From 32abd8ea7c3053d38ae5befa7a22434622c73df2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 00:49:32 +0800 Subject: [PATCH] chore: run go generate --- core_CacheLineSize.go | 24 +- core_EUCount.go | 24 +- core_PCIProperties.go | 100 +- core_RTAS.go | 1328 ++++++------- core_RTASBuilder.go | 1230 ++++++------ core_SRGB.go | 24 +- core_bandwidth.go | 52 +- core_barrier.go | 233 ++- core_bfloat16conversions.go | 8 +- core_bindlessimages.go | 203 +- core_cacheReservation.go | 157 +- core_callbacks.go | 2691 +++++++++++++------------- core_cmdlist.go | 754 ++++---- core_cmdqueue.go | 444 ++--- core_commandListClone.go | 80 +- core_common.go | 418 ++-- core_context.go | 254 +-- core_copy.go | 1040 +++++----- core_counterbasedeventpool.go | 25 +- core_device.go | 1405 +++++++------- core_deviceLUID.go | 26 +- core_deviceVectorSizes.go | 112 +- core_deviceipversion.go | 22 +- core_deviceusablememproperties.go | 22 +- core_driver.go | 743 +++---- core_driverDDIHandles.go | 29 +- core_event.go | 1759 ++++++++--------- core_eventQueryKernelTimestamps.go | 137 +- core_eventquerytimestamps.go | 88 +- core_externalMemMap.go | 30 +- core_externalSemaphores.go | 337 ++-- core_fabric.go | 520 ++--- core_fence.go | 322 +-- core_floatAtomics.go | 43 +- core_globaloffset.go | 64 +- core_image.go | 395 ++-- core_imageCopy.go | 256 +-- core_imageFormatSupport.go | 32 +- core_imageQueryAllocProperties.go | 68 +- core_imagememoryproperties.go | 80 +- core_imageview.go | 215 +- core_imageviewplanar.go | 27 +- core_immediateCommandListAppend.go | 76 +- core_ipcMemHandleType.go | 97 +- core_kernelAllocationProperties.go | 76 +- core_kernelBinary.go | 68 +- core_kernelMaxGroupSizeProperties.go | 24 +- core_kernelSchedulingHints.go | 115 +- core_linkageInspection.go | 97 +- core_linkonceodr.go | 8 +- core_memory.go | 1256 ++++++------ core_memoryCompressionHints.go | 39 +- core_memoryFreePolicies.go | 109 +- core_memoryProperties.go | 85 +- core_module.go | 2076 ++++++++++---------- core_mutableCommandList.go | 548 +++--- core_powersavinghint.go | 21 +- core_program.go | 44 +- core_raytracing.go | 52 +- core_relaxedAllocLimits.go | 33 +- core_residency.go | 243 ++- core_sampler.go | 157 +- core_subAllocationsProperties.go | 28 +- core_subgroups.go | 8 +- core_virtual.go | 735 +++---- examples/vadd/main.ll | 57 +- rntm_common.go | 170 +- sysm_Overclock.go | 1033 +++++----- sysm_common.go | 144 +- sysm_device.go | 843 ++++---- sysm_diagnostics.go | 264 +-- sysm_driver.go | 246 +-- sysm_ecc.go | 255 +-- sysm_eccState.go | 16 +- sysm_engine.go | 240 +-- sysm_engineActivity.go | 82 +- sysm_events.go | 220 +-- sysm_fabric.go | 594 +++--- sysm_fan.go | 433 ++--- sysm_firmware.go | 287 ++- sysm_firmwareSecurityVersion.go | 110 +- sysm_frequency.go | 1200 ++++++------ sysm_led.go | 281 ++- sysm_memPageOfflineState.go | 26 +- sysm_memory.go | 344 ++-- sysm_memoryBwCounterValidBits.go | 30 +- sysm_pciLinkSpeedDowngrade.go | 90 +- sysm_performance.go | 223 ++- sysm_power.go | 605 +++--- sysm_powerDomainProperties.go | 26 +- sysm_powerLimits.go | 182 +- sysm_psu.go | 188 +- sysm_ras.go | 405 ++-- sysm_rasState.go | 157 +- sysm_scheduler.go | 580 +++--- sysm_standby.go | 229 +-- sysm_sysmanDeviceMapping.go | 130 +- sysm_temperature.go | 356 ++-- sysm_virtualFunctionManagement.go | 722 +++---- tols_GlobalTimestamps.go | 86 +- tols_common.go | 75 +- tols_concurrentMetricGroup.go | 60 +- tols_debug.go | 764 ++++---- tols_metric.go | 1197 ++++++------ tols_metricExportData.go | 170 +- tols_metricExportMemory.go | 30 +- tols_metricGroupMarker.go | 68 +- tols_metricProgrammable.go | 914 ++++----- tols_metricRuntimeEnableDisable.go | 126 +- tols_metricTracer.go | 526 ++--- tols_module.go | 74 +- tols_multiMetricValues.go | 94 +- tols_pin.go | 93 +- tols_tracing.go | 326 ++-- 114 files changed, 18652 insertions(+), 18535 deletions(-) diff --git a/core_CacheLineSize.go b/core_CacheLineSize.go index c258e03..058df26 100644 --- a/core_CacheLineSize.go +++ b/core_CacheLineSize.go @@ -22,23 +22,23 @@ const ZE_CACHELINE_SIZE_EXT_NAME = "ZE_extension_device_cache_line_size" // ZeDeviceCacheLineSizeExtVersion (ze_device_cache_line_size_ext_version_t) CacheLine Size Extension Version(s) type ZeDeviceCacheLineSizeExtVersion uintptr + const ( - ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_1_0 ZeDeviceCacheLineSizeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_1_0 version 1.0 - ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_CURRENT ZeDeviceCacheLineSizeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_CURRENT latest known version - ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_FORCE_UINT32 ZeDeviceCacheLineSizeExtVersion = 0x7fffffff // ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_* ENUMs + ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_1_0 ZeDeviceCacheLineSizeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_1_0 version 1.0 + ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_CURRENT ZeDeviceCacheLineSizeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_CURRENT latest known version + ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_FORCE_UINT32 ZeDeviceCacheLineSizeExtVersion = 0x7fffffff // ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_CACHE_LINE_SIZE_EXT_VERSION_* ENUMs ) // ZeDeviceCacheLineSizeExt (ze_device_cache_line_size_ext_t) CacheLine Size queried using ::zeDeviceGetCacheProperties -/// -/// @details -/// - This structure may be returned from ::zeDeviceGetCacheProperties via -/// the `pNext` member of ::ze_device_cache_properties_t. -/// - Used for determining the cache line size supported on a device. +// / +// / @details +// / - This structure may be returned from ::zeDeviceGetCacheProperties via +// / the `pNext` member of ::ze_device_cache_properties_t. +// / - Used for determining the cache line size supported on a device. type ZeDeviceCacheLineSizeExt struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Cachelinesize uintptr // Cachelinesize [out] The cache line size in bytes. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Cachelinesize uintptr // Cachelinesize [out] The cache line size in bytes. } - diff --git a/core_EUCount.go b/core_EUCount.go index bd3917b..cae10f8 100644 --- a/core_EUCount.go +++ b/core_EUCount.go @@ -22,23 +22,23 @@ const ZE_EU_COUNT_EXT_NAME = "ZE_extension_eu_count" // ZeEuCountExtVersion (ze_eu_count_ext_version_t) EU Count Extension Version(s) type ZeEuCountExtVersion uintptr + const ( - ZE_EU_COUNT_EXT_VERSION_1_0 ZeEuCountExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EU_COUNT_EXT_VERSION_1_0 version 1.0 - ZE_EU_COUNT_EXT_VERSION_CURRENT ZeEuCountExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EU_COUNT_EXT_VERSION_CURRENT latest known version - ZE_EU_COUNT_EXT_VERSION_FORCE_UINT32 ZeEuCountExtVersion = 0x7fffffff // ZE_EU_COUNT_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_EU_COUNT_EXT_VERSION_* ENUMs + ZE_EU_COUNT_EXT_VERSION_1_0 ZeEuCountExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EU_COUNT_EXT_VERSION_1_0 version 1.0 + ZE_EU_COUNT_EXT_VERSION_CURRENT ZeEuCountExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EU_COUNT_EXT_VERSION_CURRENT latest known version + ZE_EU_COUNT_EXT_VERSION_FORCE_UINT32 ZeEuCountExtVersion = 0x7fffffff // ZE_EU_COUNT_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_EU_COUNT_EXT_VERSION_* ENUMs ) // ZeEuCountExt (ze_eu_count_ext_t) EU count queried using ::zeDeviceGetProperties -/// -/// @details -/// - This structure may be returned from ::zeDeviceGetProperties via the -/// `pNext` member of ::ze_device_properties_t. -/// - Used for determining the total number of EUs available on device. +// / +// / @details +// / - This structure may be returned from ::zeDeviceGetProperties via the +// / `pNext` member of ::ze_device_properties_t. +// / - Used for determining the total number of EUs available on device. type ZeEuCountExt struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Numtotaleus uint32 // Numtotaleus [out] Total number of EUs available + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Numtotaleus uint32 // Numtotaleus [out] Total number of EUs available } - diff --git a/core_PCIProperties.go b/core_PCIProperties.go index ecd184a..5fa7095 100644 --- a/core_PCIProperties.go +++ b/core_PCIProperties.go @@ -24,77 +24,77 @@ const ZE_PCI_PROPERTIES_EXT_NAME = "ZE_extension_pci_properties" // ZePciPropertiesExtVersion (ze_pci_properties_ext_version_t) PCI Properties Extension Version(s) type ZePciPropertiesExtVersion uintptr + const ( - ZE_PCI_PROPERTIES_EXT_VERSION_1_0 ZePciPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_PCI_PROPERTIES_EXT_VERSION_1_0 version 1.0 - ZE_PCI_PROPERTIES_EXT_VERSION_CURRENT ZePciPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_PCI_PROPERTIES_EXT_VERSION_CURRENT latest known version - ZE_PCI_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZePciPropertiesExtVersion = 0x7fffffff // ZE_PCI_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_PCI_PROPERTIES_EXT_VERSION_* ENUMs + ZE_PCI_PROPERTIES_EXT_VERSION_1_0 ZePciPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_PCI_PROPERTIES_EXT_VERSION_1_0 version 1.0 + ZE_PCI_PROPERTIES_EXT_VERSION_CURRENT ZePciPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_PCI_PROPERTIES_EXT_VERSION_CURRENT latest known version + ZE_PCI_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZePciPropertiesExtVersion = 0x7fffffff // ZE_PCI_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_PCI_PROPERTIES_EXT_VERSION_* ENUMs ) // ZePciAddressExt (ze_pci_address_ext_t) Device PCI address -/// -/// @details -/// - This structure may be passed to ::zeDevicePciGetPropertiesExt as an -/// attribute of ::ze_pci_ext_properties_t. -/// - A PCI BDF address is the bus:device:function address of the device and -/// is useful for locating the device in the PCI switch fabric. +// / +// / @details +// / - This structure may be passed to ::zeDevicePciGetPropertiesExt as an +// / attribute of ::ze_pci_ext_properties_t. +// / - A PCI BDF address is the bus:device:function address of the device and +// / is useful for locating the device in the PCI switch fabric. type ZePciAddressExt struct { - Domain uint32 // Domain [out] PCI domain number - Bus uint32 // Bus [out] PCI BDF bus number - Device uint32 // Device [out] PCI BDF device number - Function uint32 // Function [out] PCI BDF function number + Domain uint32 // Domain [out] PCI domain number + Bus uint32 // Bus [out] PCI BDF bus number + Device uint32 // Device [out] PCI BDF device number + Function uint32 // Function [out] PCI BDF function number } // ZePciSpeedExt (ze_pci_speed_ext_t) Device PCI speed type ZePciSpeedExt struct { - Genversion int32 // Genversion [out] The link generation. A value of -1 means that this property is unknown. - Width int32 // Width [out] The number of lanes. A value of -1 means that this property is unknown. - Maxbandwidth int64 // Maxbandwidth [out] The theoretical maximum bandwidth in bytes/sec (sum of all lanes). A value of -1 means that this property is unknown. + Genversion int32 // Genversion [out] The link generation. A value of -1 means that this property is unknown. + Width int32 // Width [out] The number of lanes. A value of -1 means that this property is unknown. + Maxbandwidth int64 // Maxbandwidth [out] The theoretical maximum bandwidth in bytes/sec (sum of all lanes). A value of -1 means that this property is unknown. } // ZePciExtProperties (ze_pci_ext_properties_t) Static PCI properties type ZePciExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Address ZePciAddressExt // Address [out] The BDF address - Maxspeed ZePciSpeedExt // Maxspeed [out] Fastest port configuration supported by the device (sum of all lanes) + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Address ZePciAddressExt // Address [out] The BDF address + Maxspeed ZePciSpeedExt // Maxspeed [out] Fastest port configuration supported by the device (sum of all lanes) } // ZeDevicePciGetPropertiesExt Get PCI properties - address, max speed -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - None -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pPciProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - None +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pPciProperties` func ZeDevicePciGetPropertiesExt( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device object. - pPciProperties *ZePciExtProperties, // pPciProperties [in,out] returns the PCI properties of the device. + hDevice ZeDeviceHandle, // hDevice [in] handle of the device object. + pPciProperties *ZePciExtProperties, // pPciProperties [in,out] returns the PCI properties of the device. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDevicePciGetPropertiesExt", uintptr(hDevice), uintptr(unsafe.Pointer(pPciProperties))) } - diff --git a/core_RTAS.go b/core_RTAS.go index 294529c..61b77cf 100644 --- a/core_RTAS.go +++ b/core_RTAS.go @@ -24,914 +24,924 @@ const ZE_RTAS_EXT_NAME = "ZE_extension_rtas" // ZeRtasBuilderExtVersion (ze_rtas_builder_ext_version_t) Ray Tracing Acceleration Structure Builder Extension Version(s) type ZeRtasBuilderExtVersion uintptr + const ( - ZE_RTAS_BUILDER_EXT_VERSION_1_0 ZeRtasBuilderExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_RTAS_BUILDER_EXT_VERSION_1_0 version 1.0 - ZE_RTAS_BUILDER_EXT_VERSION_CURRENT ZeRtasBuilderExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_RTAS_BUILDER_EXT_VERSION_CURRENT latest known version - ZE_RTAS_BUILDER_EXT_VERSION_FORCE_UINT32 ZeRtasBuilderExtVersion = 0x7fffffff // ZE_RTAS_BUILDER_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_EXT_VERSION_* ENUMs + ZE_RTAS_BUILDER_EXT_VERSION_1_0 ZeRtasBuilderExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_RTAS_BUILDER_EXT_VERSION_1_0 version 1.0 + ZE_RTAS_BUILDER_EXT_VERSION_CURRENT ZeRtasBuilderExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_RTAS_BUILDER_EXT_VERSION_CURRENT latest known version + ZE_RTAS_BUILDER_EXT_VERSION_FORCE_UINT32 ZeRtasBuilderExtVersion = 0x7fffffff // ZE_RTAS_BUILDER_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_EXT_VERSION_* ENUMs ) // ZeRtasDeviceExtFlags (ze_rtas_device_ext_flags_t) Ray tracing acceleration structure device flags type ZeRtasDeviceExtFlags uint32 + const ( - ZE_RTAS_DEVICE_EXT_FLAG_RESERVED ZeRtasDeviceExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_DEVICE_EXT_FLAG_RESERVED reserved for future use - ZE_RTAS_DEVICE_EXT_FLAG_FORCE_UINT32 ZeRtasDeviceExtFlags = 0x7fffffff // ZE_RTAS_DEVICE_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_DEVICE_EXT_FLAG_* ENUMs + ZE_RTAS_DEVICE_EXT_FLAG_RESERVED ZeRtasDeviceExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RTAS_DEVICE_EXT_FLAG_RESERVED reserved for future use + ZE_RTAS_DEVICE_EXT_FLAG_FORCE_UINT32 ZeRtasDeviceExtFlags = 0x7fffffff // ZE_RTAS_DEVICE_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_DEVICE_EXT_FLAG_* ENUMs ) // ZeRtasFormatExt (ze_rtas_format_ext_t) Ray tracing acceleration structure format -/// -/// @details -/// - This is an opaque ray tracing acceleration structure format -/// identifier. +// / +// / @details +// / - This is an opaque ray tracing acceleration structure format +// / identifier. type ZeRtasFormatExt uintptr + const ( - ZE_RTAS_FORMAT_EXT_INVALID ZeRtasFormatExt = 0x0 // ZE_RTAS_FORMAT_EXT_INVALID Invalid acceleration structure format code - ZE_RTAS_FORMAT_EXT_MAX ZeRtasFormatExt = 0x7ffffffe // ZE_RTAS_FORMAT_EXT_MAX Maximum acceleration structure format code - ZE_RTAS_FORMAT_EXT_FORCE_UINT32 ZeRtasFormatExt = 0x7fffffff // ZE_RTAS_FORMAT_EXT_FORCE_UINT32 Value marking end of ZE_RTAS_FORMAT_EXT_* ENUMs + ZE_RTAS_FORMAT_EXT_INVALID ZeRtasFormatExt = 0x0 // ZE_RTAS_FORMAT_EXT_INVALID Invalid acceleration structure format code + ZE_RTAS_FORMAT_EXT_MAX ZeRtasFormatExt = 0x7ffffffe // ZE_RTAS_FORMAT_EXT_MAX Maximum acceleration structure format code + ZE_RTAS_FORMAT_EXT_FORCE_UINT32 ZeRtasFormatExt = 0x7fffffff // ZE_RTAS_FORMAT_EXT_FORCE_UINT32 Value marking end of ZE_RTAS_FORMAT_EXT_* ENUMs ) // ZeRtasBuilderExtFlags (ze_rtas_builder_ext_flags_t) Ray tracing acceleration structure builder flags type ZeRtasBuilderExtFlags uint32 + const ( - ZE_RTAS_BUILDER_EXT_FLAG_RESERVED ZeRtasBuilderExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_BUILDER_EXT_FLAG_RESERVED Reserved for future use - ZE_RTAS_BUILDER_EXT_FLAG_FORCE_UINT32 ZeRtasBuilderExtFlags = 0x7fffffff // ZE_RTAS_BUILDER_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_EXT_FLAG_* ENUMs + ZE_RTAS_BUILDER_EXT_FLAG_RESERVED ZeRtasBuilderExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RTAS_BUILDER_EXT_FLAG_RESERVED Reserved for future use + ZE_RTAS_BUILDER_EXT_FLAG_FORCE_UINT32 ZeRtasBuilderExtFlags = 0x7fffffff // ZE_RTAS_BUILDER_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_EXT_FLAG_* ENUMs ) // ZeRtasParallelOperationExtFlags (ze_rtas_parallel_operation_ext_flags_t) Ray tracing acceleration structure builder parallel operation flags type ZeRtasParallelOperationExtFlags uint32 + const ( - ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_RESERVED ZeRtasParallelOperationExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_RESERVED Reserved for future use - ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_FORCE_UINT32 ZeRtasParallelOperationExtFlags = 0x7fffffff // ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_* ENUMs + ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_RESERVED ZeRtasParallelOperationExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_RESERVED Reserved for future use + ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_FORCE_UINT32 ZeRtasParallelOperationExtFlags = 0x7fffffff // ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_PARALLEL_OPERATION_EXT_FLAG_* ENUMs ) // ZeRtasBuilderGeometryExtFlags (ze_rtas_builder_geometry_ext_flags_t) Ray tracing acceleration structure builder geometry flags type ZeRtasBuilderGeometryExtFlags uint32 + const ( - ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_NON_OPAQUE ZeRtasBuilderGeometryExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_NON_OPAQUE non-opaque geometries invoke an any-hit shader - ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_FORCE_UINT32 ZeRtasBuilderGeometryExtFlags = 0x7fffffff // ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_* ENUMs + ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_NON_OPAQUE ZeRtasBuilderGeometryExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_NON_OPAQUE non-opaque geometries invoke an any-hit shader + ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_FORCE_UINT32 ZeRtasBuilderGeometryExtFlags = 0x7fffffff // ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_GEOMETRY_EXT_FLAG_* ENUMs ) // ZeRtasBuilderPackedGeometryExtFlags (ze_rtas_builder_packed_geometry_ext_flags_t) Packed ray tracing acceleration structure builder geometry flags (see -/// ::ze_rtas_builder_geometry_ext_flags_t) +// / ::ze_rtas_builder_geometry_ext_flags_t) type ZeRtasBuilderPackedGeometryExtFlags uint8 // ZeRtasBuilderInstanceExtFlags (ze_rtas_builder_instance_ext_flags_t) Ray tracing acceleration structure builder instance flags type ZeRtasBuilderInstanceExtFlags uint32 + const ( - ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_CULL_DISABLE ZeRtasBuilderInstanceExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_CULL_DISABLE disables culling of front-facing and back-facing triangles - ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE ZeRtasBuilderInstanceExtFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE reverses front and back face of triangles - ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FORCE_OPAQUE ZeRtasBuilderInstanceExtFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FORCE_OPAQUE forces instanced geometry to be opaque, unless ray flag forces it to + ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_CULL_DISABLE ZeRtasBuilderInstanceExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_CULL_DISABLE disables culling of front-facing and back-facing triangles + ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE ZeRtasBuilderInstanceExtFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE reverses front and back face of triangles + ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FORCE_OPAQUE ZeRtasBuilderInstanceExtFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FORCE_OPAQUE forces instanced geometry to be opaque, unless ray flag forces it to ///< be non-opaque - ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FORCE_NON_OPAQUE ZeRtasBuilderInstanceExtFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FORCE_NON_OPAQUE forces instanced geometry to be non-opaque, unless ray flag forces it + ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FORCE_NON_OPAQUE ZeRtasBuilderInstanceExtFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_TRIANGLE_FORCE_NON_OPAQUE forces instanced geometry to be non-opaque, unless ray flag forces it ///< to be opaque - ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_FORCE_UINT32 ZeRtasBuilderInstanceExtFlags = 0x7fffffff // ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_* ENUMs + ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_FORCE_UINT32 ZeRtasBuilderInstanceExtFlags = 0x7fffffff // ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_INSTANCE_EXT_FLAG_* ENUMs ) // ZeRtasBuilderPackedInstanceExtFlags (ze_rtas_builder_packed_instance_ext_flags_t) Packed ray tracing acceleration structure builder instance flags (see -/// ::ze_rtas_builder_instance_ext_flags_t) +// / ::ze_rtas_builder_instance_ext_flags_t) type ZeRtasBuilderPackedInstanceExtFlags uint8 // ZeRtasBuilderBuildOpExtFlags (ze_rtas_builder_build_op_ext_flags_t) Ray tracing acceleration structure builder build operation flags -/// -/// @details -/// - These flags allow the application to tune the acceleration structure -/// build operation. -/// - The acceleration structure builder implementation might choose to use -/// spatial splitting to split large or long primitives into smaller -/// pieces. This may result in any-hit shaders being invoked multiple -/// times for non-opaque primitives, unless -/// ::ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION is specified. -/// - Usage of any of these flags may reduce ray tracing performance. +// / +// / @details +// / - These flags allow the application to tune the acceleration structure +// / build operation. +// / - The acceleration structure builder implementation might choose to use +// / spatial splitting to split large or long primitives into smaller +// / pieces. This may result in any-hit shaders being invoked multiple +// / times for non-opaque primitives, unless +// / ::ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION is specified. +// / - Usage of any of these flags may reduce ray tracing performance. type ZeRtasBuilderBuildOpExtFlags uint32 + const ( - ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_COMPACT ZeRtasBuilderBuildOpExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_COMPACT build more compact acceleration structure - ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION ZeRtasBuilderBuildOpExtFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION guarantees single any-hit shader invocation per primitive - ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_FORCE_UINT32 ZeRtasBuilderBuildOpExtFlags = 0x7fffffff // ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_* ENUMs + ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_COMPACT ZeRtasBuilderBuildOpExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_COMPACT build more compact acceleration structure + ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION ZeRtasBuilderBuildOpExtFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION guarantees single any-hit shader invocation per primitive + ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_FORCE_UINT32 ZeRtasBuilderBuildOpExtFlags = 0x7fffffff // ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_BUILD_OP_EXT_FLAG_* ENUMs ) // ZeRtasBuilderBuildQualityHintExt (ze_rtas_builder_build_quality_hint_ext_t) Ray tracing acceleration structure builder build quality hint -/// -/// @details -/// - Depending on use case different quality modes for acceleration -/// structure build are supported. -/// - A low-quality build builds an acceleration structure fast, but at the -/// cost of some reduction in ray tracing performance. This mode is -/// recommended for dynamic content, such as animated characters. -/// - A medium-quality build uses a compromise between build quality and ray -/// tracing performance. This mode should be used by default. -/// - Higher ray tracing performance can be achieved by using a high-quality -/// build, but acceleration structure build performance might be -/// significantly reduced. +// / +// / @details +// / - Depending on use case different quality modes for acceleration +// / structure build are supported. +// / - A low-quality build builds an acceleration structure fast, but at the +// / cost of some reduction in ray tracing performance. This mode is +// / recommended for dynamic content, such as animated characters. +// / - A medium-quality build uses a compromise between build quality and ray +// / tracing performance. This mode should be used by default. +// / - Higher ray tracing performance can be achieved by using a high-quality +// / build, but acceleration structure build performance might be +// / significantly reduced. type ZeRtasBuilderBuildQualityHintExt uintptr + const ( - ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_LOW ZeRtasBuilderBuildQualityHintExt = 0 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_LOW build low-quality acceleration structure (fast) - ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_MEDIUM ZeRtasBuilderBuildQualityHintExt = 1 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_MEDIUM build medium-quality acceleration structure (slower) - ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH ZeRtasBuilderBuildQualityHintExt = 2 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH build high-quality acceleration structure (slow) - ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_FORCE_UINT32 ZeRtasBuilderBuildQualityHintExt = 0x7fffffff // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_* ENUMs + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_LOW ZeRtasBuilderBuildQualityHintExt = 0 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_LOW build low-quality acceleration structure (fast) + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_MEDIUM ZeRtasBuilderBuildQualityHintExt = 1 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_MEDIUM build medium-quality acceleration structure (slower) + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH ZeRtasBuilderBuildQualityHintExt = 2 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH build high-quality acceleration structure (slow) + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_FORCE_UINT32 ZeRtasBuilderBuildQualityHintExt = 0x7fffffff // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_* ENUMs ) // ZeRtasBuilderGeometryTypeExt (ze_rtas_builder_geometry_type_ext_t) Ray tracing acceleration structure builder geometry type type ZeRtasBuilderGeometryTypeExt uintptr + const ( - ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_TRIANGLES ZeRtasBuilderGeometryTypeExt = 0 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_TRIANGLES triangle mesh geometry type - ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_QUADS ZeRtasBuilderGeometryTypeExt = 1 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_QUADS quad mesh geometry type - ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_PROCEDURAL ZeRtasBuilderGeometryTypeExt = 2 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_PROCEDURAL procedural geometry type - ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_INSTANCE ZeRtasBuilderGeometryTypeExt = 3 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_INSTANCE instance geometry type - ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_FORCE_UINT32 ZeRtasBuilderGeometryTypeExt = 0x7fffffff // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_* ENUMs + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_TRIANGLES ZeRtasBuilderGeometryTypeExt = 0 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_TRIANGLES triangle mesh geometry type + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_QUADS ZeRtasBuilderGeometryTypeExt = 1 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_QUADS quad mesh geometry type + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_PROCEDURAL ZeRtasBuilderGeometryTypeExt = 2 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_PROCEDURAL procedural geometry type + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_INSTANCE ZeRtasBuilderGeometryTypeExt = 3 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_INSTANCE instance geometry type + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_FORCE_UINT32 ZeRtasBuilderGeometryTypeExt = 0x7fffffff // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_* ENUMs ) // ZeRtasBuilderPackedGeometryTypeExt (ze_rtas_builder_packed_geometry_type_ext_t) Packed ray tracing acceleration structure builder geometry type (see -/// ::ze_rtas_builder_geometry_type_ext_t) +// / ::ze_rtas_builder_geometry_type_ext_t) type ZeRtasBuilderPackedGeometryTypeExt uint8 // ZeRtasBuilderInputDataFormatExt (ze_rtas_builder_input_data_format_ext_t) Ray tracing acceleration structure data buffer element format -/// -/// @details -/// - Specifies the format of data buffer elements. -/// - Data buffers may contain instancing transform matrices, triangle/quad -/// vertex indices, etc... +// / +// / @details +// / - Specifies the format of data buffer elements. +// / - Data buffers may contain instancing transform matrices, triangle/quad +// / vertex indices, etc... type ZeRtasBuilderInputDataFormatExt uintptr + const ( - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 ZeRtasBuilderInputDataFormatExt = 0 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 3-component float vector (see ::ze_rtas_float3_ext_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_COLUMN_MAJOR ZeRtasBuilderInputDataFormatExt = 1 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_COLUMN_MAJOR 3x4 affine transformation in column-major format (see + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 ZeRtasBuilderInputDataFormatExt = 0 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 3-component float vector (see ::ze_rtas_float3_ext_t) + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_COLUMN_MAJOR ZeRtasBuilderInputDataFormatExt = 1 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_COLUMN_MAJOR 3x4 affine transformation in column-major format (see ///< ::ze_rtas_transform_float3x4_column_major_ext_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_ALIGNED_COLUMN_MAJOR ZeRtasBuilderInputDataFormatExt = 2 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_ALIGNED_COLUMN_MAJOR 3x4 affine transformation in column-major format (see + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_ALIGNED_COLUMN_MAJOR ZeRtasBuilderInputDataFormatExt = 2 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_ALIGNED_COLUMN_MAJOR 3x4 affine transformation in column-major format (see ///< ::ze_rtas_transform_float3x4_aligned_column_major_ext_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_ROW_MAJOR ZeRtasBuilderInputDataFormatExt = 3 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_ROW_MAJOR 3x4 affine transformation in row-major format (see + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_ROW_MAJOR ZeRtasBuilderInputDataFormatExt = 3 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3X4_ROW_MAJOR 3x4 affine transformation in row-major format (see ///< ::ze_rtas_transform_float3x4_row_major_ext_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_AABB ZeRtasBuilderInputDataFormatExt = 4 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_AABB 3-dimensional axis-aligned bounding-box (see ::ze_rtas_aabb_ext_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_TRIANGLE_INDICES_UINT32 ZeRtasBuilderInputDataFormatExt = 5 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_TRIANGLE_INDICES_UINT32 Unsigned 32-bit triangle indices (see + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_AABB ZeRtasBuilderInputDataFormatExt = 4 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_AABB 3-dimensional axis-aligned bounding-box (see ::ze_rtas_aabb_ext_t) + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_TRIANGLE_INDICES_UINT32 ZeRtasBuilderInputDataFormatExt = 5 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_TRIANGLE_INDICES_UINT32 Unsigned 32-bit triangle indices (see ///< ::ze_rtas_triangle_indices_uint32_ext_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_QUAD_INDICES_UINT32 ZeRtasBuilderInputDataFormatExt = 6 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_QUAD_INDICES_UINT32 Unsigned 32-bit quad indices (see ::ze_rtas_quad_indices_uint32_ext_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FORCE_UINT32 ZeRtasBuilderInputDataFormatExt = 0x7fffffff // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_* ENUMs + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_QUAD_INDICES_UINT32 ZeRtasBuilderInputDataFormatExt = 6 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_QUAD_INDICES_UINT32 Unsigned 32-bit quad indices (see ::ze_rtas_quad_indices_uint32_ext_t) + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FORCE_UINT32 ZeRtasBuilderInputDataFormatExt = 0x7fffffff // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_* ENUMs ) // ZeRtasBuilderPackedInputDataFormatExt (ze_rtas_builder_packed_input_data_format_ext_t) Packed ray tracing acceleration structure data buffer element format -/// (see ::ze_rtas_builder_input_data_format_ext_t) +// / (see ::ze_rtas_builder_input_data_format_ext_t) type ZeRtasBuilderPackedInputDataFormatExt uint8 // ZeRtasBuilderExtHandle (ze_rtas_builder_ext_handle_t) Handle of ray tracing acceleration structure builder object type ZeRtasBuilderExtHandle uintptr // ZeRtasParallelOperationExtHandle (ze_rtas_parallel_operation_ext_handle_t) Handle of ray tracing acceleration structure builder parallel -/// operation object +// / operation object type ZeRtasParallelOperationExtHandle uintptr // ZeRtasBuilderExtDesc (ze_rtas_builder_ext_desc_t) Ray tracing acceleration structure builder descriptor type ZeRtasBuilderExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Builderversion ZeRtasBuilderExtVersion // Builderversion [in] ray tracing acceleration structure builder version + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Builderversion ZeRtasBuilderExtVersion // Builderversion [in] ray tracing acceleration structure builder version } // ZeRtasBuilderExtProperties (ze_rtas_builder_ext_properties_t) Ray tracing acceleration structure builder properties type ZeRtasBuilderExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeRtasBuilderExtFlags // Flags [out] ray tracing acceleration structure builder flags - Rtasbuffersizebytesexpected uintptr // Rtasbuffersizebytesexpected [out] expected size (in bytes) required for acceleration structure buffer - When using an acceleration structure buffer of this size, the build is expected to succeed; however, it is possible that the build may fail with ::ZE_RESULT_EXT_RTAS_BUILD_RETRY - Rtasbuffersizebytesmaxrequired uintptr // Rtasbuffersizebytesmaxrequired [out] worst-case size (in bytes) required for acceleration structure buffer - When using an acceleration structure buffer of this size, the build is guaranteed to not run out of memory. - Scratchbuffersizebytes uintptr // Scratchbuffersizebytes [out] scratch buffer size (in bytes) required for acceleration structure build. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeRtasBuilderExtFlags // Flags [out] ray tracing acceleration structure builder flags + Rtasbuffersizebytesexpected uintptr // Rtasbuffersizebytesexpected [out] expected size (in bytes) required for acceleration structure buffer - When using an acceleration structure buffer of this size, the build is expected to succeed; however, it is possible that the build may fail with ::ZE_RESULT_EXT_RTAS_BUILD_RETRY + Rtasbuffersizebytesmaxrequired uintptr // Rtasbuffersizebytesmaxrequired [out] worst-case size (in bytes) required for acceleration structure buffer - When using an acceleration structure buffer of this size, the build is guaranteed to not run out of memory. + Scratchbuffersizebytes uintptr // Scratchbuffersizebytes [out] scratch buffer size (in bytes) required for acceleration structure build. } // ZeRtasParallelOperationExtProperties (ze_rtas_parallel_operation_ext_properties_t) Ray tracing acceleration structure builder parallel operation -/// properties +// / properties type ZeRtasParallelOperationExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeRtasParallelOperationExtFlags // Flags [out] ray tracing acceleration structure builder parallel operation flags - Maxconcurrency uint32 // Maxconcurrency [out] maximum number of threads that may join the parallel operation + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeRtasParallelOperationExtFlags // Flags [out] ray tracing acceleration structure builder parallel operation flags + Maxconcurrency uint32 // Maxconcurrency [out] maximum number of threads that may join the parallel operation } // ZeRtasDeviceExtProperties (ze_rtas_device_ext_properties_t) Ray tracing acceleration structure device properties -/// -/// @details -/// - This structure may be passed to ::zeDeviceGetProperties, via `pNext` -/// member of ::ze_device_properties_t. -/// - The implementation shall populate `format` with a value other than -/// ::ZE_RTAS_FORMAT_EXT_INVALID when the device supports ray tracing. +// / +// / @details +// / - This structure may be passed to ::zeDeviceGetProperties, via `pNext` +// / member of ::ze_device_properties_t. +// / - The implementation shall populate `format` with a value other than +// / ::ZE_RTAS_FORMAT_EXT_INVALID when the device supports ray tracing. type ZeRtasDeviceExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeRtasDeviceExtFlags // Flags [out] ray tracing acceleration structure device flags - Rtasformat ZeRtasFormatExt // Rtasformat [out] ray tracing acceleration structure format - Rtasbufferalignment uint32 // Rtasbufferalignment [out] required alignment of acceleration structure buffer + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeRtasDeviceExtFlags // Flags [out] ray tracing acceleration structure device flags + Rtasformat ZeRtasFormatExt // Rtasformat [out] ray tracing acceleration structure format + Rtasbufferalignment uint32 // Rtasbufferalignment [out] required alignment of acceleration structure buffer } // ZeRtasFloat3Ext (ze_rtas_float3_ext_t) A 3-component vector type type ZeRtasFloat3Ext struct { - X float32 // X [in] x-coordinate of float3 vector - Y float32 // Y [in] y-coordinate of float3 vector - Z float32 // Z [in] z-coordinate of float3 vector + X float32 // X [in] x-coordinate of float3 vector + Y float32 // Y [in] y-coordinate of float3 vector + Z float32 // Z [in] z-coordinate of float3 vector } // ZeRtasTransformFloat3x4ColumnMajorExt (ze_rtas_transform_float3x4_column_major_ext_t) 3x4 affine transformation in column-major layout -/// -/// @details -/// - A 3x4 affine transformation in column major layout, consisting of vectors -/// - vx=(vx_x, vx_y, vx_z), -/// - vy=(vy_x, vy_y, vy_z), -/// - vz=(vz_x, vz_y, vz_z), and -/// - p=(p_x, p_y, p_z) -/// - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + -/// z*vz + p`. +// / +// / @details +// / - A 3x4 affine transformation in column major layout, consisting of vectors +// / - vx=(vx_x, vx_y, vx_z), +// / - vy=(vy_x, vy_y, vy_z), +// / - vz=(vz_x, vz_y, vz_z), and +// / - p=(p_x, p_y, p_z) +// / - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +// / z*vz + p`. type ZeRtasTransformFloat3x4ColumnMajorExt struct { - VxX float32 // VxX [in] element 0 of column 0 of 3x4 matrix - VxY float32 // VxY [in] element 1 of column 0 of 3x4 matrix - VxZ float32 // VxZ [in] element 2 of column 0 of 3x4 matrix - VyX float32 // VyX [in] element 0 of column 1 of 3x4 matrix - VyY float32 // VyY [in] element 1 of column 1 of 3x4 matrix - VyZ float32 // VyZ [in] element 2 of column 1 of 3x4 matrix - VzX float32 // VzX [in] element 0 of column 2 of 3x4 matrix - VzY float32 // VzY [in] element 1 of column 2 of 3x4 matrix - VzZ float32 // VzZ [in] element 2 of column 2 of 3x4 matrix - PX float32 // PX [in] element 0 of column 3 of 3x4 matrix - PY float32 // PY [in] element 1 of column 3 of 3x4 matrix - PZ float32 // PZ [in] element 2 of column 3 of 3x4 matrix + VxX float32 // VxX [in] element 0 of column 0 of 3x4 matrix + VxY float32 // VxY [in] element 1 of column 0 of 3x4 matrix + VxZ float32 // VxZ [in] element 2 of column 0 of 3x4 matrix + VyX float32 // VyX [in] element 0 of column 1 of 3x4 matrix + VyY float32 // VyY [in] element 1 of column 1 of 3x4 matrix + VyZ float32 // VyZ [in] element 2 of column 1 of 3x4 matrix + VzX float32 // VzX [in] element 0 of column 2 of 3x4 matrix + VzY float32 // VzY [in] element 1 of column 2 of 3x4 matrix + VzZ float32 // VzZ [in] element 2 of column 2 of 3x4 matrix + PX float32 // PX [in] element 0 of column 3 of 3x4 matrix + PY float32 // PY [in] element 1 of column 3 of 3x4 matrix + PZ float32 // PZ [in] element 2 of column 3 of 3x4 matrix } // ZeRtasTransformFloat3x4AlignedColumnMajorExt (ze_rtas_transform_float3x4_aligned_column_major_ext_t) 3x4 affine transformation in column-major layout with aligned column -/// vectors -/// -/// @details -/// - A 3x4 affine transformation in column major layout, consisting of vectors -/// - vx=(vx_x, vx_y, vx_z), -/// - vy=(vy_x, vy_y, vy_z), -/// - vz=(vz_x, vz_y, vz_z), and -/// - p=(p_x, p_y, p_z) -/// - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + -/// z*vz + p`. -/// - The column vectors are aligned to 16-bytes and pad members are -/// ignored. +// / vectors +// / +// / @details +// / - A 3x4 affine transformation in column major layout, consisting of vectors +// / - vx=(vx_x, vx_y, vx_z), +// / - vy=(vy_x, vy_y, vy_z), +// / - vz=(vz_x, vz_y, vz_z), and +// / - p=(p_x, p_y, p_z) +// / - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +// / z*vz + p`. +// / - The column vectors are aligned to 16-bytes and pad members are +// / ignored. type ZeRtasTransformFloat3x4AlignedColumnMajorExt struct { - VxX float32 // VxX [in] element 0 of column 0 of 3x4 matrix - VxY float32 // VxY [in] element 1 of column 0 of 3x4 matrix - VxZ float32 // VxZ [in] element 2 of column 0 of 3x4 matrix - Pad0 float32 // Pad0 [in] ignored padding - VyX float32 // VyX [in] element 0 of column 1 of 3x4 matrix - VyY float32 // VyY [in] element 1 of column 1 of 3x4 matrix - VyZ float32 // VyZ [in] element 2 of column 1 of 3x4 matrix - Pad1 float32 // Pad1 [in] ignored padding - VzX float32 // VzX [in] element 0 of column 2 of 3x4 matrix - VzY float32 // VzY [in] element 1 of column 2 of 3x4 matrix - VzZ float32 // VzZ [in] element 2 of column 2 of 3x4 matrix - Pad2 float32 // Pad2 [in] ignored padding - PX float32 // PX [in] element 0 of column 3 of 3x4 matrix - PY float32 // PY [in] element 1 of column 3 of 3x4 matrix - PZ float32 // PZ [in] element 2 of column 3 of 3x4 matrix - Pad3 float32 // Pad3 [in] ignored padding + VxX float32 // VxX [in] element 0 of column 0 of 3x4 matrix + VxY float32 // VxY [in] element 1 of column 0 of 3x4 matrix + VxZ float32 // VxZ [in] element 2 of column 0 of 3x4 matrix + Pad0 float32 // Pad0 [in] ignored padding + VyX float32 // VyX [in] element 0 of column 1 of 3x4 matrix + VyY float32 // VyY [in] element 1 of column 1 of 3x4 matrix + VyZ float32 // VyZ [in] element 2 of column 1 of 3x4 matrix + Pad1 float32 // Pad1 [in] ignored padding + VzX float32 // VzX [in] element 0 of column 2 of 3x4 matrix + VzY float32 // VzY [in] element 1 of column 2 of 3x4 matrix + VzZ float32 // VzZ [in] element 2 of column 2 of 3x4 matrix + Pad2 float32 // Pad2 [in] ignored padding + PX float32 // PX [in] element 0 of column 3 of 3x4 matrix + PY float32 // PY [in] element 1 of column 3 of 3x4 matrix + PZ float32 // PZ [in] element 2 of column 3 of 3x4 matrix + Pad3 float32 // Pad3 [in] ignored padding } // ZeRtasTransformFloat3x4RowMajorExt (ze_rtas_transform_float3x4_row_major_ext_t) 3x4 affine transformation in row-major layout -/// -/// @details -/// - A 3x4 affine transformation in row-major layout, consisting of vectors -/// - vx=(vx_x, vx_y, vx_z), -/// - vy=(vy_x, vy_y, vy_z), -/// - vz=(vz_x, vz_y, vz_z), and -/// - p=(p_x, p_y, p_z) -/// - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + -/// z*vz + p`. +// / +// / @details +// / - A 3x4 affine transformation in row-major layout, consisting of vectors +// / - vx=(vx_x, vx_y, vx_z), +// / - vy=(vy_x, vy_y, vy_z), +// / - vz=(vz_x, vz_y, vz_z), and +// / - p=(p_x, p_y, p_z) +// / - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +// / z*vz + p`. type ZeRtasTransformFloat3x4RowMajorExt struct { - VxX float32 // VxX [in] element 0 of row 0 of 3x4 matrix - VyX float32 // VyX [in] element 1 of row 0 of 3x4 matrix - VzX float32 // VzX [in] element 2 of row 0 of 3x4 matrix - PX float32 // PX [in] element 3 of row 0 of 3x4 matrix - VxY float32 // VxY [in] element 0 of row 1 of 3x4 matrix - VyY float32 // VyY [in] element 1 of row 1 of 3x4 matrix - VzY float32 // VzY [in] element 2 of row 1 of 3x4 matrix - PY float32 // PY [in] element 3 of row 1 of 3x4 matrix - VxZ float32 // VxZ [in] element 0 of row 2 of 3x4 matrix - VyZ float32 // VyZ [in] element 1 of row 2 of 3x4 matrix - VzZ float32 // VzZ [in] element 2 of row 2 of 3x4 matrix - PZ float32 // PZ [in] element 3 of row 2 of 3x4 matrix + VxX float32 // VxX [in] element 0 of row 0 of 3x4 matrix + VyX float32 // VyX [in] element 1 of row 0 of 3x4 matrix + VzX float32 // VzX [in] element 2 of row 0 of 3x4 matrix + PX float32 // PX [in] element 3 of row 0 of 3x4 matrix + VxY float32 // VxY [in] element 0 of row 1 of 3x4 matrix + VyY float32 // VyY [in] element 1 of row 1 of 3x4 matrix + VzY float32 // VzY [in] element 2 of row 1 of 3x4 matrix + PY float32 // PY [in] element 3 of row 1 of 3x4 matrix + VxZ float32 // VxZ [in] element 0 of row 2 of 3x4 matrix + VyZ float32 // VyZ [in] element 1 of row 2 of 3x4 matrix + VzZ float32 // VzZ [in] element 2 of row 2 of 3x4 matrix + PZ float32 // PZ [in] element 3 of row 2 of 3x4 matrix } // ZeRtasAabbExt (ze_rtas_aabb_ext_t) A 3-dimensional axis-aligned bounding-box with lower and upper bounds -/// in each dimension +// / in each dimension type ZeRtasAabbExt struct { - Lower ZeRtasFloat3Ext // Lower [in] lower bounds of AABB - Upper ZeRtasFloat3Ext // Upper [in] upper bounds of AABB + Lower ZeRtasFloat3Ext // Lower [in] lower bounds of AABB + Upper ZeRtasFloat3Ext // Upper [in] upper bounds of AABB } // ZeRtasTriangleIndicesUint32Ext (ze_rtas_triangle_indices_uint32_ext_t) Triangle represented using 3 vertex indices -/// -/// @details -/// - Represents a triangle using 3 vertex indices that index into a vertex -/// array that needs to be provided together with the index array. -/// - The linear barycentric u/v parametrization of the triangle is defined as: -/// - (u=0, v=0) at v0, -/// - (u=1, v=0) at v1, and -/// - (u=0, v=1) at v2 +// / +// / @details +// / - Represents a triangle using 3 vertex indices that index into a vertex +// / array that needs to be provided together with the index array. +// / - The linear barycentric u/v parametrization of the triangle is defined as: +// / - (u=0, v=0) at v0, +// / - (u=1, v=0) at v1, and +// / - (u=0, v=1) at v2 type ZeRtasTriangleIndicesUint32Ext struct { - V0 uint32 // V0 [in] first index pointing to the first triangle vertex in vertex array - V1 uint32 // V1 [in] second index pointing to the second triangle vertex in vertex array - V2 uint32 // V2 [in] third index pointing to the third triangle vertex in vertex array + V0 uint32 // V0 [in] first index pointing to the first triangle vertex in vertex array + V1 uint32 // V1 [in] second index pointing to the second triangle vertex in vertex array + V2 uint32 // V2 [in] third index pointing to the third triangle vertex in vertex array } // ZeRtasQuadIndicesUint32Ext (ze_rtas_quad_indices_uint32_ext_t) Quad represented using 4 vertex indices -/// -/// @details -/// - Represents a quad composed of 4 indices that index into a vertex array -/// that needs to be provided together with the index array. -/// - A quad is a triangle pair represented using 4 vertex indices v0, v1, -/// v2, v3. -/// The first triangle is made out of indices v0, v1, v3 and the second triangle -/// from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization -/// of the quad is defined as: -/// - (u=0, v=0) at v0, -/// - (u=1, v=0) at v1, -/// - (u=0, v=1) at v3, and -/// - (u=1, v=1) at v2 -/// This is achieved by correcting the u'/v' coordinates of the second -/// triangle by -/// *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. +// / +// / @details +// / - Represents a quad composed of 4 indices that index into a vertex array +// / that needs to be provided together with the index array. +// / - A quad is a triangle pair represented using 4 vertex indices v0, v1, +// / v2, v3. +// / The first triangle is made out of indices v0, v1, v3 and the second triangle +// / from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization +// / of the quad is defined as: +// / - (u=0, v=0) at v0, +// / - (u=1, v=0) at v1, +// / - (u=0, v=1) at v3, and +// / - (u=1, v=1) at v2 +// / This is achieved by correcting the u'/v' coordinates of the second +// / triangle by +// / *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. type ZeRtasQuadIndicesUint32Ext struct { - V0 uint32 // V0 [in] first index pointing to the first quad vertex in vertex array - V1 uint32 // V1 [in] second index pointing to the second quad vertex in vertex array - V2 uint32 // V2 [in] third index pointing to the third quad vertex in vertex array - V3 uint32 // V3 [in] fourth index pointing to the fourth quad vertex in vertex array + V0 uint32 // V0 [in] first index pointing to the first quad vertex in vertex array + V1 uint32 // V1 [in] second index pointing to the second quad vertex in vertex array + V2 uint32 // V2 [in] third index pointing to the third quad vertex in vertex array + V3 uint32 // V3 [in] fourth index pointing to the fourth quad vertex in vertex array } // ZeRtasBuilderGeometryInfoExt (ze_rtas_builder_geometry_info_ext_t) Ray tracing acceleration structure builder geometry info type ZeRtasBuilderGeometryInfoExt struct { - Geometrytype ZeRtasBuilderPackedGeometryTypeExt // Geometrytype [in] geometry type + Geometrytype ZeRtasBuilderPackedGeometryTypeExt // Geometrytype [in] geometry type } // ZeRtasBuilderTrianglesGeometryInfoExt (ze_rtas_builder_triangles_geometry_info_ext_t) Ray tracing acceleration structure builder triangle mesh geometry info -/// -/// @details -/// - The linear barycentric u/v parametrization of the triangle is defined as: -/// - (u=0, v=0) at v0, -/// - (u=1, v=0) at v1, and -/// - (u=0, v=1) at v2 +// / +// / @details +// / - The linear barycentric u/v parametrization of the triangle is defined as: +// / - (u=0, v=0) at v0, +// / - (u=1, v=0) at v1, and +// / - (u=0, v=1) at v2 type ZeRtasBuilderTrianglesGeometryInfoExt struct { - Geometrytype ZeRtasBuilderPackedGeometryTypeExt // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_TRIANGLES - Geometryflags ZeRtasBuilderPackedGeometryExtFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t bits representing the geometry flags for all primitives of this geometry - Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking - Triangleformat ZeRtasBuilderPackedInputDataFormatExt // Triangleformat [in] format of triangle buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_TRIANGLE_INDICES_UINT32 - Vertexformat ZeRtasBuilderPackedInputDataFormatExt // Vertexformat [in] format of vertex buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 - Trianglecount uint32 // Trianglecount [in] number of triangles in triangle buffer - Vertexcount uint32 // Vertexcount [in] number of vertices in vertex buffer - Trianglestride uint32 // Trianglestride [in] stride (in bytes) of triangles in triangle buffer - Vertexstride uint32 // Vertexstride [in] stride (in bytes) of vertices in vertex buffer - Ptrianglebuffer unsafe.Pointer // Ptrianglebuffer [in] pointer to array of triangle indices in specified format - Pvertexbuffer unsafe.Pointer // Pvertexbuffer [in] pointer to array of triangle vertices in specified format + Geometrytype ZeRtasBuilderPackedGeometryTypeExt // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_TRIANGLES + Geometryflags ZeRtasBuilderPackedGeometryExtFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t bits representing the geometry flags for all primitives of this geometry + Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking + Triangleformat ZeRtasBuilderPackedInputDataFormatExt // Triangleformat [in] format of triangle buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_TRIANGLE_INDICES_UINT32 + Vertexformat ZeRtasBuilderPackedInputDataFormatExt // Vertexformat [in] format of vertex buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 + Trianglecount uint32 // Trianglecount [in] number of triangles in triangle buffer + Vertexcount uint32 // Vertexcount [in] number of vertices in vertex buffer + Trianglestride uint32 // Trianglestride [in] stride (in bytes) of triangles in triangle buffer + Vertexstride uint32 // Vertexstride [in] stride (in bytes) of vertices in vertex buffer + Ptrianglebuffer unsafe.Pointer // Ptrianglebuffer [in] pointer to array of triangle indices in specified format + Pvertexbuffer unsafe.Pointer // Pvertexbuffer [in] pointer to array of triangle vertices in specified format } // ZeRtasBuilderQuadsGeometryInfoExt (ze_rtas_builder_quads_geometry_info_ext_t) Ray tracing acceleration structure builder quad mesh geometry info -/// -/// @details -/// - A quad is a triangle pair represented using 4 vertex indices v0, v1, -/// v2, v3. -/// The first triangle is made out of indices v0, v1, v3 and the second triangle -/// from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization -/// of the quad is defined as: -/// - (u=0, v=0) at v0, -/// - (u=1, v=0) at v1, -/// - (u=0, v=1) at v3, and -/// - (u=1, v=1) at v2 -/// This is achieved by correcting the u'/v' coordinates of the second -/// triangle by -/// *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. +// / +// / @details +// / - A quad is a triangle pair represented using 4 vertex indices v0, v1, +// / v2, v3. +// / The first triangle is made out of indices v0, v1, v3 and the second triangle +// / from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization +// / of the quad is defined as: +// / - (u=0, v=0) at v0, +// / - (u=1, v=0) at v1, +// / - (u=0, v=1) at v3, and +// / - (u=1, v=1) at v2 +// / This is achieved by correcting the u'/v' coordinates of the second +// / triangle by +// / *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. type ZeRtasBuilderQuadsGeometryInfoExt struct { - Geometrytype ZeRtasBuilderPackedGeometryTypeExt // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_QUADS - Geometryflags ZeRtasBuilderPackedGeometryExtFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t bits representing the geometry flags for all primitives of this geometry - Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking - Quadformat ZeRtasBuilderPackedInputDataFormatExt // Quadformat [in] format of quad buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_QUAD_INDICES_UINT32 - Vertexformat ZeRtasBuilderPackedInputDataFormatExt // Vertexformat [in] format of vertex buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 - Quadcount uint32 // Quadcount [in] number of quads in quad buffer - Vertexcount uint32 // Vertexcount [in] number of vertices in vertex buffer - Quadstride uint32 // Quadstride [in] stride (in bytes) of quads in quad buffer - Vertexstride uint32 // Vertexstride [in] stride (in bytes) of vertices in vertex buffer - Pquadbuffer unsafe.Pointer // Pquadbuffer [in] pointer to array of quad indices in specified format - Pvertexbuffer unsafe.Pointer // Pvertexbuffer [in] pointer to array of quad vertices in specified format + Geometrytype ZeRtasBuilderPackedGeometryTypeExt // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_QUADS + Geometryflags ZeRtasBuilderPackedGeometryExtFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t bits representing the geometry flags for all primitives of this geometry + Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking + Quadformat ZeRtasBuilderPackedInputDataFormatExt // Quadformat [in] format of quad buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_QUAD_INDICES_UINT32 + Vertexformat ZeRtasBuilderPackedInputDataFormatExt // Vertexformat [in] format of vertex buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXT_FLOAT3 + Quadcount uint32 // Quadcount [in] number of quads in quad buffer + Vertexcount uint32 // Vertexcount [in] number of vertices in vertex buffer + Quadstride uint32 // Quadstride [in] stride (in bytes) of quads in quad buffer + Vertexstride uint32 // Vertexstride [in] stride (in bytes) of vertices in vertex buffer + Pquadbuffer unsafe.Pointer // Pquadbuffer [in] pointer to array of quad indices in specified format + Pvertexbuffer unsafe.Pointer // Pvertexbuffer [in] pointer to array of quad vertices in specified format } // ZeRtasGeometryAabbsExtCbParams (ze_rtas_geometry_aabbs_ext_cb_params_t) AABB callback function parameters type ZeRtasGeometryAabbsExtCbParams struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Primid uint32 // Primid [in] first primitive to return bounds for - Primidcount uint32 // Primidcount [in] number of primitives to return bounds for - Pgeomuserptr unsafe.Pointer // Pgeomuserptr [in] pointer provided through geometry descriptor - Pbuilduserptr unsafe.Pointer // Pbuilduserptr [in] pointer provided through ::zeRTASBuilderBuildExt function - Pboundsout *ZeRtasAabbExt // Pboundsout [out] destination buffer to write AABB bounds to + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Primid uint32 // Primid [in] first primitive to return bounds for + Primidcount uint32 // Primidcount [in] number of primitives to return bounds for + Pgeomuserptr unsafe.Pointer // Pgeomuserptr [in] pointer provided through geometry descriptor + Pbuilduserptr unsafe.Pointer // Pbuilduserptr [in] pointer provided through ::zeRTASBuilderBuildExt function + Pboundsout *ZeRtasAabbExt // Pboundsout [out] destination buffer to write AABB bounds to } // ZeRtasGeometryAabbsCbExt (ze_rtas_geometry_aabbs_cb_ext_t) Callback function pointer type to return AABBs for a range of -/// procedural primitives +// / procedural primitives // gozel warn: please use C function pointer loaded from C library! type ZeRtasGeometryAabbsCbExt uintptr // ZeRtasBuilderProceduralGeometryInfoExt (ze_rtas_builder_procedural_geometry_info_ext_t) Ray tracing acceleration structure builder procedural primitives -/// geometry info -/// -/// @details -/// - A host-side bounds callback function is invoked by the acceleration -/// structure builder to query the bounds of procedural primitives on -/// demand. The callback is passed some `pGeomUserPtr` that can point to -/// an application-side representation of the procedural primitives. -/// Further, a second `pBuildUserPtr`, which is set by a parameter to -/// ::zeRTASBuilderBuildExt, is passed to the callback. This allows the -/// build to change the bounds of the procedural geometry, for example, to -/// build a BVH only over a short time range to implement multi-segment -/// motion blur. +// / geometry info +// / +// / @details +// / - A host-side bounds callback function is invoked by the acceleration +// / structure builder to query the bounds of procedural primitives on +// / demand. The callback is passed some `pGeomUserPtr` that can point to +// / an application-side representation of the procedural primitives. +// / Further, a second `pBuildUserPtr`, which is set by a parameter to +// / ::zeRTASBuilderBuildExt, is passed to the callback. This allows the +// / build to change the bounds of the procedural geometry, for example, to +// / build a BVH only over a short time range to implement multi-segment +// / motion blur. type ZeRtasBuilderProceduralGeometryInfoExt struct { - Geometrytype ZeRtasBuilderPackedGeometryTypeExt // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_PROCEDURAL - Geometryflags ZeRtasBuilderPackedGeometryExtFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t bits representing the geometry flags for all primitives of this geometry - Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking - Reserved uint8 // Reserved [in] reserved for future use - Primcount uint32 // Primcount [in] number of primitives in geometry - Pfngetboundscb ZeRtasGeometryAabbsCbExt // Pfngetboundscb [in] pointer to callback function to get the axis-aligned bounding-box for a range of primitives - Pgeomuserptr unsafe.Pointer // Pgeomuserptr [in] user data pointer passed to callback + Geometrytype ZeRtasBuilderPackedGeometryTypeExt // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_PROCEDURAL + Geometryflags ZeRtasBuilderPackedGeometryExtFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t bits representing the geometry flags for all primitives of this geometry + Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking + Reserved uint8 // Reserved [in] reserved for future use + Primcount uint32 // Primcount [in] number of primitives in geometry + Pfngetboundscb ZeRtasGeometryAabbsCbExt // Pfngetboundscb [in] pointer to callback function to get the axis-aligned bounding-box for a range of primitives + Pgeomuserptr unsafe.Pointer // Pgeomuserptr [in] user data pointer passed to callback } // ZeRtasBuilderInstanceGeometryInfoExt (ze_rtas_builder_instance_geometry_info_ext_t) Ray tracing acceleration structure builder instance geometry info type ZeRtasBuilderInstanceGeometryInfoExt struct { - Geometrytype ZeRtasBuilderPackedGeometryTypeExt // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_INSTANCE - Instanceflags ZeRtasBuilderPackedInstanceExtFlags // Instanceflags [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t bits representing the geometry flags for all primitives of this geometry - Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking - Transformformat ZeRtasBuilderPackedInputDataFormatExt // Transformformat [in] format of the specified transformation - Instanceuserid uint32 // Instanceuserid [in] user-specified identifier for the instance - Ptransform unsafe.Pointer // Ptransform [in] object-to-world instance transformation in specified format - Pbounds *ZeRtasAabbExt // Pbounds [in] object-space axis-aligned bounding-box of the instanced acceleration structure - Paccelerationstructure unsafe.Pointer // Paccelerationstructure [in] device pointer to acceleration structure to instantiate + Geometrytype ZeRtasBuilderPackedGeometryTypeExt // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXT_INSTANCE + Instanceflags ZeRtasBuilderPackedInstanceExtFlags // Instanceflags [in] 0 or some combination of ::ze_rtas_builder_geometry_ext_flag_t bits representing the geometry flags for all primitives of this geometry + Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking + Transformformat ZeRtasBuilderPackedInputDataFormatExt // Transformformat [in] format of the specified transformation + Instanceuserid uint32 // Instanceuserid [in] user-specified identifier for the instance + Ptransform unsafe.Pointer // Ptransform [in] object-to-world instance transformation in specified format + Pbounds *ZeRtasAabbExt // Pbounds [in] object-space axis-aligned bounding-box of the instanced acceleration structure + Paccelerationstructure unsafe.Pointer // Paccelerationstructure [in] device pointer to acceleration structure to instantiate } -// ZeRtasBuilderBuildOpExtDesc (ze_rtas_builder_build_op_ext_desc_t) +// ZeRtasBuilderBuildOpExtDesc (ze_rtas_builder_build_op_ext_desc_t) type ZeRtasBuilderBuildOpExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Rtasformat ZeRtasFormatExt // Rtasformat [in] ray tracing acceleration structure format - Buildquality ZeRtasBuilderBuildQualityHintExt // Buildquality [in] acceleration structure build quality hint - Buildflags ZeRtasBuilderBuildOpExtFlags // Buildflags [in] 0 or some combination of ::ze_rtas_builder_build_op_ext_flag_t flags - Ppgeometries **ZeRtasBuilderGeometryInfoExt // Ppgeometries [in][optional][range(0, `numGeometries`)] NULL or a valid array of pointers to geometry infos - Numgeometries uint32 // Numgeometries [in] number of geometries in geometry infos array, can be zero when `ppGeometries` is NULL + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Rtasformat ZeRtasFormatExt // Rtasformat [in] ray tracing acceleration structure format + Buildquality ZeRtasBuilderBuildQualityHintExt // Buildquality [in] acceleration structure build quality hint + Buildflags ZeRtasBuilderBuildOpExtFlags // Buildflags [in] 0 or some combination of ::ze_rtas_builder_build_op_ext_flag_t flags + Ppgeometries **ZeRtasBuilderGeometryInfoExt // Ppgeometries [in][optional][range(0, `numGeometries`)] NULL or a valid array of pointers to geometry infos + Numgeometries uint32 // Numgeometries [in] number of geometries in geometry infos array, can be zero when `ppGeometries` is NULL } // ZeRTASBuilderCreateExt Creates a ray tracing acceleration structure builder object -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_RTAS_EXT_NAME extension. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pDescriptor` -/// + `nullptr == phBuilder` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_RTAS_BUILDER_EXT_VERSION_CURRENT < pDescriptor->builderVersion` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / - The implementation must support ::ZE_RTAS_EXT_NAME extension. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pDescriptor` +// / + `nullptr == phBuilder` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_RTAS_BUILDER_EXT_VERSION_CURRENT < pDescriptor->builderVersion` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeRTASBuilderCreateExt( - hDriver ZeDriverHandle, // hDriver [in] handle of driver object - pDescriptor *ZeRtasBuilderExtDesc, // pDescriptor [in] pointer to builder descriptor - phBuilder *ZeRtasBuilderExtHandle, // phBuilder [out] handle of builder object + hDriver ZeDriverHandle, // hDriver [in] handle of driver object + pDescriptor *ZeRtasBuilderExtDesc, // pDescriptor [in] pointer to builder descriptor + phBuilder *ZeRtasBuilderExtHandle, // phBuilder [out] handle of builder object ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASBuilderCreateExt", uintptr(hDriver), uintptr(unsafe.Pointer(pDescriptor)), uintptr(unsafe.Pointer(phBuilder))) } // ZeRTASBuilderGetBuildPropertiesExt Retrieves ray tracing acceleration structure builder properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hBuilder` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pBuildOpDescriptor` -/// + `nullptr == pProperties` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_RTAS_FORMAT_EXT_MAX < pBuildOpDescriptor->rtasFormat` -/// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH < pBuildOpDescriptor->buildQuality` -/// + `0x3 < pBuildOpDescriptor->buildFlags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hBuilder` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pBuildOpDescriptor` +// / + `nullptr == pProperties` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_RTAS_FORMAT_EXT_MAX < pBuildOpDescriptor->rtasFormat` +// / + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH < pBuildOpDescriptor->buildQuality` +// / + `0x3 < pBuildOpDescriptor->buildFlags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeRTASBuilderGetBuildPropertiesExt( - hBuilder ZeRtasBuilderExtHandle, // hBuilder [in] handle of builder object - pBuildOpDescriptor *ZeRtasBuilderBuildOpExtDesc, // pBuildOpDescriptor [in] pointer to build operation descriptor - pProperties *ZeRtasBuilderExtProperties, // pProperties [in,out] query result for builder properties + hBuilder ZeRtasBuilderExtHandle, // hBuilder [in] handle of builder object + pBuildOpDescriptor *ZeRtasBuilderBuildOpExtDesc, // pBuildOpDescriptor [in] pointer to build operation descriptor + pProperties *ZeRtasBuilderExtProperties, // pProperties [in,out] query result for builder properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASBuilderGetBuildPropertiesExt", uintptr(hBuilder), uintptr(unsafe.Pointer(pBuildOpDescriptor)), uintptr(unsafe.Pointer(pProperties))) } // ZeDriverRTASFormatCompatibilityCheckExt Checks ray tracing acceleration structure format compatibility -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_RTAS_FORMAT_EXT_MAX < rtasFormatA` -/// + `::ZE_RTAS_FORMAT_EXT_MAX < rtasFormatB` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_SUCCESS -/// + An acceleration structure built with `rtasFormatA` is compatible with devices that report `rtasFormatB`. -/// - ::ZE_RESULT_EXT_ERROR_OPERANDS_INCOMPATIBLE -/// + An acceleration structure built with `rtasFormatA` is **not** compatible with devices that report `rtasFormatB`. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_RTAS_FORMAT_EXT_MAX < rtasFormatA` +// / + `::ZE_RTAS_FORMAT_EXT_MAX < rtasFormatB` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_SUCCESS +// / + An acceleration structure built with `rtasFormatA` is compatible with devices that report `rtasFormatB`. +// / - ::ZE_RESULT_EXT_ERROR_OPERANDS_INCOMPATIBLE +// / + An acceleration structure built with `rtasFormatA` is **not** compatible with devices that report `rtasFormatB`. func ZeDriverRTASFormatCompatibilityCheckExt( - hDriver ZeDriverHandle, // hDriver [in] handle of driver object - rtasFormatA ZeRtasFormatExt, // rtasFormatA [in] operand A - rtasFormatB ZeRtasFormatExt, // rtasFormatB [in] operand B + hDriver ZeDriverHandle, // hDriver [in] handle of driver object + rtasFormatA ZeRtasFormatExt, // rtasFormatA [in] operand A + rtasFormatB ZeRtasFormatExt, // rtasFormatB [in] operand B ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDriverRTASFormatCompatibilityCheckExt", uintptr(hDriver), uintptr(rtasFormatA), uintptr(rtasFormatB)) } // ZeRTASBuilderBuildExt Build ray tracing acceleration structure -/// -/// @details -/// - This function builds an acceleration structure of the scene consisting -/// of the specified geometry information and writes the acceleration -/// structure to the provided destination buffer. All types of geometries -/// can get freely mixed inside a scene. -/// - Before an acceleration structure can be built, the user must allocate -/// the memory for the acceleration structure buffer and scratch buffer -/// using sizes queried with the ::zeRTASBuilderGetBuildPropertiesExt function. -/// - When using the "worst-case" size for the acceleration structure -/// buffer, the acceleration structure construction will never fail with ::ZE_RESULT_EXT_RTAS_BUILD_RETRY. -/// - When using the "expected" size for the acceleration structure buffer, -/// the acceleration structure construction may fail with -/// ::ZE_RESULT_EXT_RTAS_BUILD_RETRY. If this happens, the user may resize -/// their acceleration structure buffer using the returned -/// `*pRtasBufferSizeBytes` value, which will be updated with an improved -/// size estimate that will likely result in a successful build. -/// - The acceleration structure construction is run on the host and is -/// synchronous, thus after the function returns with a successful result, -/// the acceleration structure may be used. -/// - All provided data buffers must be host-accessible. The referenced -/// scene data (index- and vertex- buffers) have to be accessible from the -/// host, and will **not** be referenced by the build acceleration structure. -/// - The acceleration structure buffer is typicall a host allocation that -/// is later manually copied to a device allocation. Alternatively one can -/// also use a shared USM allocation as acceration structure buffer and -/// skip the copy. -/// - A successfully constructed acceleration structure is entirely -/// self-contained. There is no requirement for input data to persist -/// beyond build completion. -/// - A successfully constructed acceleration structure is non-copyable. -/// - Acceleration structure construction may be parallelized by passing a -/// valid handle to a parallel operation object and joining that parallel -/// operation using ::zeRTASParallelOperationJoinExt with user-provided -/// worker threads. -/// - A successfully constructed acceleration structure is generally -/// non-copyable. It can only get copied from host to device using the -/// special ::zeRTASBuilderCommandListAppendCopyExt function. -/// - **Additional Notes** -/// - "The geometry infos array, geometry infos, and scratch buffer must -/// all be standard host memory allocations." -/// - "A pointer to a geometry info can be a null pointer, in which case -/// the geometry is treated as empty." -/// - "If no parallel operation handle is provided, the build is run -/// sequentially on the current thread." -/// - "A parallel operation object may only be associated with a single -/// acceleration structure build at a time." -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hBuilder` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pBuildOpDescriptor` -/// + `nullptr == pScratchBuffer` -/// + `nullptr == pRtasBuffer` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_RTAS_FORMAT_EXT_MAX < pBuildOpDescriptor->rtasFormat` -/// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH < pBuildOpDescriptor->buildQuality` -/// + `0x3 < pBuildOpDescriptor->buildFlags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_EXT_RTAS_BUILD_DEFERRED -/// + Acceleration structure build completion is deferred to parallel operation join. -/// - ::ZE_RESULT_EXT_RTAS_BUILD_RETRY -/// + Acceleration structure build failed due to insufficient resources, retry the build operation with a larger acceleration structure buffer allocation. -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE -/// + Acceleration structure build failed due to parallel operation object participation in another build operation. +// / +// / @details +// / - This function builds an acceleration structure of the scene consisting +// / of the specified geometry information and writes the acceleration +// / structure to the provided destination buffer. All types of geometries +// / can get freely mixed inside a scene. +// / - Before an acceleration structure can be built, the user must allocate +// / the memory for the acceleration structure buffer and scratch buffer +// / using sizes queried with the ::zeRTASBuilderGetBuildPropertiesExt function. +// / - When using the "worst-case" size for the acceleration structure +// / buffer, the acceleration structure construction will never fail with ::ZE_RESULT_EXT_RTAS_BUILD_RETRY. +// / - When using the "expected" size for the acceleration structure buffer, +// / the acceleration structure construction may fail with +// / ::ZE_RESULT_EXT_RTAS_BUILD_RETRY. If this happens, the user may resize +// / their acceleration structure buffer using the returned +// / `*pRtasBufferSizeBytes` value, which will be updated with an improved +// / size estimate that will likely result in a successful build. +// / - The acceleration structure construction is run on the host and is +// / synchronous, thus after the function returns with a successful result, +// / the acceleration structure may be used. +// / - All provided data buffers must be host-accessible. The referenced +// / scene data (index- and vertex- buffers) have to be accessible from the +// / host, and will **not** be referenced by the build acceleration structure. +// / - The acceleration structure buffer is typicall a host allocation that +// / is later manually copied to a device allocation. Alternatively one can +// / also use a shared USM allocation as acceration structure buffer and +// / skip the copy. +// / - A successfully constructed acceleration structure is entirely +// / self-contained. There is no requirement for input data to persist +// / beyond build completion. +// / - A successfully constructed acceleration structure is non-copyable. +// / - Acceleration structure construction may be parallelized by passing a +// / valid handle to a parallel operation object and joining that parallel +// / operation using ::zeRTASParallelOperationJoinExt with user-provided +// / worker threads. +// / - A successfully constructed acceleration structure is generally +// / non-copyable. It can only get copied from host to device using the +// / special ::zeRTASBuilderCommandListAppendCopyExt function. +// / - **Additional Notes** +// / - "The geometry infos array, geometry infos, and scratch buffer must +// / all be standard host memory allocations." +// / - "A pointer to a geometry info can be a null pointer, in which case +// / the geometry is treated as empty." +// / - "If no parallel operation handle is provided, the build is run +// / sequentially on the current thread." +// / - "A parallel operation object may only be associated with a single +// / acceleration structure build at a time." +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hBuilder` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pBuildOpDescriptor` +// / + `nullptr == pScratchBuffer` +// / + `nullptr == pRtasBuffer` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_RTAS_FORMAT_EXT_MAX < pBuildOpDescriptor->rtasFormat` +// / + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXT_HIGH < pBuildOpDescriptor->buildQuality` +// / + `0x3 < pBuildOpDescriptor->buildFlags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_EXT_RTAS_BUILD_DEFERRED +// / + Acceleration structure build completion is deferred to parallel operation join. +// / - ::ZE_RESULT_EXT_RTAS_BUILD_RETRY +// / + Acceleration structure build failed due to insufficient resources, retry the build operation with a larger acceleration structure buffer allocation. +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / + Acceleration structure build failed due to parallel operation object participation in another build operation. func ZeRTASBuilderBuildExt( - hBuilder ZeRtasBuilderExtHandle, // hBuilder [in] handle of builder object - pBuildOpDescriptor *ZeRtasBuilderBuildOpExtDesc, // pBuildOpDescriptor [in] pointer to build operation descriptor - pScratchBuffer unsafe.Pointer, // pScratchBuffer [in][range(0, `scratchBufferSizeBytes`)] scratch buffer to be used during acceleration structure construction - scratchBufferSizeBytes uintptr, // scratchBufferSizeBytes [in] size of scratch buffer, in bytes - pRtasBuffer unsafe.Pointer, // pRtasBuffer [in] pointer to destination buffer - rtasBufferSizeBytes uintptr, // rtasBufferSizeBytes [in] destination buffer size, in bytes - hParallelOperation ZeRtasParallelOperationExtHandle, // hParallelOperation [in][optional] handle to parallel operation object - pBuildUserPtr unsafe.Pointer, // pBuildUserPtr [in][optional] pointer passed to callbacks - pBounds *ZeRtasAabbExt, // pBounds [in,out][optional] pointer to destination address for acceleration structure bounds - pRtasBufferSizeBytes *uintptr, // pRtasBufferSizeBytes [out][optional] updated acceleration structure size requirement, in bytes + hBuilder ZeRtasBuilderExtHandle, // hBuilder [in] handle of builder object + pBuildOpDescriptor *ZeRtasBuilderBuildOpExtDesc, // pBuildOpDescriptor [in] pointer to build operation descriptor + pScratchBuffer unsafe.Pointer, // pScratchBuffer [in][range(0, `scratchBufferSizeBytes`)] scratch buffer to be used during acceleration structure construction + scratchBufferSizeBytes uintptr, // scratchBufferSizeBytes [in] size of scratch buffer, in bytes + pRtasBuffer unsafe.Pointer, // pRtasBuffer [in] pointer to destination buffer + rtasBufferSizeBytes uintptr, // rtasBufferSizeBytes [in] destination buffer size, in bytes + hParallelOperation ZeRtasParallelOperationExtHandle, // hParallelOperation [in][optional] handle to parallel operation object + pBuildUserPtr unsafe.Pointer, // pBuildUserPtr [in][optional] pointer passed to callbacks + pBounds *ZeRtasAabbExt, // pBounds [in,out][optional] pointer to destination address for acceleration structure bounds + pRtasBufferSizeBytes *uintptr, // pRtasBufferSizeBytes [out][optional] updated acceleration structure size requirement, in bytes ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASBuilderBuildExt", uintptr(hBuilder), uintptr(unsafe.Pointer(pBuildOpDescriptor)), uintptr(unsafe.Pointer(pScratchBuffer)), uintptr(scratchBufferSizeBytes), uintptr(unsafe.Pointer(pRtasBuffer)), uintptr(rtasBufferSizeBytes), uintptr(hParallelOperation), uintptr(unsafe.Pointer(pBuildUserPtr)), uintptr(unsafe.Pointer(pBounds)), uintptr(unsafe.Pointer(pRtasBufferSizeBytes))) } // ZeRTASBuilderCommandListAppendCopyExt Copies a ray tracing acceleration structure (RTAS) from host to device -/// memory. -/// -/// @details -/// - The memory pointed to by srcptr must be host memory containing a valid -/// ray tracing acceleration structure. -/// - The number of bytes to copy must be larger or equal to the size of the -/// ray tracing acceleration structure. -/// - The application must ensure the memory pointed to by dstptr and srcptr -/// is accessible by the device on which the command list was created. -/// - The implementation must not access the memory pointed to by dstptr and -/// srcptr as they are free to be modified by either the Host or device up -/// until execution. -/// - The application must ensure the events are accessible by the device on -/// which the command list was created. -/// - The application must ensure the command list and events were created, -/// and the memory was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == dstptr` -/// + `nullptr == srcptr` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / memory. +// / +// / @details +// / - The memory pointed to by srcptr must be host memory containing a valid +// / ray tracing acceleration structure. +// / - The number of bytes to copy must be larger or equal to the size of the +// / ray tracing acceleration structure. +// / - The application must ensure the memory pointed to by dstptr and srcptr +// / is accessible by the device on which the command list was created. +// / - The implementation must not access the memory pointed to by dstptr and +// / srcptr as they are free to be modified by either the Host or device up +// / until execution. +// / - The application must ensure the events are accessible by the device on +// / which the command list was created. +// / - The application must ensure the command list and events were created, +// / and the memory was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == dstptr` +// / + `nullptr == srcptr` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeRTASBuilderCommandListAppendCopyExt( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list - dstptr unsafe.Pointer, // dstptr [in] pointer to destination in device memory to copy the ray tracing acceleration structure to - srcptr unsafe.Pointer, // srcptr [in] pointer to a valid source ray tracing acceleration structure in host memory to copy from - size uintptr, // size [in] size in bytes to copy - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list + dstptr unsafe.Pointer, // dstptr [in] pointer to destination in device memory to copy the ray tracing acceleration structure to + srcptr unsafe.Pointer, // srcptr [in] pointer to a valid source ray tracing acceleration structure in host memory to copy from + size uintptr, // size [in] size in bytes to copy + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASBuilderCommandListAppendCopyExt", uintptr(hCommandList), uintptr(unsafe.Pointer(dstptr)), uintptr(unsafe.Pointer(srcptr)), uintptr(size), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeRTASBuilderDestroyExt Destroys a ray tracing acceleration structure builder object -/// -/// @details -/// - The implementation of this function may immediately release any -/// internal Host and Device resources associated with this builder. -/// - The application must **not** call this function from simultaneous -/// threads with the same builder handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hBuilder` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The implementation of this function may immediately release any +// / internal Host and Device resources associated with this builder. +// / - The application must **not** call this function from simultaneous +// / threads with the same builder handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hBuilder` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeRTASBuilderDestroyExt( - hBuilder ZeRtasBuilderExtHandle, // hBuilder [in][release] handle of builder object to destroy + hBuilder ZeRtasBuilderExtHandle, // hBuilder [in][release] handle of builder object to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASBuilderDestroyExt", uintptr(hBuilder)) } // ZeRTASParallelOperationCreateExt Creates a ray tracing acceleration structure builder parallel -/// operation object -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_RTAS_EXT_NAME extension. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phParallelOperation` +// / operation object +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / - The implementation must support ::ZE_RTAS_EXT_NAME extension. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phParallelOperation` func ZeRTASParallelOperationCreateExt( - hDriver ZeDriverHandle, // hDriver [in] handle of driver object - phParallelOperation *ZeRtasParallelOperationExtHandle, // phParallelOperation [out] handle of parallel operation object + hDriver ZeDriverHandle, // hDriver [in] handle of driver object + phParallelOperation *ZeRtasParallelOperationExtHandle, // phParallelOperation [out] handle of parallel operation object ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASParallelOperationCreateExt", uintptr(hDriver), uintptr(unsafe.Pointer(phParallelOperation))) } // ZeRTASParallelOperationGetPropertiesExt Retrieves ray tracing acceleration structure builder parallel -/// operation properties -/// -/// @details -/// - The application must first bind the parallel operation object to a -/// build operation before it may query the parallel operation properties. -/// In other words, the application must first call -/// ::zeRTASBuilderBuildExt with **hParallelOperation** before calling -/// this function. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hParallelOperation` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / operation properties +// / +// / @details +// / - The application must first bind the parallel operation object to a +// / build operation before it may query the parallel operation properties. +// / In other words, the application must first call +// / ::zeRTASBuilderBuildExt with **hParallelOperation** before calling +// / this function. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hParallelOperation` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZeRTASParallelOperationGetPropertiesExt( - hParallelOperation ZeRtasParallelOperationExtHandle, // hParallelOperation [in] handle of parallel operation object - pProperties *ZeRtasParallelOperationExtProperties, // pProperties [in,out] query result for parallel operation properties + hParallelOperation ZeRtasParallelOperationExtHandle, // hParallelOperation [in] handle of parallel operation object + pProperties *ZeRtasParallelOperationExtProperties, // pProperties [in,out] query result for parallel operation properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASParallelOperationGetPropertiesExt", uintptr(hParallelOperation), uintptr(unsafe.Pointer(pProperties))) } // ZeRTASParallelOperationJoinExt Joins a parallel build operation -/// -/// @details -/// - All worker threads return the same error code for the parallel build -/// operation upon build completion -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hParallelOperation` +// / +// / @details +// / - All worker threads return the same error code for the parallel build +// / operation upon build completion +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hParallelOperation` func ZeRTASParallelOperationJoinExt( - hParallelOperation ZeRtasParallelOperationExtHandle, // hParallelOperation [in] handle of parallel operation object + hParallelOperation ZeRtasParallelOperationExtHandle, // hParallelOperation [in] handle of parallel operation object ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASParallelOperationJoinExt", uintptr(hParallelOperation)) } // ZeRTASParallelOperationDestroyExt Destroys a ray tracing acceleration structure builder parallel -/// operation object -/// -/// @details -/// - The implementation of this function may immediately release any -/// internal Host and Device resources associated with this parallel -/// operation. -/// - The application must **not** call this function from simultaneous -/// threads with the same parallel operation handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hParallelOperation` +// / operation object +// / +// / @details +// / - The implementation of this function may immediately release any +// / internal Host and Device resources associated with this parallel +// / operation. +// / - The application must **not** call this function from simultaneous +// / threads with the same parallel operation handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hParallelOperation` func ZeRTASParallelOperationDestroyExt( - hParallelOperation ZeRtasParallelOperationExtHandle, // hParallelOperation [in][release] handle of parallel operation object to destroy + hParallelOperation ZeRtasParallelOperationExtHandle, // hParallelOperation [in][release] handle of parallel operation object to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASParallelOperationDestroyExt", uintptr(hParallelOperation)) } - diff --git a/core_RTASBuilder.go b/core_RTASBuilder.go index d9fe533..8ac110d 100644 --- a/core_RTASBuilder.go +++ b/core_RTASBuilder.go @@ -24,859 +24,869 @@ const ZE_RTAS_BUILDER_EXP_NAME = "ZE_experimental_rtas_builder" // ZeRtasBuilderExpVersion (ze_rtas_builder_exp_version_t) Ray Tracing Acceleration Structure Builder Extension Version(s) type ZeRtasBuilderExpVersion uintptr + const ( - ZE_RTAS_BUILDER_EXP_VERSION_1_0 ZeRtasBuilderExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_RTAS_BUILDER_EXP_VERSION_1_0 version 1.0 - ZE_RTAS_BUILDER_EXP_VERSION_CURRENT ZeRtasBuilderExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_RTAS_BUILDER_EXP_VERSION_CURRENT latest known version - ZE_RTAS_BUILDER_EXP_VERSION_FORCE_UINT32 ZeRtasBuilderExpVersion = 0x7fffffff // ZE_RTAS_BUILDER_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_EXP_VERSION_* ENUMs + ZE_RTAS_BUILDER_EXP_VERSION_1_0 ZeRtasBuilderExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_RTAS_BUILDER_EXP_VERSION_1_0 version 1.0 + ZE_RTAS_BUILDER_EXP_VERSION_CURRENT ZeRtasBuilderExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_RTAS_BUILDER_EXP_VERSION_CURRENT latest known version + ZE_RTAS_BUILDER_EXP_VERSION_FORCE_UINT32 ZeRtasBuilderExpVersion = 0x7fffffff // ZE_RTAS_BUILDER_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_EXP_VERSION_* ENUMs ) // ZeRtasDeviceExpFlags (ze_rtas_device_exp_flags_t) Ray tracing acceleration structure device flags type ZeRtasDeviceExpFlags uint32 + const ( - ZE_RTAS_DEVICE_EXP_FLAG_RESERVED ZeRtasDeviceExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_DEVICE_EXP_FLAG_RESERVED reserved for future use - ZE_RTAS_DEVICE_EXP_FLAG_FORCE_UINT32 ZeRtasDeviceExpFlags = 0x7fffffff // ZE_RTAS_DEVICE_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_DEVICE_EXP_FLAG_* ENUMs + ZE_RTAS_DEVICE_EXP_FLAG_RESERVED ZeRtasDeviceExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RTAS_DEVICE_EXP_FLAG_RESERVED reserved for future use + ZE_RTAS_DEVICE_EXP_FLAG_FORCE_UINT32 ZeRtasDeviceExpFlags = 0x7fffffff // ZE_RTAS_DEVICE_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_DEVICE_EXP_FLAG_* ENUMs ) // ZeRtasFormatExp (ze_rtas_format_exp_t) Ray tracing acceleration structure format -/// -/// @details -/// - This is an opaque ray tracing acceleration structure format -/// identifier. +// / +// / @details +// / - This is an opaque ray tracing acceleration structure format +// / identifier. type ZeRtasFormatExp uintptr + const ( - ZE_RTAS_FORMAT_EXP_INVALID ZeRtasFormatExp = 0 // ZE_RTAS_FORMAT_EXP_INVALID Invalid acceleration structure format - ZE_RTAS_FORMAT_EXP_MAX ZeRtasFormatExp = 0x7ffffffe // ZE_RTAS_FORMAT_EXP_MAX Maximum acceleration structure format code - ZE_RTAS_FORMAT_EXP_FORCE_UINT32 ZeRtasFormatExp = 0x7fffffff // ZE_RTAS_FORMAT_EXP_FORCE_UINT32 Value marking end of ZE_RTAS_FORMAT_EXP_* ENUMs + ZE_RTAS_FORMAT_EXP_INVALID ZeRtasFormatExp = 0 // ZE_RTAS_FORMAT_EXP_INVALID Invalid acceleration structure format + ZE_RTAS_FORMAT_EXP_MAX ZeRtasFormatExp = 0x7ffffffe // ZE_RTAS_FORMAT_EXP_MAX Maximum acceleration structure format code + ZE_RTAS_FORMAT_EXP_FORCE_UINT32 ZeRtasFormatExp = 0x7fffffff // ZE_RTAS_FORMAT_EXP_FORCE_UINT32 Value marking end of ZE_RTAS_FORMAT_EXP_* ENUMs ) // ZeRtasBuilderExpFlags (ze_rtas_builder_exp_flags_t) Ray tracing acceleration structure builder flags type ZeRtasBuilderExpFlags uint32 + const ( - ZE_RTAS_BUILDER_EXP_FLAG_RESERVED ZeRtasBuilderExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_BUILDER_EXP_FLAG_RESERVED Reserved for future use - ZE_RTAS_BUILDER_EXP_FLAG_FORCE_UINT32 ZeRtasBuilderExpFlags = 0x7fffffff // ZE_RTAS_BUILDER_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_EXP_FLAG_* ENUMs + ZE_RTAS_BUILDER_EXP_FLAG_RESERVED ZeRtasBuilderExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RTAS_BUILDER_EXP_FLAG_RESERVED Reserved for future use + ZE_RTAS_BUILDER_EXP_FLAG_FORCE_UINT32 ZeRtasBuilderExpFlags = 0x7fffffff // ZE_RTAS_BUILDER_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_EXP_FLAG_* ENUMs ) // ZeRtasParallelOperationExpFlags (ze_rtas_parallel_operation_exp_flags_t) Ray tracing acceleration structure builder parallel operation flags type ZeRtasParallelOperationExpFlags uint32 + const ( - ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_RESERVED ZeRtasParallelOperationExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_RESERVED Reserved for future use - ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_FORCE_UINT32 ZeRtasParallelOperationExpFlags = 0x7fffffff // ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_* ENUMs + ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_RESERVED ZeRtasParallelOperationExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_RESERVED Reserved for future use + ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_FORCE_UINT32 ZeRtasParallelOperationExpFlags = 0x7fffffff // ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_PARALLEL_OPERATION_EXP_FLAG_* ENUMs ) // ZeRtasBuilderGeometryExpFlags (ze_rtas_builder_geometry_exp_flags_t) Ray tracing acceleration structure builder geometry flags type ZeRtasBuilderGeometryExpFlags uint32 + const ( - ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_NON_OPAQUE ZeRtasBuilderGeometryExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_NON_OPAQUE non-opaque geometries invoke an any-hit shader - ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_FORCE_UINT32 ZeRtasBuilderGeometryExpFlags = 0x7fffffff // ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_* ENUMs + ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_NON_OPAQUE ZeRtasBuilderGeometryExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_NON_OPAQUE non-opaque geometries invoke an any-hit shader + ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_FORCE_UINT32 ZeRtasBuilderGeometryExpFlags = 0x7fffffff // ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_GEOMETRY_EXP_FLAG_* ENUMs ) // ZeRtasBuilderPackedGeometryExpFlags (ze_rtas_builder_packed_geometry_exp_flags_t) Packed ray tracing acceleration structure builder geometry flags (see -/// ::ze_rtas_builder_geometry_exp_flags_t) +// / ::ze_rtas_builder_geometry_exp_flags_t) type ZeRtasBuilderPackedGeometryExpFlags uint8 // ZeRtasBuilderInstanceExpFlags (ze_rtas_builder_instance_exp_flags_t) Ray tracing acceleration structure builder instance flags type ZeRtasBuilderInstanceExpFlags uint32 + const ( - ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_CULL_DISABLE ZeRtasBuilderInstanceExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_CULL_DISABLE disables culling of front-facing and back-facing triangles - ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE ZeRtasBuilderInstanceExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE reverses front and back face of triangles - ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_OPAQUE ZeRtasBuilderInstanceExpFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_OPAQUE forces instanced geometry to be opaque, unless ray flag forces it to + ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_CULL_DISABLE ZeRtasBuilderInstanceExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_CULL_DISABLE disables culling of front-facing and back-facing triangles + ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE ZeRtasBuilderInstanceExpFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE reverses front and back face of triangles + ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_OPAQUE ZeRtasBuilderInstanceExpFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_OPAQUE forces instanced geometry to be opaque, unless ray flag forces it to ///< be non-opaque - ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_NON_OPAQUE ZeRtasBuilderInstanceExpFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_NON_OPAQUE forces instanced geometry to be non-opaque, unless ray flag forces it + ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_NON_OPAQUE ZeRtasBuilderInstanceExpFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_TRIANGLE_FORCE_NON_OPAQUE forces instanced geometry to be non-opaque, unless ray flag forces it ///< to be opaque - ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_FORCE_UINT32 ZeRtasBuilderInstanceExpFlags = 0x7fffffff // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_* ENUMs + ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_FORCE_UINT32 ZeRtasBuilderInstanceExpFlags = 0x7fffffff // ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_INSTANCE_EXP_FLAG_* ENUMs ) // ZeRtasBuilderPackedInstanceExpFlags (ze_rtas_builder_packed_instance_exp_flags_t) Packed ray tracing acceleration structure builder instance flags (see -/// ::ze_rtas_builder_instance_exp_flags_t) +// / ::ze_rtas_builder_instance_exp_flags_t) type ZeRtasBuilderPackedInstanceExpFlags uint8 // ZeRtasBuilderBuildOpExpFlags (ze_rtas_builder_build_op_exp_flags_t) Ray tracing acceleration structure builder build operation flags -/// -/// @details -/// - These flags allow the application to tune the acceleration structure -/// build operation. -/// - The acceleration structure builder implementation might choose to use -/// spatial splitting to split large or long primitives into smaller -/// pieces. This may result in any-hit shaders being invoked multiple -/// times for non-opaque primitives, unless -/// ::ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION is specified. -/// - Usage of any of these flags may reduce ray tracing performance. +// / +// / @details +// / - These flags allow the application to tune the acceleration structure +// / build operation. +// / - The acceleration structure builder implementation might choose to use +// / spatial splitting to split large or long primitives into smaller +// / pieces. This may result in any-hit shaders being invoked multiple +// / times for non-opaque primitives, unless +// / ::ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION is specified. +// / - Usage of any of these flags may reduce ray tracing performance. type ZeRtasBuilderBuildOpExpFlags uint32 + const ( - ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_COMPACT ZeRtasBuilderBuildOpExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_COMPACT build more compact acceleration structure - ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION ZeRtasBuilderBuildOpExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION guarantees single any-hit shader invocation per primitive - ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_FORCE_UINT32 ZeRtasBuilderBuildOpExpFlags = 0x7fffffff // ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_* ENUMs + ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_COMPACT ZeRtasBuilderBuildOpExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_COMPACT build more compact acceleration structure + ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION ZeRtasBuilderBuildOpExpFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION guarantees single any-hit shader invocation per primitive + ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_FORCE_UINT32 ZeRtasBuilderBuildOpExpFlags = 0x7fffffff // ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_BUILD_OP_EXP_FLAG_* ENUMs ) // ZeRtasBuilderBuildQualityHintExp (ze_rtas_builder_build_quality_hint_exp_t) Ray tracing acceleration structure builder build quality hint -/// -/// @details -/// - Depending on use case different quality modes for acceleration -/// structure build are supported. -/// - A low-quality build builds an acceleration structure fast, but at the -/// cost of some reduction in ray tracing performance. This mode is -/// recommended for dynamic content, such as animated characters. -/// - A medium-quality build uses a compromise between build quality and ray -/// tracing performance. This mode should be used by default. -/// - Higher ray tracing performance can be achieved by using a high-quality -/// build, but acceleration structure build performance might be -/// significantly reduced. +// / +// / @details +// / - Depending on use case different quality modes for acceleration +// / structure build are supported. +// / - A low-quality build builds an acceleration structure fast, but at the +// / cost of some reduction in ray tracing performance. This mode is +// / recommended for dynamic content, such as animated characters. +// / - A medium-quality build uses a compromise between build quality and ray +// / tracing performance. This mode should be used by default. +// / - Higher ray tracing performance can be achieved by using a high-quality +// / build, but acceleration structure build performance might be +// / significantly reduced. type ZeRtasBuilderBuildQualityHintExp uintptr + const ( - ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_LOW ZeRtasBuilderBuildQualityHintExp = 0 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_LOW build low-quality acceleration structure (fast) - ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_MEDIUM ZeRtasBuilderBuildQualityHintExp = 1 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_MEDIUM build medium-quality acceleration structure (slower) - ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH ZeRtasBuilderBuildQualityHintExp = 2 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH build high-quality acceleration structure (slow) - ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_FORCE_UINT32 ZeRtasBuilderBuildQualityHintExp = 0x7fffffff // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_* ENUMs + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_LOW ZeRtasBuilderBuildQualityHintExp = 0 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_LOW build low-quality acceleration structure (fast) + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_MEDIUM ZeRtasBuilderBuildQualityHintExp = 1 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_MEDIUM build medium-quality acceleration structure (slower) + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH ZeRtasBuilderBuildQualityHintExp = 2 // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH build high-quality acceleration structure (slow) + ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_FORCE_UINT32 ZeRtasBuilderBuildQualityHintExp = 0x7fffffff // ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_* ENUMs ) // ZeRtasBuilderGeometryTypeExp (ze_rtas_builder_geometry_type_exp_t) Ray tracing acceleration structure builder geometry type type ZeRtasBuilderGeometryTypeExp uintptr + const ( - ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_TRIANGLES ZeRtasBuilderGeometryTypeExp = 0 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_TRIANGLES triangle mesh geometry type - ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_QUADS ZeRtasBuilderGeometryTypeExp = 1 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_QUADS quad mesh geometry type - ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_PROCEDURAL ZeRtasBuilderGeometryTypeExp = 2 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_PROCEDURAL procedural geometry type - ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_INSTANCE ZeRtasBuilderGeometryTypeExp = 3 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_INSTANCE instance geometry type - ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_FORCE_UINT32 ZeRtasBuilderGeometryTypeExp = 0x7fffffff // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_* ENUMs + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_TRIANGLES ZeRtasBuilderGeometryTypeExp = 0 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_TRIANGLES triangle mesh geometry type + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_QUADS ZeRtasBuilderGeometryTypeExp = 1 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_QUADS quad mesh geometry type + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_PROCEDURAL ZeRtasBuilderGeometryTypeExp = 2 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_PROCEDURAL procedural geometry type + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_INSTANCE ZeRtasBuilderGeometryTypeExp = 3 // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_INSTANCE instance geometry type + ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_FORCE_UINT32 ZeRtasBuilderGeometryTypeExp = 0x7fffffff // ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_* ENUMs ) // ZeRtasBuilderPackedGeometryTypeExp (ze_rtas_builder_packed_geometry_type_exp_t) Packed ray tracing acceleration structure builder geometry type (see -/// ::ze_rtas_builder_geometry_type_exp_t) +// / ::ze_rtas_builder_geometry_type_exp_t) type ZeRtasBuilderPackedGeometryTypeExp uint8 // ZeRtasBuilderInputDataFormatExp (ze_rtas_builder_input_data_format_exp_t) Ray tracing acceleration structure data buffer element format -/// -/// @details -/// - Specifies the format of data buffer elements. -/// - Data buffers may contain instancing transform matrices, triangle/quad -/// vertex indices, etc... +// / +// / @details +// / - Specifies the format of data buffer elements. +// / - Data buffers may contain instancing transform matrices, triangle/quad +// / vertex indices, etc... type ZeRtasBuilderInputDataFormatExp uintptr + const ( - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 ZeRtasBuilderInputDataFormatExp = 0 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 3-component float vector (see ::ze_rtas_float3_exp_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_COLUMN_MAJOR ZeRtasBuilderInputDataFormatExp = 1 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_COLUMN_MAJOR 3x4 affine transformation in column-major format (see + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 ZeRtasBuilderInputDataFormatExp = 0 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 3-component float vector (see ::ze_rtas_float3_exp_t) + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_COLUMN_MAJOR ZeRtasBuilderInputDataFormatExp = 1 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_COLUMN_MAJOR 3x4 affine transformation in column-major format (see ///< ::ze_rtas_transform_float3x4_column_major_exp_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_ALIGNED_COLUMN_MAJOR ZeRtasBuilderInputDataFormatExp = 2 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_ALIGNED_COLUMN_MAJOR 3x4 affine transformation in column-major format (see + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_ALIGNED_COLUMN_MAJOR ZeRtasBuilderInputDataFormatExp = 2 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_ALIGNED_COLUMN_MAJOR 3x4 affine transformation in column-major format (see ///< ::ze_rtas_transform_float3x4_aligned_column_major_exp_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_ROW_MAJOR ZeRtasBuilderInputDataFormatExp = 3 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_ROW_MAJOR 3x4 affine transformation in row-major format (see + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_ROW_MAJOR ZeRtasBuilderInputDataFormatExp = 3 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3X4_ROW_MAJOR 3x4 affine transformation in row-major format (see ///< ::ze_rtas_transform_float3x4_row_major_exp_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_AABB ZeRtasBuilderInputDataFormatExp = 4 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_AABB 3-dimensional axis-aligned bounding-box (see ::ze_rtas_aabb_exp_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_TRIANGLE_INDICES_UINT32 ZeRtasBuilderInputDataFormatExp = 5 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_TRIANGLE_INDICES_UINT32 Unsigned 32-bit triangle indices (see + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_AABB ZeRtasBuilderInputDataFormatExp = 4 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_AABB 3-dimensional axis-aligned bounding-box (see ::ze_rtas_aabb_exp_t) + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_TRIANGLE_INDICES_UINT32 ZeRtasBuilderInputDataFormatExp = 5 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_TRIANGLE_INDICES_UINT32 Unsigned 32-bit triangle indices (see ///< ::ze_rtas_triangle_indices_uint32_exp_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_QUAD_INDICES_UINT32 ZeRtasBuilderInputDataFormatExp = 6 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_QUAD_INDICES_UINT32 Unsigned 32-bit quad indices (see ::ze_rtas_quad_indices_uint32_exp_t) - ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FORCE_UINT32 ZeRtasBuilderInputDataFormatExp = 0x7fffffff // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_* ENUMs + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_QUAD_INDICES_UINT32 ZeRtasBuilderInputDataFormatExp = 6 // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_QUAD_INDICES_UINT32 Unsigned 32-bit quad indices (see ::ze_rtas_quad_indices_uint32_exp_t) + ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FORCE_UINT32 ZeRtasBuilderInputDataFormatExp = 0x7fffffff // ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FORCE_UINT32 Value marking end of ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_* ENUMs ) // ZeRtasBuilderPackedInputDataFormatExp (ze_rtas_builder_packed_input_data_format_exp_t) Packed ray tracing acceleration structure data buffer element format -/// (see ::ze_rtas_builder_input_data_format_exp_t) +// / (see ::ze_rtas_builder_input_data_format_exp_t) type ZeRtasBuilderPackedInputDataFormatExp uint8 // ZeRtasBuilderExpHandle (ze_rtas_builder_exp_handle_t) Handle of ray tracing acceleration structure builder object type ZeRtasBuilderExpHandle uintptr // ZeRtasParallelOperationExpHandle (ze_rtas_parallel_operation_exp_handle_t) Handle of ray tracing acceleration structure builder parallel -/// operation object +// / operation object type ZeRtasParallelOperationExpHandle uintptr // ZeRtasBuilderExpDesc (ze_rtas_builder_exp_desc_t) Ray tracing acceleration structure builder descriptor type ZeRtasBuilderExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Builderversion ZeRtasBuilderExpVersion // Builderversion [in] ray tracing acceleration structure builder version + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Builderversion ZeRtasBuilderExpVersion // Builderversion [in] ray tracing acceleration structure builder version } // ZeRtasBuilderExpProperties (ze_rtas_builder_exp_properties_t) Ray tracing acceleration structure builder properties type ZeRtasBuilderExpProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeRtasBuilderExpFlags // Flags [out] ray tracing acceleration structure builder flags - Rtasbuffersizebytesexpected uintptr // Rtasbuffersizebytesexpected [out] expected size (in bytes) required for acceleration structure buffer - When using an acceleration structure buffer of this size, the build is expected to succeed; however, it is possible that the build may fail with ::ZE_RESULT_EXP_RTAS_BUILD_RETRY - Rtasbuffersizebytesmaxrequired uintptr // Rtasbuffersizebytesmaxrequired [out] worst-case size (in bytes) required for acceleration structure buffer - When using an acceleration structure buffer of this size, the build is guaranteed to not run out of memory. - Scratchbuffersizebytes uintptr // Scratchbuffersizebytes [out] scratch buffer size (in bytes) required for acceleration structure build. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeRtasBuilderExpFlags // Flags [out] ray tracing acceleration structure builder flags + Rtasbuffersizebytesexpected uintptr // Rtasbuffersizebytesexpected [out] expected size (in bytes) required for acceleration structure buffer - When using an acceleration structure buffer of this size, the build is expected to succeed; however, it is possible that the build may fail with ::ZE_RESULT_EXP_RTAS_BUILD_RETRY + Rtasbuffersizebytesmaxrequired uintptr // Rtasbuffersizebytesmaxrequired [out] worst-case size (in bytes) required for acceleration structure buffer - When using an acceleration structure buffer of this size, the build is guaranteed to not run out of memory. + Scratchbuffersizebytes uintptr // Scratchbuffersizebytes [out] scratch buffer size (in bytes) required for acceleration structure build. } // ZeRtasParallelOperationExpProperties (ze_rtas_parallel_operation_exp_properties_t) Ray tracing acceleration structure builder parallel operation -/// properties +// / properties type ZeRtasParallelOperationExpProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeRtasParallelOperationExpFlags // Flags [out] ray tracing acceleration structure builder parallel operation flags - Maxconcurrency uint32 // Maxconcurrency [out] maximum number of threads that may join the parallel operation + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeRtasParallelOperationExpFlags // Flags [out] ray tracing acceleration structure builder parallel operation flags + Maxconcurrency uint32 // Maxconcurrency [out] maximum number of threads that may join the parallel operation } // ZeRtasDeviceExpProperties (ze_rtas_device_exp_properties_t) Ray tracing acceleration structure device properties -/// -/// @details -/// - This structure may be passed to ::zeDeviceGetProperties, via `pNext` -/// member of ::ze_device_properties_t. -/// - The implementation shall populate `format` with a value other than -/// ::ZE_RTAS_FORMAT_EXP_INVALID when the device supports ray tracing. +// / +// / @details +// / - This structure may be passed to ::zeDeviceGetProperties, via `pNext` +// / member of ::ze_device_properties_t. +// / - The implementation shall populate `format` with a value other than +// / ::ZE_RTAS_FORMAT_EXP_INVALID when the device supports ray tracing. type ZeRtasDeviceExpProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeRtasDeviceExpFlags // Flags [out] ray tracing acceleration structure device flags - Rtasformat ZeRtasFormatExp // Rtasformat [out] ray tracing acceleration structure format - Rtasbufferalignment uint32 // Rtasbufferalignment [out] required alignment of acceleration structure buffer + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeRtasDeviceExpFlags // Flags [out] ray tracing acceleration structure device flags + Rtasformat ZeRtasFormatExp // Rtasformat [out] ray tracing acceleration structure format + Rtasbufferalignment uint32 // Rtasbufferalignment [out] required alignment of acceleration structure buffer } // ZeRtasFloat3Exp (ze_rtas_float3_exp_t) A 3-component vector type type ZeRtasFloat3Exp struct { - X float32 // X [in] x-coordinate of float3 vector - Y float32 // Y [in] y-coordinate of float3 vector - Z float32 // Z [in] z-coordinate of float3 vector + X float32 // X [in] x-coordinate of float3 vector + Y float32 // Y [in] y-coordinate of float3 vector + Z float32 // Z [in] z-coordinate of float3 vector } // ZeRtasTransformFloat3x4ColumnMajorExp (ze_rtas_transform_float3x4_column_major_exp_t) 3x4 affine transformation in column-major layout -/// -/// @details -/// - A 3x4 affine transformation in column major layout, consisting of vectors -/// - vx=(vx_x, vx_y, vx_z), -/// - vy=(vy_x, vy_y, vy_z), -/// - vz=(vz_x, vz_y, vz_z), and -/// - p=(p_x, p_y, p_z) -/// - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + -/// z*vz + p`. +// / +// / @details +// / - A 3x4 affine transformation in column major layout, consisting of vectors +// / - vx=(vx_x, vx_y, vx_z), +// / - vy=(vy_x, vy_y, vy_z), +// / - vz=(vz_x, vz_y, vz_z), and +// / - p=(p_x, p_y, p_z) +// / - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +// / z*vz + p`. type ZeRtasTransformFloat3x4ColumnMajorExp struct { - VxX float32 // VxX [in] element 0 of column 0 of 3x4 matrix - VxY float32 // VxY [in] element 1 of column 0 of 3x4 matrix - VxZ float32 // VxZ [in] element 2 of column 0 of 3x4 matrix - VyX float32 // VyX [in] element 0 of column 1 of 3x4 matrix - VyY float32 // VyY [in] element 1 of column 1 of 3x4 matrix - VyZ float32 // VyZ [in] element 2 of column 1 of 3x4 matrix - VzX float32 // VzX [in] element 0 of column 2 of 3x4 matrix - VzY float32 // VzY [in] element 1 of column 2 of 3x4 matrix - VzZ float32 // VzZ [in] element 2 of column 2 of 3x4 matrix - PX float32 // PX [in] element 0 of column 3 of 3x4 matrix - PY float32 // PY [in] element 1 of column 3 of 3x4 matrix - PZ float32 // PZ [in] element 2 of column 3 of 3x4 matrix + VxX float32 // VxX [in] element 0 of column 0 of 3x4 matrix + VxY float32 // VxY [in] element 1 of column 0 of 3x4 matrix + VxZ float32 // VxZ [in] element 2 of column 0 of 3x4 matrix + VyX float32 // VyX [in] element 0 of column 1 of 3x4 matrix + VyY float32 // VyY [in] element 1 of column 1 of 3x4 matrix + VyZ float32 // VyZ [in] element 2 of column 1 of 3x4 matrix + VzX float32 // VzX [in] element 0 of column 2 of 3x4 matrix + VzY float32 // VzY [in] element 1 of column 2 of 3x4 matrix + VzZ float32 // VzZ [in] element 2 of column 2 of 3x4 matrix + PX float32 // PX [in] element 0 of column 3 of 3x4 matrix + PY float32 // PY [in] element 1 of column 3 of 3x4 matrix + PZ float32 // PZ [in] element 2 of column 3 of 3x4 matrix } // ZeRtasTransformFloat3x4AlignedColumnMajorExp (ze_rtas_transform_float3x4_aligned_column_major_exp_t) 3x4 affine transformation in column-major layout with aligned column -/// vectors -/// -/// @details -/// - A 3x4 affine transformation in column major layout, consisting of vectors -/// - vx=(vx_x, vx_y, vx_z), -/// - vy=(vy_x, vy_y, vy_z), -/// - vz=(vz_x, vz_y, vz_z), and -/// - p=(p_x, p_y, p_z) -/// - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + -/// z*vz + p`. -/// - The column vectors are aligned to 16-bytes and pad members are -/// ignored. +// / vectors +// / +// / @details +// / - A 3x4 affine transformation in column major layout, consisting of vectors +// / - vx=(vx_x, vx_y, vx_z), +// / - vy=(vy_x, vy_y, vy_z), +// / - vz=(vz_x, vz_y, vz_z), and +// / - p=(p_x, p_y, p_z) +// / - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +// / z*vz + p`. +// / - The column vectors are aligned to 16-bytes and pad members are +// / ignored. type ZeRtasTransformFloat3x4AlignedColumnMajorExp struct { - VxX float32 // VxX [in] element 0 of column 0 of 3x4 matrix - VxY float32 // VxY [in] element 1 of column 0 of 3x4 matrix - VxZ float32 // VxZ [in] element 2 of column 0 of 3x4 matrix - Pad0 float32 // Pad0 [in] ignored padding - VyX float32 // VyX [in] element 0 of column 1 of 3x4 matrix - VyY float32 // VyY [in] element 1 of column 1 of 3x4 matrix - VyZ float32 // VyZ [in] element 2 of column 1 of 3x4 matrix - Pad1 float32 // Pad1 [in] ignored padding - VzX float32 // VzX [in] element 0 of column 2 of 3x4 matrix - VzY float32 // VzY [in] element 1 of column 2 of 3x4 matrix - VzZ float32 // VzZ [in] element 2 of column 2 of 3x4 matrix - Pad2 float32 // Pad2 [in] ignored padding - PX float32 // PX [in] element 0 of column 3 of 3x4 matrix - PY float32 // PY [in] element 1 of column 3 of 3x4 matrix - PZ float32 // PZ [in] element 2 of column 3 of 3x4 matrix - Pad3 float32 // Pad3 [in] ignored padding + VxX float32 // VxX [in] element 0 of column 0 of 3x4 matrix + VxY float32 // VxY [in] element 1 of column 0 of 3x4 matrix + VxZ float32 // VxZ [in] element 2 of column 0 of 3x4 matrix + Pad0 float32 // Pad0 [in] ignored padding + VyX float32 // VyX [in] element 0 of column 1 of 3x4 matrix + VyY float32 // VyY [in] element 1 of column 1 of 3x4 matrix + VyZ float32 // VyZ [in] element 2 of column 1 of 3x4 matrix + Pad1 float32 // Pad1 [in] ignored padding + VzX float32 // VzX [in] element 0 of column 2 of 3x4 matrix + VzY float32 // VzY [in] element 1 of column 2 of 3x4 matrix + VzZ float32 // VzZ [in] element 2 of column 2 of 3x4 matrix + Pad2 float32 // Pad2 [in] ignored padding + PX float32 // PX [in] element 0 of column 3 of 3x4 matrix + PY float32 // PY [in] element 1 of column 3 of 3x4 matrix + PZ float32 // PZ [in] element 2 of column 3 of 3x4 matrix + Pad3 float32 // Pad3 [in] ignored padding } // ZeRtasTransformFloat3x4RowMajorExp (ze_rtas_transform_float3x4_row_major_exp_t) 3x4 affine transformation in row-major layout -/// -/// @details -/// - A 3x4 affine transformation in row-major layout, consisting of vectors -/// - vx=(vx_x, vx_y, vx_z), -/// - vy=(vy_x, vy_y, vy_z), -/// - vz=(vz_x, vz_y, vz_z), and -/// - p=(p_x, p_y, p_z) -/// - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + -/// z*vz + p`. +// / +// / @details +// / - A 3x4 affine transformation in row-major layout, consisting of vectors +// / - vx=(vx_x, vx_y, vx_z), +// / - vy=(vy_x, vy_y, vy_z), +// / - vz=(vz_x, vz_y, vz_z), and +// / - p=(p_x, p_y, p_z) +// / - The transformation transforms a point (x, y, z) to: `x*vx + y*vy + +// / z*vz + p`. type ZeRtasTransformFloat3x4RowMajorExp struct { - VxX float32 // VxX [in] element 0 of row 0 of 3x4 matrix - VyX float32 // VyX [in] element 1 of row 0 of 3x4 matrix - VzX float32 // VzX [in] element 2 of row 0 of 3x4 matrix - PX float32 // PX [in] element 3 of row 0 of 3x4 matrix - VxY float32 // VxY [in] element 0 of row 1 of 3x4 matrix - VyY float32 // VyY [in] element 1 of row 1 of 3x4 matrix - VzY float32 // VzY [in] element 2 of row 1 of 3x4 matrix - PY float32 // PY [in] element 3 of row 1 of 3x4 matrix - VxZ float32 // VxZ [in] element 0 of row 2 of 3x4 matrix - VyZ float32 // VyZ [in] element 1 of row 2 of 3x4 matrix - VzZ float32 // VzZ [in] element 2 of row 2 of 3x4 matrix - PZ float32 // PZ [in] element 3 of row 2 of 3x4 matrix + VxX float32 // VxX [in] element 0 of row 0 of 3x4 matrix + VyX float32 // VyX [in] element 1 of row 0 of 3x4 matrix + VzX float32 // VzX [in] element 2 of row 0 of 3x4 matrix + PX float32 // PX [in] element 3 of row 0 of 3x4 matrix + VxY float32 // VxY [in] element 0 of row 1 of 3x4 matrix + VyY float32 // VyY [in] element 1 of row 1 of 3x4 matrix + VzY float32 // VzY [in] element 2 of row 1 of 3x4 matrix + PY float32 // PY [in] element 3 of row 1 of 3x4 matrix + VxZ float32 // VxZ [in] element 0 of row 2 of 3x4 matrix + VyZ float32 // VyZ [in] element 1 of row 2 of 3x4 matrix + VzZ float32 // VzZ [in] element 2 of row 2 of 3x4 matrix + PZ float32 // PZ [in] element 3 of row 2 of 3x4 matrix } // ZeRtasAabbExp (ze_rtas_aabb_exp_t) A 3-dimensional axis-aligned bounding-box with lower and upper bounds -/// in each dimension +// / in each dimension type ZeRtasAabbExp struct { - Lower ZeRtasFloat3Exp // Lower [in] lower bounds of AABB - Upper ZeRtasFloat3Exp // Upper [in] upper bounds of AABB + Lower ZeRtasFloat3Exp // Lower [in] lower bounds of AABB + Upper ZeRtasFloat3Exp // Upper [in] upper bounds of AABB } // ZeRtasTriangleIndicesUint32Exp (ze_rtas_triangle_indices_uint32_exp_t) Triangle represented using 3 vertex indices -/// -/// @details -/// - Represents a triangle using 3 vertex indices that index into a vertex -/// array that needs to be provided together with the index array. -/// - The linear barycentric u/v parametrization of the triangle is defined as: -/// - (u=0, v=0) at v0, -/// - (u=1, v=0) at v1, and -/// - (u=0, v=1) at v2 +// / +// / @details +// / - Represents a triangle using 3 vertex indices that index into a vertex +// / array that needs to be provided together with the index array. +// / - The linear barycentric u/v parametrization of the triangle is defined as: +// / - (u=0, v=0) at v0, +// / - (u=1, v=0) at v1, and +// / - (u=0, v=1) at v2 type ZeRtasTriangleIndicesUint32Exp struct { - V0 uint32 // V0 [in] first index pointing to the first triangle vertex in vertex array - V1 uint32 // V1 [in] second index pointing to the second triangle vertex in vertex array - V2 uint32 // V2 [in] third index pointing to the third triangle vertex in vertex array + V0 uint32 // V0 [in] first index pointing to the first triangle vertex in vertex array + V1 uint32 // V1 [in] second index pointing to the second triangle vertex in vertex array + V2 uint32 // V2 [in] third index pointing to the third triangle vertex in vertex array } // ZeRtasQuadIndicesUint32Exp (ze_rtas_quad_indices_uint32_exp_t) Quad represented using 4 vertex indices -/// -/// @details -/// - Represents a quad composed of 4 indices that index into a vertex array -/// that needs to be provided together with the index array. -/// - A quad is a triangle pair represented using 4 vertex indices v0, v1, -/// v2, v3. -/// The first triangle is made out of indices v0, v1, v3 and the second triangle -/// from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization -/// of the quad is defined as: -/// - (u=0, v=0) at v0, -/// - (u=1, v=0) at v1, -/// - (u=0, v=1) at v3, and -/// - (u=1, v=1) at v2 -/// This is achieved by correcting the u'/v' coordinates of the second -/// triangle by -/// *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. +// / +// / @details +// / - Represents a quad composed of 4 indices that index into a vertex array +// / that needs to be provided together with the index array. +// / - A quad is a triangle pair represented using 4 vertex indices v0, v1, +// / v2, v3. +// / The first triangle is made out of indices v0, v1, v3 and the second triangle +// / from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization +// / of the quad is defined as: +// / - (u=0, v=0) at v0, +// / - (u=1, v=0) at v1, +// / - (u=0, v=1) at v3, and +// / - (u=1, v=1) at v2 +// / This is achieved by correcting the u'/v' coordinates of the second +// / triangle by +// / *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. type ZeRtasQuadIndicesUint32Exp struct { - V0 uint32 // V0 [in] first index pointing to the first quad vertex in vertex array - V1 uint32 // V1 [in] second index pointing to the second quad vertex in vertex array - V2 uint32 // V2 [in] third index pointing to the third quad vertex in vertex array - V3 uint32 // V3 [in] fourth index pointing to the fourth quad vertex in vertex array + V0 uint32 // V0 [in] first index pointing to the first quad vertex in vertex array + V1 uint32 // V1 [in] second index pointing to the second quad vertex in vertex array + V2 uint32 // V2 [in] third index pointing to the third quad vertex in vertex array + V3 uint32 // V3 [in] fourth index pointing to the fourth quad vertex in vertex array } // ZeRtasBuilderGeometryInfoExp (ze_rtas_builder_geometry_info_exp_t) Ray tracing acceleration structure builder geometry info type ZeRtasBuilderGeometryInfoExp struct { - Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type + Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type } // ZeRtasBuilderTrianglesGeometryInfoExp (ze_rtas_builder_triangles_geometry_info_exp_t) Ray tracing acceleration structure builder triangle mesh geometry info -/// -/// @details -/// - The linear barycentric u/v parametrization of the triangle is defined as: -/// - (u=0, v=0) at v0, -/// - (u=1, v=0) at v1, and -/// - (u=0, v=1) at v2 +// / +// / @details +// / - The linear barycentric u/v parametrization of the triangle is defined as: +// / - (u=0, v=0) at v0, +// / - (u=1, v=0) at v1, and +// / - (u=0, v=1) at v2 type ZeRtasBuilderTrianglesGeometryInfoExp struct { - Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_TRIANGLES - Geometryflags ZeRtasBuilderPackedGeometryExpFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t bits representing the geometry flags for all primitives of this geometry - Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking - Triangleformat ZeRtasBuilderPackedInputDataFormatExp // Triangleformat [in] format of triangle buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_TRIANGLE_INDICES_UINT32 - Vertexformat ZeRtasBuilderPackedInputDataFormatExp // Vertexformat [in] format of vertex buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 - Trianglecount uint32 // Trianglecount [in] number of triangles in triangle buffer - Vertexcount uint32 // Vertexcount [in] number of vertices in vertex buffer - Trianglestride uint32 // Trianglestride [in] stride (in bytes) of triangles in triangle buffer - Vertexstride uint32 // Vertexstride [in] stride (in bytes) of vertices in vertex buffer - Ptrianglebuffer unsafe.Pointer // Ptrianglebuffer [in] pointer to array of triangle indices in specified format - Pvertexbuffer unsafe.Pointer // Pvertexbuffer [in] pointer to array of triangle vertices in specified format + Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_TRIANGLES + Geometryflags ZeRtasBuilderPackedGeometryExpFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t bits representing the geometry flags for all primitives of this geometry + Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking + Triangleformat ZeRtasBuilderPackedInputDataFormatExp // Triangleformat [in] format of triangle buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_TRIANGLE_INDICES_UINT32 + Vertexformat ZeRtasBuilderPackedInputDataFormatExp // Vertexformat [in] format of vertex buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 + Trianglecount uint32 // Trianglecount [in] number of triangles in triangle buffer + Vertexcount uint32 // Vertexcount [in] number of vertices in vertex buffer + Trianglestride uint32 // Trianglestride [in] stride (in bytes) of triangles in triangle buffer + Vertexstride uint32 // Vertexstride [in] stride (in bytes) of vertices in vertex buffer + Ptrianglebuffer unsafe.Pointer // Ptrianglebuffer [in] pointer to array of triangle indices in specified format + Pvertexbuffer unsafe.Pointer // Pvertexbuffer [in] pointer to array of triangle vertices in specified format } // ZeRtasBuilderQuadsGeometryInfoExp (ze_rtas_builder_quads_geometry_info_exp_t) Ray tracing acceleration structure builder quad mesh geometry info -/// -/// @details -/// - A quad is a triangle pair represented using 4 vertex indices v0, v1, -/// v2, v3. -/// The first triangle is made out of indices v0, v1, v3 and the second triangle -/// from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization -/// of the quad is defined as: -/// - (u=0, v=0) at v0, -/// - (u=1, v=0) at v1, -/// - (u=0, v=1) at v3, and -/// - (u=1, v=1) at v2 -/// This is achieved by correcting the u'/v' coordinates of the second -/// triangle by -/// *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. +// / +// / @details +// / - A quad is a triangle pair represented using 4 vertex indices v0, v1, +// / v2, v3. +// / The first triangle is made out of indices v0, v1, v3 and the second triangle +// / from indices v2, v3, v1. The piecewise linear barycentric u/v parametrization +// / of the quad is defined as: +// / - (u=0, v=0) at v0, +// / - (u=1, v=0) at v1, +// / - (u=0, v=1) at v3, and +// / - (u=1, v=1) at v2 +// / This is achieved by correcting the u'/v' coordinates of the second +// / triangle by +// / *u = 1-u'* and *v = 1-v'*, yielding a piecewise linear parametrization. type ZeRtasBuilderQuadsGeometryInfoExp struct { - Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_QUADS - Geometryflags ZeRtasBuilderPackedGeometryExpFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t bits representing the geometry flags for all primitives of this geometry - Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking - Quadformat ZeRtasBuilderPackedInputDataFormatExp // Quadformat [in] format of quad buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_QUAD_INDICES_UINT32 - Vertexformat ZeRtasBuilderPackedInputDataFormatExp // Vertexformat [in] format of vertex buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 - Quadcount uint32 // Quadcount [in] number of quads in quad buffer - Vertexcount uint32 // Vertexcount [in] number of vertices in vertex buffer - Quadstride uint32 // Quadstride [in] stride (in bytes) of quads in quad buffer - Vertexstride uint32 // Vertexstride [in] stride (in bytes) of vertices in vertex buffer - Pquadbuffer unsafe.Pointer // Pquadbuffer [in] pointer to array of quad indices in specified format - Pvertexbuffer unsafe.Pointer // Pvertexbuffer [in] pointer to array of quad vertices in specified format + Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_QUADS + Geometryflags ZeRtasBuilderPackedGeometryExpFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t bits representing the geometry flags for all primitives of this geometry + Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking + Quadformat ZeRtasBuilderPackedInputDataFormatExp // Quadformat [in] format of quad buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_QUAD_INDICES_UINT32 + Vertexformat ZeRtasBuilderPackedInputDataFormatExp // Vertexformat [in] format of vertex buffer data, must be ::ZE_RTAS_BUILDER_INPUT_DATA_FORMAT_EXP_FLOAT3 + Quadcount uint32 // Quadcount [in] number of quads in quad buffer + Vertexcount uint32 // Vertexcount [in] number of vertices in vertex buffer + Quadstride uint32 // Quadstride [in] stride (in bytes) of quads in quad buffer + Vertexstride uint32 // Vertexstride [in] stride (in bytes) of vertices in vertex buffer + Pquadbuffer unsafe.Pointer // Pquadbuffer [in] pointer to array of quad indices in specified format + Pvertexbuffer unsafe.Pointer // Pvertexbuffer [in] pointer to array of quad vertices in specified format } // ZeRtasGeometryAabbsExpCbParams (ze_rtas_geometry_aabbs_exp_cb_params_t) AABB callback function parameters type ZeRtasGeometryAabbsExpCbParams struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Primid uint32 // Primid [in] first primitive to return bounds for - Primidcount uint32 // Primidcount [in] number of primitives to return bounds for - Pgeomuserptr unsafe.Pointer // Pgeomuserptr [in] pointer provided through geometry descriptor - Pbuilduserptr unsafe.Pointer // Pbuilduserptr [in] pointer provided through ::zeRTASBuilderBuildExp function - Pboundsout *ZeRtasAabbExp // Pboundsout [out] destination buffer to write AABB bounds to + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Primid uint32 // Primid [in] first primitive to return bounds for + Primidcount uint32 // Primidcount [in] number of primitives to return bounds for + Pgeomuserptr unsafe.Pointer // Pgeomuserptr [in] pointer provided through geometry descriptor + Pbuilduserptr unsafe.Pointer // Pbuilduserptr [in] pointer provided through ::zeRTASBuilderBuildExp function + Pboundsout *ZeRtasAabbExp // Pboundsout [out] destination buffer to write AABB bounds to } // ZeRtasGeometryAabbsCbExp (ze_rtas_geometry_aabbs_cb_exp_t) Callback function pointer type to return AABBs for a range of -/// procedural primitives +// / procedural primitives // gozel warn: please use C function pointer loaded from C library! type ZeRtasGeometryAabbsCbExp uintptr // ZeRtasBuilderProceduralGeometryInfoExp (ze_rtas_builder_procedural_geometry_info_exp_t) Ray tracing acceleration structure builder procedural primitives -/// geometry info -/// -/// @details -/// - A host-side bounds callback function is invoked by the acceleration -/// structure builder to query the bounds of procedural primitives on -/// demand. The callback is passed some `pGeomUserPtr` that can point to -/// an application-side representation of the procedural primitives. -/// Further, a second `pBuildUserPtr`, which is set by a parameter to -/// ::zeRTASBuilderBuildExp, is passed to the callback. This allows the -/// build to change the bounds of the procedural geometry, for example, to -/// build a BVH only over a short time range to implement multi-segment -/// motion blur. +// / geometry info +// / +// / @details +// / - A host-side bounds callback function is invoked by the acceleration +// / structure builder to query the bounds of procedural primitives on +// / demand. The callback is passed some `pGeomUserPtr` that can point to +// / an application-side representation of the procedural primitives. +// / Further, a second `pBuildUserPtr`, which is set by a parameter to +// / ::zeRTASBuilderBuildExp, is passed to the callback. This allows the +// / build to change the bounds of the procedural geometry, for example, to +// / build a BVH only over a short time range to implement multi-segment +// / motion blur. type ZeRtasBuilderProceduralGeometryInfoExp struct { - Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_PROCEDURAL - Geometryflags ZeRtasBuilderPackedGeometryExpFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t bits representing the geometry flags for all primitives of this geometry - Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking - Reserved uint8 // Reserved [in] reserved for future use - Primcount uint32 // Primcount [in] number of primitives in geometry - Pfngetboundscb ZeRtasGeometryAabbsCbExp // Pfngetboundscb [in] pointer to callback function to get the axis-aligned bounding-box for a range of primitives - Pgeomuserptr unsafe.Pointer // Pgeomuserptr [in] user data pointer passed to callback + Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_PROCEDURAL + Geometryflags ZeRtasBuilderPackedGeometryExpFlags // Geometryflags [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t bits representing the geometry flags for all primitives of this geometry + Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking + Reserved uint8 // Reserved [in] reserved for future use + Primcount uint32 // Primcount [in] number of primitives in geometry + Pfngetboundscb ZeRtasGeometryAabbsCbExp // Pfngetboundscb [in] pointer to callback function to get the axis-aligned bounding-box for a range of primitives + Pgeomuserptr unsafe.Pointer // Pgeomuserptr [in] user data pointer passed to callback } // ZeRtasBuilderInstanceGeometryInfoExp (ze_rtas_builder_instance_geometry_info_exp_t) Ray tracing acceleration structure builder instance geometry info type ZeRtasBuilderInstanceGeometryInfoExp struct { - Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_INSTANCE - Instanceflags ZeRtasBuilderPackedInstanceExpFlags // Instanceflags [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t bits representing the geometry flags for all primitives of this geometry - Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking - Transformformat ZeRtasBuilderPackedInputDataFormatExp // Transformformat [in] format of the specified transformation - Instanceuserid uint32 // Instanceuserid [in] user-specified identifier for the instance - Ptransform unsafe.Pointer // Ptransform [in] object-to-world instance transformation in specified format - Pbounds *ZeRtasAabbExp // Pbounds [in] object-space axis-aligned bounding-box of the instanced acceleration structure - Paccelerationstructure unsafe.Pointer // Paccelerationstructure [in] pointer to acceleration structure to instantiate + Geometrytype ZeRtasBuilderPackedGeometryTypeExp // Geometrytype [in] geometry type, must be ::ZE_RTAS_BUILDER_GEOMETRY_TYPE_EXP_INSTANCE + Instanceflags ZeRtasBuilderPackedInstanceExpFlags // Instanceflags [in] 0 or some combination of ::ze_rtas_builder_geometry_exp_flag_t bits representing the geometry flags for all primitives of this geometry + Geometrymask uint8 // Geometrymask [in] 8-bit geometry mask for ray masking + Transformformat ZeRtasBuilderPackedInputDataFormatExp // Transformformat [in] format of the specified transformation + Instanceuserid uint32 // Instanceuserid [in] user-specified identifier for the instance + Ptransform unsafe.Pointer // Ptransform [in] object-to-world instance transformation in specified format + Pbounds *ZeRtasAabbExp // Pbounds [in] object-space axis-aligned bounding-box of the instanced acceleration structure + Paccelerationstructure unsafe.Pointer // Paccelerationstructure [in] pointer to acceleration structure to instantiate } -// ZeRtasBuilderBuildOpExpDesc (ze_rtas_builder_build_op_exp_desc_t) +// ZeRtasBuilderBuildOpExpDesc (ze_rtas_builder_build_op_exp_desc_t) type ZeRtasBuilderBuildOpExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Rtasformat ZeRtasFormatExp // Rtasformat [in] ray tracing acceleration structure format - Buildquality ZeRtasBuilderBuildQualityHintExp // Buildquality [in] acceleration structure build quality hint - Buildflags ZeRtasBuilderBuildOpExpFlags // Buildflags [in] 0 or some combination of ::ze_rtas_builder_build_op_exp_flag_t flags - Ppgeometries **ZeRtasBuilderGeometryInfoExp // Ppgeometries [in][optional][range(0, `numGeometries`)] NULL or a valid array of pointers to geometry infos - Numgeometries uint32 // Numgeometries [in] number of geometries in geometry infos array, can be zero when `ppGeometries` is NULL + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Rtasformat ZeRtasFormatExp // Rtasformat [in] ray tracing acceleration structure format + Buildquality ZeRtasBuilderBuildQualityHintExp // Buildquality [in] acceleration structure build quality hint + Buildflags ZeRtasBuilderBuildOpExpFlags // Buildflags [in] 0 or some combination of ::ze_rtas_builder_build_op_exp_flag_t flags + Ppgeometries **ZeRtasBuilderGeometryInfoExp // Ppgeometries [in][optional][range(0, `numGeometries`)] NULL or a valid array of pointers to geometry infos + Numgeometries uint32 // Numgeometries [in] number of geometries in geometry infos array, can be zero when `ppGeometries` is NULL } // ZeRTASBuilderCreateExp Creates a ray tracing acceleration structure builder object -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_RTAS_BUILDER_EXP_NAME extension. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pDescriptor` -/// + `nullptr == phBuilder` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_RTAS_BUILDER_EXP_VERSION_CURRENT < pDescriptor->builderVersion` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / - The implementation must support ::ZE_RTAS_BUILDER_EXP_NAME extension. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pDescriptor` +// / + `nullptr == phBuilder` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_RTAS_BUILDER_EXP_VERSION_CURRENT < pDescriptor->builderVersion` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeRTASBuilderCreateExp( - hDriver ZeDriverHandle, // hDriver [in] handle of driver object - pDescriptor *ZeRtasBuilderExpDesc, // pDescriptor [in] pointer to builder descriptor - phBuilder *ZeRtasBuilderExpHandle, // phBuilder [out] handle of builder object + hDriver ZeDriverHandle, // hDriver [in] handle of driver object + pDescriptor *ZeRtasBuilderExpDesc, // pDescriptor [in] pointer to builder descriptor + phBuilder *ZeRtasBuilderExpHandle, // phBuilder [out] handle of builder object ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASBuilderCreateExp", uintptr(hDriver), uintptr(unsafe.Pointer(pDescriptor)), uintptr(unsafe.Pointer(phBuilder))) } // ZeRTASBuilderGetBuildPropertiesExp Retrieves ray tracing acceleration structure builder properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hBuilder` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pBuildOpDescriptor` -/// + `nullptr == pProperties` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_RTAS_FORMAT_EXP_MAX < pBuildOpDescriptor->rtasFormat` -/// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH < pBuildOpDescriptor->buildQuality` -/// + `0x3 < pBuildOpDescriptor->buildFlags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hBuilder` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pBuildOpDescriptor` +// / + `nullptr == pProperties` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_RTAS_FORMAT_EXP_MAX < pBuildOpDescriptor->rtasFormat` +// / + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH < pBuildOpDescriptor->buildQuality` +// / + `0x3 < pBuildOpDescriptor->buildFlags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeRTASBuilderGetBuildPropertiesExp( - hBuilder ZeRtasBuilderExpHandle, // hBuilder [in] handle of builder object - pBuildOpDescriptor *ZeRtasBuilderBuildOpExpDesc, // pBuildOpDescriptor [in] pointer to build operation descriptor - pProperties *ZeRtasBuilderExpProperties, // pProperties [in,out] query result for builder properties + hBuilder ZeRtasBuilderExpHandle, // hBuilder [in] handle of builder object + pBuildOpDescriptor *ZeRtasBuilderBuildOpExpDesc, // pBuildOpDescriptor [in] pointer to build operation descriptor + pProperties *ZeRtasBuilderExpProperties, // pProperties [in,out] query result for builder properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASBuilderGetBuildPropertiesExp", uintptr(hBuilder), uintptr(unsafe.Pointer(pBuildOpDescriptor)), uintptr(unsafe.Pointer(pProperties))) } // ZeDriverRTASFormatCompatibilityCheckExp Checks ray tracing acceleration structure format compatibility -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_RTAS_FORMAT_EXP_MAX < rtasFormatA` -/// + `::ZE_RTAS_FORMAT_EXP_MAX < rtasFormatB` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_SUCCESS -/// + An acceleration structure built with `rtasFormatA` is compatible with devices that report `rtasFormatB`. -/// - ::ZE_RESULT_EXP_ERROR_OPERANDS_INCOMPATIBLE -/// + An acceleration structure built with `rtasFormatA` is **not** compatible with devices that report `rtasFormatB`. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_RTAS_FORMAT_EXP_MAX < rtasFormatA` +// / + `::ZE_RTAS_FORMAT_EXP_MAX < rtasFormatB` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_SUCCESS +// / + An acceleration structure built with `rtasFormatA` is compatible with devices that report `rtasFormatB`. +// / - ::ZE_RESULT_EXP_ERROR_OPERANDS_INCOMPATIBLE +// / + An acceleration structure built with `rtasFormatA` is **not** compatible with devices that report `rtasFormatB`. func ZeDriverRTASFormatCompatibilityCheckExp( - hDriver ZeDriverHandle, // hDriver [in] handle of driver object - rtasFormatA ZeRtasFormatExp, // rtasFormatA [in] operand A - rtasFormatB ZeRtasFormatExp, // rtasFormatB [in] operand B + hDriver ZeDriverHandle, // hDriver [in] handle of driver object + rtasFormatA ZeRtasFormatExp, // rtasFormatA [in] operand A + rtasFormatB ZeRtasFormatExp, // rtasFormatB [in] operand B ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDriverRTASFormatCompatibilityCheckExp", uintptr(hDriver), uintptr(rtasFormatA), uintptr(rtasFormatB)) } // ZeRTASBuilderBuildExp Build ray tracing acceleration structure -/// -/// @details -/// - This function builds an acceleration structure of the scene consisting -/// of the specified geometry information and writes the acceleration -/// structure to the provided destination buffer. All types of geometries -/// can get freely mixed inside a scene. -/// - It is the user's responsibility to manage the acceleration structure -/// buffer allocation, de-allocation, and potential prefetching to the -/// device memory. The required size of the acceleration structure buffer -/// can be queried with the ::zeRTASBuilderGetBuildPropertiesExp function. -/// The acceleration structure buffer must be a shared USM allocation and -/// should be present on the host at build time. The referenced scene data -/// (index- and vertex- buffers) can be standard host allocations, and -/// will not be referenced into by the build acceleration structure. -/// - Before an acceleration structure can be built, the user must allocate -/// the memory for the acceleration structure buffer and scratch buffer -/// using sizes based on a query for the estimated size properties. -/// - When using the "worst-case" size for the acceleration structure -/// buffer, the acceleration structure construction will never fail with ::ZE_RESULT_EXP_RTAS_BUILD_RETRY. -/// - When using the "expected" size for the acceleration structure buffer, -/// the acceleration structure construction may fail with -/// ::ZE_RESULT_EXP_RTAS_BUILD_RETRY. If this happens, the user may resize -/// their acceleration structure buffer using the returned -/// `*pRtasBufferSizeBytes` value, which will be updated with an improved -/// size estimate that will likely result in a successful build. -/// - The acceleration structure construction is run on the host and is -/// synchronous, thus after the function returns with a successful result, -/// the acceleration structure may be used. -/// - All provided data buffers must be host-accessible. -/// - The acceleration structure buffer must be a USM allocation. -/// - A successfully constructed acceleration structure is entirely -/// self-contained. There is no requirement for input data to persist -/// beyond build completion. -/// - A successfully constructed acceleration structure is non-copyable. -/// - Acceleration structure construction may be parallelized by passing a -/// valid handle to a parallel operation object and joining that parallel -/// operation using ::zeRTASParallelOperationJoinExp with user-provided -/// worker threads. -/// - **Additional Notes** -/// - "The geometry infos array, geometry infos, and scratch buffer must -/// all be standard host memory allocations." -/// - "A pointer to a geometry info can be a null pointer, in which case -/// the geometry is treated as empty." -/// - "If no parallel operation handle is provided, the build is run -/// sequentially on the current thread." -/// - "A parallel operation object may only be associated with a single -/// acceleration structure build at a time." -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hBuilder` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pBuildOpDescriptor` -/// + `nullptr == pScratchBuffer` -/// + `nullptr == pRtasBuffer` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_RTAS_FORMAT_EXP_MAX < pBuildOpDescriptor->rtasFormat` -/// + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH < pBuildOpDescriptor->buildQuality` -/// + `0x3 < pBuildOpDescriptor->buildFlags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_EXP_RTAS_BUILD_DEFERRED -/// + Acceleration structure build completion is deferred to parallel operation join. -/// - ::ZE_RESULT_EXP_RTAS_BUILD_RETRY -/// + Acceleration structure build failed due to insufficient resources, retry the build operation with a larger acceleration structure buffer allocation. -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE -/// + Acceleration structure build failed due to parallel operation object participation in another build operation. +// / +// / @details +// / - This function builds an acceleration structure of the scene consisting +// / of the specified geometry information and writes the acceleration +// / structure to the provided destination buffer. All types of geometries +// / can get freely mixed inside a scene. +// / - It is the user's responsibility to manage the acceleration structure +// / buffer allocation, de-allocation, and potential prefetching to the +// / device memory. The required size of the acceleration structure buffer +// / can be queried with the ::zeRTASBuilderGetBuildPropertiesExp function. +// / The acceleration structure buffer must be a shared USM allocation and +// / should be present on the host at build time. The referenced scene data +// / (index- and vertex- buffers) can be standard host allocations, and +// / will not be referenced into by the build acceleration structure. +// / - Before an acceleration structure can be built, the user must allocate +// / the memory for the acceleration structure buffer and scratch buffer +// / using sizes based on a query for the estimated size properties. +// / - When using the "worst-case" size for the acceleration structure +// / buffer, the acceleration structure construction will never fail with ::ZE_RESULT_EXP_RTAS_BUILD_RETRY. +// / - When using the "expected" size for the acceleration structure buffer, +// / the acceleration structure construction may fail with +// / ::ZE_RESULT_EXP_RTAS_BUILD_RETRY. If this happens, the user may resize +// / their acceleration structure buffer using the returned +// / `*pRtasBufferSizeBytes` value, which will be updated with an improved +// / size estimate that will likely result in a successful build. +// / - The acceleration structure construction is run on the host and is +// / synchronous, thus after the function returns with a successful result, +// / the acceleration structure may be used. +// / - All provided data buffers must be host-accessible. +// / - The acceleration structure buffer must be a USM allocation. +// / - A successfully constructed acceleration structure is entirely +// / self-contained. There is no requirement for input data to persist +// / beyond build completion. +// / - A successfully constructed acceleration structure is non-copyable. +// / - Acceleration structure construction may be parallelized by passing a +// / valid handle to a parallel operation object and joining that parallel +// / operation using ::zeRTASParallelOperationJoinExp with user-provided +// / worker threads. +// / - **Additional Notes** +// / - "The geometry infos array, geometry infos, and scratch buffer must +// / all be standard host memory allocations." +// / - "A pointer to a geometry info can be a null pointer, in which case +// / the geometry is treated as empty." +// / - "If no parallel operation handle is provided, the build is run +// / sequentially on the current thread." +// / - "A parallel operation object may only be associated with a single +// / acceleration structure build at a time." +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hBuilder` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pBuildOpDescriptor` +// / + `nullptr == pScratchBuffer` +// / + `nullptr == pRtasBuffer` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_RTAS_FORMAT_EXP_MAX < pBuildOpDescriptor->rtasFormat` +// / + `::ZE_RTAS_BUILDER_BUILD_QUALITY_HINT_EXP_HIGH < pBuildOpDescriptor->buildQuality` +// / + `0x3 < pBuildOpDescriptor->buildFlags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_EXP_RTAS_BUILD_DEFERRED +// / + Acceleration structure build completion is deferred to parallel operation join. +// / - ::ZE_RESULT_EXP_RTAS_BUILD_RETRY +// / + Acceleration structure build failed due to insufficient resources, retry the build operation with a larger acceleration structure buffer allocation. +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / + Acceleration structure build failed due to parallel operation object participation in another build operation. func ZeRTASBuilderBuildExp( - hBuilder ZeRtasBuilderExpHandle, // hBuilder [in] handle of builder object - pBuildOpDescriptor *ZeRtasBuilderBuildOpExpDesc, // pBuildOpDescriptor [in] pointer to build operation descriptor - pScratchBuffer unsafe.Pointer, // pScratchBuffer [in][range(0, `scratchBufferSizeBytes`)] scratch buffer to be used during acceleration structure construction - scratchBufferSizeBytes uintptr, // scratchBufferSizeBytes [in] size of scratch buffer, in bytes - pRtasBuffer unsafe.Pointer, // pRtasBuffer [in] pointer to destination buffer - rtasBufferSizeBytes uintptr, // rtasBufferSizeBytes [in] destination buffer size, in bytes - hParallelOperation ZeRtasParallelOperationExpHandle, // hParallelOperation [in][optional] handle to parallel operation object - pBuildUserPtr unsafe.Pointer, // pBuildUserPtr [in][optional] pointer passed to callbacks - pBounds *ZeRtasAabbExp, // pBounds [in,out][optional] pointer to destination address for acceleration structure bounds - pRtasBufferSizeBytes *uintptr, // pRtasBufferSizeBytes [out][optional] updated acceleration structure size requirement, in bytes + hBuilder ZeRtasBuilderExpHandle, // hBuilder [in] handle of builder object + pBuildOpDescriptor *ZeRtasBuilderBuildOpExpDesc, // pBuildOpDescriptor [in] pointer to build operation descriptor + pScratchBuffer unsafe.Pointer, // pScratchBuffer [in][range(0, `scratchBufferSizeBytes`)] scratch buffer to be used during acceleration structure construction + scratchBufferSizeBytes uintptr, // scratchBufferSizeBytes [in] size of scratch buffer, in bytes + pRtasBuffer unsafe.Pointer, // pRtasBuffer [in] pointer to destination buffer + rtasBufferSizeBytes uintptr, // rtasBufferSizeBytes [in] destination buffer size, in bytes + hParallelOperation ZeRtasParallelOperationExpHandle, // hParallelOperation [in][optional] handle to parallel operation object + pBuildUserPtr unsafe.Pointer, // pBuildUserPtr [in][optional] pointer passed to callbacks + pBounds *ZeRtasAabbExp, // pBounds [in,out][optional] pointer to destination address for acceleration structure bounds + pRtasBufferSizeBytes *uintptr, // pRtasBufferSizeBytes [out][optional] updated acceleration structure size requirement, in bytes ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASBuilderBuildExp", uintptr(hBuilder), uintptr(unsafe.Pointer(pBuildOpDescriptor)), uintptr(unsafe.Pointer(pScratchBuffer)), uintptr(scratchBufferSizeBytes), uintptr(unsafe.Pointer(pRtasBuffer)), uintptr(rtasBufferSizeBytes), uintptr(hParallelOperation), uintptr(unsafe.Pointer(pBuildUserPtr)), uintptr(unsafe.Pointer(pBounds)), uintptr(unsafe.Pointer(pRtasBufferSizeBytes))) } // ZeRTASBuilderDestroyExp Destroys a ray tracing acceleration structure builder object -/// -/// @details -/// - The implementation of this function may immediately release any -/// internal Host and Device resources associated with this builder. -/// - The application must **not** call this function from simultaneous -/// threads with the same builder handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hBuilder` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The implementation of this function may immediately release any +// / internal Host and Device resources associated with this builder. +// / - The application must **not** call this function from simultaneous +// / threads with the same builder handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hBuilder` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeRTASBuilderDestroyExp( - hBuilder ZeRtasBuilderExpHandle, // hBuilder [in][release] handle of builder object to destroy + hBuilder ZeRtasBuilderExpHandle, // hBuilder [in][release] handle of builder object to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASBuilderDestroyExp", uintptr(hBuilder)) } // ZeRTASParallelOperationCreateExp Creates a ray tracing acceleration structure builder parallel -/// operation object -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_RTAS_BUILDER_EXP_NAME extension. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phParallelOperation` +// / operation object +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / - The implementation must support ::ZE_RTAS_BUILDER_EXP_NAME extension. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phParallelOperation` func ZeRTASParallelOperationCreateExp( - hDriver ZeDriverHandle, // hDriver [in] handle of driver object - phParallelOperation *ZeRtasParallelOperationExpHandle, // phParallelOperation [out] handle of parallel operation object + hDriver ZeDriverHandle, // hDriver [in] handle of driver object + phParallelOperation *ZeRtasParallelOperationExpHandle, // phParallelOperation [out] handle of parallel operation object ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASParallelOperationCreateExp", uintptr(hDriver), uintptr(unsafe.Pointer(phParallelOperation))) } // ZeRTASParallelOperationGetPropertiesExp Retrieves ray tracing acceleration structure builder parallel -/// operation properties -/// -/// @details -/// - The application must first bind the parallel operation object to a -/// build operation before it may query the parallel operation properties. -/// In other words, the application must first call -/// ::zeRTASBuilderBuildExp with **hParallelOperation** before calling -/// this function. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hParallelOperation` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / operation properties +// / +// / @details +// / - The application must first bind the parallel operation object to a +// / build operation before it may query the parallel operation properties. +// / In other words, the application must first call +// / ::zeRTASBuilderBuildExp with **hParallelOperation** before calling +// / this function. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hParallelOperation` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZeRTASParallelOperationGetPropertiesExp( - hParallelOperation ZeRtasParallelOperationExpHandle, // hParallelOperation [in] handle of parallel operation object - pProperties *ZeRtasParallelOperationExpProperties, // pProperties [in,out] query result for parallel operation properties + hParallelOperation ZeRtasParallelOperationExpHandle, // hParallelOperation [in] handle of parallel operation object + pProperties *ZeRtasParallelOperationExpProperties, // pProperties [in,out] query result for parallel operation properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASParallelOperationGetPropertiesExp", uintptr(hParallelOperation), uintptr(unsafe.Pointer(pProperties))) } // ZeRTASParallelOperationJoinExp Joins a parallel build operation -/// -/// @details -/// - All worker threads return the same error code for the parallel build -/// operation upon build completion -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hParallelOperation` +// / +// / @details +// / - All worker threads return the same error code for the parallel build +// / operation upon build completion +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hParallelOperation` func ZeRTASParallelOperationJoinExp( - hParallelOperation ZeRtasParallelOperationExpHandle, // hParallelOperation [in] handle of parallel operation object + hParallelOperation ZeRtasParallelOperationExpHandle, // hParallelOperation [in] handle of parallel operation object ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASParallelOperationJoinExp", uintptr(hParallelOperation)) } // ZeRTASParallelOperationDestroyExp Destroys a ray tracing acceleration structure builder parallel -/// operation object -/// -/// @details -/// - The implementation of this function may immediately release any -/// internal Host and Device resources associated with this parallel -/// operation. -/// - The application must **not** call this function from simultaneous -/// threads with the same parallel operation handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hParallelOperation` +// / operation object +// / +// / @details +// / - The implementation of this function may immediately release any +// / internal Host and Device resources associated with this parallel +// / operation. +// / - The application must **not** call this function from simultaneous +// / threads with the same parallel operation handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hParallelOperation` func ZeRTASParallelOperationDestroyExp( - hParallelOperation ZeRtasParallelOperationExpHandle, // hParallelOperation [in][release] handle of parallel operation object to destroy + hParallelOperation ZeRtasParallelOperationExpHandle, // hParallelOperation [in][release] handle of parallel operation object to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zeRTASParallelOperationDestroyExp", uintptr(hParallelOperation)) } - diff --git a/core_SRGB.go b/core_SRGB.go index 893b1ee..162061d 100644 --- a/core_SRGB.go +++ b/core_SRGB.go @@ -22,23 +22,23 @@ const ZE_SRGB_EXT_NAME = "ZE_extension_srgb" // ZeSrgbExtVersion (ze_srgb_ext_version_t) sRGB Extension Version(s) type ZeSrgbExtVersion uintptr + const ( - ZE_SRGB_EXT_VERSION_1_0 ZeSrgbExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SRGB_EXT_VERSION_1_0 version 1.0 - ZE_SRGB_EXT_VERSION_CURRENT ZeSrgbExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SRGB_EXT_VERSION_CURRENT latest known version - ZE_SRGB_EXT_VERSION_FORCE_UINT32 ZeSrgbExtVersion = 0x7fffffff // ZE_SRGB_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_SRGB_EXT_VERSION_* ENUMs + ZE_SRGB_EXT_VERSION_1_0 ZeSrgbExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_SRGB_EXT_VERSION_1_0 version 1.0 + ZE_SRGB_EXT_VERSION_CURRENT ZeSrgbExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_SRGB_EXT_VERSION_CURRENT latest known version + ZE_SRGB_EXT_VERSION_FORCE_UINT32 ZeSrgbExtVersion = 0x7fffffff // ZE_SRGB_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_SRGB_EXT_VERSION_* ENUMs ) // ZeSrgbExtDesc (ze_srgb_ext_desc_t) sRGB image descriptor -/// -/// @details -/// - This structure may be passed to ::zeImageCreate via the `pNext` member -/// of ::ze_image_desc_t -/// - Used for specifying that the image is in sRGB format. +// / +// / @details +// / - This structure may be passed to ::zeImageCreate via the `pNext` member +// / of ::ze_image_desc_t +// / - Used for specifying that the image is in sRGB format. type ZeSrgbExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Srgb ZeBool // Srgb [in] Is sRGB. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Srgb ZeBool // Srgb [in] Is sRGB. } - diff --git a/core_bandwidth.go b/core_bandwidth.go index d3d111c..6ac56ee 100644 --- a/core_bandwidth.go +++ b/core_bandwidth.go @@ -22,42 +22,42 @@ const ZE_BANDWIDTH_PROPERTIES_EXP_NAME = "ZE_experimental_bandwidth_properties" // ZeBandwidthPropertiesExpVersion (ze_bandwidth_properties_exp_version_t) Bandwidth Extension Version(s) type ZeBandwidthPropertiesExpVersion uintptr + const ( - ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_1_0 ZeBandwidthPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_1_0 version 1.0 - ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_CURRENT ZeBandwidthPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_CURRENT latest known version - ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_FORCE_UINT32 ZeBandwidthPropertiesExpVersion = 0x7fffffff // ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_* ENUMs + ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_1_0 ZeBandwidthPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_1_0 version 1.0 + ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_CURRENT ZeBandwidthPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_CURRENT latest known version + ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_FORCE_UINT32 ZeBandwidthPropertiesExpVersion = 0x7fffffff // ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_BANDWIDTH_PROPERTIES_EXP_VERSION_* ENUMs ) // ZeDeviceP2pBandwidthExpProperties (ze_device_p2p_bandwidth_exp_properties_t) P2P Bandwidth Properties -/// -/// @details -/// - This structure may be passed to ::zeDeviceGetP2PProperties by having -/// the pNext member of ::ze_device_p2p_properties_t point at this struct. +// / +// / @details +// / - This structure may be passed to ::zeDeviceGetP2PProperties by having +// / the pNext member of ::ze_device_p2p_properties_t point at this struct. type ZeDeviceP2pBandwidthExpProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Logicalbandwidth uint32 // Logicalbandwidth [out] total logical design bandwidth for all links connecting the two devices - Physicalbandwidth uint32 // Physicalbandwidth [out] total physical design bandwidth for all links connecting the two devices - Bandwidthunit ZeBandwidthUnit // Bandwidthunit [out] bandwidth unit - Logicallatency uint32 // Logicallatency [out] average logical design latency for all links connecting the two devices - Physicallatency uint32 // Physicallatency [out] average physical design latency for all links connecting the two devices - Latencyunit ZeLatencyUnit // Latencyunit [out] latency unit + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Logicalbandwidth uint32 // Logicalbandwidth [out] total logical design bandwidth for all links connecting the two devices + Physicalbandwidth uint32 // Physicalbandwidth [out] total physical design bandwidth for all links connecting the two devices + Bandwidthunit ZeBandwidthUnit // Bandwidthunit [out] bandwidth unit + Logicallatency uint32 // Logicallatency [out] average logical design latency for all links connecting the two devices + Physicallatency uint32 // Physicallatency [out] average physical design latency for all links connecting the two devices + Latencyunit ZeLatencyUnit // Latencyunit [out] latency unit } // ZeCopyBandwidthExpProperties (ze_copy_bandwidth_exp_properties_t) Copy Bandwidth Properties -/// -/// @details -/// - This structure may be passed to -/// ::zeDeviceGetCommandQueueGroupProperties by having the pNext member of -/// ::ze_command_queue_group_properties_t point at this struct. -/// - [DEPRECATED] +// / +// / @details +// / - This structure may be passed to +// / ::zeDeviceGetCommandQueueGroupProperties by having the pNext member of +// / ::ze_command_queue_group_properties_t point at this struct. +// / - [DEPRECATED] type ZeCopyBandwidthExpProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Copybandwidth uint32 // Copybandwidth [out] design bandwidth supported by this engine type for copy operations - Copybandwidthunit ZeBandwidthUnit // Copybandwidthunit [out] copy bandwidth unit + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Copybandwidth uint32 // Copybandwidth [out] design bandwidth supported by this engine type for copy operations + Copybandwidthunit ZeBandwidthUnit // Copybandwidthunit [out] copy bandwidth unit } - diff --git a/core_barrier.go b/core_barrier.go index d1c2034..008a4d9 100644 --- a/core_barrier.go +++ b/core_barrier.go @@ -20,136 +20,135 @@ import ( ) // ZeCommandListAppendBarrier Appends an execution and global memory barrier into a command list. -/// -/// @details -/// - The application must ensure the events are accessible by the device on -/// which the command list was created. -/// - If numWaitEvents is zero, then all previous commands, enqueued on same -/// command queue, must complete prior to the execution of the barrier. -/// This is not the case when numWaitEvents is non-zero. -/// - If numWaitEvents is non-zero, then only all phWaitEvents must be -/// signaled prior to the execution of the barrier. -/// - This command blocks all following commands from beginning until the -/// execution of the barrier completes. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **vkCmdPipelineBarrier** -/// - clEnqueueBarrierWithWaitList -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the events are accessible by the device on +// / which the command list was created. +// / - If numWaitEvents is zero, then all previous commands, enqueued on same +// / command queue, must complete prior to the execution of the barrier. +// / This is not the case when numWaitEvents is non-zero. +// / - If numWaitEvents is non-zero, then only all phWaitEvents must be +// / signaled prior to the execution of the barrier. +// / - This command blocks all following commands from beginning until the +// / execution of the barrier completes. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **vkCmdPipelineBarrier** +// / - clEnqueueBarrierWithWaitList +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendBarrier( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before executing barrier; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing barrier + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before executing barrier; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing barrier ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendBarrier", uintptr(hCommandList), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListAppendMemoryRangesBarrier Appends a global memory ranges barrier into a command list. -/// -/// @details -/// - The application must ensure the events are accessible by the device on -/// which the command list was created. -/// - If numWaitEvents is zero, then all previous commands are completed -/// prior to the execution of the barrier. -/// - If numWaitEvents is non-zero, then then all phWaitEvents must be -/// signaled prior to the execution of the barrier. -/// - This command blocks all following commands from beginning until the -/// execution of the barrier completes. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pRangeSizes` -/// + `nullptr == pRanges` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the events are accessible by the device on +// / which the command list was created. +// / - If numWaitEvents is zero, then all previous commands are completed +// / prior to the execution of the barrier. +// / - If numWaitEvents is non-zero, then then all phWaitEvents must be +// / signaled prior to the execution of the barrier. +// / - This command blocks all following commands from beginning until the +// / execution of the barrier completes. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pRangeSizes` +// / + `nullptr == pRanges` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendMemoryRangesBarrier( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - numRanges uint32, // numRanges [in] number of memory ranges - pRangeSizes *uintptr, // pRangeSizes [in][range(0, numRanges)] array of sizes of memory range - pRanges *unsafe.Pointer, // pRanges [in][range(0, numRanges)] array of memory ranges - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before executing barrier; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing barrier + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + numRanges uint32, // numRanges [in] number of memory ranges + pRangeSizes *uintptr, // pRangeSizes [in][range(0, numRanges)] array of sizes of memory range + pRanges *unsafe.Pointer, // pRanges [in][range(0, numRanges)] array of memory ranges + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before executing barrier; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing barrier ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendMemoryRangesBarrier", uintptr(hCommandList), uintptr(numRanges), uintptr(unsafe.Pointer(pRangeSizes)), uintptr(unsafe.Pointer(pRanges)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeContextSystemBarrier Ensures in-bound writes to the device are globally observable. -/// -/// @details -/// - This is a special-case system level barrier that can be used to ensure -/// global observability of writes; -/// typically needed after a producer (e.g., NIC) performs direct writes -/// to the device's memory (e.g., Direct RDMA writes). -/// This is typically required when the memory corresponding to the writes -/// is subsequently accessed from a remote device. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` +// / +// / @details +// / - This is a special-case system level barrier that can be used to ensure +// / global observability of writes; +// / typically needed after a producer (e.g., NIC) performs direct writes +// / to the device's memory (e.g., Direct RDMA writes). +// / This is typically required when the memory corresponding to the writes +// / is subsequently accessed from a remote device. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` func ZeContextSystemBarrier( - hContext ZeContextHandle, // hContext [in] handle of context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device + hContext ZeContextHandle, // hContext [in] handle of context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device ) (ZeResult, error) { return zecall.Call[ZeResult]("zeContextSystemBarrier", uintptr(hContext), uintptr(hDevice)) } - diff --git a/core_bfloat16conversions.go b/core_bfloat16conversions.go index 58ef702..539a947 100644 --- a/core_bfloat16conversions.go +++ b/core_bfloat16conversions.go @@ -18,10 +18,10 @@ const ZE_BFLOAT16_CONVERSIONS_EXT_NAME = "ZE_extension_bfloat16_conversions" // ZeBfloat16ConversionsExtVersion (ze_bfloat16_conversions_ext_version_t) Bfloat16 Conversions Extension Version(s) type ZeBfloat16ConversionsExtVersion uintptr + const ( - ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_1_0 ZeBfloat16ConversionsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_1_0 version 1.0 - ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_CURRENT ZeBfloat16ConversionsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_CURRENT latest known version - ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_FORCE_UINT32 ZeBfloat16ConversionsExtVersion = 0x7fffffff // ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_* ENUMs + ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_1_0 ZeBfloat16ConversionsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_1_0 version 1.0 + ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_CURRENT ZeBfloat16ConversionsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_CURRENT latest known version + ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_FORCE_UINT32 ZeBfloat16ConversionsExtVersion = 0x7fffffff // ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_BFLOAT16_CONVERSIONS_EXT_VERSION_* ENUMs ) - diff --git a/core_bindlessimages.go b/core_bindlessimages.go index 3f40744..28395b0 100644 --- a/core_bindlessimages.go +++ b/core_bindlessimages.go @@ -24,157 +24,158 @@ const ZE_BINDLESS_IMAGE_EXP_NAME = "ZE_experimental_bindless_image" // ZeBindlessImageExpVersion (ze_bindless_image_exp_version_t) Bindless Image Extension Version(s) type ZeBindlessImageExpVersion uintptr + const ( - ZE_BINDLESS_IMAGE_EXP_VERSION_1_0 ZeBindlessImageExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_BINDLESS_IMAGE_EXP_VERSION_1_0 version 1.0 - ZE_BINDLESS_IMAGE_EXP_VERSION_CURRENT ZeBindlessImageExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_BINDLESS_IMAGE_EXP_VERSION_CURRENT latest known version - ZE_BINDLESS_IMAGE_EXP_VERSION_FORCE_UINT32 ZeBindlessImageExpVersion = 0x7fffffff // ZE_BINDLESS_IMAGE_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_BINDLESS_IMAGE_EXP_VERSION_* ENUMs + ZE_BINDLESS_IMAGE_EXP_VERSION_1_0 ZeBindlessImageExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_BINDLESS_IMAGE_EXP_VERSION_1_0 version 1.0 + ZE_BINDLESS_IMAGE_EXP_VERSION_CURRENT ZeBindlessImageExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_BINDLESS_IMAGE_EXP_VERSION_CURRENT latest known version + ZE_BINDLESS_IMAGE_EXP_VERSION_FORCE_UINT32 ZeBindlessImageExpVersion = 0x7fffffff // ZE_BINDLESS_IMAGE_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_BINDLESS_IMAGE_EXP_VERSION_* ENUMs ) // ZeImageBindlessExpFlags (ze_image_bindless_exp_flags_t) Image flags for Bindless images type ZeImageBindlessExpFlags uint32 + const ( - ZE_IMAGE_BINDLESS_EXP_FLAG_BINDLESS ZeImageBindlessExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_IMAGE_BINDLESS_EXP_FLAG_BINDLESS Bindless images are created with ::zeImageCreate. The image handle + ZE_IMAGE_BINDLESS_EXP_FLAG_BINDLESS ZeImageBindlessExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_IMAGE_BINDLESS_EXP_FLAG_BINDLESS Bindless images are created with ::zeImageCreate. The image handle ///< created with this flag is valid on both host and device. - ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE ZeImageBindlessExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE Bindless sampled images are created with ::zeImageCreate by combining + ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE ZeImageBindlessExpFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE Bindless sampled images are created with ::zeImageCreate by combining ///< BINDLESS and SAMPLED_IMAGE. ///< Create sampled image view from bindless unsampled image using SAMPLED_IMAGE. - ZE_IMAGE_BINDLESS_EXP_FLAG_FORCE_UINT32 ZeImageBindlessExpFlags = 0x7fffffff // ZE_IMAGE_BINDLESS_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_IMAGE_BINDLESS_EXP_FLAG_* ENUMs + ZE_IMAGE_BINDLESS_EXP_FLAG_FORCE_UINT32 ZeImageBindlessExpFlags = 0x7fffffff // ZE_IMAGE_BINDLESS_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_IMAGE_BINDLESS_EXP_FLAG_* ENUMs ) // ZeImageBindlessExpDesc (ze_image_bindless_exp_desc_t) Image descriptor for bindless images. This structure may be passed to -/// ::zeImageCreate via pNext member of ::ze_image_desc_t. +// / ::zeImageCreate via pNext member of ::ze_image_desc_t. type ZeImageBindlessExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeImageBindlessExpFlags // Flags [in] image flags. must be 0 (default) or a valid value of ::ze_image_bindless_exp_flag_t default behavior is bindless images are not used when creating handles via ::zeImageCreate. When the flag is passed to ::zeImageCreate, then only the memory for the image is allocated. Additional image handles can be created with ::zeImageViewCreateExt. When ::ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE flag is passed, ::ze_sampler_desc_t must be attached via pNext member of ::ze_image_bindless_exp_desc_t. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeImageBindlessExpFlags // Flags [in] image flags. must be 0 (default) or a valid value of ::ze_image_bindless_exp_flag_t default behavior is bindless images are not used when creating handles via ::zeImageCreate. When the flag is passed to ::zeImageCreate, then only the memory for the image is allocated. Additional image handles can be created with ::zeImageViewCreateExt. When ::ZE_IMAGE_BINDLESS_EXP_FLAG_SAMPLED_IMAGE flag is passed, ::ze_sampler_desc_t must be attached via pNext member of ::ze_image_bindless_exp_desc_t. } // ZeImagePitchedExpDesc (ze_image_pitched_exp_desc_t) Image descriptor for bindless images created from pitched allocations. -/// This structure may be passed to ::zeImageCreate via pNext member of -/// ::ze_image_desc_t. +// / This structure may be passed to ::zeImageCreate via pNext member of +// / ::ze_image_desc_t. type ZeImagePitchedExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Ptr unsafe.Pointer // Ptr [in] pointer to pitched device allocation allocated using ::zeMemAllocDevice + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Ptr unsafe.Pointer // Ptr [in] pointer to pitched device allocation allocated using ::zeMemAllocDevice } // ZeDevicePitchedAllocExpProperties (ze_device_pitched_alloc_exp_properties_t) Device specific properties for pitched allocations -/// -/// @details -/// - This structure may be passed to ::zeDeviceGetImageProperties via the -/// pNext member of ::ze_device_image_properties_t. +// / +// / @details +// / - This structure may be passed to ::zeDeviceGetImageProperties via the +// / pNext member of ::ze_device_image_properties_t. type ZeDevicePitchedAllocExpProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Maximagelinearwidth uintptr // Maximagelinearwidth [out] Maximum image linear width. - Maximagelinearheight uintptr // Maximagelinearheight [out] Maximum image linear height. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Maximagelinearwidth uintptr // Maximagelinearwidth [out] Maximum image linear width. + Maximagelinearheight uintptr // Maximagelinearheight [out] Maximum image linear height. } // ZePitchedAlloc2dimageLinearPitchExpInfo (ze_pitched_alloc_2dimage_linear_pitch_exp_info_t) Pitch information for 2-dimensional linear pitched allocations -/// -/// @details -/// - This structure may be passed to ::zeDeviceGetImageProperties in -/// conjunction with the ::ze_device_pitched_alloc_exp_properties_t via -/// its pNext member +// / +// / @details +// / - This structure may be passed to ::zeDeviceGetImageProperties in +// / conjunction with the ::ze_device_pitched_alloc_exp_properties_t via +// / its pNext member type ZePitchedAlloc2dimageLinearPitchExpInfo struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Pitchalign uintptr // Pitchalign [out] Required pitch Aligment in Bytes. - Maxsupportedpitch uintptr // Maxsupportedpitch [out] Maximum allowed pitch in Bytes. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Pitchalign uintptr // Pitchalign [out] Required pitch Aligment in Bytes. + Maxsupportedpitch uintptr // Maxsupportedpitch [out] Maximum allowed pitch in Bytes. } // ZeMemGetPitchFor2dImage Retrieves pitch information that can be used to allocate USM memory -/// for a given image. -/// -/// @details -/// - Retrieves pitch for 2D image given the width, height and size in bytes -/// - The memory is then allocated using ::zeMemAllocDevice by providing -/// input size calculated as the returned pitch value multiplied by image height -/// - The application may call this function from simultaneous threads -/// - The implementation of this function must be thread-safe. -/// - The implementation of this function should be lock-free. -/// - The implementation must support ::ZE_BINDLESS_IMAGE_EXP_NAME extension. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` +// / for a given image. +// / +// / @details +// / - Retrieves pitch for 2D image given the width, height and size in bytes +// / - The memory is then allocated using ::zeMemAllocDevice by providing +// / input size calculated as the returned pitch value multiplied by image height +// / - The application may call this function from simultaneous threads +// / - The implementation of this function must be thread-safe. +// / - The implementation of this function should be lock-free. +// / - The implementation must support ::ZE_BINDLESS_IMAGE_EXP_NAME extension. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` func ZeMemGetPitchFor2dImage( - hContext ZeContextHandle, // hContext [in] handle of the context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - imageWidth uintptr, // imageWidth [in] imageWidth - imageHeight uintptr, // imageHeight [in] imageHeight - elementSizeInBytes uint32, // elementSizeInBytes [in] Element size in bytes - rowPitch *uintptr, // rowPitch [out] rowPitch + hContext ZeContextHandle, // hContext [in] handle of the context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + imageWidth uintptr, // imageWidth [in] imageWidth + imageHeight uintptr, // imageHeight [in] imageHeight + elementSizeInBytes uint32, // elementSizeInBytes [in] Element size in bytes + rowPitch *uintptr, // rowPitch [out] rowPitch ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemGetPitchFor2dImage", uintptr(hContext), uintptr(hDevice), uintptr(imageWidth), uintptr(imageHeight), uintptr(elementSizeInBytes), uintptr(unsafe.Pointer(rowPitch))) } // ZeImageGetDeviceOffsetExp Get bindless device offset for image -/// -/// @details -/// - The application may call this function from simultaneous threads -/// - The implementation of this function must be thread-safe. -/// - The implementation of this function should be lock-free. -/// - The implementation must support ::ZE_BINDLESS_IMAGE_EXP_NAME -/// extension. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hImage` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pDeviceOffset` +// / +// / @details +// / - The application may call this function from simultaneous threads +// / - The implementation of this function must be thread-safe. +// / - The implementation of this function should be lock-free. +// / - The implementation must support ::ZE_BINDLESS_IMAGE_EXP_NAME +// / extension. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hImage` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pDeviceOffset` func ZeImageGetDeviceOffsetExp( - hImage ZeImageHandle, // hImage [in] handle of the image - pDeviceOffset *uint64, // pDeviceOffset [out] bindless device offset for image + hImage ZeImageHandle, // hImage [in] handle of the image + pDeviceOffset *uint64, // pDeviceOffset [out] bindless device offset for image ) (ZeResult, error) { return zecall.Call[ZeResult]("zeImageGetDeviceOffsetExp", uintptr(hImage), uintptr(unsafe.Pointer(pDeviceOffset))) } // ZeCustomPitchExpDesc (ze_custom_pitch_exp_desc_t) Specify user defined pitch for pitched linear image allocations. This -/// structure may be passed to ::zeImageCreate in conjunction with -/// ::ze_image_pitched_exp_desc_t via its pNext member +// / structure may be passed to ::zeImageCreate in conjunction with +// / ::ze_image_pitched_exp_desc_t via its pNext member type ZeCustomPitchExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Rowpitch uintptr // Rowpitch [in] user programmed aligned pitch for pitched linear image allocations. This pitch should satisfy the pitchAlign requirement in ::ze_pitched_alloc_2dimage_linear_pitch_exp_info_t - Slicepitch uintptr // Slicepitch [in] user programmed slice pitch , must be multiple of rowPitch. For 2D image arrary or a slice of a 3D image array - this pitch should be >= rowPitch * image_height . For 1D iamge array >= rowPitch. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Rowpitch uintptr // Rowpitch [in] user programmed aligned pitch for pitched linear image allocations. This pitch should satisfy the pitchAlign requirement in ::ze_pitched_alloc_2dimage_linear_pitch_exp_info_t + Slicepitch uintptr // Slicepitch [in] user programmed slice pitch , must be multiple of rowPitch. For 2D image arrary or a slice of a 3D image array - this pitch should be >= rowPitch * image_height . For 1D iamge array >= rowPitch. } - diff --git a/core_cacheReservation.go b/core_cacheReservation.go index ad428e7..0c9380a 100644 --- a/core_cacheReservation.go +++ b/core_cacheReservation.go @@ -24,116 +24,117 @@ const ZE_CACHE_RESERVATION_EXT_NAME = "ZE_extension_cache_reservation" // ZeCacheReservationExtVersion (ze_cache_reservation_ext_version_t) Cache_Reservation Extension Version(s) type ZeCacheReservationExtVersion uintptr + const ( - ZE_CACHE_RESERVATION_EXT_VERSION_1_0 ZeCacheReservationExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_CACHE_RESERVATION_EXT_VERSION_1_0 version 1.0 - ZE_CACHE_RESERVATION_EXT_VERSION_CURRENT ZeCacheReservationExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_CACHE_RESERVATION_EXT_VERSION_CURRENT latest known version - ZE_CACHE_RESERVATION_EXT_VERSION_FORCE_UINT32 ZeCacheReservationExtVersion = 0x7fffffff // ZE_CACHE_RESERVATION_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_CACHE_RESERVATION_EXT_VERSION_* ENUMs + ZE_CACHE_RESERVATION_EXT_VERSION_1_0 ZeCacheReservationExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_CACHE_RESERVATION_EXT_VERSION_1_0 version 1.0 + ZE_CACHE_RESERVATION_EXT_VERSION_CURRENT ZeCacheReservationExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_CACHE_RESERVATION_EXT_VERSION_CURRENT latest known version + ZE_CACHE_RESERVATION_EXT_VERSION_FORCE_UINT32 ZeCacheReservationExtVersion = 0x7fffffff // ZE_CACHE_RESERVATION_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_CACHE_RESERVATION_EXT_VERSION_* ENUMs ) // ZeCacheExtRegion (ze_cache_ext_region_t) Cache Reservation Region type ZeCacheExtRegion uintptr + const ( - ZE_CACHE_EXT_REGION_ZE_CACHE_REGION_DEFAULT ZeCacheExtRegion = 0 // ZE_CACHE_EXT_REGION_ZE_CACHE_REGION_DEFAULT [DEPRECATED] utilize driver default scheme. Use + ZE_CACHE_EXT_REGION_ZE_CACHE_REGION_DEFAULT ZeCacheExtRegion = 0 // ZE_CACHE_EXT_REGION_ZE_CACHE_REGION_DEFAULT [DEPRECATED] utilize driver default scheme. Use ///< ::ZE_CACHE_EXT_REGION_DEFAULT. - ZE_CACHE_EXT_REGION_ZE_CACHE_RESERVE_REGION ZeCacheExtRegion = 1 // ZE_CACHE_EXT_REGION_ZE_CACHE_RESERVE_REGION [DEPRECATED] utilize reserved region. Use + ZE_CACHE_EXT_REGION_ZE_CACHE_RESERVE_REGION ZeCacheExtRegion = 1 // ZE_CACHE_EXT_REGION_ZE_CACHE_RESERVE_REGION [DEPRECATED] utilize reserved region. Use ///< ::ZE_CACHE_EXT_REGION_RESERVED. - ZE_CACHE_EXT_REGION_ZE_CACHE_NON_RESERVED_REGION ZeCacheExtRegion = 2 // ZE_CACHE_EXT_REGION_ZE_CACHE_NON_RESERVED_REGION [DEPRECATED] utilize non-reserverd region. Use + ZE_CACHE_EXT_REGION_ZE_CACHE_NON_RESERVED_REGION ZeCacheExtRegion = 2 // ZE_CACHE_EXT_REGION_ZE_CACHE_NON_RESERVED_REGION [DEPRECATED] utilize non-reserverd region. Use ///< ::ZE_CACHE_EXT_REGION_NON_RESERVED. - ZE_CACHE_EXT_REGION_DEFAULT ZeCacheExtRegion = 0 // ZE_CACHE_EXT_REGION_DEFAULT utilize driver default scheme - ZE_CACHE_EXT_REGION_RESERVED ZeCacheExtRegion = 1 // ZE_CACHE_EXT_REGION_RESERVED utilize reserved region - ZE_CACHE_EXT_REGION_NON_RESERVED ZeCacheExtRegion = 2 // ZE_CACHE_EXT_REGION_NON_RESERVED utilize non-reserverd region - ZE_CACHE_EXT_REGION_FORCE_UINT32 ZeCacheExtRegion = 0x7fffffff // ZE_CACHE_EXT_REGION_FORCE_UINT32 Value marking end of ZE_CACHE_EXT_REGION_* ENUMs + ZE_CACHE_EXT_REGION_DEFAULT ZeCacheExtRegion = 0 // ZE_CACHE_EXT_REGION_DEFAULT utilize driver default scheme + ZE_CACHE_EXT_REGION_RESERVED ZeCacheExtRegion = 1 // ZE_CACHE_EXT_REGION_RESERVED utilize reserved region + ZE_CACHE_EXT_REGION_NON_RESERVED ZeCacheExtRegion = 2 // ZE_CACHE_EXT_REGION_NON_RESERVED utilize non-reserverd region + ZE_CACHE_EXT_REGION_FORCE_UINT32 ZeCacheExtRegion = 0x7fffffff // ZE_CACHE_EXT_REGION_FORCE_UINT32 Value marking end of ZE_CACHE_EXT_REGION_* ENUMs ) // ZeCacheReservationExtDesc (ze_cache_reservation_ext_desc_t) CacheReservation structure -/// -/// @details -/// - This structure must be passed to ::zeDeviceGetCacheProperties via the -/// `pNext` member of ::ze_device_cache_properties_t -/// - Used for determining the max cache reservation allowed on device. Size -/// of zero means no reservation available. +// / +// / @details +// / - This structure must be passed to ::zeDeviceGetCacheProperties via the +// / `pNext` member of ::ze_device_cache_properties_t +// / - Used for determining the max cache reservation allowed on device. Size +// / of zero means no reservation available. type ZeCacheReservationExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Maxcachereservationsize uintptr // Maxcachereservationsize [out] max cache reservation size + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Maxcachereservationsize uintptr // Maxcachereservationsize [out] max cache reservation size } // ZeDeviceReserveCacheExt Reserve Cache on Device -/// -/// @details -/// - The application may call this function but may not be successful as -/// some other application may have reserve prior -/// -/// @remarks -/// _Analogues_ -/// - None -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` +// / +// / @details +// / - The application may call this function but may not be successful as +// / some other application may have reserve prior +// / +// / @remarks +// / _Analogues_ +// / - None +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` func ZeDeviceReserveCacheExt( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device object - cacheLevel uintptr, // cacheLevel [in] cache level where application want to reserve. If zero, then the driver shall default to last level of cache and attempt to reserve in that cache. - cacheReservationSize uintptr, // cacheReservationSize [in] value for reserving size, in bytes. If zero, then the driver shall remove prior reservation + hDevice ZeDeviceHandle, // hDevice [in] handle of the device object + cacheLevel uintptr, // cacheLevel [in] cache level where application want to reserve. If zero, then the driver shall default to last level of cache and attempt to reserve in that cache. + cacheReservationSize uintptr, // cacheReservationSize [in] value for reserving size, in bytes. If zero, then the driver shall remove prior reservation ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceReserveCacheExt", uintptr(hDevice), uintptr(cacheLevel), uintptr(cacheReservationSize)) } // ZeDeviceSetCacheAdviceExt Assign VA section to use reserved section -/// -/// @details -/// - The application may call this function to assign VA to particular -/// reservartion region -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_CACHE_EXT_REGION_NON_RESERVED < cacheRegion` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - The application may call this function to assign VA to particular +// / reservartion region +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_CACHE_EXT_REGION_NON_RESERVED < cacheRegion` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeDeviceSetCacheAdviceExt( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device object - ptr unsafe.Pointer, // ptr [in] memory pointer to query - regionSize uintptr, // regionSize [in] region size, in pages - cacheRegion ZeCacheExtRegion, // cacheRegion [in] reservation region + hDevice ZeDeviceHandle, // hDevice [in] handle of the device object + ptr unsafe.Pointer, // ptr [in] memory pointer to query + regionSize uintptr, // regionSize [in] region size, in pages + cacheRegion ZeCacheExtRegion, // cacheRegion [in] reservation region ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceSetCacheAdviceExt", uintptr(hDevice), uintptr(unsafe.Pointer(ptr)), uintptr(regionSize), uintptr(cacheRegion)) } - diff --git a/core_callbacks.go b/core_callbacks.go index c4e70e5..b8a09d9 100644 --- a/core_callbacks.go +++ b/core_callbacks.go @@ -17,18 +17,18 @@ import ( "unsafe" ) -// ZeInitParams (ze_init_params_t) Callback function parameters for zeInit -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeInitParams (ze_init_params_t) Callback function parameters for zeInit +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeInitParams struct { Pflags *ZeInitFlags } -// ZePfninitcb (ze_pfnInitCb_t) Callback function-pointer for zeInit -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfninitcb (ze_pfnInitCb_t) Callback function-pointer for zeInit +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfninitcb uintptr @@ -37,2269 +37,2268 @@ type ZeGlobalCallbacks struct { Pfninitcb ZePfninitcb } -// ZeDriverGetParams (ze_driver_get_params_t) Callback function parameters for zeDriverGet -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDriverGetParams (ze_driver_get_params_t) Callback function parameters for zeDriverGet +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDriverGetParams struct { - Ppcount **uint32 + Ppcount **uint32 Pphdrivers **ZeDriverHandle } -// ZePfndrivergetcb (ze_pfnDriverGetCb_t) Callback function-pointer for zeDriverGet -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndrivergetcb (ze_pfnDriverGetCb_t) Callback function-pointer for zeDriverGet +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndrivergetcb uintptr -// ZeDriverGetApiVersionParams (ze_driver_get_api_version_params_t) Callback function parameters for zeDriverGetApiVersion -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDriverGetApiVersionParams (ze_driver_get_api_version_params_t) Callback function parameters for zeDriverGetApiVersion +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDriverGetApiVersionParams struct { Phdriver *ZeDriverHandle Pversion **ZeApiVersion } -// ZePfndrivergetapiversioncb (ze_pfnDriverGetApiVersionCb_t) Callback function-pointer for zeDriverGetApiVersion -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndrivergetapiversioncb (ze_pfnDriverGetApiVersionCb_t) Callback function-pointer for zeDriverGetApiVersion +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndrivergetapiversioncb uintptr -// ZeDriverGetPropertiesParams (ze_driver_get_properties_params_t) Callback function parameters for zeDriverGetProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDriverGetPropertiesParams (ze_driver_get_properties_params_t) Callback function parameters for zeDriverGetProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDriverGetPropertiesParams struct { - Phdriver *ZeDriverHandle + Phdriver *ZeDriverHandle Ppdriverproperties **ZeDriverProperties } -// ZePfndrivergetpropertiescb (ze_pfnDriverGetPropertiesCb_t) Callback function-pointer for zeDriverGetProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndrivergetpropertiescb (ze_pfnDriverGetPropertiesCb_t) Callback function-pointer for zeDriverGetProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndrivergetpropertiescb uintptr -// ZeDriverGetIpcPropertiesParams (ze_driver_get_ipc_properties_params_t) Callback function parameters for zeDriverGetIpcProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDriverGetIpcPropertiesParams (ze_driver_get_ipc_properties_params_t) Callback function parameters for zeDriverGetIpcProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDriverGetIpcPropertiesParams struct { - Phdriver *ZeDriverHandle + Phdriver *ZeDriverHandle Ppipcproperties **ZeDriverIpcProperties } -// ZePfndrivergetipcpropertiescb (ze_pfnDriverGetIpcPropertiesCb_t) Callback function-pointer for zeDriverGetIpcProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndrivergetipcpropertiescb (ze_pfnDriverGetIpcPropertiesCb_t) Callback function-pointer for zeDriverGetIpcProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndrivergetipcpropertiescb uintptr -// ZeDriverGetExtensionPropertiesParams (ze_driver_get_extension_properties_params_t) Callback function parameters for zeDriverGetExtensionProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDriverGetExtensionPropertiesParams (ze_driver_get_extension_properties_params_t) Callback function parameters for zeDriverGetExtensionProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDriverGetExtensionPropertiesParams struct { - Phdriver *ZeDriverHandle - Ppcount **uint32 + Phdriver *ZeDriverHandle + Ppcount **uint32 Ppextensionproperties **ZeDriverExtensionProperties } -// ZePfndrivergetextensionpropertiescb (ze_pfnDriverGetExtensionPropertiesCb_t) Callback function-pointer for zeDriverGetExtensionProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndrivergetextensionpropertiescb (ze_pfnDriverGetExtensionPropertiesCb_t) Callback function-pointer for zeDriverGetExtensionProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndrivergetextensionpropertiescb uintptr // ZeDriverCallbacks (ze_driver_callbacks_t) Table of Driver callback functions pointers type ZeDriverCallbacks struct { - Pfngetcb ZePfndrivergetcb - Pfngetapiversioncb ZePfndrivergetapiversioncb - Pfngetpropertiescb ZePfndrivergetpropertiescb - Pfngetipcpropertiescb ZePfndrivergetipcpropertiescb + Pfngetcb ZePfndrivergetcb + Pfngetapiversioncb ZePfndrivergetapiversioncb + Pfngetpropertiescb ZePfndrivergetpropertiescb + Pfngetipcpropertiescb ZePfndrivergetipcpropertiescb Pfngetextensionpropertiescb ZePfndrivergetextensionpropertiescb } -// ZeDeviceGetParams (ze_device_get_params_t) Callback function parameters for zeDeviceGet -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceGetParams (ze_device_get_params_t) Callback function parameters for zeDeviceGet +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceGetParams struct { - Phdriver *ZeDriverHandle - Ppcount **uint32 + Phdriver *ZeDriverHandle + Ppcount **uint32 Pphdevices **ZeDeviceHandle } -// ZePfndevicegetcb (ze_pfnDeviceGetCb_t) Callback function-pointer for zeDeviceGet -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicegetcb (ze_pfnDeviceGetCb_t) Callback function-pointer for zeDeviceGet +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicegetcb uintptr -// ZeDeviceGetSubDevicesParams (ze_device_get_sub_devices_params_t) Callback function parameters for zeDeviceGetSubDevices -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceGetSubDevicesParams (ze_device_get_sub_devices_params_t) Callback function parameters for zeDeviceGetSubDevices +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceGetSubDevicesParams struct { - Phdevice *ZeDeviceHandle - Ppcount **uint32 + Phdevice *ZeDeviceHandle + Ppcount **uint32 Pphsubdevices **ZeDeviceHandle } -// ZePfndevicegetsubdevicescb (ze_pfnDeviceGetSubDevicesCb_t) Callback function-pointer for zeDeviceGetSubDevices -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicegetsubdevicescb (ze_pfnDeviceGetSubDevicesCb_t) Callback function-pointer for zeDeviceGetSubDevices +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicegetsubdevicescb uintptr -// ZeDeviceGetPropertiesParams (ze_device_get_properties_params_t) Callback function parameters for zeDeviceGetProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceGetPropertiesParams (ze_device_get_properties_params_t) Callback function parameters for zeDeviceGetProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceGetPropertiesParams struct { - Phdevice *ZeDeviceHandle + Phdevice *ZeDeviceHandle Ppdeviceproperties **ZeDeviceProperties } -// ZePfndevicegetpropertiescb (ze_pfnDeviceGetPropertiesCb_t) Callback function-pointer for zeDeviceGetProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicegetpropertiescb (ze_pfnDeviceGetPropertiesCb_t) Callback function-pointer for zeDeviceGetProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicegetpropertiescb uintptr -// ZeDeviceGetComputePropertiesParams (ze_device_get_compute_properties_params_t) Callback function parameters for zeDeviceGetComputeProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceGetComputePropertiesParams (ze_device_get_compute_properties_params_t) Callback function parameters for zeDeviceGetComputeProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceGetComputePropertiesParams struct { - Phdevice *ZeDeviceHandle + Phdevice *ZeDeviceHandle Ppcomputeproperties **ZeDeviceComputeProperties } -// ZePfndevicegetcomputepropertiescb (ze_pfnDeviceGetComputePropertiesCb_t) Callback function-pointer for zeDeviceGetComputeProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicegetcomputepropertiescb (ze_pfnDeviceGetComputePropertiesCb_t) Callback function-pointer for zeDeviceGetComputeProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicegetcomputepropertiescb uintptr -// ZeDeviceGetModulePropertiesParams (ze_device_get_module_properties_params_t) Callback function parameters for zeDeviceGetModuleProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceGetModulePropertiesParams (ze_device_get_module_properties_params_t) Callback function parameters for zeDeviceGetModuleProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceGetModulePropertiesParams struct { - Phdevice *ZeDeviceHandle + Phdevice *ZeDeviceHandle Ppmoduleproperties **ZeDeviceModuleProperties } -// ZePfndevicegetmodulepropertiescb (ze_pfnDeviceGetModulePropertiesCb_t) Callback function-pointer for zeDeviceGetModuleProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicegetmodulepropertiescb (ze_pfnDeviceGetModulePropertiesCb_t) Callback function-pointer for zeDeviceGetModuleProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicegetmodulepropertiescb uintptr -// ZeDeviceGetCommandQueueGroupPropertiesParams (ze_device_get_command_queue_group_properties_params_t) Callback function parameters for zeDeviceGetCommandQueueGroupProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceGetCommandQueueGroupPropertiesParams (ze_device_get_command_queue_group_properties_params_t) Callback function parameters for zeDeviceGetCommandQueueGroupProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceGetCommandQueueGroupPropertiesParams struct { - Phdevice *ZeDeviceHandle - Ppcount **uint32 + Phdevice *ZeDeviceHandle + Ppcount **uint32 Ppcommandqueuegroupproperties **ZeCommandQueueGroupProperties } -// ZePfndevicegetcommandqueuegrouppropertiescb (ze_pfnDeviceGetCommandQueueGroupPropertiesCb_t) Callback function-pointer for zeDeviceGetCommandQueueGroupProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicegetcommandqueuegrouppropertiescb (ze_pfnDeviceGetCommandQueueGroupPropertiesCb_t) Callback function-pointer for zeDeviceGetCommandQueueGroupProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicegetcommandqueuegrouppropertiescb uintptr -// ZeDeviceGetMemoryPropertiesParams (ze_device_get_memory_properties_params_t) Callback function parameters for zeDeviceGetMemoryProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceGetMemoryPropertiesParams (ze_device_get_memory_properties_params_t) Callback function parameters for zeDeviceGetMemoryProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceGetMemoryPropertiesParams struct { - Phdevice *ZeDeviceHandle - Ppcount **uint32 + Phdevice *ZeDeviceHandle + Ppcount **uint32 Ppmemproperties **ZeDeviceMemoryProperties } -// ZePfndevicegetmemorypropertiescb (ze_pfnDeviceGetMemoryPropertiesCb_t) Callback function-pointer for zeDeviceGetMemoryProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicegetmemorypropertiescb (ze_pfnDeviceGetMemoryPropertiesCb_t) Callback function-pointer for zeDeviceGetMemoryProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicegetmemorypropertiescb uintptr -// ZeDeviceGetMemoryAccessPropertiesParams (ze_device_get_memory_access_properties_params_t) Callback function parameters for zeDeviceGetMemoryAccessProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceGetMemoryAccessPropertiesParams (ze_device_get_memory_access_properties_params_t) Callback function parameters for zeDeviceGetMemoryAccessProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceGetMemoryAccessPropertiesParams struct { - Phdevice *ZeDeviceHandle + Phdevice *ZeDeviceHandle Ppmemaccessproperties **ZeDeviceMemoryAccessProperties } -// ZePfndevicegetmemoryaccesspropertiescb (ze_pfnDeviceGetMemoryAccessPropertiesCb_t) Callback function-pointer for zeDeviceGetMemoryAccessProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicegetmemoryaccesspropertiescb (ze_pfnDeviceGetMemoryAccessPropertiesCb_t) Callback function-pointer for zeDeviceGetMemoryAccessProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicegetmemoryaccesspropertiescb uintptr -// ZeDeviceGetCachePropertiesParams (ze_device_get_cache_properties_params_t) Callback function parameters for zeDeviceGetCacheProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceGetCachePropertiesParams (ze_device_get_cache_properties_params_t) Callback function parameters for zeDeviceGetCacheProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceGetCachePropertiesParams struct { - Phdevice *ZeDeviceHandle - Ppcount **uint32 + Phdevice *ZeDeviceHandle + Ppcount **uint32 Ppcacheproperties **ZeDeviceCacheProperties } -// ZePfndevicegetcachepropertiescb (ze_pfnDeviceGetCachePropertiesCb_t) Callback function-pointer for zeDeviceGetCacheProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicegetcachepropertiescb (ze_pfnDeviceGetCachePropertiesCb_t) Callback function-pointer for zeDeviceGetCacheProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicegetcachepropertiescb uintptr -// ZeDeviceGetImagePropertiesParams (ze_device_get_image_properties_params_t) Callback function parameters for zeDeviceGetImageProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceGetImagePropertiesParams (ze_device_get_image_properties_params_t) Callback function parameters for zeDeviceGetImageProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceGetImagePropertiesParams struct { - Phdevice *ZeDeviceHandle + Phdevice *ZeDeviceHandle Ppimageproperties **ZeDeviceImageProperties } -// ZePfndevicegetimagepropertiescb (ze_pfnDeviceGetImagePropertiesCb_t) Callback function-pointer for zeDeviceGetImageProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicegetimagepropertiescb (ze_pfnDeviceGetImagePropertiesCb_t) Callback function-pointer for zeDeviceGetImageProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicegetimagepropertiescb uintptr -// ZeDeviceGetExternalMemoryPropertiesParams (ze_device_get_external_memory_properties_params_t) Callback function parameters for zeDeviceGetExternalMemoryProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceGetExternalMemoryPropertiesParams (ze_device_get_external_memory_properties_params_t) Callback function parameters for zeDeviceGetExternalMemoryProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceGetExternalMemoryPropertiesParams struct { - Phdevice *ZeDeviceHandle + Phdevice *ZeDeviceHandle Ppexternalmemoryproperties **ZeDeviceExternalMemoryProperties } -// ZePfndevicegetexternalmemorypropertiescb (ze_pfnDeviceGetExternalMemoryPropertiesCb_t) Callback function-pointer for zeDeviceGetExternalMemoryProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicegetexternalmemorypropertiescb (ze_pfnDeviceGetExternalMemoryPropertiesCb_t) Callback function-pointer for zeDeviceGetExternalMemoryProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicegetexternalmemorypropertiescb uintptr -// ZeDeviceGetP2PPropertiesParams (ze_device_get_p2_p_properties_params_t) Callback function parameters for zeDeviceGetP2PProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceGetP2PPropertiesParams (ze_device_get_p2_p_properties_params_t) Callback function parameters for zeDeviceGetP2PProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceGetP2PPropertiesParams struct { - Phdevice *ZeDeviceHandle - Phpeerdevice *ZeDeviceHandle + Phdevice *ZeDeviceHandle + Phpeerdevice *ZeDeviceHandle Ppp2pproperties **ZeDeviceP2pProperties } -// ZePfndevicegetp2ppropertiescb (ze_pfnDeviceGetP2PPropertiesCb_t) Callback function-pointer for zeDeviceGetP2PProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicegetp2ppropertiescb (ze_pfnDeviceGetP2PPropertiesCb_t) Callback function-pointer for zeDeviceGetP2PProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicegetp2ppropertiescb uintptr -// ZeDeviceCanAccessPeerParams (ze_device_can_access_peer_params_t) Callback function parameters for zeDeviceCanAccessPeer -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceCanAccessPeerParams (ze_device_can_access_peer_params_t) Callback function parameters for zeDeviceCanAccessPeer +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceCanAccessPeerParams struct { - Phdevice *ZeDeviceHandle + Phdevice *ZeDeviceHandle Phpeerdevice *ZeDeviceHandle - Pvalue **ZeBool + Pvalue **ZeBool } -// ZePfndevicecanaccesspeercb (ze_pfnDeviceCanAccessPeerCb_t) Callback function-pointer for zeDeviceCanAccessPeer -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicecanaccesspeercb (ze_pfnDeviceCanAccessPeerCb_t) Callback function-pointer for zeDeviceCanAccessPeer +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicecanaccesspeercb uintptr -// ZeDeviceGetStatusParams (ze_device_get_status_params_t) Callback function parameters for zeDeviceGetStatus -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeDeviceGetStatusParams (ze_device_get_status_params_t) Callback function parameters for zeDeviceGetStatus +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeDeviceGetStatusParams struct { Phdevice *ZeDeviceHandle } -// ZePfndevicegetstatuscb (ze_pfnDeviceGetStatusCb_t) Callback function-pointer for zeDeviceGetStatus -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfndevicegetstatuscb (ze_pfnDeviceGetStatusCb_t) Callback function-pointer for zeDeviceGetStatus +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfndevicegetstatuscb uintptr // ZeDeviceCallbacks (ze_device_callbacks_t) Table of Device callback functions pointers type ZeDeviceCallbacks struct { - Pfngetcb ZePfndevicegetcb - Pfngetsubdevicescb ZePfndevicegetsubdevicescb - Pfngetpropertiescb ZePfndevicegetpropertiescb - Pfngetcomputepropertiescb ZePfndevicegetcomputepropertiescb - Pfngetmodulepropertiescb ZePfndevicegetmodulepropertiescb + Pfngetcb ZePfndevicegetcb + Pfngetsubdevicescb ZePfndevicegetsubdevicescb + Pfngetpropertiescb ZePfndevicegetpropertiescb + Pfngetcomputepropertiescb ZePfndevicegetcomputepropertiescb + Pfngetmodulepropertiescb ZePfndevicegetmodulepropertiescb Pfngetcommandqueuegrouppropertiescb ZePfndevicegetcommandqueuegrouppropertiescb - Pfngetmemorypropertiescb ZePfndevicegetmemorypropertiescb - Pfngetmemoryaccesspropertiescb ZePfndevicegetmemoryaccesspropertiescb - Pfngetcachepropertiescb ZePfndevicegetcachepropertiescb - Pfngetimagepropertiescb ZePfndevicegetimagepropertiescb - Pfngetexternalmemorypropertiescb ZePfndevicegetexternalmemorypropertiescb - Pfngetp2ppropertiescb ZePfndevicegetp2ppropertiescb - Pfncanaccesspeercb ZePfndevicecanaccesspeercb - Pfngetstatuscb ZePfndevicegetstatuscb + Pfngetmemorypropertiescb ZePfndevicegetmemorypropertiescb + Pfngetmemoryaccesspropertiescb ZePfndevicegetmemoryaccesspropertiescb + Pfngetcachepropertiescb ZePfndevicegetcachepropertiescb + Pfngetimagepropertiescb ZePfndevicegetimagepropertiescb + Pfngetexternalmemorypropertiescb ZePfndevicegetexternalmemorypropertiescb + Pfngetp2ppropertiescb ZePfndevicegetp2ppropertiescb + Pfncanaccesspeercb ZePfndevicecanaccesspeercb + Pfngetstatuscb ZePfndevicegetstatuscb } -// ZeContextCreateParams (ze_context_create_params_t) Callback function parameters for zeContextCreate -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeContextCreateParams (ze_context_create_params_t) Callback function parameters for zeContextCreate +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeContextCreateParams struct { - Phdriver *ZeDriverHandle - Pdesc **ZeContextDesc + Phdriver *ZeDriverHandle + Pdesc **ZeContextDesc Pphcontext **ZeContextHandle } -// ZePfncontextcreatecb (ze_pfnContextCreateCb_t) Callback function-pointer for zeContextCreate -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncontextcreatecb (ze_pfnContextCreateCb_t) Callback function-pointer for zeContextCreate +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncontextcreatecb uintptr -// ZeContextDestroyParams (ze_context_destroy_params_t) Callback function parameters for zeContextDestroy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeContextDestroyParams (ze_context_destroy_params_t) Callback function parameters for zeContextDestroy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeContextDestroyParams struct { Phcontext *ZeContextHandle } -// ZePfncontextdestroycb (ze_pfnContextDestroyCb_t) Callback function-pointer for zeContextDestroy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncontextdestroycb (ze_pfnContextDestroyCb_t) Callback function-pointer for zeContextDestroy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncontextdestroycb uintptr -// ZeContextGetStatusParams (ze_context_get_status_params_t) Callback function parameters for zeContextGetStatus -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeContextGetStatusParams (ze_context_get_status_params_t) Callback function parameters for zeContextGetStatus +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeContextGetStatusParams struct { Phcontext *ZeContextHandle } -// ZePfncontextgetstatuscb (ze_pfnContextGetStatusCb_t) Callback function-pointer for zeContextGetStatus -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncontextgetstatuscb (ze_pfnContextGetStatusCb_t) Callback function-pointer for zeContextGetStatus +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncontextgetstatuscb uintptr -// ZeContextSystemBarrierParams (ze_context_system_barrier_params_t) Callback function parameters for zeContextSystemBarrier -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeContextSystemBarrierParams (ze_context_system_barrier_params_t) Callback function parameters for zeContextSystemBarrier +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeContextSystemBarrierParams struct { Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle + Phdevice *ZeDeviceHandle } -// ZePfncontextsystembarriercb (ze_pfnContextSystemBarrierCb_t) Callback function-pointer for zeContextSystemBarrier -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncontextsystembarriercb (ze_pfnContextSystemBarrierCb_t) Callback function-pointer for zeContextSystemBarrier +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncontextsystembarriercb uintptr -// ZeContextMakeMemoryResidentParams (ze_context_make_memory_resident_params_t) Callback function parameters for zeContextMakeMemoryResident -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeContextMakeMemoryResidentParams (ze_context_make_memory_resident_params_t) Callback function parameters for zeContextMakeMemoryResident +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeContextMakeMemoryResidentParams struct { Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle - Pptr *unsafe.Pointer - Psize *uintptr + Phdevice *ZeDeviceHandle + Pptr *unsafe.Pointer + Psize *uintptr } -// ZePfncontextmakememoryresidentcb (ze_pfnContextMakeMemoryResidentCb_t) Callback function-pointer for zeContextMakeMemoryResident -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncontextmakememoryresidentcb (ze_pfnContextMakeMemoryResidentCb_t) Callback function-pointer for zeContextMakeMemoryResident +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncontextmakememoryresidentcb uintptr -// ZeContextEvictMemoryParams (ze_context_evict_memory_params_t) Callback function parameters for zeContextEvictMemory -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeContextEvictMemoryParams (ze_context_evict_memory_params_t) Callback function parameters for zeContextEvictMemory +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeContextEvictMemoryParams struct { Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle - Pptr *unsafe.Pointer - Psize *uintptr + Phdevice *ZeDeviceHandle + Pptr *unsafe.Pointer + Psize *uintptr } -// ZePfncontextevictmemorycb (ze_pfnContextEvictMemoryCb_t) Callback function-pointer for zeContextEvictMemory -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncontextevictmemorycb (ze_pfnContextEvictMemoryCb_t) Callback function-pointer for zeContextEvictMemory +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncontextevictmemorycb uintptr -// ZeContextMakeImageResidentParams (ze_context_make_image_resident_params_t) Callback function parameters for zeContextMakeImageResident -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeContextMakeImageResidentParams (ze_context_make_image_resident_params_t) Callback function parameters for zeContextMakeImageResident +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeContextMakeImageResidentParams struct { Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle - Phimage *ZeImageHandle + Phdevice *ZeDeviceHandle + Phimage *ZeImageHandle } -// ZePfncontextmakeimageresidentcb (ze_pfnContextMakeImageResidentCb_t) Callback function-pointer for zeContextMakeImageResident -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncontextmakeimageresidentcb (ze_pfnContextMakeImageResidentCb_t) Callback function-pointer for zeContextMakeImageResident +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncontextmakeimageresidentcb uintptr -// ZeContextEvictImageParams (ze_context_evict_image_params_t) Callback function parameters for zeContextEvictImage -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeContextEvictImageParams (ze_context_evict_image_params_t) Callback function parameters for zeContextEvictImage +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeContextEvictImageParams struct { Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle - Phimage *ZeImageHandle + Phdevice *ZeDeviceHandle + Phimage *ZeImageHandle } -// ZePfncontextevictimagecb (ze_pfnContextEvictImageCb_t) Callback function-pointer for zeContextEvictImage -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncontextevictimagecb (ze_pfnContextEvictImageCb_t) Callback function-pointer for zeContextEvictImage +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncontextevictimagecb uintptr // ZeContextCallbacks (ze_context_callbacks_t) Table of Context callback functions pointers type ZeContextCallbacks struct { - Pfncreatecb ZePfncontextcreatecb - Pfndestroycb ZePfncontextdestroycb - Pfngetstatuscb ZePfncontextgetstatuscb - Pfnsystembarriercb ZePfncontextsystembarriercb + Pfncreatecb ZePfncontextcreatecb + Pfndestroycb ZePfncontextdestroycb + Pfngetstatuscb ZePfncontextgetstatuscb + Pfnsystembarriercb ZePfncontextsystembarriercb Pfnmakememoryresidentcb ZePfncontextmakememoryresidentcb - Pfnevictmemorycb ZePfncontextevictmemorycb - Pfnmakeimageresidentcb ZePfncontextmakeimageresidentcb - Pfnevictimagecb ZePfncontextevictimagecb + Pfnevictmemorycb ZePfncontextevictmemorycb + Pfnmakeimageresidentcb ZePfncontextmakeimageresidentcb + Pfnevictimagecb ZePfncontextevictimagecb } -// ZeCommandQueueCreateParams (ze_command_queue_create_params_t) Callback function parameters for zeCommandQueueCreate -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandQueueCreateParams (ze_command_queue_create_params_t) Callback function parameters for zeCommandQueueCreate +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandQueueCreateParams struct { - Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle - Pdesc **ZeCommandQueueDesc + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Pdesc **ZeCommandQueueDesc Pphcommandqueue **ZeCommandQueueHandle } -// ZePfncommandqueuecreatecb (ze_pfnCommandQueueCreateCb_t) Callback function-pointer for zeCommandQueueCreate -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandqueuecreatecb (ze_pfnCommandQueueCreateCb_t) Callback function-pointer for zeCommandQueueCreate +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandqueuecreatecb uintptr -// ZeCommandQueueDestroyParams (ze_command_queue_destroy_params_t) Callback function parameters for zeCommandQueueDestroy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandQueueDestroyParams (ze_command_queue_destroy_params_t) Callback function parameters for zeCommandQueueDestroy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandQueueDestroyParams struct { Phcommandqueue *ZeCommandQueueHandle } -// ZePfncommandqueuedestroycb (ze_pfnCommandQueueDestroyCb_t) Callback function-pointer for zeCommandQueueDestroy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandqueuedestroycb (ze_pfnCommandQueueDestroyCb_t) Callback function-pointer for zeCommandQueueDestroy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandqueuedestroycb uintptr -// ZeCommandQueueExecuteCommandListsParams (ze_command_queue_execute_command_lists_params_t) Callback function parameters for zeCommandQueueExecuteCommandLists -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandQueueExecuteCommandListsParams (ze_command_queue_execute_command_lists_params_t) Callback function parameters for zeCommandQueueExecuteCommandLists +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandQueueExecuteCommandListsParams struct { - Phcommandqueue *ZeCommandQueueHandle + Phcommandqueue *ZeCommandQueueHandle Pnumcommandlists *uint32 - Pphcommandlists **ZeCommandListHandle - Phfence *ZeFenceHandle + Pphcommandlists **ZeCommandListHandle + Phfence *ZeFenceHandle } -// ZePfncommandqueueexecutecommandlistscb (ze_pfnCommandQueueExecuteCommandListsCb_t) Callback function-pointer for zeCommandQueueExecuteCommandLists -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandqueueexecutecommandlistscb (ze_pfnCommandQueueExecuteCommandListsCb_t) Callback function-pointer for zeCommandQueueExecuteCommandLists +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandqueueexecutecommandlistscb uintptr -// ZeCommandQueueSynchronizeParams (ze_command_queue_synchronize_params_t) Callback function parameters for zeCommandQueueSynchronize -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandQueueSynchronizeParams (ze_command_queue_synchronize_params_t) Callback function parameters for zeCommandQueueSynchronize +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandQueueSynchronizeParams struct { Phcommandqueue *ZeCommandQueueHandle - Ptimeout *uint64 + Ptimeout *uint64 } -// ZePfncommandqueuesynchronizecb (ze_pfnCommandQueueSynchronizeCb_t) Callback function-pointer for zeCommandQueueSynchronize -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandqueuesynchronizecb (ze_pfnCommandQueueSynchronizeCb_t) Callback function-pointer for zeCommandQueueSynchronize +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandqueuesynchronizecb uintptr // ZeCommandQueueCallbacks (ze_command_queue_callbacks_t) Table of CommandQueue callback functions pointers type ZeCommandQueueCallbacks struct { - Pfncreatecb ZePfncommandqueuecreatecb - Pfndestroycb ZePfncommandqueuedestroycb + Pfncreatecb ZePfncommandqueuecreatecb + Pfndestroycb ZePfncommandqueuedestroycb Pfnexecutecommandlistscb ZePfncommandqueueexecutecommandlistscb - Pfnsynchronizecb ZePfncommandqueuesynchronizecb + Pfnsynchronizecb ZePfncommandqueuesynchronizecb } -// ZeCommandListCreateParams (ze_command_list_create_params_t) Callback function parameters for zeCommandListCreate -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListCreateParams (ze_command_list_create_params_t) Callback function parameters for zeCommandListCreate +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListCreateParams struct { - Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle - Pdesc **ZeCommandListDesc + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Pdesc **ZeCommandListDesc Pphcommandlist **ZeCommandListHandle } -// ZePfncommandlistcreatecb (ze_pfnCommandListCreateCb_t) Callback function-pointer for zeCommandListCreate -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistcreatecb (ze_pfnCommandListCreateCb_t) Callback function-pointer for zeCommandListCreate +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistcreatecb uintptr -// ZeCommandListCreateImmediateParams (ze_command_list_create_immediate_params_t) Callback function parameters for zeCommandListCreateImmediate -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListCreateImmediateParams (ze_command_list_create_immediate_params_t) Callback function parameters for zeCommandListCreateImmediate +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListCreateImmediateParams struct { - Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle - Paltdesc **ZeCommandQueueDesc + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Paltdesc **ZeCommandQueueDesc Pphcommandlist **ZeCommandListHandle } -// ZePfncommandlistcreateimmediatecb (ze_pfnCommandListCreateImmediateCb_t) Callback function-pointer for zeCommandListCreateImmediate -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistcreateimmediatecb (ze_pfnCommandListCreateImmediateCb_t) Callback function-pointer for zeCommandListCreateImmediate +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistcreateimmediatecb uintptr -// ZeCommandListDestroyParams (ze_command_list_destroy_params_t) Callback function parameters for zeCommandListDestroy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListDestroyParams (ze_command_list_destroy_params_t) Callback function parameters for zeCommandListDestroy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListDestroyParams struct { Phcommandlist *ZeCommandListHandle } -// ZePfncommandlistdestroycb (ze_pfnCommandListDestroyCb_t) Callback function-pointer for zeCommandListDestroy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistdestroycb (ze_pfnCommandListDestroyCb_t) Callback function-pointer for zeCommandListDestroy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistdestroycb uintptr -// ZeCommandListCloseParams (ze_command_list_close_params_t) Callback function parameters for zeCommandListClose -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListCloseParams (ze_command_list_close_params_t) Callback function parameters for zeCommandListClose +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListCloseParams struct { Phcommandlist *ZeCommandListHandle } -// ZePfncommandlistclosecb (ze_pfnCommandListCloseCb_t) Callback function-pointer for zeCommandListClose -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistclosecb (ze_pfnCommandListCloseCb_t) Callback function-pointer for zeCommandListClose +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistclosecb uintptr -// ZeCommandListResetParams (ze_command_list_reset_params_t) Callback function parameters for zeCommandListReset -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListResetParams (ze_command_list_reset_params_t) Callback function parameters for zeCommandListReset +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListResetParams struct { Phcommandlist *ZeCommandListHandle } -// ZePfncommandlistresetcb (ze_pfnCommandListResetCb_t) Callback function-pointer for zeCommandListReset -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistresetcb (ze_pfnCommandListResetCb_t) Callback function-pointer for zeCommandListReset +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistresetcb uintptr -// ZeCommandListAppendWriteGlobalTimestampParams (ze_command_list_append_write_global_timestamp_params_t) Callback function parameters for zeCommandListAppendWriteGlobalTimestamp -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendWriteGlobalTimestampParams (ze_command_list_append_write_global_timestamp_params_t) Callback function parameters for zeCommandListAppendWriteGlobalTimestamp +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendWriteGlobalTimestampParams struct { - Phcommandlist *ZeCommandListHandle - Pdstptr **uint64 - Phsignalevent *ZeEventHandle + Phcommandlist *ZeCommandListHandle + Pdstptr **uint64 + Phsignalevent *ZeEventHandle Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendwriteglobaltimestampcb (ze_pfnCommandListAppendWriteGlobalTimestampCb_t) Callback function-pointer for zeCommandListAppendWriteGlobalTimestamp -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendwriteglobaltimestampcb (ze_pfnCommandListAppendWriteGlobalTimestampCb_t) Callback function-pointer for zeCommandListAppendWriteGlobalTimestamp +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendwriteglobaltimestampcb uintptr -// ZeCommandListAppendBarrierParams (ze_command_list_append_barrier_params_t) Callback function parameters for zeCommandListAppendBarrier -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendBarrierParams (ze_command_list_append_barrier_params_t) Callback function parameters for zeCommandListAppendBarrier +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendBarrierParams struct { - Phcommandlist *ZeCommandListHandle - Phsignalevent *ZeEventHandle + Phcommandlist *ZeCommandListHandle + Phsignalevent *ZeEventHandle Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendbarriercb (ze_pfnCommandListAppendBarrierCb_t) Callback function-pointer for zeCommandListAppendBarrier -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendbarriercb (ze_pfnCommandListAppendBarrierCb_t) Callback function-pointer for zeCommandListAppendBarrier +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendbarriercb uintptr -// ZeCommandListAppendMemoryRangesBarrierParams (ze_command_list_append_memory_ranges_barrier_params_t) Callback function parameters for zeCommandListAppendMemoryRangesBarrier -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendMemoryRangesBarrierParams (ze_command_list_append_memory_ranges_barrier_params_t) Callback function parameters for zeCommandListAppendMemoryRangesBarrier +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendMemoryRangesBarrierParams struct { - Phcommandlist *ZeCommandListHandle - Pnumranges *uint32 - Pprangesizes **uintptr - Ppranges **unsafe.Pointer - Phsignalevent *ZeEventHandle + Phcommandlist *ZeCommandListHandle + Pnumranges *uint32 + Pprangesizes **uintptr + Ppranges **unsafe.Pointer + Phsignalevent *ZeEventHandle Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendmemoryrangesbarriercb (ze_pfnCommandListAppendMemoryRangesBarrierCb_t) Callback function-pointer for zeCommandListAppendMemoryRangesBarrier -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendmemoryrangesbarriercb (ze_pfnCommandListAppendMemoryRangesBarrierCb_t) Callback function-pointer for zeCommandListAppendMemoryRangesBarrier +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendmemoryrangesbarriercb uintptr -// ZeCommandListAppendMemoryCopyParams (ze_command_list_append_memory_copy_params_t) Callback function parameters for zeCommandListAppendMemoryCopy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendMemoryCopyParams (ze_command_list_append_memory_copy_params_t) Callback function parameters for zeCommandListAppendMemoryCopy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendMemoryCopyParams struct { - Phcommandlist *ZeCommandListHandle - Pdstptr *unsafe.Pointer - Psrcptr *unsafe.Pointer - Psize *uintptr - Phsignalevent *ZeEventHandle + Phcommandlist *ZeCommandListHandle + Pdstptr *unsafe.Pointer + Psrcptr *unsafe.Pointer + Psize *uintptr + Phsignalevent *ZeEventHandle Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendmemorycopycb (ze_pfnCommandListAppendMemoryCopyCb_t) Callback function-pointer for zeCommandListAppendMemoryCopy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendmemorycopycb (ze_pfnCommandListAppendMemoryCopyCb_t) Callback function-pointer for zeCommandListAppendMemoryCopy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendmemorycopycb uintptr -// ZeCommandListAppendMemoryFillParams (ze_command_list_append_memory_fill_params_t) Callback function parameters for zeCommandListAppendMemoryFill -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendMemoryFillParams (ze_command_list_append_memory_fill_params_t) Callback function parameters for zeCommandListAppendMemoryFill +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendMemoryFillParams struct { - Phcommandlist *ZeCommandListHandle - Pptr *unsafe.Pointer - Ppattern *unsafe.Pointer - PpatternSize *uintptr - Psize *uintptr - Phsignalevent *ZeEventHandle + Phcommandlist *ZeCommandListHandle + Pptr *unsafe.Pointer + Ppattern *unsafe.Pointer + PpatternSize *uintptr + Psize *uintptr + Phsignalevent *ZeEventHandle Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendmemoryfillcb (ze_pfnCommandListAppendMemoryFillCb_t) Callback function-pointer for zeCommandListAppendMemoryFill -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendmemoryfillcb (ze_pfnCommandListAppendMemoryFillCb_t) Callback function-pointer for zeCommandListAppendMemoryFill +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendmemoryfillcb uintptr -// ZeCommandListAppendMemoryCopyRegionParams (ze_command_list_append_memory_copy_region_params_t) Callback function parameters for zeCommandListAppendMemoryCopyRegion -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendMemoryCopyRegionParams (ze_command_list_append_memory_copy_region_params_t) Callback function parameters for zeCommandListAppendMemoryCopyRegion +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendMemoryCopyRegionParams struct { - Phcommandlist *ZeCommandListHandle - Pdstptr *unsafe.Pointer - Pdstregion **ZeCopyRegion - Pdstpitch *uint32 + Phcommandlist *ZeCommandListHandle + Pdstptr *unsafe.Pointer + Pdstregion **ZeCopyRegion + Pdstpitch *uint32 Pdstslicepitch *uint32 - Psrcptr *unsafe.Pointer - Psrcregion **ZeCopyRegion - Psrcpitch *uint32 + Psrcptr *unsafe.Pointer + Psrcregion **ZeCopyRegion + Psrcpitch *uint32 Psrcslicepitch *uint32 - Phsignalevent *ZeEventHandle + Phsignalevent *ZeEventHandle Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendmemorycopyregioncb (ze_pfnCommandListAppendMemoryCopyRegionCb_t) Callback function-pointer for zeCommandListAppendMemoryCopyRegion -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendmemorycopyregioncb (ze_pfnCommandListAppendMemoryCopyRegionCb_t) Callback function-pointer for zeCommandListAppendMemoryCopyRegion +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendmemorycopyregioncb uintptr -// ZeCommandListAppendMemoryCopyFromContextParams (ze_command_list_append_memory_copy_from_context_params_t) Callback function parameters for zeCommandListAppendMemoryCopyFromContext -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendMemoryCopyFromContextParams (ze_command_list_append_memory_copy_from_context_params_t) Callback function parameters for zeCommandListAppendMemoryCopyFromContext +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendMemoryCopyFromContextParams struct { - Phcommandlist *ZeCommandListHandle - Pdstptr *unsafe.Pointer - Phcontextsrc *ZeContextHandle - Psrcptr *unsafe.Pointer - Psize *uintptr - Phsignalevent *ZeEventHandle + Phcommandlist *ZeCommandListHandle + Pdstptr *unsafe.Pointer + Phcontextsrc *ZeContextHandle + Psrcptr *unsafe.Pointer + Psize *uintptr + Phsignalevent *ZeEventHandle Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendmemorycopyfromcontextcb (ze_pfnCommandListAppendMemoryCopyFromContextCb_t) Callback function-pointer for zeCommandListAppendMemoryCopyFromContext -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendmemorycopyfromcontextcb (ze_pfnCommandListAppendMemoryCopyFromContextCb_t) Callback function-pointer for zeCommandListAppendMemoryCopyFromContext +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendmemorycopyfromcontextcb uintptr -// ZeCommandListAppendImageCopyParams (ze_command_list_append_image_copy_params_t) Callback function parameters for zeCommandListAppendImageCopy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendImageCopyParams (ze_command_list_append_image_copy_params_t) Callback function parameters for zeCommandListAppendImageCopy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendImageCopyParams struct { - Phcommandlist *ZeCommandListHandle - Phdstimage *ZeImageHandle - Phsrcimage *ZeImageHandle - Phsignalevent *ZeEventHandle + Phcommandlist *ZeCommandListHandle + Phdstimage *ZeImageHandle + Phsrcimage *ZeImageHandle + Phsignalevent *ZeEventHandle Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendimagecopycb (ze_pfnCommandListAppendImageCopyCb_t) Callback function-pointer for zeCommandListAppendImageCopy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendimagecopycb (ze_pfnCommandListAppendImageCopyCb_t) Callback function-pointer for zeCommandListAppendImageCopy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendimagecopycb uintptr -// ZeCommandListAppendImageCopyRegionParams (ze_command_list_append_image_copy_region_params_t) Callback function parameters for zeCommandListAppendImageCopyRegion -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendImageCopyRegionParams (ze_command_list_append_image_copy_region_params_t) Callback function parameters for zeCommandListAppendImageCopyRegion +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendImageCopyRegionParams struct { - Phcommandlist *ZeCommandListHandle - Phdstimage *ZeImageHandle - Phsrcimage *ZeImageHandle - Ppdstregion **ZeImageRegion - Ppsrcregion **ZeImageRegion - Phsignalevent *ZeEventHandle + Phcommandlist *ZeCommandListHandle + Phdstimage *ZeImageHandle + Phsrcimage *ZeImageHandle + Ppdstregion **ZeImageRegion + Ppsrcregion **ZeImageRegion + Phsignalevent *ZeEventHandle Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendimagecopyregioncb (ze_pfnCommandListAppendImageCopyRegionCb_t) Callback function-pointer for zeCommandListAppendImageCopyRegion -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendimagecopyregioncb (ze_pfnCommandListAppendImageCopyRegionCb_t) Callback function-pointer for zeCommandListAppendImageCopyRegion +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendimagecopyregioncb uintptr -// ZeCommandListAppendImageCopyToMemoryParams (ze_command_list_append_image_copy_to_memory_params_t) Callback function parameters for zeCommandListAppendImageCopyToMemory -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendImageCopyToMemoryParams (ze_command_list_append_image_copy_to_memory_params_t) Callback function parameters for zeCommandListAppendImageCopyToMemory +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendImageCopyToMemoryParams struct { - Phcommandlist *ZeCommandListHandle - Pdstptr *unsafe.Pointer - Phsrcimage *ZeImageHandle - Ppsrcregion **ZeImageRegion - Phsignalevent *ZeEventHandle + Phcommandlist *ZeCommandListHandle + Pdstptr *unsafe.Pointer + Phsrcimage *ZeImageHandle + Ppsrcregion **ZeImageRegion + Phsignalevent *ZeEventHandle Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendimagecopytomemorycb (ze_pfnCommandListAppendImageCopyToMemoryCb_t) Callback function-pointer for zeCommandListAppendImageCopyToMemory -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendimagecopytomemorycb (ze_pfnCommandListAppendImageCopyToMemoryCb_t) Callback function-pointer for zeCommandListAppendImageCopyToMemory +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendimagecopytomemorycb uintptr -// ZeCommandListAppendImageCopyFromMemoryParams (ze_command_list_append_image_copy_from_memory_params_t) Callback function parameters for zeCommandListAppendImageCopyFromMemory -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendImageCopyFromMemoryParams (ze_command_list_append_image_copy_from_memory_params_t) Callback function parameters for zeCommandListAppendImageCopyFromMemory +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendImageCopyFromMemoryParams struct { - Phcommandlist *ZeCommandListHandle - Phdstimage *ZeImageHandle - Psrcptr *unsafe.Pointer - Ppdstregion **ZeImageRegion - Phsignalevent *ZeEventHandle + Phcommandlist *ZeCommandListHandle + Phdstimage *ZeImageHandle + Psrcptr *unsafe.Pointer + Ppdstregion **ZeImageRegion + Phsignalevent *ZeEventHandle Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendimagecopyfrommemorycb (ze_pfnCommandListAppendImageCopyFromMemoryCb_t) Callback function-pointer for zeCommandListAppendImageCopyFromMemory -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendimagecopyfrommemorycb (ze_pfnCommandListAppendImageCopyFromMemoryCb_t) Callback function-pointer for zeCommandListAppendImageCopyFromMemory +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendimagecopyfrommemorycb uintptr -// ZeCommandListAppendMemoryPrefetchParams (ze_command_list_append_memory_prefetch_params_t) Callback function parameters for zeCommandListAppendMemoryPrefetch -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendMemoryPrefetchParams (ze_command_list_append_memory_prefetch_params_t) Callback function parameters for zeCommandListAppendMemoryPrefetch +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendMemoryPrefetchParams struct { Phcommandlist *ZeCommandListHandle - Pptr *unsafe.Pointer - Psize *uintptr + Pptr *unsafe.Pointer + Psize *uintptr } -// ZePfncommandlistappendmemoryprefetchcb (ze_pfnCommandListAppendMemoryPrefetchCb_t) Callback function-pointer for zeCommandListAppendMemoryPrefetch -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendmemoryprefetchcb (ze_pfnCommandListAppendMemoryPrefetchCb_t) Callback function-pointer for zeCommandListAppendMemoryPrefetch +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendmemoryprefetchcb uintptr -// ZeCommandListAppendMemAdviseParams (ze_command_list_append_mem_advise_params_t) Callback function parameters for zeCommandListAppendMemAdvise -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendMemAdviseParams (ze_command_list_append_mem_advise_params_t) Callback function parameters for zeCommandListAppendMemAdvise +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendMemAdviseParams struct { Phcommandlist *ZeCommandListHandle - Phdevice *ZeDeviceHandle - Pptr *unsafe.Pointer - Psize *uintptr - Padvice *ZeMemoryAdvice + Phdevice *ZeDeviceHandle + Pptr *unsafe.Pointer + Psize *uintptr + Padvice *ZeMemoryAdvice } -// ZePfncommandlistappendmemadvisecb (ze_pfnCommandListAppendMemAdviseCb_t) Callback function-pointer for zeCommandListAppendMemAdvise -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendmemadvisecb (ze_pfnCommandListAppendMemAdviseCb_t) Callback function-pointer for zeCommandListAppendMemAdvise +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendmemadvisecb uintptr -// ZeCommandListAppendSignalEventParams (ze_command_list_append_signal_event_params_t) Callback function parameters for zeCommandListAppendSignalEvent -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendSignalEventParams (ze_command_list_append_signal_event_params_t) Callback function parameters for zeCommandListAppendSignalEvent +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendSignalEventParams struct { Phcommandlist *ZeCommandListHandle - Phevent *ZeEventHandle + Phevent *ZeEventHandle } -// ZePfncommandlistappendsignaleventcb (ze_pfnCommandListAppendSignalEventCb_t) Callback function-pointer for zeCommandListAppendSignalEvent -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendsignaleventcb (ze_pfnCommandListAppendSignalEventCb_t) Callback function-pointer for zeCommandListAppendSignalEvent +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendsignaleventcb uintptr -// ZeCommandListAppendWaitOnEventsParams (ze_command_list_append_wait_on_events_params_t) Callback function parameters for zeCommandListAppendWaitOnEvents -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendWaitOnEventsParams (ze_command_list_append_wait_on_events_params_t) Callback function parameters for zeCommandListAppendWaitOnEvents +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendWaitOnEventsParams struct { Phcommandlist *ZeCommandListHandle - Pnumevents *uint32 - Pphevents **ZeEventHandle + Pnumevents *uint32 + Pphevents **ZeEventHandle } -// ZePfncommandlistappendwaitoneventscb (ze_pfnCommandListAppendWaitOnEventsCb_t) Callback function-pointer for zeCommandListAppendWaitOnEvents -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendwaitoneventscb (ze_pfnCommandListAppendWaitOnEventsCb_t) Callback function-pointer for zeCommandListAppendWaitOnEvents +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendwaitoneventscb uintptr -// ZeCommandListAppendEventResetParams (ze_command_list_append_event_reset_params_t) Callback function parameters for zeCommandListAppendEventReset -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendEventResetParams (ze_command_list_append_event_reset_params_t) Callback function parameters for zeCommandListAppendEventReset +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendEventResetParams struct { Phcommandlist *ZeCommandListHandle - Phevent *ZeEventHandle + Phevent *ZeEventHandle } -// ZePfncommandlistappendeventresetcb (ze_pfnCommandListAppendEventResetCb_t) Callback function-pointer for zeCommandListAppendEventReset -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendeventresetcb (ze_pfnCommandListAppendEventResetCb_t) Callback function-pointer for zeCommandListAppendEventReset +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendeventresetcb uintptr -// ZeCommandListAppendQueryKernelTimestampsParams (ze_command_list_append_query_kernel_timestamps_params_t) Callback function parameters for zeCommandListAppendQueryKernelTimestamps -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendQueryKernelTimestampsParams (ze_command_list_append_query_kernel_timestamps_params_t) Callback function parameters for zeCommandListAppendQueryKernelTimestamps +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendQueryKernelTimestampsParams struct { - Phcommandlist *ZeCommandListHandle - Pnumevents *uint32 - Pphevents **ZeEventHandle - Pdstptr *unsafe.Pointer - Ppoffsets **uintptr - Phsignalevent *ZeEventHandle + Phcommandlist *ZeCommandListHandle + Pnumevents *uint32 + Pphevents **ZeEventHandle + Pdstptr *unsafe.Pointer + Ppoffsets **uintptr + Phsignalevent *ZeEventHandle Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendquerykerneltimestampscb (ze_pfnCommandListAppendQueryKernelTimestampsCb_t) Callback function-pointer for zeCommandListAppendQueryKernelTimestamps -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendquerykerneltimestampscb (ze_pfnCommandListAppendQueryKernelTimestampsCb_t) Callback function-pointer for zeCommandListAppendQueryKernelTimestamps +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendquerykerneltimestampscb uintptr -// ZeCommandListAppendLaunchKernelParams (ze_command_list_append_launch_kernel_params_t) Callback function parameters for zeCommandListAppendLaunchKernel -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendLaunchKernelParams (ze_command_list_append_launch_kernel_params_t) Callback function parameters for zeCommandListAppendLaunchKernel +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendLaunchKernelParams struct { - Phcommandlist *ZeCommandListHandle - Phkernel *ZeKernelHandle + Phcommandlist *ZeCommandListHandle + Phkernel *ZeKernelHandle Pplaunchfuncargs **ZeGroupCount - Phsignalevent *ZeEventHandle - Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendlaunchkernelcb (ze_pfnCommandListAppendLaunchKernelCb_t) Callback function-pointer for zeCommandListAppendLaunchKernel -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendlaunchkernelcb (ze_pfnCommandListAppendLaunchKernelCb_t) Callback function-pointer for zeCommandListAppendLaunchKernel +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendlaunchkernelcb uintptr -// ZeCommandListAppendLaunchCooperativeKernelParams (ze_command_list_append_launch_cooperative_kernel_params_t) Callback function parameters for zeCommandListAppendLaunchCooperativeKernel -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendLaunchCooperativeKernelParams (ze_command_list_append_launch_cooperative_kernel_params_t) Callback function parameters for zeCommandListAppendLaunchCooperativeKernel +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendLaunchCooperativeKernelParams struct { - Phcommandlist *ZeCommandListHandle - Phkernel *ZeKernelHandle + Phcommandlist *ZeCommandListHandle + Phkernel *ZeKernelHandle Pplaunchfuncargs **ZeGroupCount - Phsignalevent *ZeEventHandle - Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendlaunchcooperativekernelcb (ze_pfnCommandListAppendLaunchCooperativeKernelCb_t) Callback function-pointer for zeCommandListAppendLaunchCooperativeKernel -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendlaunchcooperativekernelcb (ze_pfnCommandListAppendLaunchCooperativeKernelCb_t) Callback function-pointer for zeCommandListAppendLaunchCooperativeKernel +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendlaunchcooperativekernelcb uintptr -// ZeCommandListAppendLaunchKernelIndirectParams (ze_command_list_append_launch_kernel_indirect_params_t) Callback function parameters for zeCommandListAppendLaunchKernelIndirect -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendLaunchKernelIndirectParams (ze_command_list_append_launch_kernel_indirect_params_t) Callback function parameters for zeCommandListAppendLaunchKernelIndirect +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendLaunchKernelIndirectParams struct { - Phcommandlist *ZeCommandListHandle - Phkernel *ZeKernelHandle + Phcommandlist *ZeCommandListHandle + Phkernel *ZeKernelHandle Pplaunchargumentsbuffer **ZeGroupCount - Phsignalevent *ZeEventHandle - Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendlaunchkernelindirectcb (ze_pfnCommandListAppendLaunchKernelIndirectCb_t) Callback function-pointer for zeCommandListAppendLaunchKernelIndirect -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendlaunchkernelindirectcb (ze_pfnCommandListAppendLaunchKernelIndirectCb_t) Callback function-pointer for zeCommandListAppendLaunchKernelIndirect +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendlaunchkernelindirectcb uintptr -// ZeCommandListAppendLaunchMultipleKernelsIndirectParams (ze_command_list_append_launch_multiple_kernels_indirect_params_t) Callback function parameters for zeCommandListAppendLaunchMultipleKernelsIndirect -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeCommandListAppendLaunchMultipleKernelsIndirectParams (ze_command_list_append_launch_multiple_kernels_indirect_params_t) Callback function parameters for zeCommandListAppendLaunchMultipleKernelsIndirect +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeCommandListAppendLaunchMultipleKernelsIndirectParams struct { - Phcommandlist *ZeCommandListHandle - Pnumkernels *uint32 - Pphkernels **ZeKernelHandle - Ppcountbuffer **uint32 + Phcommandlist *ZeCommandListHandle + Pnumkernels *uint32 + Pphkernels **ZeKernelHandle + Ppcountbuffer **uint32 Pplaunchargumentsbuffer **ZeGroupCount - Phsignalevent *ZeEventHandle - Pnumwaitevents *uint32 - Pphwaitevents **ZeEventHandle + Phsignalevent *ZeEventHandle + Pnumwaitevents *uint32 + Pphwaitevents **ZeEventHandle } -// ZePfncommandlistappendlaunchmultiplekernelsindirectcb (ze_pfnCommandListAppendLaunchMultipleKernelsIndirectCb_t) Callback function-pointer for zeCommandListAppendLaunchMultipleKernelsIndirect -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfncommandlistappendlaunchmultiplekernelsindirectcb (ze_pfnCommandListAppendLaunchMultipleKernelsIndirectCb_t) Callback function-pointer for zeCommandListAppendLaunchMultipleKernelsIndirect +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfncommandlistappendlaunchmultiplekernelsindirectcb uintptr // ZeCommandListCallbacks (ze_command_list_callbacks_t) Table of CommandList callback functions pointers type ZeCommandListCallbacks struct { - Pfncreatecb ZePfncommandlistcreatecb - Pfncreateimmediatecb ZePfncommandlistcreateimmediatecb - Pfndestroycb ZePfncommandlistdestroycb - Pfnclosecb ZePfncommandlistclosecb - Pfnresetcb ZePfncommandlistresetcb - Pfnappendwriteglobaltimestampcb ZePfncommandlistappendwriteglobaltimestampcb - Pfnappendbarriercb ZePfncommandlistappendbarriercb - Pfnappendmemoryrangesbarriercb ZePfncommandlistappendmemoryrangesbarriercb - Pfnappendmemorycopycb ZePfncommandlistappendmemorycopycb - Pfnappendmemoryfillcb ZePfncommandlistappendmemoryfillcb - Pfnappendmemorycopyregioncb ZePfncommandlistappendmemorycopyregioncb - Pfnappendmemorycopyfromcontextcb ZePfncommandlistappendmemorycopyfromcontextcb - Pfnappendimagecopycb ZePfncommandlistappendimagecopycb - Pfnappendimagecopyregioncb ZePfncommandlistappendimagecopyregioncb - Pfnappendimagecopytomemorycb ZePfncommandlistappendimagecopytomemorycb - Pfnappendimagecopyfrommemorycb ZePfncommandlistappendimagecopyfrommemorycb - Pfnappendmemoryprefetchcb ZePfncommandlistappendmemoryprefetchcb - Pfnappendmemadvisecb ZePfncommandlistappendmemadvisecb - Pfnappendsignaleventcb ZePfncommandlistappendsignaleventcb - Pfnappendwaitoneventscb ZePfncommandlistappendwaitoneventscb - Pfnappendeventresetcb ZePfncommandlistappendeventresetcb - Pfnappendquerykerneltimestampscb ZePfncommandlistappendquerykerneltimestampscb - Pfnappendlaunchkernelcb ZePfncommandlistappendlaunchkernelcb - Pfnappendlaunchcooperativekernelcb ZePfncommandlistappendlaunchcooperativekernelcb - Pfnappendlaunchkernelindirectcb ZePfncommandlistappendlaunchkernelindirectcb + Pfncreatecb ZePfncommandlistcreatecb + Pfncreateimmediatecb ZePfncommandlistcreateimmediatecb + Pfndestroycb ZePfncommandlistdestroycb + Pfnclosecb ZePfncommandlistclosecb + Pfnresetcb ZePfncommandlistresetcb + Pfnappendwriteglobaltimestampcb ZePfncommandlistappendwriteglobaltimestampcb + Pfnappendbarriercb ZePfncommandlistappendbarriercb + Pfnappendmemoryrangesbarriercb ZePfncommandlistappendmemoryrangesbarriercb + Pfnappendmemorycopycb ZePfncommandlistappendmemorycopycb + Pfnappendmemoryfillcb ZePfncommandlistappendmemoryfillcb + Pfnappendmemorycopyregioncb ZePfncommandlistappendmemorycopyregioncb + Pfnappendmemorycopyfromcontextcb ZePfncommandlistappendmemorycopyfromcontextcb + Pfnappendimagecopycb ZePfncommandlistappendimagecopycb + Pfnappendimagecopyregioncb ZePfncommandlistappendimagecopyregioncb + Pfnappendimagecopytomemorycb ZePfncommandlistappendimagecopytomemorycb + Pfnappendimagecopyfrommemorycb ZePfncommandlistappendimagecopyfrommemorycb + Pfnappendmemoryprefetchcb ZePfncommandlistappendmemoryprefetchcb + Pfnappendmemadvisecb ZePfncommandlistappendmemadvisecb + Pfnappendsignaleventcb ZePfncommandlistappendsignaleventcb + Pfnappendwaitoneventscb ZePfncommandlistappendwaitoneventscb + Pfnappendeventresetcb ZePfncommandlistappendeventresetcb + Pfnappendquerykerneltimestampscb ZePfncommandlistappendquerykerneltimestampscb + Pfnappendlaunchkernelcb ZePfncommandlistappendlaunchkernelcb + Pfnappendlaunchcooperativekernelcb ZePfncommandlistappendlaunchcooperativekernelcb + Pfnappendlaunchkernelindirectcb ZePfncommandlistappendlaunchkernelindirectcb Pfnappendlaunchmultiplekernelsindirectcb ZePfncommandlistappendlaunchmultiplekernelsindirectcb } -// ZeImageGetPropertiesParams (ze_image_get_properties_params_t) Callback function parameters for zeImageGetProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeImageGetPropertiesParams (ze_image_get_properties_params_t) Callback function parameters for zeImageGetProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeImageGetPropertiesParams struct { - Phdevice *ZeDeviceHandle - Pdesc **ZeImageDesc + Phdevice *ZeDeviceHandle + Pdesc **ZeImageDesc Ppimageproperties **ZeImageProperties } -// ZePfnimagegetpropertiescb (ze_pfnImageGetPropertiesCb_t) Callback function-pointer for zeImageGetProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnimagegetpropertiescb (ze_pfnImageGetPropertiesCb_t) Callback function-pointer for zeImageGetProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnimagegetpropertiescb uintptr -// ZeImageCreateParams (ze_image_create_params_t) Callback function parameters for zeImageCreate -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeImageCreateParams (ze_image_create_params_t) Callback function parameters for zeImageCreate +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeImageCreateParams struct { Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle - Pdesc **ZeImageDesc - Pphimage **ZeImageHandle + Phdevice *ZeDeviceHandle + Pdesc **ZeImageDesc + Pphimage **ZeImageHandle } -// ZePfnimagecreatecb (ze_pfnImageCreateCb_t) Callback function-pointer for zeImageCreate -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnimagecreatecb (ze_pfnImageCreateCb_t) Callback function-pointer for zeImageCreate +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnimagecreatecb uintptr -// ZeImageDestroyParams (ze_image_destroy_params_t) Callback function parameters for zeImageDestroy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeImageDestroyParams (ze_image_destroy_params_t) Callback function parameters for zeImageDestroy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeImageDestroyParams struct { Phimage *ZeImageHandle } -// ZePfnimagedestroycb (ze_pfnImageDestroyCb_t) Callback function-pointer for zeImageDestroy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnimagedestroycb (ze_pfnImageDestroyCb_t) Callback function-pointer for zeImageDestroy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnimagedestroycb uintptr // ZeImageCallbacks (ze_image_callbacks_t) Table of Image callback functions pointers type ZeImageCallbacks struct { Pfngetpropertiescb ZePfnimagegetpropertiescb - Pfncreatecb ZePfnimagecreatecb - Pfndestroycb ZePfnimagedestroycb + Pfncreatecb ZePfnimagecreatecb + Pfndestroycb ZePfnimagedestroycb } -// ZeMemAllocSharedParams (ze_mem_alloc_shared_params_t) Callback function parameters for zeMemAllocShared -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeMemAllocSharedParams (ze_mem_alloc_shared_params_t) Callback function parameters for zeMemAllocShared +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeMemAllocSharedParams struct { - Phcontext *ZeContextHandle + Phcontext *ZeContextHandle PdeviceDesc **ZeDeviceMemAllocDesc - PhostDesc **ZeHostMemAllocDesc - Psize *uintptr - Palignment *uintptr - Phdevice *ZeDeviceHandle - Ppptr **unsafe.Pointer + PhostDesc **ZeHostMemAllocDesc + Psize *uintptr + Palignment *uintptr + Phdevice *ZeDeviceHandle + Ppptr **unsafe.Pointer } -// ZePfnmemallocsharedcb (ze_pfnMemAllocSharedCb_t) Callback function-pointer for zeMemAllocShared -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmemallocsharedcb (ze_pfnMemAllocSharedCb_t) Callback function-pointer for zeMemAllocShared +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmemallocsharedcb uintptr -// ZeMemAllocDeviceParams (ze_mem_alloc_device_params_t) Callback function parameters for zeMemAllocDevice -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeMemAllocDeviceParams (ze_mem_alloc_device_params_t) Callback function parameters for zeMemAllocDevice +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeMemAllocDeviceParams struct { - Phcontext *ZeContextHandle + Phcontext *ZeContextHandle PdeviceDesc **ZeDeviceMemAllocDesc - Psize *uintptr - Palignment *uintptr - Phdevice *ZeDeviceHandle - Ppptr **unsafe.Pointer + Psize *uintptr + Palignment *uintptr + Phdevice *ZeDeviceHandle + Ppptr **unsafe.Pointer } -// ZePfnmemallocdevicecb (ze_pfnMemAllocDeviceCb_t) Callback function-pointer for zeMemAllocDevice -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmemallocdevicecb (ze_pfnMemAllocDeviceCb_t) Callback function-pointer for zeMemAllocDevice +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmemallocdevicecb uintptr -// ZeMemAllocHostParams (ze_mem_alloc_host_params_t) Callback function parameters for zeMemAllocHost -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeMemAllocHostParams (ze_mem_alloc_host_params_t) Callback function parameters for zeMemAllocHost +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeMemAllocHostParams struct { - Phcontext *ZeContextHandle - PhostDesc **ZeHostMemAllocDesc - Psize *uintptr + Phcontext *ZeContextHandle + PhostDesc **ZeHostMemAllocDesc + Psize *uintptr Palignment *uintptr - Ppptr **unsafe.Pointer + Ppptr **unsafe.Pointer } -// ZePfnmemallochostcb (ze_pfnMemAllocHostCb_t) Callback function-pointer for zeMemAllocHost -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmemallochostcb (ze_pfnMemAllocHostCb_t) Callback function-pointer for zeMemAllocHost +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmemallochostcb uintptr -// ZeMemFreeParams (ze_mem_free_params_t) Callback function parameters for zeMemFree -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeMemFreeParams (ze_mem_free_params_t) Callback function parameters for zeMemFree +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeMemFreeParams struct { Phcontext *ZeContextHandle - Pptr *unsafe.Pointer + Pptr *unsafe.Pointer } -// ZePfnmemfreecb (ze_pfnMemFreeCb_t) Callback function-pointer for zeMemFree -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmemfreecb (ze_pfnMemFreeCb_t) Callback function-pointer for zeMemFree +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmemfreecb uintptr -// ZeMemGetAllocPropertiesParams (ze_mem_get_alloc_properties_params_t) Callback function parameters for zeMemGetAllocProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeMemGetAllocPropertiesParams (ze_mem_get_alloc_properties_params_t) Callback function parameters for zeMemGetAllocProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeMemGetAllocPropertiesParams struct { - Phcontext *ZeContextHandle - Pptr *unsafe.Pointer + Phcontext *ZeContextHandle + Pptr *unsafe.Pointer Ppmemallocproperties **ZeMemoryAllocationProperties - Pphdevice **ZeDeviceHandle + Pphdevice **ZeDeviceHandle } -// ZePfnmemgetallocpropertiescb (ze_pfnMemGetAllocPropertiesCb_t) Callback function-pointer for zeMemGetAllocProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmemgetallocpropertiescb (ze_pfnMemGetAllocPropertiesCb_t) Callback function-pointer for zeMemGetAllocProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmemgetallocpropertiescb uintptr -// ZeMemGetAddressRangeParams (ze_mem_get_address_range_params_t) Callback function parameters for zeMemGetAddressRange -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeMemGetAddressRangeParams (ze_mem_get_address_range_params_t) Callback function parameters for zeMemGetAddressRange +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeMemGetAddressRangeParams struct { Phcontext *ZeContextHandle - Pptr *unsafe.Pointer - Ppbase **unsafe.Pointer - Ppsize **uintptr + Pptr *unsafe.Pointer + Ppbase **unsafe.Pointer + Ppsize **uintptr } -// ZePfnmemgetaddressrangecb (ze_pfnMemGetAddressRangeCb_t) Callback function-pointer for zeMemGetAddressRange -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmemgetaddressrangecb (ze_pfnMemGetAddressRangeCb_t) Callback function-pointer for zeMemGetAddressRange +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmemgetaddressrangecb uintptr -// ZeMemGetIpcHandleParams (ze_mem_get_ipc_handle_params_t) Callback function parameters for zeMemGetIpcHandle -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeMemGetIpcHandleParams (ze_mem_get_ipc_handle_params_t) Callback function parameters for zeMemGetIpcHandle +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeMemGetIpcHandleParams struct { - Phcontext *ZeContextHandle - Pptr *unsafe.Pointer + Phcontext *ZeContextHandle + Pptr *unsafe.Pointer Ppipchandle **ZeIpcMemHandle } -// ZePfnmemgetipchandlecb (ze_pfnMemGetIpcHandleCb_t) Callback function-pointer for zeMemGetIpcHandle -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmemgetipchandlecb (ze_pfnMemGetIpcHandleCb_t) Callback function-pointer for zeMemGetIpcHandle +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmemgetipchandlecb uintptr -// ZeMemOpenIpcHandleParams (ze_mem_open_ipc_handle_params_t) Callback function parameters for zeMemOpenIpcHandle -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeMemOpenIpcHandleParams (ze_mem_open_ipc_handle_params_t) Callback function parameters for zeMemOpenIpcHandle +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeMemOpenIpcHandleParams struct { Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle - Phandle *ZeIpcMemHandle - Pflags *ZeIpcMemoryFlags - Ppptr **unsafe.Pointer + Phdevice *ZeDeviceHandle + Phandle *ZeIpcMemHandle + Pflags *ZeIpcMemoryFlags + Ppptr **unsafe.Pointer } -// ZePfnmemopenipchandlecb (ze_pfnMemOpenIpcHandleCb_t) Callback function-pointer for zeMemOpenIpcHandle -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmemopenipchandlecb (ze_pfnMemOpenIpcHandleCb_t) Callback function-pointer for zeMemOpenIpcHandle +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmemopenipchandlecb uintptr -// ZeMemCloseIpcHandleParams (ze_mem_close_ipc_handle_params_t) Callback function parameters for zeMemCloseIpcHandle -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeMemCloseIpcHandleParams (ze_mem_close_ipc_handle_params_t) Callback function parameters for zeMemCloseIpcHandle +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeMemCloseIpcHandleParams struct { Phcontext *ZeContextHandle - Pptr *unsafe.Pointer + Pptr *unsafe.Pointer } -// ZePfnmemcloseipchandlecb (ze_pfnMemCloseIpcHandleCb_t) Callback function-pointer for zeMemCloseIpcHandle -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmemcloseipchandlecb (ze_pfnMemCloseIpcHandleCb_t) Callback function-pointer for zeMemCloseIpcHandle +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmemcloseipchandlecb uintptr // ZeMemCallbacks (ze_mem_callbacks_t) Table of Mem callback functions pointers type ZeMemCallbacks struct { - Pfnallocsharedcb ZePfnmemallocsharedcb - Pfnallocdevicecb ZePfnmemallocdevicecb - Pfnallochostcb ZePfnmemallochostcb - Pfnfreecb ZePfnmemfreecb + Pfnallocsharedcb ZePfnmemallocsharedcb + Pfnallocdevicecb ZePfnmemallocdevicecb + Pfnallochostcb ZePfnmemallochostcb + Pfnfreecb ZePfnmemfreecb Pfngetallocpropertiescb ZePfnmemgetallocpropertiescb - Pfngetaddressrangecb ZePfnmemgetaddressrangecb - Pfngetipchandlecb ZePfnmemgetipchandlecb - Pfnopenipchandlecb ZePfnmemopenipchandlecb - Pfncloseipchandlecb ZePfnmemcloseipchandlecb + Pfngetaddressrangecb ZePfnmemgetaddressrangecb + Pfngetipchandlecb ZePfnmemgetipchandlecb + Pfnopenipchandlecb ZePfnmemopenipchandlecb + Pfncloseipchandlecb ZePfnmemcloseipchandlecb } -// ZeFenceCreateParams (ze_fence_create_params_t) Callback function parameters for zeFenceCreate -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeFenceCreateParams (ze_fence_create_params_t) Callback function parameters for zeFenceCreate +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeFenceCreateParams struct { Phcommandqueue *ZeCommandQueueHandle - Pdesc **ZeFenceDesc - Pphfence **ZeFenceHandle + Pdesc **ZeFenceDesc + Pphfence **ZeFenceHandle } -// ZePfnfencecreatecb (ze_pfnFenceCreateCb_t) Callback function-pointer for zeFenceCreate -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnfencecreatecb (ze_pfnFenceCreateCb_t) Callback function-pointer for zeFenceCreate +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnfencecreatecb uintptr -// ZeFenceDestroyParams (ze_fence_destroy_params_t) Callback function parameters for zeFenceDestroy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeFenceDestroyParams (ze_fence_destroy_params_t) Callback function parameters for zeFenceDestroy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeFenceDestroyParams struct { Phfence *ZeFenceHandle } -// ZePfnfencedestroycb (ze_pfnFenceDestroyCb_t) Callback function-pointer for zeFenceDestroy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnfencedestroycb (ze_pfnFenceDestroyCb_t) Callback function-pointer for zeFenceDestroy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnfencedestroycb uintptr -// ZeFenceHostSynchronizeParams (ze_fence_host_synchronize_params_t) Callback function parameters for zeFenceHostSynchronize -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeFenceHostSynchronizeParams (ze_fence_host_synchronize_params_t) Callback function parameters for zeFenceHostSynchronize +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeFenceHostSynchronizeParams struct { - Phfence *ZeFenceHandle + Phfence *ZeFenceHandle Ptimeout *uint64 } -// ZePfnfencehostsynchronizecb (ze_pfnFenceHostSynchronizeCb_t) Callback function-pointer for zeFenceHostSynchronize -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnfencehostsynchronizecb (ze_pfnFenceHostSynchronizeCb_t) Callback function-pointer for zeFenceHostSynchronize +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnfencehostsynchronizecb uintptr -// ZeFenceQueryStatusParams (ze_fence_query_status_params_t) Callback function parameters for zeFenceQueryStatus -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeFenceQueryStatusParams (ze_fence_query_status_params_t) Callback function parameters for zeFenceQueryStatus +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeFenceQueryStatusParams struct { Phfence *ZeFenceHandle } -// ZePfnfencequerystatuscb (ze_pfnFenceQueryStatusCb_t) Callback function-pointer for zeFenceQueryStatus -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnfencequerystatuscb (ze_pfnFenceQueryStatusCb_t) Callback function-pointer for zeFenceQueryStatus +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnfencequerystatuscb uintptr -// ZeFenceResetParams (ze_fence_reset_params_t) Callback function parameters for zeFenceReset -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeFenceResetParams (ze_fence_reset_params_t) Callback function parameters for zeFenceReset +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeFenceResetParams struct { Phfence *ZeFenceHandle } -// ZePfnfenceresetcb (ze_pfnFenceResetCb_t) Callback function-pointer for zeFenceReset -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnfenceresetcb (ze_pfnFenceResetCb_t) Callback function-pointer for zeFenceReset +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnfenceresetcb uintptr // ZeFenceCallbacks (ze_fence_callbacks_t) Table of Fence callback functions pointers type ZeFenceCallbacks struct { - Pfncreatecb ZePfnfencecreatecb - Pfndestroycb ZePfnfencedestroycb + Pfncreatecb ZePfnfencecreatecb + Pfndestroycb ZePfnfencedestroycb Pfnhostsynchronizecb ZePfnfencehostsynchronizecb - Pfnquerystatuscb ZePfnfencequerystatuscb - Pfnresetcb ZePfnfenceresetcb + Pfnquerystatuscb ZePfnfencequerystatuscb + Pfnresetcb ZePfnfenceresetcb } -// ZeEventPoolCreateParams (ze_event_pool_create_params_t) Callback function parameters for zeEventPoolCreate -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeEventPoolCreateParams (ze_event_pool_create_params_t) Callback function parameters for zeEventPoolCreate +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeEventPoolCreateParams struct { - Phcontext *ZeContextHandle - Pdesc **ZeEventPoolDesc - Pnumdevices *uint32 - Pphdevices **ZeDeviceHandle + Phcontext *ZeContextHandle + Pdesc **ZeEventPoolDesc + Pnumdevices *uint32 + Pphdevices **ZeDeviceHandle Ppheventpool **ZeEventPoolHandle } -// ZePfneventpoolcreatecb (ze_pfnEventPoolCreateCb_t) Callback function-pointer for zeEventPoolCreate -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfneventpoolcreatecb (ze_pfnEventPoolCreateCb_t) Callback function-pointer for zeEventPoolCreate +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfneventpoolcreatecb uintptr -// ZeEventPoolDestroyParams (ze_event_pool_destroy_params_t) Callback function parameters for zeEventPoolDestroy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeEventPoolDestroyParams (ze_event_pool_destroy_params_t) Callback function parameters for zeEventPoolDestroy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeEventPoolDestroyParams struct { Pheventpool *ZeEventPoolHandle } -// ZePfneventpooldestroycb (ze_pfnEventPoolDestroyCb_t) Callback function-pointer for zeEventPoolDestroy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfneventpooldestroycb (ze_pfnEventPoolDestroyCb_t) Callback function-pointer for zeEventPoolDestroy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfneventpooldestroycb uintptr -// ZeEventPoolGetIpcHandleParams (ze_event_pool_get_ipc_handle_params_t) Callback function parameters for zeEventPoolGetIpcHandle -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeEventPoolGetIpcHandleParams (ze_event_pool_get_ipc_handle_params_t) Callback function parameters for zeEventPoolGetIpcHandle +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeEventPoolGetIpcHandleParams struct { Pheventpool *ZeEventPoolHandle - Pphipc **ZeIpcEventPoolHandle + Pphipc **ZeIpcEventPoolHandle } -// ZePfneventpoolgetipchandlecb (ze_pfnEventPoolGetIpcHandleCb_t) Callback function-pointer for zeEventPoolGetIpcHandle -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfneventpoolgetipchandlecb (ze_pfnEventPoolGetIpcHandleCb_t) Callback function-pointer for zeEventPoolGetIpcHandle +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfneventpoolgetipchandlecb uintptr -// ZeEventPoolOpenIpcHandleParams (ze_event_pool_open_ipc_handle_params_t) Callback function parameters for zeEventPoolOpenIpcHandle -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeEventPoolOpenIpcHandleParams (ze_event_pool_open_ipc_handle_params_t) Callback function parameters for zeEventPoolOpenIpcHandle +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeEventPoolOpenIpcHandleParams struct { - Phcontext *ZeContextHandle - Phipc *ZeIpcEventPoolHandle + Phcontext *ZeContextHandle + Phipc *ZeIpcEventPoolHandle Ppheventpool **ZeEventPoolHandle } -// ZePfneventpoolopenipchandlecb (ze_pfnEventPoolOpenIpcHandleCb_t) Callback function-pointer for zeEventPoolOpenIpcHandle -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfneventpoolopenipchandlecb (ze_pfnEventPoolOpenIpcHandleCb_t) Callback function-pointer for zeEventPoolOpenIpcHandle +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfneventpoolopenipchandlecb uintptr -// ZeEventPoolCloseIpcHandleParams (ze_event_pool_close_ipc_handle_params_t) Callback function parameters for zeEventPoolCloseIpcHandle -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeEventPoolCloseIpcHandleParams (ze_event_pool_close_ipc_handle_params_t) Callback function parameters for zeEventPoolCloseIpcHandle +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeEventPoolCloseIpcHandleParams struct { Pheventpool *ZeEventPoolHandle } -// ZePfneventpoolcloseipchandlecb (ze_pfnEventPoolCloseIpcHandleCb_t) Callback function-pointer for zeEventPoolCloseIpcHandle -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfneventpoolcloseipchandlecb (ze_pfnEventPoolCloseIpcHandleCb_t) Callback function-pointer for zeEventPoolCloseIpcHandle +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfneventpoolcloseipchandlecb uintptr // ZeEventPoolCallbacks (ze_event_pool_callbacks_t) Table of EventPool callback functions pointers type ZeEventPoolCallbacks struct { - Pfncreatecb ZePfneventpoolcreatecb - Pfndestroycb ZePfneventpooldestroycb - Pfngetipchandlecb ZePfneventpoolgetipchandlecb - Pfnopenipchandlecb ZePfneventpoolopenipchandlecb + Pfncreatecb ZePfneventpoolcreatecb + Pfndestroycb ZePfneventpooldestroycb + Pfngetipchandlecb ZePfneventpoolgetipchandlecb + Pfnopenipchandlecb ZePfneventpoolopenipchandlecb Pfncloseipchandlecb ZePfneventpoolcloseipchandlecb } -// ZeEventCreateParams (ze_event_create_params_t) Callback function parameters for zeEventCreate -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeEventCreateParams (ze_event_create_params_t) Callback function parameters for zeEventCreate +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeEventCreateParams struct { Pheventpool *ZeEventPoolHandle - Pdesc **ZeEventDesc - Pphevent **ZeEventHandle + Pdesc **ZeEventDesc + Pphevent **ZeEventHandle } -// ZePfneventcreatecb (ze_pfnEventCreateCb_t) Callback function-pointer for zeEventCreate -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfneventcreatecb (ze_pfnEventCreateCb_t) Callback function-pointer for zeEventCreate +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfneventcreatecb uintptr -// ZeEventDestroyParams (ze_event_destroy_params_t) Callback function parameters for zeEventDestroy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeEventDestroyParams (ze_event_destroy_params_t) Callback function parameters for zeEventDestroy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeEventDestroyParams struct { Phevent *ZeEventHandle } -// ZePfneventdestroycb (ze_pfnEventDestroyCb_t) Callback function-pointer for zeEventDestroy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfneventdestroycb (ze_pfnEventDestroyCb_t) Callback function-pointer for zeEventDestroy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfneventdestroycb uintptr -// ZeEventHostSignalParams (ze_event_host_signal_params_t) Callback function parameters for zeEventHostSignal -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeEventHostSignalParams (ze_event_host_signal_params_t) Callback function parameters for zeEventHostSignal +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeEventHostSignalParams struct { Phevent *ZeEventHandle } -// ZePfneventhostsignalcb (ze_pfnEventHostSignalCb_t) Callback function-pointer for zeEventHostSignal -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfneventhostsignalcb (ze_pfnEventHostSignalCb_t) Callback function-pointer for zeEventHostSignal +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfneventhostsignalcb uintptr -// ZeEventHostSynchronizeParams (ze_event_host_synchronize_params_t) Callback function parameters for zeEventHostSynchronize -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeEventHostSynchronizeParams (ze_event_host_synchronize_params_t) Callback function parameters for zeEventHostSynchronize +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeEventHostSynchronizeParams struct { - Phevent *ZeEventHandle + Phevent *ZeEventHandle Ptimeout *uint64 } -// ZePfneventhostsynchronizecb (ze_pfnEventHostSynchronizeCb_t) Callback function-pointer for zeEventHostSynchronize -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfneventhostsynchronizecb (ze_pfnEventHostSynchronizeCb_t) Callback function-pointer for zeEventHostSynchronize +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfneventhostsynchronizecb uintptr -// ZeEventQueryStatusParams (ze_event_query_status_params_t) Callback function parameters for zeEventQueryStatus -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeEventQueryStatusParams (ze_event_query_status_params_t) Callback function parameters for zeEventQueryStatus +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeEventQueryStatusParams struct { Phevent *ZeEventHandle } -// ZePfneventquerystatuscb (ze_pfnEventQueryStatusCb_t) Callback function-pointer for zeEventQueryStatus -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfneventquerystatuscb (ze_pfnEventQueryStatusCb_t) Callback function-pointer for zeEventQueryStatus +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfneventquerystatuscb uintptr -// ZeEventHostResetParams (ze_event_host_reset_params_t) Callback function parameters for zeEventHostReset -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeEventHostResetParams (ze_event_host_reset_params_t) Callback function parameters for zeEventHostReset +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeEventHostResetParams struct { Phevent *ZeEventHandle } -// ZePfneventhostresetcb (ze_pfnEventHostResetCb_t) Callback function-pointer for zeEventHostReset -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfneventhostresetcb (ze_pfnEventHostResetCb_t) Callback function-pointer for zeEventHostReset +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfneventhostresetcb uintptr -// ZeEventQueryKernelTimestampParams (ze_event_query_kernel_timestamp_params_t) Callback function parameters for zeEventQueryKernelTimestamp -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeEventQueryKernelTimestampParams (ze_event_query_kernel_timestamp_params_t) Callback function parameters for zeEventQueryKernelTimestamp +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeEventQueryKernelTimestampParams struct { Phevent *ZeEventHandle Pdstptr **ZeKernelTimestampResult } -// ZePfneventquerykerneltimestampcb (ze_pfnEventQueryKernelTimestampCb_t) Callback function-pointer for zeEventQueryKernelTimestamp -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfneventquerykerneltimestampcb (ze_pfnEventQueryKernelTimestampCb_t) Callback function-pointer for zeEventQueryKernelTimestamp +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfneventquerykerneltimestampcb uintptr // ZeEventCallbacks (ze_event_callbacks_t) Table of Event callback functions pointers type ZeEventCallbacks struct { - Pfncreatecb ZePfneventcreatecb - Pfndestroycb ZePfneventdestroycb - Pfnhostsignalcb ZePfneventhostsignalcb - Pfnhostsynchronizecb ZePfneventhostsynchronizecb - Pfnquerystatuscb ZePfneventquerystatuscb - Pfnhostresetcb ZePfneventhostresetcb + Pfncreatecb ZePfneventcreatecb + Pfndestroycb ZePfneventdestroycb + Pfnhostsignalcb ZePfneventhostsignalcb + Pfnhostsynchronizecb ZePfneventhostsynchronizecb + Pfnquerystatuscb ZePfneventquerystatuscb + Pfnhostresetcb ZePfneventhostresetcb Pfnquerykerneltimestampcb ZePfneventquerykerneltimestampcb } -// ZeModuleCreateParams (ze_module_create_params_t) Callback function parameters for zeModuleCreate -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeModuleCreateParams (ze_module_create_params_t) Callback function parameters for zeModuleCreate +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeModuleCreateParams struct { - Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle - Pdesc **ZeModuleDesc - Pphmodule **ZeModuleHandle + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Pdesc **ZeModuleDesc + Pphmodule **ZeModuleHandle Pphbuildlog **ZeModuleBuildLogHandle } -// ZePfnmodulecreatecb (ze_pfnModuleCreateCb_t) Callback function-pointer for zeModuleCreate -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmodulecreatecb (ze_pfnModuleCreateCb_t) Callback function-pointer for zeModuleCreate +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmodulecreatecb uintptr -// ZeModuleDestroyParams (ze_module_destroy_params_t) Callback function parameters for zeModuleDestroy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeModuleDestroyParams (ze_module_destroy_params_t) Callback function parameters for zeModuleDestroy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeModuleDestroyParams struct { Phmodule *ZeModuleHandle } -// ZePfnmoduledestroycb (ze_pfnModuleDestroyCb_t) Callback function-pointer for zeModuleDestroy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmoduledestroycb (ze_pfnModuleDestroyCb_t) Callback function-pointer for zeModuleDestroy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmoduledestroycb uintptr -// ZeModuleDynamicLinkParams (ze_module_dynamic_link_params_t) Callback function parameters for zeModuleDynamicLink -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeModuleDynamicLinkParams (ze_module_dynamic_link_params_t) Callback function parameters for zeModuleDynamicLink +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeModuleDynamicLinkParams struct { Pnummodules *uint32 - Pphmodules **ZeModuleHandle - Pphlinklog **ZeModuleBuildLogHandle + Pphmodules **ZeModuleHandle + Pphlinklog **ZeModuleBuildLogHandle } -// ZePfnmoduledynamiclinkcb (ze_pfnModuleDynamicLinkCb_t) Callback function-pointer for zeModuleDynamicLink -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmoduledynamiclinkcb (ze_pfnModuleDynamicLinkCb_t) Callback function-pointer for zeModuleDynamicLink +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmoduledynamiclinkcb uintptr -// ZeModuleGetNativeBinaryParams (ze_module_get_native_binary_params_t) Callback function parameters for zeModuleGetNativeBinary -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeModuleGetNativeBinaryParams (ze_module_get_native_binary_params_t) Callback function parameters for zeModuleGetNativeBinary +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeModuleGetNativeBinaryParams struct { - Phmodule *ZeModuleHandle - Ppsize **uintptr + Phmodule *ZeModuleHandle + Ppsize **uintptr Ppmodulenativebinary **uint8 } -// ZePfnmodulegetnativebinarycb (ze_pfnModuleGetNativeBinaryCb_t) Callback function-pointer for zeModuleGetNativeBinary -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmodulegetnativebinarycb (ze_pfnModuleGetNativeBinaryCb_t) Callback function-pointer for zeModuleGetNativeBinary +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmodulegetnativebinarycb uintptr -// ZeModuleGetGlobalPointerParams (ze_module_get_global_pointer_params_t) Callback function parameters for zeModuleGetGlobalPointer -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeModuleGetGlobalPointerParams (ze_module_get_global_pointer_params_t) Callback function parameters for zeModuleGetGlobalPointer +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeModuleGetGlobalPointerParams struct { - Phmodule *ZeModuleHandle + Phmodule *ZeModuleHandle Ppglobalname **byte - Ppsize **uintptr - Ppptr **unsafe.Pointer + Ppsize **uintptr + Ppptr **unsafe.Pointer } -// ZePfnmodulegetglobalpointercb (ze_pfnModuleGetGlobalPointerCb_t) Callback function-pointer for zeModuleGetGlobalPointer -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmodulegetglobalpointercb (ze_pfnModuleGetGlobalPointerCb_t) Callback function-pointer for zeModuleGetGlobalPointer +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmodulegetglobalpointercb uintptr -// ZeModuleGetKernelNamesParams (ze_module_get_kernel_names_params_t) Callback function parameters for zeModuleGetKernelNames -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeModuleGetKernelNamesParams (ze_module_get_kernel_names_params_t) Callback function parameters for zeModuleGetKernelNames +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeModuleGetKernelNamesParams struct { Phmodule *ZeModuleHandle - Ppcount **uint32 - Ppnames ***byte + Ppcount **uint32 + Ppnames ***byte } -// ZePfnmodulegetkernelnamescb (ze_pfnModuleGetKernelNamesCb_t) Callback function-pointer for zeModuleGetKernelNames -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmodulegetkernelnamescb (ze_pfnModuleGetKernelNamesCb_t) Callback function-pointer for zeModuleGetKernelNames +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmodulegetkernelnamescb uintptr -// ZeModuleGetPropertiesParams (ze_module_get_properties_params_t) Callback function parameters for zeModuleGetProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeModuleGetPropertiesParams (ze_module_get_properties_params_t) Callback function parameters for zeModuleGetProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeModuleGetPropertiesParams struct { - Phmodule *ZeModuleHandle + Phmodule *ZeModuleHandle Ppmoduleproperties **ZeModuleProperties } -// ZePfnmodulegetpropertiescb (ze_pfnModuleGetPropertiesCb_t) Callback function-pointer for zeModuleGetProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmodulegetpropertiescb (ze_pfnModuleGetPropertiesCb_t) Callback function-pointer for zeModuleGetProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmodulegetpropertiescb uintptr -// ZeModuleGetFunctionPointerParams (ze_module_get_function_pointer_params_t) Callback function parameters for zeModuleGetFunctionPointer -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeModuleGetFunctionPointerParams (ze_module_get_function_pointer_params_t) Callback function parameters for zeModuleGetFunctionPointer +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeModuleGetFunctionPointerParams struct { - Phmodule *ZeModuleHandle + Phmodule *ZeModuleHandle Ppfunctionname **byte - Ppfnfunction **unsafe.Pointer + Ppfnfunction **unsafe.Pointer } -// ZePfnmodulegetfunctionpointercb (ze_pfnModuleGetFunctionPointerCb_t) Callback function-pointer for zeModuleGetFunctionPointer -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmodulegetfunctionpointercb (ze_pfnModuleGetFunctionPointerCb_t) Callback function-pointer for zeModuleGetFunctionPointer +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmodulegetfunctionpointercb uintptr // ZeModuleCallbacks (ze_module_callbacks_t) Table of Module callback functions pointers type ZeModuleCallbacks struct { - Pfncreatecb ZePfnmodulecreatecb - Pfndestroycb ZePfnmoduledestroycb - Pfndynamiclinkcb ZePfnmoduledynamiclinkcb - Pfngetnativebinarycb ZePfnmodulegetnativebinarycb - Pfngetglobalpointercb ZePfnmodulegetglobalpointercb - Pfngetkernelnamescb ZePfnmodulegetkernelnamescb - Pfngetpropertiescb ZePfnmodulegetpropertiescb + Pfncreatecb ZePfnmodulecreatecb + Pfndestroycb ZePfnmoduledestroycb + Pfndynamiclinkcb ZePfnmoduledynamiclinkcb + Pfngetnativebinarycb ZePfnmodulegetnativebinarycb + Pfngetglobalpointercb ZePfnmodulegetglobalpointercb + Pfngetkernelnamescb ZePfnmodulegetkernelnamescb + Pfngetpropertiescb ZePfnmodulegetpropertiescb Pfngetfunctionpointercb ZePfnmodulegetfunctionpointercb } -// ZeModuleBuildLogDestroyParams (ze_module_build_log_destroy_params_t) Callback function parameters for zeModuleBuildLogDestroy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeModuleBuildLogDestroyParams (ze_module_build_log_destroy_params_t) Callback function parameters for zeModuleBuildLogDestroy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeModuleBuildLogDestroyParams struct { Phmodulebuildlog *ZeModuleBuildLogHandle } -// ZePfnmodulebuildlogdestroycb (ze_pfnModuleBuildLogDestroyCb_t) Callback function-pointer for zeModuleBuildLogDestroy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmodulebuildlogdestroycb (ze_pfnModuleBuildLogDestroyCb_t) Callback function-pointer for zeModuleBuildLogDestroy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmodulebuildlogdestroycb uintptr -// ZeModuleBuildLogGetStringParams (ze_module_build_log_get_string_params_t) Callback function parameters for zeModuleBuildLogGetString -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeModuleBuildLogGetStringParams (ze_module_build_log_get_string_params_t) Callback function parameters for zeModuleBuildLogGetString +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeModuleBuildLogGetStringParams struct { Phmodulebuildlog *ZeModuleBuildLogHandle - Ppsize **uintptr - Ppbuildlog **byte + Ppsize **uintptr + Ppbuildlog **byte } -// ZePfnmodulebuildloggetstringcb (ze_pfnModuleBuildLogGetStringCb_t) Callback function-pointer for zeModuleBuildLogGetString -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnmodulebuildloggetstringcb (ze_pfnModuleBuildLogGetStringCb_t) Callback function-pointer for zeModuleBuildLogGetString +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnmodulebuildloggetstringcb uintptr // ZeModuleBuildLogCallbacks (ze_module_build_log_callbacks_t) Table of ModuleBuildLog callback functions pointers type ZeModuleBuildLogCallbacks struct { - Pfndestroycb ZePfnmodulebuildlogdestroycb + Pfndestroycb ZePfnmodulebuildlogdestroycb Pfngetstringcb ZePfnmodulebuildloggetstringcb } -// ZeKernelCreateParams (ze_kernel_create_params_t) Callback function parameters for zeKernelCreate -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeKernelCreateParams (ze_kernel_create_params_t) Callback function parameters for zeKernelCreate +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeKernelCreateParams struct { - Phmodule *ZeModuleHandle - Pdesc **ZeKernelDesc + Phmodule *ZeModuleHandle + Pdesc **ZeKernelDesc Pphkernel **ZeKernelHandle } -// ZePfnkernelcreatecb (ze_pfnKernelCreateCb_t) Callback function-pointer for zeKernelCreate -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnkernelcreatecb (ze_pfnKernelCreateCb_t) Callback function-pointer for zeKernelCreate +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnkernelcreatecb uintptr -// ZeKernelDestroyParams (ze_kernel_destroy_params_t) Callback function parameters for zeKernelDestroy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeKernelDestroyParams (ze_kernel_destroy_params_t) Callback function parameters for zeKernelDestroy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeKernelDestroyParams struct { Phkernel *ZeKernelHandle } -// ZePfnkerneldestroycb (ze_pfnKernelDestroyCb_t) Callback function-pointer for zeKernelDestroy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnkerneldestroycb (ze_pfnKernelDestroyCb_t) Callback function-pointer for zeKernelDestroy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnkerneldestroycb uintptr -// ZeKernelSetCacheConfigParams (ze_kernel_set_cache_config_params_t) Callback function parameters for zeKernelSetCacheConfig -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeKernelSetCacheConfigParams (ze_kernel_set_cache_config_params_t) Callback function parameters for zeKernelSetCacheConfig +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeKernelSetCacheConfigParams struct { Phkernel *ZeKernelHandle - Pflags *ZeCacheConfigFlags + Pflags *ZeCacheConfigFlags } -// ZePfnkernelsetcacheconfigcb (ze_pfnKernelSetCacheConfigCb_t) Callback function-pointer for zeKernelSetCacheConfig -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnkernelsetcacheconfigcb (ze_pfnKernelSetCacheConfigCb_t) Callback function-pointer for zeKernelSetCacheConfig +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnkernelsetcacheconfigcb uintptr -// ZeKernelSetGroupSizeParams (ze_kernel_set_group_size_params_t) Callback function parameters for zeKernelSetGroupSize -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeKernelSetGroupSizeParams (ze_kernel_set_group_size_params_t) Callback function parameters for zeKernelSetGroupSize +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeKernelSetGroupSizeParams struct { - Phkernel *ZeKernelHandle + Phkernel *ZeKernelHandle Pgroupsizex *uint32 Pgroupsizey *uint32 Pgroupsizez *uint32 } -// ZePfnkernelsetgroupsizecb (ze_pfnKernelSetGroupSizeCb_t) Callback function-pointer for zeKernelSetGroupSize -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnkernelsetgroupsizecb (ze_pfnKernelSetGroupSizeCb_t) Callback function-pointer for zeKernelSetGroupSize +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnkernelsetgroupsizecb uintptr -// ZeKernelSuggestGroupSizeParams (ze_kernel_suggest_group_size_params_t) Callback function parameters for zeKernelSuggestGroupSize -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeKernelSuggestGroupSizeParams (ze_kernel_suggest_group_size_params_t) Callback function parameters for zeKernelSuggestGroupSize +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeKernelSuggestGroupSizeParams struct { - Phkernel *ZeKernelHandle + Phkernel *ZeKernelHandle Pglobalsizex *uint32 Pglobalsizey *uint32 Pglobalsizez *uint32 - Pgroupsizex **uint32 - Pgroupsizey **uint32 - Pgroupsizez **uint32 + Pgroupsizex **uint32 + Pgroupsizey **uint32 + Pgroupsizez **uint32 } -// ZePfnkernelsuggestgroupsizecb (ze_pfnKernelSuggestGroupSizeCb_t) Callback function-pointer for zeKernelSuggestGroupSize -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnkernelsuggestgroupsizecb (ze_pfnKernelSuggestGroupSizeCb_t) Callback function-pointer for zeKernelSuggestGroupSize +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnkernelsuggestgroupsizecb uintptr -// ZeKernelSuggestMaxCooperativeGroupCountParams (ze_kernel_suggest_max_cooperative_group_count_params_t) Callback function parameters for zeKernelSuggestMaxCooperativeGroupCount -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeKernelSuggestMaxCooperativeGroupCountParams (ze_kernel_suggest_max_cooperative_group_count_params_t) Callback function parameters for zeKernelSuggestMaxCooperativeGroupCount +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeKernelSuggestMaxCooperativeGroupCountParams struct { - Phkernel *ZeKernelHandle + Phkernel *ZeKernelHandle Ptotalgroupcount **uint32 } -// ZePfnkernelsuggestmaxcooperativegroupcountcb (ze_pfnKernelSuggestMaxCooperativeGroupCountCb_t) Callback function-pointer for zeKernelSuggestMaxCooperativeGroupCount -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnkernelsuggestmaxcooperativegroupcountcb (ze_pfnKernelSuggestMaxCooperativeGroupCountCb_t) Callback function-pointer for zeKernelSuggestMaxCooperativeGroupCount +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnkernelsuggestmaxcooperativegroupcountcb uintptr -// ZeKernelSetArgumentValueParams (ze_kernel_set_argument_value_params_t) Callback function parameters for zeKernelSetArgumentValue -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeKernelSetArgumentValueParams (ze_kernel_set_argument_value_params_t) Callback function parameters for zeKernelSetArgumentValue +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeKernelSetArgumentValueParams struct { - Phkernel *ZeKernelHandle - Pargindex *uint32 - Pargsize *uintptr + Phkernel *ZeKernelHandle + Pargindex *uint32 + Pargsize *uintptr Ppargvalue *unsafe.Pointer } -// ZePfnkernelsetargumentvaluecb (ze_pfnKernelSetArgumentValueCb_t) Callback function-pointer for zeKernelSetArgumentValue -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnkernelsetargumentvaluecb (ze_pfnKernelSetArgumentValueCb_t) Callback function-pointer for zeKernelSetArgumentValue +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnkernelsetargumentvaluecb uintptr -// ZeKernelSetIndirectAccessParams (ze_kernel_set_indirect_access_params_t) Callback function parameters for zeKernelSetIndirectAccess -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeKernelSetIndirectAccessParams (ze_kernel_set_indirect_access_params_t) Callback function parameters for zeKernelSetIndirectAccess +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeKernelSetIndirectAccessParams struct { Phkernel *ZeKernelHandle - Pflags *ZeKernelIndirectAccessFlags + Pflags *ZeKernelIndirectAccessFlags } -// ZePfnkernelsetindirectaccesscb (ze_pfnKernelSetIndirectAccessCb_t) Callback function-pointer for zeKernelSetIndirectAccess -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnkernelsetindirectaccesscb (ze_pfnKernelSetIndirectAccessCb_t) Callback function-pointer for zeKernelSetIndirectAccess +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnkernelsetindirectaccesscb uintptr -// ZeKernelGetIndirectAccessParams (ze_kernel_get_indirect_access_params_t) Callback function parameters for zeKernelGetIndirectAccess -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeKernelGetIndirectAccessParams (ze_kernel_get_indirect_access_params_t) Callback function parameters for zeKernelGetIndirectAccess +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeKernelGetIndirectAccessParams struct { Phkernel *ZeKernelHandle - Ppflags **ZeKernelIndirectAccessFlags + Ppflags **ZeKernelIndirectAccessFlags } -// ZePfnkernelgetindirectaccesscb (ze_pfnKernelGetIndirectAccessCb_t) Callback function-pointer for zeKernelGetIndirectAccess -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnkernelgetindirectaccesscb (ze_pfnKernelGetIndirectAccessCb_t) Callback function-pointer for zeKernelGetIndirectAccess +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnkernelgetindirectaccesscb uintptr -// ZeKernelGetSourceAttributesParams (ze_kernel_get_source_attributes_params_t) Callback function parameters for zeKernelGetSourceAttributes -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeKernelGetSourceAttributesParams (ze_kernel_get_source_attributes_params_t) Callback function parameters for zeKernelGetSourceAttributes +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeKernelGetSourceAttributesParams struct { Phkernel *ZeKernelHandle - Ppsize **uint32 + Ppsize **uint32 Ppstring ***byte } -// ZePfnkernelgetsourceattributescb (ze_pfnKernelGetSourceAttributesCb_t) Callback function-pointer for zeKernelGetSourceAttributes -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnkernelgetsourceattributescb (ze_pfnKernelGetSourceAttributesCb_t) Callback function-pointer for zeKernelGetSourceAttributes +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnkernelgetsourceattributescb uintptr -// ZeKernelGetPropertiesParams (ze_kernel_get_properties_params_t) Callback function parameters for zeKernelGetProperties -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeKernelGetPropertiesParams (ze_kernel_get_properties_params_t) Callback function parameters for zeKernelGetProperties +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeKernelGetPropertiesParams struct { - Phkernel *ZeKernelHandle + Phkernel *ZeKernelHandle Ppkernelproperties **ZeKernelProperties } -// ZePfnkernelgetpropertiescb (ze_pfnKernelGetPropertiesCb_t) Callback function-pointer for zeKernelGetProperties -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnkernelgetpropertiescb (ze_pfnKernelGetPropertiesCb_t) Callback function-pointer for zeKernelGetProperties +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnkernelgetpropertiescb uintptr -// ZeKernelGetNameParams (ze_kernel_get_name_params_t) Callback function parameters for zeKernelGetName -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeKernelGetNameParams (ze_kernel_get_name_params_t) Callback function parameters for zeKernelGetName +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeKernelGetNameParams struct { Phkernel *ZeKernelHandle - Ppsize **uintptr - Ppname **byte + Ppsize **uintptr + Ppname **byte } -// ZePfnkernelgetnamecb (ze_pfnKernelGetNameCb_t) Callback function-pointer for zeKernelGetName -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnkernelgetnamecb (ze_pfnKernelGetNameCb_t) Callback function-pointer for zeKernelGetName +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnkernelgetnamecb uintptr // ZeKernelCallbacks (ze_kernel_callbacks_t) Table of Kernel callback functions pointers type ZeKernelCallbacks struct { - Pfncreatecb ZePfnkernelcreatecb - Pfndestroycb ZePfnkerneldestroycb - Pfnsetcacheconfigcb ZePfnkernelsetcacheconfigcb - Pfnsetgroupsizecb ZePfnkernelsetgroupsizecb - Pfnsuggestgroupsizecb ZePfnkernelsuggestgroupsizecb + Pfncreatecb ZePfnkernelcreatecb + Pfndestroycb ZePfnkerneldestroycb + Pfnsetcacheconfigcb ZePfnkernelsetcacheconfigcb + Pfnsetgroupsizecb ZePfnkernelsetgroupsizecb + Pfnsuggestgroupsizecb ZePfnkernelsuggestgroupsizecb Pfnsuggestmaxcooperativegroupcountcb ZePfnkernelsuggestmaxcooperativegroupcountcb - Pfnsetargumentvaluecb ZePfnkernelsetargumentvaluecb - Pfnsetindirectaccesscb ZePfnkernelsetindirectaccesscb - Pfngetindirectaccesscb ZePfnkernelgetindirectaccesscb - Pfngetsourceattributescb ZePfnkernelgetsourceattributescb - Pfngetpropertiescb ZePfnkernelgetpropertiescb - Pfngetnamecb ZePfnkernelgetnamecb + Pfnsetargumentvaluecb ZePfnkernelsetargumentvaluecb + Pfnsetindirectaccesscb ZePfnkernelsetindirectaccesscb + Pfngetindirectaccesscb ZePfnkernelgetindirectaccesscb + Pfngetsourceattributescb ZePfnkernelgetsourceattributescb + Pfngetpropertiescb ZePfnkernelgetpropertiescb + Pfngetnamecb ZePfnkernelgetnamecb } -// ZeSamplerCreateParams (ze_sampler_create_params_t) Callback function parameters for zeSamplerCreate -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeSamplerCreateParams (ze_sampler_create_params_t) Callback function parameters for zeSamplerCreate +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeSamplerCreateParams struct { - Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle - Pdesc **ZeSamplerDesc + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Pdesc **ZeSamplerDesc Pphsampler **ZeSamplerHandle } -// ZePfnsamplercreatecb (ze_pfnSamplerCreateCb_t) Callback function-pointer for zeSamplerCreate -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnsamplercreatecb (ze_pfnSamplerCreateCb_t) Callback function-pointer for zeSamplerCreate +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnsamplercreatecb uintptr -// ZeSamplerDestroyParams (ze_sampler_destroy_params_t) Callback function parameters for zeSamplerDestroy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeSamplerDestroyParams (ze_sampler_destroy_params_t) Callback function parameters for zeSamplerDestroy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeSamplerDestroyParams struct { Phsampler *ZeSamplerHandle } -// ZePfnsamplerdestroycb (ze_pfnSamplerDestroyCb_t) Callback function-pointer for zeSamplerDestroy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnsamplerdestroycb (ze_pfnSamplerDestroyCb_t) Callback function-pointer for zeSamplerDestroy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnsamplerdestroycb uintptr // ZeSamplerCallbacks (ze_sampler_callbacks_t) Table of Sampler callback functions pointers type ZeSamplerCallbacks struct { - Pfncreatecb ZePfnsamplercreatecb + Pfncreatecb ZePfnsamplercreatecb Pfndestroycb ZePfnsamplerdestroycb } -// ZePhysicalMemCreateParams (ze_physical_mem_create_params_t) Callback function parameters for zePhysicalMemCreate -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZePhysicalMemCreateParams (ze_physical_mem_create_params_t) Callback function parameters for zePhysicalMemCreate +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZePhysicalMemCreateParams struct { - Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle - Pdesc **ZePhysicalMemDesc + Phcontext *ZeContextHandle + Phdevice *ZeDeviceHandle + Pdesc **ZePhysicalMemDesc Pphphysicalmemory **ZePhysicalMemHandle } -// ZePfnphysicalmemcreatecb (ze_pfnPhysicalMemCreateCb_t) Callback function-pointer for zePhysicalMemCreate -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnphysicalmemcreatecb (ze_pfnPhysicalMemCreateCb_t) Callback function-pointer for zePhysicalMemCreate +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnphysicalmemcreatecb uintptr -// ZePhysicalMemDestroyParams (ze_physical_mem_destroy_params_t) Callback function parameters for zePhysicalMemDestroy -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZePhysicalMemDestroyParams (ze_physical_mem_destroy_params_t) Callback function parameters for zePhysicalMemDestroy +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZePhysicalMemDestroyParams struct { - Phcontext *ZeContextHandle + Phcontext *ZeContextHandle Phphysicalmemory *ZePhysicalMemHandle } -// ZePfnphysicalmemdestroycb (ze_pfnPhysicalMemDestroyCb_t) Callback function-pointer for zePhysicalMemDestroy -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnphysicalmemdestroycb (ze_pfnPhysicalMemDestroyCb_t) Callback function-pointer for zePhysicalMemDestroy +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnphysicalmemdestroycb uintptr // ZePhysicalMemCallbacks (ze_physical_mem_callbacks_t) Table of PhysicalMem callback functions pointers type ZePhysicalMemCallbacks struct { - Pfncreatecb ZePfnphysicalmemcreatecb + Pfncreatecb ZePfnphysicalmemcreatecb Pfndestroycb ZePfnphysicalmemdestroycb } -// ZeVirtualMemReserveParams (ze_virtual_mem_reserve_params_t) Callback function parameters for zeVirtualMemReserve -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeVirtualMemReserveParams (ze_virtual_mem_reserve_params_t) Callback function parameters for zeVirtualMemReserve +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeVirtualMemReserveParams struct { Phcontext *ZeContextHandle - Ppstart *unsafe.Pointer - Psize *uintptr - Ppptr **unsafe.Pointer + Ppstart *unsafe.Pointer + Psize *uintptr + Ppptr **unsafe.Pointer } -// ZePfnvirtualmemreservecb (ze_pfnVirtualMemReserveCb_t) Callback function-pointer for zeVirtualMemReserve -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnvirtualmemreservecb (ze_pfnVirtualMemReserveCb_t) Callback function-pointer for zeVirtualMemReserve +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnvirtualmemreservecb uintptr -// ZeVirtualMemFreeParams (ze_virtual_mem_free_params_t) Callback function parameters for zeVirtualMemFree -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeVirtualMemFreeParams (ze_virtual_mem_free_params_t) Callback function parameters for zeVirtualMemFree +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeVirtualMemFreeParams struct { Phcontext *ZeContextHandle - Pptr *unsafe.Pointer - Psize *uintptr + Pptr *unsafe.Pointer + Psize *uintptr } -// ZePfnvirtualmemfreecb (ze_pfnVirtualMemFreeCb_t) Callback function-pointer for zeVirtualMemFree -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnvirtualmemfreecb (ze_pfnVirtualMemFreeCb_t) Callback function-pointer for zeVirtualMemFree +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnvirtualmemfreecb uintptr -// ZeVirtualMemQueryPageSizeParams (ze_virtual_mem_query_page_size_params_t) Callback function parameters for zeVirtualMemQueryPageSize -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeVirtualMemQueryPageSizeParams (ze_virtual_mem_query_page_size_params_t) Callback function parameters for zeVirtualMemQueryPageSize +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeVirtualMemQueryPageSizeParams struct { Phcontext *ZeContextHandle - Phdevice *ZeDeviceHandle - Psize *uintptr + Phdevice *ZeDeviceHandle + Psize *uintptr Ppagesize **uintptr } -// ZePfnvirtualmemquerypagesizecb (ze_pfnVirtualMemQueryPageSizeCb_t) Callback function-pointer for zeVirtualMemQueryPageSize -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnvirtualmemquerypagesizecb (ze_pfnVirtualMemQueryPageSizeCb_t) Callback function-pointer for zeVirtualMemQueryPageSize +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnvirtualmemquerypagesizecb uintptr -// ZeVirtualMemMapParams (ze_virtual_mem_map_params_t) Callback function parameters for zeVirtualMemMap -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeVirtualMemMapParams (ze_virtual_mem_map_params_t) Callback function parameters for zeVirtualMemMap +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeVirtualMemMapParams struct { - Phcontext *ZeContextHandle - Pptr *unsafe.Pointer - Psize *uintptr + Phcontext *ZeContextHandle + Pptr *unsafe.Pointer + Psize *uintptr Phphysicalmemory *ZePhysicalMemHandle - Poffset *uintptr - Paccess *ZeMemoryAccessAttribute + Poffset *uintptr + Paccess *ZeMemoryAccessAttribute } -// ZePfnvirtualmemmapcb (ze_pfnVirtualMemMapCb_t) Callback function-pointer for zeVirtualMemMap -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnvirtualmemmapcb (ze_pfnVirtualMemMapCb_t) Callback function-pointer for zeVirtualMemMap +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnvirtualmemmapcb uintptr -// ZeVirtualMemUnmapParams (ze_virtual_mem_unmap_params_t) Callback function parameters for zeVirtualMemUnmap -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeVirtualMemUnmapParams (ze_virtual_mem_unmap_params_t) Callback function parameters for zeVirtualMemUnmap +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeVirtualMemUnmapParams struct { Phcontext *ZeContextHandle - Pptr *unsafe.Pointer - Psize *uintptr + Pptr *unsafe.Pointer + Psize *uintptr } -// ZePfnvirtualmemunmapcb (ze_pfnVirtualMemUnmapCb_t) Callback function-pointer for zeVirtualMemUnmap -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnvirtualmemunmapcb (ze_pfnVirtualMemUnmapCb_t) Callback function-pointer for zeVirtualMemUnmap +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnvirtualmemunmapcb uintptr -// ZeVirtualMemSetAccessAttributeParams (ze_virtual_mem_set_access_attribute_params_t) Callback function parameters for zeVirtualMemSetAccessAttribute -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeVirtualMemSetAccessAttributeParams (ze_virtual_mem_set_access_attribute_params_t) Callback function parameters for zeVirtualMemSetAccessAttribute +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeVirtualMemSetAccessAttributeParams struct { Phcontext *ZeContextHandle - Pptr *unsafe.Pointer - Psize *uintptr - Paccess *ZeMemoryAccessAttribute + Pptr *unsafe.Pointer + Psize *uintptr + Paccess *ZeMemoryAccessAttribute } -// ZePfnvirtualmemsetaccessattributecb (ze_pfnVirtualMemSetAccessAttributeCb_t) Callback function-pointer for zeVirtualMemSetAccessAttribute -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnvirtualmemsetaccessattributecb (ze_pfnVirtualMemSetAccessAttributeCb_t) Callback function-pointer for zeVirtualMemSetAccessAttribute +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnvirtualmemsetaccessattributecb uintptr -// ZeVirtualMemGetAccessAttributeParams (ze_virtual_mem_get_access_attribute_params_t) Callback function parameters for zeVirtualMemGetAccessAttribute -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value +// ZeVirtualMemGetAccessAttributeParams (ze_virtual_mem_get_access_attribute_params_t) Callback function parameters for zeVirtualMemGetAccessAttribute +// / @details Each entry is a pointer to the parameter passed to the function; +// / allowing the callback the ability to modify the parameter's value type ZeVirtualMemGetAccessAttributeParams struct { Phcontext *ZeContextHandle - Pptr *unsafe.Pointer - Psize *uintptr - Paccess **ZeMemoryAccessAttribute - Poutsize **uintptr + Pptr *unsafe.Pointer + Psize *uintptr + Paccess **ZeMemoryAccessAttribute + Poutsize **uintptr } -// ZePfnvirtualmemgetaccessattributecb (ze_pfnVirtualMemGetAccessAttributeCb_t) Callback function-pointer for zeVirtualMemGetAccessAttribute -/// @param[in] params Parameters passed to this instance -/// @param[in] result Return value -/// @param[in] pTracerUserData Per-Tracer user data -/// @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data +// ZePfnvirtualmemgetaccessattributecb (ze_pfnVirtualMemGetAccessAttributeCb_t) Callback function-pointer for zeVirtualMemGetAccessAttribute +// / @param[in] params Parameters passed to this instance +// / @param[in] result Return value +// / @param[in] pTracerUserData Per-Tracer user data +// / @param[in,out] ppTracerInstanceUserData Per-Tracer, Per-Instance user data // gozel warn: please use C function pointer loaded from C library! type ZePfnvirtualmemgetaccessattributecb uintptr // ZeVirtualMemCallbacks (ze_virtual_mem_callbacks_t) Table of VirtualMem callback functions pointers type ZeVirtualMemCallbacks struct { - Pfnreservecb ZePfnvirtualmemreservecb - Pfnfreecb ZePfnvirtualmemfreecb - Pfnquerypagesizecb ZePfnvirtualmemquerypagesizecb - Pfnmapcb ZePfnvirtualmemmapcb - Pfnunmapcb ZePfnvirtualmemunmapcb + Pfnreservecb ZePfnvirtualmemreservecb + Pfnfreecb ZePfnvirtualmemfreecb + Pfnquerypagesizecb ZePfnvirtualmemquerypagesizecb + Pfnmapcb ZePfnvirtualmemmapcb + Pfnunmapcb ZePfnvirtualmemunmapcb Pfnsetaccessattributecb ZePfnvirtualmemsetaccessattributecb Pfngetaccessattributecb ZePfnvirtualmemgetaccessattributecb } // ZeCallbacks (ze_callbacks_t) Container for all callbacks type ZeCallbacks struct { - Global ZeGlobalCallbacks - Driver ZeDriverCallbacks - Device ZeDeviceCallbacks - Context ZeContextCallbacks - Commandqueue ZeCommandQueueCallbacks - Commandlist ZeCommandListCallbacks - Fence ZeFenceCallbacks - Eventpool ZeEventPoolCallbacks - Event ZeEventCallbacks - Image ZeImageCallbacks - Module ZeModuleCallbacks + Global ZeGlobalCallbacks + Driver ZeDriverCallbacks + Device ZeDeviceCallbacks + Context ZeContextCallbacks + Commandqueue ZeCommandQueueCallbacks + Commandlist ZeCommandListCallbacks + Fence ZeFenceCallbacks + Eventpool ZeEventPoolCallbacks + Event ZeEventCallbacks + Image ZeImageCallbacks + Module ZeModuleCallbacks Modulebuildlog ZeModuleBuildLogCallbacks - Kernel ZeKernelCallbacks - Sampler ZeSamplerCallbacks - Physicalmem ZePhysicalMemCallbacks - Mem ZeMemCallbacks - Virtualmem ZeVirtualMemCallbacks + Kernel ZeKernelCallbacks + Sampler ZeSamplerCallbacks + Physicalmem ZePhysicalMemCallbacks + Mem ZeMemCallbacks + Virtualmem ZeVirtualMemCallbacks } - diff --git a/core_cmdlist.go b/core_cmdlist.go index bfc6219..b08cae6 100644 --- a/core_cmdlist.go +++ b/core_cmdlist.go @@ -21,20 +21,21 @@ import ( // ZeCommandListFlags (ze_command_list_flags_t) Supported command list creation flags type ZeCommandListFlags uint32 + const ( - ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING ZeCommandListFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING driver may reorder commands (e.g., kernels, copies) between barriers + ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING ZeCommandListFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING driver may reorder commands (e.g., kernels, copies) between barriers ///< and synchronization primitives. ///< using this flag may increase Host overhead of ::zeCommandListClose. ///< therefore, this flag should **not** be set for low-latency usage-models. - ZE_COMMAND_LIST_FLAG_MAXIMIZE_THROUGHPUT ZeCommandListFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_COMMAND_LIST_FLAG_MAXIMIZE_THROUGHPUT driver may perform additional optimizations that increase execution + ZE_COMMAND_LIST_FLAG_MAXIMIZE_THROUGHPUT ZeCommandListFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_COMMAND_LIST_FLAG_MAXIMIZE_THROUGHPUT driver may perform additional optimizations that increase execution ///< throughput. ///< using this flag may increase Host overhead of ::zeCommandListClose and ::zeCommandQueueExecuteCommandLists. ///< therefore, this flag should **not** be set for low-latency usage-models. - ZE_COMMAND_LIST_FLAG_EXPLICIT_ONLY ZeCommandListFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_COMMAND_LIST_FLAG_EXPLICIT_ONLY command list should be optimized for submission to a single command + ZE_COMMAND_LIST_FLAG_EXPLICIT_ONLY ZeCommandListFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_COMMAND_LIST_FLAG_EXPLICIT_ONLY command list should be optimized for submission to a single command ///< queue and device engine. ///< driver **must** disable any implicit optimizations for distributing @@ -44,7 +45,7 @@ const ( ///< This flag is **DEPRECATED** and implementations are not expected to ///< support this feature. - ZE_COMMAND_LIST_FLAG_IN_ORDER ZeCommandListFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_COMMAND_LIST_FLAG_IN_ORDER commands appended to this command list are executed in-order, with + ZE_COMMAND_LIST_FLAG_IN_ORDER ZeCommandListFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_COMMAND_LIST_FLAG_IN_ORDER commands appended to this command list are executed in-order, with ///< driver implementation ///< enforcing dependencies between them. Application is not required to @@ -55,463 +56,462 @@ const ( ///< command to implement ///< more complex dependency graphs. Cannot be combined with ::ZE_COMMAND_LIST_FLAG_RELAXED_ORDERING. - ZE_COMMAND_LIST_FLAG_EXP_CLONEABLE ZeCommandListFlags = /* ZE_BIT(4) */(( 1 << 4 )) // ZE_COMMAND_LIST_FLAG_EXP_CLONEABLE this command list may be cloned using ::zeCommandListCreateCloneExp + ZE_COMMAND_LIST_FLAG_EXP_CLONEABLE ZeCommandListFlags = /* ZE_BIT(4) */ (1 << 4) // ZE_COMMAND_LIST_FLAG_EXP_CLONEABLE this command list may be cloned using ::zeCommandListCreateCloneExp ///< after ::zeCommandListClose. - ZE_COMMAND_LIST_FLAG_COPY_OFFLOAD_HINT ZeCommandListFlags = /* ZE_BIT(5) */(( 1 << 5 )) // ZE_COMMAND_LIST_FLAG_COPY_OFFLOAD_HINT Try to offload copy operations to different engines. Applicable only + ZE_COMMAND_LIST_FLAG_COPY_OFFLOAD_HINT ZeCommandListFlags = /* ZE_BIT(5) */ (1 << 5) // ZE_COMMAND_LIST_FLAG_COPY_OFFLOAD_HINT Try to offload copy operations to different engines. Applicable only ///< for compute queues. ///< This is only a hint. Driver may ignore it per append call, based on ///< platform capabilities or internal heuristics. - ZE_COMMAND_LIST_FLAG_FORCE_UINT32 ZeCommandListFlags = 0x7fffffff // ZE_COMMAND_LIST_FLAG_FORCE_UINT32 Value marking end of ZE_COMMAND_LIST_FLAG_* ENUMs + ZE_COMMAND_LIST_FLAG_FORCE_UINT32 ZeCommandListFlags = 0x7fffffff // ZE_COMMAND_LIST_FLAG_FORCE_UINT32 Value marking end of ZE_COMMAND_LIST_FLAG_* ENUMs ) // ZeCommandListDesc (ze_command_list_desc_t) Command List descriptor type ZeCommandListDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Commandqueuegroupordinal uint32 // Commandqueuegroupordinal [in] command queue group ordinal to which this command list will be submitted - Flags ZeCommandListFlags // Flags [in] usage flags. must be 0 (default) or a valid combination of ::ze_command_list_flag_t; default behavior may use implicit driver-based heuristics to balance latency and throughput. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Commandqueuegroupordinal uint32 // Commandqueuegroupordinal [in] command queue group ordinal to which this command list will be submitted + Flags ZeCommandListFlags // Flags [in] usage flags. must be 0 (default) or a valid combination of ::ze_command_list_flag_t; default behavior may use implicit driver-based heuristics to balance latency and throughput. } // ZeCommandListCreate Creates a command list on the context. -/// -/// @details -/// - A command list represents a sequence of commands for execution on a -/// command queue. -/// - The command list is created in the 'open' state. -/// - The application must only use the command list for the device, or its -/// sub-devices, which was provided during creation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3f < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - A command list represents a sequence of commands for execution on a +// / command queue. +// / - The command list is created in the 'open' state. +// / - The application must only use the command list for the device, or its +// / sub-devices, which was provided during creation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x3f < desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeCommandListCreate( - hContext ZeContextHandle, // hContext [in] handle of the context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device object - desc *ZeCommandListDesc, // desc [in] pointer to command list descriptor - phCommandList *ZeCommandListHandle, // phCommandList [out] pointer to handle of command list object created + hContext ZeContextHandle, // hContext [in] handle of the context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device object + desc *ZeCommandListDesc, // desc [in] pointer to command list descriptor + phCommandList *ZeCommandListHandle, // phCommandList [out] pointer to handle of command list object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListCreate", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phCommandList))) } // ZeCommandListCreateImmediate Creates an immediate command list on the context. -/// -/// @details -/// - An immediate command list is used for low-latency submission of -/// commands. -/// - An immediate command list creates an implicit command queue. -/// - Immediate command lists must not be passed to -/// ::zeCommandQueueExecuteCommandLists. -/// - Commands appended into an immediate command list may execute -/// synchronously, by blocking until the command is complete. -/// - The command list is created in the 'open' state and never needs to be -/// closed. -/// - The application must only use the command list for the device, or its -/// sub-devices, which was provided during creation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == altdesc` -/// + `nullptr == phCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x7 < altdesc->flags` -/// + `::ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS < altdesc->mode` -/// + `::ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH < altdesc->priority` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - An immediate command list is used for low-latency submission of +// / commands. +// / - An immediate command list creates an implicit command queue. +// / - Immediate command lists must not be passed to +// / ::zeCommandQueueExecuteCommandLists. +// / - Commands appended into an immediate command list may execute +// / synchronously, by blocking until the command is complete. +// / - The command list is created in the 'open' state and never needs to be +// / closed. +// / - The application must only use the command list for the device, or its +// / sub-devices, which was provided during creation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == altdesc` +// / + `nullptr == phCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x7 < altdesc->flags` +// / + `::ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS < altdesc->mode` +// / + `::ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH < altdesc->priority` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeCommandListCreateImmediate( - hContext ZeContextHandle, // hContext [in] handle of the context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device object - altdesc *ZeCommandQueueDesc, // altdesc [in] pointer to command queue descriptor - phCommandList *ZeCommandListHandle, // phCommandList [out] pointer to handle of command list object created + hContext ZeContextHandle, // hContext [in] handle of the context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device object + altdesc *ZeCommandQueueDesc, // altdesc [in] pointer to command queue descriptor + phCommandList *ZeCommandListHandle, // phCommandList [out] pointer to handle of command list object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListCreateImmediate", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(altdesc)), uintptr(unsafe.Pointer(phCommandList))) } // ZeCommandListDestroy Destroys a command list. -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the command list before it is deleted. -/// - The implementation of this function may immediately free all Host and -/// Device allocations associated with this command list. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the command list before it is deleted. +// / - The implementation of this function may immediately free all Host and +// / Device allocations associated with this command list. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeCommandListDestroy( - hCommandList ZeCommandListHandle, // hCommandList [in][release] handle of command list object to destroy + hCommandList ZeCommandListHandle, // hCommandList [in][release] handle of command list object to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListDestroy", uintptr(hCommandList)) } // ZeCommandListClose Closes a command list; ready to be executed by a command queue. -/// -/// @details -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` +// / +// / @details +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` func ZeCommandListClose( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list object to close + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list object to close ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListClose", uintptr(hCommandList)) } // ZeCommandListReset Reset a command list to initial (empty) state; ready for appending -/// commands. -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the command list before it is reset -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` +// / commands. +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the command list before it is reset +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` func ZeCommandListReset( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list object to reset + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list object to reset ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListReset", uintptr(hCommandList)) } // ZeCommandListAppendWriteGlobalTimestamp Appends a memory write of the device's global timestamp value into a -/// command list. -/// -/// @details -/// - The application must ensure the events are accessible by the device on -/// which the command list was created. -/// - The timestamp frequency can be queried from the `timerResolution` -/// member of ::ze_device_properties_t. -/// - The number of valid bits in the timestamp value can be queried from -/// the `timestampValidBits` member of ::ze_device_properties_t. -/// - The application must ensure the memory pointed to by dstptr is -/// accessible by the device on which the command list was created. -/// - The application must ensure the command list and events were created, -/// and the memory was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == dstptr` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / command list. +// / +// / @details +// / - The application must ensure the events are accessible by the device on +// / which the command list was created. +// / - The timestamp frequency can be queried from the `timerResolution` +// / member of ::ze_device_properties_t. +// / - The number of valid bits in the timestamp value can be queried from +// / the `timestampValidBits` member of ::ze_device_properties_t. +// / - The application must ensure the memory pointed to by dstptr is +// / accessible by the device on which the command list was created. +// / - The application must ensure the command list and events were created, +// / and the memory was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == dstptr` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendWriteGlobalTimestamp( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - dstptr *uint64, // dstptr [in,out] pointer to memory where timestamp value will be written; must be 8byte-aligned. - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before executing query; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing query + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + dstptr *uint64, // dstptr [in,out] pointer to memory where timestamp value will be written; must be 8byte-aligned. + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before executing query; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing query ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendWriteGlobalTimestamp", uintptr(hCommandList), uintptr(unsafe.Pointer(dstptr)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListHostSynchronize Synchronizes an immediate command list by waiting on the host for the -/// completion of all commands previously submitted to it. -/// -/// @details -/// - The application must call this function only with command lists -/// created with ::zeCommandListCreateImmediate. -/// - Waiting on one immediate command list shall not block the concurrent -/// execution of commands appended to other -/// immediate command lists created with either a different ordinal or -/// different index. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_NOT_READY -/// + timeout expired -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + handle does not correspond to an immediate command list +// / completion of all commands previously submitted to it. +// / +// / @details +// / - The application must call this function only with command lists +// / created with ::zeCommandListCreateImmediate. +// / - Waiting on one immediate command list shall not block the concurrent +// / execution of commands appended to other +// / immediate command lists created with either a different ordinal or +// / different index. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_NOT_READY +// / + timeout expired +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + handle does not correspond to an immediate command list func ZeCommandListHostSynchronize( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the immediate command list - timeout uint64, // timeout [in] if non-zero, then indicates the maximum time (in nanoseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then immediately returns the status of the immediate command list; if `UINT64_MAX`, then function will not return until complete or device is lost. Due to external dependencies, timeout may be rounded to the closest value allowed by the accuracy of those dependencies. + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the immediate command list + timeout uint64, // timeout [in] if non-zero, then indicates the maximum time (in nanoseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then immediately returns the status of the immediate command list; if `UINT64_MAX`, then function will not return until complete or device is lost. Due to external dependencies, timeout may be rounded to the closest value allowed by the accuracy of those dependencies. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListHostSynchronize", uintptr(hCommandList), uintptr(timeout)) } // ZeCommandListGetDeviceHandle Gets the handle of the device on which the command list was created. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phDevice` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phDevice` func ZeCommandListGetDeviceHandle( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - phDevice *ZeDeviceHandle, // phDevice [out] handle of the device on which the command list was created + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + phDevice *ZeDeviceHandle, // phDevice [out] handle of the device on which the command list was created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListGetDeviceHandle", uintptr(hCommandList), uintptr(unsafe.Pointer(phDevice))) } // ZeCommandListGetContextHandle Gets the handle of the context on which the command list was created. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phContext` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phContext` func ZeCommandListGetContextHandle( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - phContext *ZeContextHandle, // phContext [out] handle of the context on which the command list was created + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + phContext *ZeContextHandle, // phContext [out] handle of the context on which the command list was created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListGetContextHandle", uintptr(hCommandList), uintptr(unsafe.Pointer(phContext))) } // ZeCommandListGetOrdinal Gets the command queue group ordinal to which the command list is -/// submitted. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pOrdinal` +// / submitted. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pOrdinal` func ZeCommandListGetOrdinal( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - pOrdinal *uint32, // pOrdinal [out] command queue group ordinal to which command list is submitted + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + pOrdinal *uint32, // pOrdinal [out] command queue group ordinal to which command list is submitted ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListGetOrdinal", uintptr(hCommandList), uintptr(unsafe.Pointer(pOrdinal))) } // ZeCommandListImmediateGetIndex Gets the command queue index within the group to which the immediate -/// command list is submitted. -/// -/// @details -/// - The application must call this function only with command lists -/// created with ::zeCommandListCreateImmediate. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandListImmediate` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pIndex` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + handle does not correspond to an immediate command list +// / command list is submitted. +// / +// / @details +// / - The application must call this function only with command lists +// / created with ::zeCommandListCreateImmediate. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandListImmediate` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pIndex` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + handle does not correspond to an immediate command list func ZeCommandListImmediateGetIndex( - hCommandListImmediate ZeCommandListHandle, // hCommandListImmediate [in] handle of the immediate command list - pIndex *uint32, // pIndex [out] command queue index within the group to which the immediate command list is submitted + hCommandListImmediate ZeCommandListHandle, // hCommandListImmediate [in] handle of the immediate command list + pIndex *uint32, // pIndex [out] command queue index within the group to which the immediate command list is submitted ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListImmediateGetIndex", uintptr(hCommandListImmediate), uintptr(unsafe.Pointer(pIndex))) } // ZeCommandListIsImmediate Query whether a command list is an immediate command list. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pIsImmediate` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pIsImmediate` func ZeCommandListIsImmediate( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - pIsImmediate *ZeBool, // pIsImmediate [out] Boolean indicating whether the command list is an immediate command list (true) or not (false) + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + pIsImmediate *ZeBool, // pIsImmediate [out] Boolean indicating whether the command list is an immediate command list (true) or not (false) ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListIsImmediate", uintptr(hCommandList), uintptr(unsafe.Pointer(pIsImmediate))) } - diff --git a/core_cmdqueue.go b/core_cmdqueue.go index c734517..176b3eb 100644 --- a/core_cmdqueue.go +++ b/core_cmdqueue.go @@ -21,8 +21,9 @@ import ( // ZeCommandQueueFlags (ze_command_queue_flags_t) Supported command queue flags type ZeCommandQueueFlags uint32 + const ( - ZE_COMMAND_QUEUE_FLAG_EXPLICIT_ONLY ZeCommandQueueFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_COMMAND_QUEUE_FLAG_EXPLICIT_ONLY command queue should be optimized for submission to a single device engine. + ZE_COMMAND_QUEUE_FLAG_EXPLICIT_ONLY ZeCommandQueueFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_COMMAND_QUEUE_FLAG_EXPLICIT_ONLY command queue should be optimized for submission to a single device engine. ///< driver **must** disable any implicit optimizations for distributing ///< work across multiple engines. @@ -31,7 +32,7 @@ const ( ///< This flag is **DEPRECATED** as flag ///< ${X}_COMMAND_LIST_FLAG_EXPLICIT_ONLY is **DEPRECATED**. - ZE_COMMAND_QUEUE_FLAG_IN_ORDER ZeCommandQueueFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_COMMAND_QUEUE_FLAG_IN_ORDER To be used only when creating immediate command lists. Commands + ZE_COMMAND_QUEUE_FLAG_IN_ORDER ZeCommandQueueFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_COMMAND_QUEUE_FLAG_IN_ORDER To be used only when creating immediate command lists. Commands ///< appended to the immediate command ///< list are executed in-order, with driver implementation enforcing @@ -42,289 +43,290 @@ const ( ///< pass signal and wait events ///< to each appended command to implement more complex dependency graphs. - ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT ZeCommandQueueFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT To be used only when creating immediate command lists and only for + ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT ZeCommandQueueFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT To be used only when creating immediate command lists and only for ///< compute queues. ///< Try to offload copy operations to different engines. This is only a hint. ///< Driver may ignore it per append call, based on platform capabilities ///< or internal heuristics. - ZE_COMMAND_QUEUE_FLAG_FORCE_UINT32 ZeCommandQueueFlags = 0x7fffffff // ZE_COMMAND_QUEUE_FLAG_FORCE_UINT32 Value marking end of ZE_COMMAND_QUEUE_FLAG_* ENUMs + ZE_COMMAND_QUEUE_FLAG_FORCE_UINT32 ZeCommandQueueFlags = 0x7fffffff // ZE_COMMAND_QUEUE_FLAG_FORCE_UINT32 Value marking end of ZE_COMMAND_QUEUE_FLAG_* ENUMs ) // ZeCommandQueueMode (ze_command_queue_mode_t) Supported command queue modes type ZeCommandQueueMode uintptr + const ( - ZE_COMMAND_QUEUE_MODE_DEFAULT ZeCommandQueueMode = 0 // ZE_COMMAND_QUEUE_MODE_DEFAULT implicit default behavior; uses driver-based heuristics - ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS ZeCommandQueueMode = 1 // ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS Device execution always completes immediately on execute; + ZE_COMMAND_QUEUE_MODE_DEFAULT ZeCommandQueueMode = 0 // ZE_COMMAND_QUEUE_MODE_DEFAULT implicit default behavior; uses driver-based heuristics + ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS ZeCommandQueueMode = 1 // ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS Device execution always completes immediately on execute; ///< Host thread is blocked using wait on implicit synchronization object - ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS ZeCommandQueueMode = 2 // ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS Device execution is scheduled and will complete in future; + ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS ZeCommandQueueMode = 2 // ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS Device execution is scheduled and will complete in future; ///< explicit synchronization object must be used to determine completeness - ZE_COMMAND_QUEUE_MODE_FORCE_UINT32 ZeCommandQueueMode = 0x7fffffff // ZE_COMMAND_QUEUE_MODE_FORCE_UINT32 Value marking end of ZE_COMMAND_QUEUE_MODE_* ENUMs + ZE_COMMAND_QUEUE_MODE_FORCE_UINT32 ZeCommandQueueMode = 0x7fffffff // ZE_COMMAND_QUEUE_MODE_FORCE_UINT32 Value marking end of ZE_COMMAND_QUEUE_MODE_* ENUMs ) // ZeCommandQueuePriority (ze_command_queue_priority_t) Supported command queue priorities type ZeCommandQueuePriority uintptr + const ( - ZE_COMMAND_QUEUE_PRIORITY_NORMAL ZeCommandQueuePriority = 0 // ZE_COMMAND_QUEUE_PRIORITY_NORMAL [default] normal priority - ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_LOW ZeCommandQueuePriority = 1 // ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_LOW lower priority than normal - ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH ZeCommandQueuePriority = 2 // ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH higher priority than normal - ZE_COMMAND_QUEUE_PRIORITY_FORCE_UINT32 ZeCommandQueuePriority = 0x7fffffff // ZE_COMMAND_QUEUE_PRIORITY_FORCE_UINT32 Value marking end of ZE_COMMAND_QUEUE_PRIORITY_* ENUMs + ZE_COMMAND_QUEUE_PRIORITY_NORMAL ZeCommandQueuePriority = 0 // ZE_COMMAND_QUEUE_PRIORITY_NORMAL [default] normal priority + ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_LOW ZeCommandQueuePriority = 1 // ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_LOW lower priority than normal + ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH ZeCommandQueuePriority = 2 // ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH higher priority than normal + ZE_COMMAND_QUEUE_PRIORITY_FORCE_UINT32 ZeCommandQueuePriority = 0x7fffffff // ZE_COMMAND_QUEUE_PRIORITY_FORCE_UINT32 Value marking end of ZE_COMMAND_QUEUE_PRIORITY_* ENUMs ) // ZeCommandQueueDesc (ze_command_queue_desc_t) Command Queue descriptor type ZeCommandQueueDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Ordinal uint32 // Ordinal [in] command queue group ordinal - Index uint32 // Index [in] command queue index within the group; must be zero. - Flags ZeCommandQueueFlags // Flags [in] usage flags. must be 0 (default) or a valid combination of ::ze_command_queue_flag_t; default behavior may use implicit driver-based heuristics to balance latency and throughput. - Mode ZeCommandQueueMode // Mode [in] operation mode - Priority ZeCommandQueuePriority // Priority [in] priority + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Ordinal uint32 // Ordinal [in] command queue group ordinal + Index uint32 // Index [in] command queue index within the group; must be zero. + Flags ZeCommandQueueFlags // Flags [in] usage flags. must be 0 (default) or a valid combination of ::ze_command_queue_flag_t; default behavior may use implicit driver-based heuristics to balance latency and throughput. + Mode ZeCommandQueueMode // Mode [in] operation mode + Priority ZeCommandQueuePriority // Priority [in] priority } // ZeCommandQueueCreate Creates a command queue on the context. -/// -/// @details -/// - A command queue represents a logical input stream to the device, tied -/// to a physical input stream. -/// - The application must only use the command queue for the device, or its -/// sub-devices, which was provided during creation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @remarks -/// _Analogues_ -/// - **clCreateCommandQueue** -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phCommandQueue` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x7 < desc->flags` -/// + `::ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS < desc->mode` -/// + `::ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH < desc->priority` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - A command queue represents a logical input stream to the device, tied +// / to a physical input stream. +// / - The application must only use the command queue for the device, or its +// / sub-devices, which was provided during creation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @remarks +// / _Analogues_ +// / - **clCreateCommandQueue** +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phCommandQueue` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x7 < desc->flags` +// / + `::ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS < desc->mode` +// / + `::ZE_COMMAND_QUEUE_PRIORITY_PRIORITY_HIGH < desc->priority` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeCommandQueueCreate( - hContext ZeContextHandle, // hContext [in] handle of the context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device object - desc *ZeCommandQueueDesc, // desc [in] pointer to command queue descriptor - phCommandQueue *ZeCommandQueueHandle, // phCommandQueue [out] pointer to handle of command queue object created + hContext ZeContextHandle, // hContext [in] handle of the context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device object + desc *ZeCommandQueueDesc, // desc [in] pointer to command queue descriptor + phCommandQueue *ZeCommandQueueHandle, // phCommandQueue [out] pointer to handle of command queue object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandQueueCreate", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phCommandQueue))) } // ZeCommandQueueDestroy Destroys a command queue. -/// -/// @details -/// - The application must destroy all fence handles created from the -/// command queue before destroying the command queue itself -/// - The application must ensure the device is not currently referencing -/// the command queue before it is deleted -/// - The implementation of this function may immediately free all Host and -/// Device allocations associated with this command queue -/// - The application must **not** call this function from simultaneous -/// threads with the same command queue handle. -/// - The implementation of this function must be thread-safe. -/// -/// @remarks -/// _Analogues_ -/// - **clReleaseCommandQueue** -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandQueue` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must destroy all fence handles created from the +// / command queue before destroying the command queue itself +// / - The application must ensure the device is not currently referencing +// / the command queue before it is deleted +// / - The implementation of this function may immediately free all Host and +// / Device allocations associated with this command queue +// / - The application must **not** call this function from simultaneous +// / threads with the same command queue handle. +// / - The implementation of this function must be thread-safe. +// / +// / @remarks +// / _Analogues_ +// / - **clReleaseCommandQueue** +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandQueue` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeCommandQueueDestroy( - hCommandQueue ZeCommandQueueHandle, // hCommandQueue [in][release] handle of command queue object to destroy + hCommandQueue ZeCommandQueueHandle, // hCommandQueue [in][release] handle of command queue object to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandQueueDestroy", uintptr(hCommandQueue)) } // ZeCommandQueueExecuteCommandLists Executes a command list in a command queue. -/// -/// @details -/// - The command lists are submitted to the device in the order they are -/// received, whether from multiple calls (on the same or different -/// threads) or a single call with multiple command lists. -/// - The application must ensure the command lists are accessible by the -/// device on which the command queue was created. -/// - The application must ensure the device is not currently referencing -/// the command list since the implementation is allowed to modify the -/// contents of the command list for submission. -/// - The application must only execute command lists created with an -/// identical command queue group ordinal to the command queue. -/// - The application must use a fence created using the same command queue. -/// - The application must ensure the command queue, command list and fence -/// were created on the same context. -/// - The application must ensure the command lists being executed are not -/// immediate command lists. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - vkQueueSubmit -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandQueue` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phCommandLists` -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `0 == numCommandLists` -/// - ::ZE_RESULT_ERROR_INVALID_COMMAND_LIST_TYPE -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / +// / @details +// / - The command lists are submitted to the device in the order they are +// / received, whether from multiple calls (on the same or different +// / threads) or a single call with multiple command lists. +// / - The application must ensure the command lists are accessible by the +// / device on which the command queue was created. +// / - The application must ensure the device is not currently referencing +// / the command list since the implementation is allowed to modify the +// / contents of the command list for submission. +// / - The application must only execute command lists created with an +// / identical command queue group ordinal to the command queue. +// / - The application must use a fence created using the same command queue. +// / - The application must ensure the command queue, command list and fence +// / were created on the same context. +// / - The application must ensure the command lists being executed are not +// / immediate command lists. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - vkQueueSubmit +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandQueue` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phCommandLists` +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `0 == numCommandLists` +// / - ::ZE_RESULT_ERROR_INVALID_COMMAND_LIST_TYPE +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT func ZeCommandQueueExecuteCommandLists( - hCommandQueue ZeCommandQueueHandle, // hCommandQueue [in] handle of the command queue - numCommandLists uint32, // numCommandLists [in] number of command lists to execute - phCommandLists *ZeCommandListHandle, // phCommandLists [in][range(0, numCommandLists)] list of handles of the command lists to execute - hFence ZeFenceHandle, // hFence [in][optional] handle of the fence to signal on completion + hCommandQueue ZeCommandQueueHandle, // hCommandQueue [in] handle of the command queue + numCommandLists uint32, // numCommandLists [in] number of command lists to execute + phCommandLists *ZeCommandListHandle, // phCommandLists [in][range(0, numCommandLists)] list of handles of the command lists to execute + hFence ZeFenceHandle, // hFence [in][optional] handle of the fence to signal on completion ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandQueueExecuteCommandLists", uintptr(hCommandQueue), uintptr(numCommandLists), uintptr(unsafe.Pointer(phCommandLists)), uintptr(hFence)) } // ZeCommandQueueSynchronize Synchronizes a command queue by waiting on the host. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandQueue` -/// - ::ZE_RESULT_NOT_READY -/// + timeout expired +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandQueue` +// / - ::ZE_RESULT_NOT_READY +// / + timeout expired func ZeCommandQueueSynchronize( - hCommandQueue ZeCommandQueueHandle, // hCommandQueue [in] handle of the command queue - timeout uint64, // timeout [in] if non-zero, then indicates the maximum time (in nanoseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then immediately returns the status of the command queue; if `UINT64_MAX`, then function will not return until complete or device is lost. Due to external dependencies, timeout may be rounded to the closest value allowed by the accuracy of those dependencies. + hCommandQueue ZeCommandQueueHandle, // hCommandQueue [in] handle of the command queue + timeout uint64, // timeout [in] if non-zero, then indicates the maximum time (in nanoseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then immediately returns the status of the command queue; if `UINT64_MAX`, then function will not return until complete or device is lost. Due to external dependencies, timeout may be rounded to the closest value allowed by the accuracy of those dependencies. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandQueueSynchronize", uintptr(hCommandQueue), uintptr(timeout)) } // ZeCommandQueueGetOrdinal Gets the command queue group ordinal. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandQueue` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pOrdinal` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandQueue` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pOrdinal` func ZeCommandQueueGetOrdinal( - hCommandQueue ZeCommandQueueHandle, // hCommandQueue [in] handle of the command queue - pOrdinal *uint32, // pOrdinal [out] command queue group ordinal + hCommandQueue ZeCommandQueueHandle, // hCommandQueue [in] handle of the command queue + pOrdinal *uint32, // pOrdinal [out] command queue group ordinal ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandQueueGetOrdinal", uintptr(hCommandQueue), uintptr(unsafe.Pointer(pOrdinal))) } // ZeCommandQueueGetIndex Gets the command queue index within the group. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandQueue` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pIndex` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandQueue` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pIndex` func ZeCommandQueueGetIndex( - hCommandQueue ZeCommandQueueHandle, // hCommandQueue [in] handle of the command queue - pIndex *uint32, // pIndex [out] command queue index within the group + hCommandQueue ZeCommandQueueHandle, // hCommandQueue [in] handle of the command queue + pIndex *uint32, // pIndex [out] command queue index within the group ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandQueueGetIndex", uintptr(hCommandQueue), uintptr(unsafe.Pointer(pIndex))) } - diff --git a/core_commandListClone.go b/core_commandListClone.go index 81e09d3..ff50fc5 100644 --- a/core_commandListClone.go +++ b/core_commandListClone.go @@ -24,52 +24,52 @@ const ZE_COMMAND_LIST_CLONE_EXP_NAME = "ZE_experimental_command_list_clone" // ZeCommandListCloneExpVersion (ze_command_list_clone_exp_version_t) Command List Clone Extension Version(s) type ZeCommandListCloneExpVersion uintptr + const ( - ZE_COMMAND_LIST_CLONE_EXP_VERSION_1_0 ZeCommandListCloneExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_COMMAND_LIST_CLONE_EXP_VERSION_1_0 version 1.0 - ZE_COMMAND_LIST_CLONE_EXP_VERSION_CURRENT ZeCommandListCloneExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_COMMAND_LIST_CLONE_EXP_VERSION_CURRENT latest known version - ZE_COMMAND_LIST_CLONE_EXP_VERSION_FORCE_UINT32 ZeCommandListCloneExpVersion = 0x7fffffff // ZE_COMMAND_LIST_CLONE_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_COMMAND_LIST_CLONE_EXP_VERSION_* ENUMs + ZE_COMMAND_LIST_CLONE_EXP_VERSION_1_0 ZeCommandListCloneExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_COMMAND_LIST_CLONE_EXP_VERSION_1_0 version 1.0 + ZE_COMMAND_LIST_CLONE_EXP_VERSION_CURRENT ZeCommandListCloneExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_COMMAND_LIST_CLONE_EXP_VERSION_CURRENT latest known version + ZE_COMMAND_LIST_CLONE_EXP_VERSION_FORCE_UINT32 ZeCommandListCloneExpVersion = 0x7fffffff // ZE_COMMAND_LIST_CLONE_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_COMMAND_LIST_CLONE_EXP_VERSION_* ENUMs ) // ZeCommandListCreateCloneExp Creates a command list as the clone of another command list. -/// -/// @details -/// - The source command list must be created with the -/// ::ZE_COMMAND_LIST_FLAG_EXP_CLONEABLE flag. -/// - The source command list must be closed prior to cloning. -/// - The source command list may be cloned while it is running on the -/// device. -/// - The cloned command list inherits all properties of the source command -/// list. -/// - The cloned command list must be destroyed prior to the source command -/// list. -/// - The application must only use the command list for the device, or its -/// sub-devices, which was provided during creation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phClonedCommandList` +// / +// / @details +// / - The source command list must be created with the +// / ::ZE_COMMAND_LIST_FLAG_EXP_CLONEABLE flag. +// / - The source command list must be closed prior to cloning. +// / - The source command list may be cloned while it is running on the +// / device. +// / - The cloned command list inherits all properties of the source command +// / list. +// / - The cloned command list must be destroyed prior to the source command +// / list. +// / - The application must only use the command list for the device, or its +// / sub-devices, which was provided during creation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phClonedCommandList` func ZeCommandListCreateCloneExp( - hCommandList ZeCommandListHandle, // hCommandList [in] handle to source command list (the command list to clone) - phClonedCommandList *ZeCommandListHandle, // phClonedCommandList [out] pointer to handle of the cloned command list + hCommandList ZeCommandListHandle, // hCommandList [in] handle to source command list (the command list to clone) + phClonedCommandList *ZeCommandListHandle, // phClonedCommandList [out] pointer to handle of the cloned command list ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListCreateCloneExp", uintptr(hCommandList), uintptr(unsafe.Pointer(phClonedCommandList))) } - diff --git a/core_common.go b/core_common.go index 409af86..264f284 100644 --- a/core_common.go +++ b/core_common.go @@ -18,18 +18,18 @@ import ( ) // ZE_MAKE_VERSION Generates generic 'oneAPI' API versions -func ZE_MAKE_VERSION[T ~int| ~uint32 | ~uint64 | ~uintptr](_major T, _minor T) T { - return (( _major << 16 )|( _minor & 0x0000ffff)) +func ZE_MAKE_VERSION[T ~int | ~uint32 | ~uint64 | ~uintptr](_major T, _minor T) T { + return ((_major << 16) | (_minor & 0x0000ffff)) } // ZE_MAJOR_VERSION Extracts 'oneAPI' API major version -func ZE_MAJOR_VERSION[T ~int| ~uint32 | ~uint64 | ~uintptr](_ver T) T { - return ( _ver >> 16 ) +func ZE_MAJOR_VERSION[T ~int | ~uint32 | ~uint64 | ~uintptr](_ver T) T { + return (_ver >> 16) } // ZE_MINOR_VERSION Extracts 'oneAPI' API minor version -func ZE_MINOR_VERSION[T ~int| ~uint32 | ~uint64 | ~uintptr](_ver T) T { - return ( _ver & 0x0000ffff ) +func ZE_MINOR_VERSION[T ~int | ~uint32 | ~uint64 | ~uintptr](_ver T) T { + return (_ver & 0x0000ffff) } // ZeBool (ze_bool_t) compiler-independent type @@ -88,283 +88,288 @@ const ZE_MAX_IPC_HANDLE_SIZE = 64 // ZeIpcMemHandle (ze_ipc_mem_handle_t) IPC handle to a memory allocation type ZeIpcMemHandle struct { - Data [ZE_MAX_IPC_HANDLE_SIZE]byte // Data [out] Opaque data representing an IPC handle + Data [ZE_MAX_IPC_HANDLE_SIZE]byte // Data [out] Opaque data representing an IPC handle } // ZeIpcEventPoolHandle (ze_ipc_event_pool_handle_t) IPC handle to a event pool allocation type ZeIpcEventPoolHandle struct { - Data [ZE_MAX_IPC_HANDLE_SIZE]byte // Data [out] Opaque data representing an IPC handle + Data [ZE_MAX_IPC_HANDLE_SIZE]byte // Data [out] Opaque data representing an IPC handle } // ZE_BIT Generic macro for enumerator bit masks -func ZE_BIT[T ~int| ~uint32 | ~uint64 | ~uintptr](_i T) T { - return ( 1 << _i ) +func ZE_BIT[T ~int | ~uint32 | ~uint64 | ~uintptr](_i T) T { + return (1 << _i) } // ZeResult (ze_result_t) Defines Return/Error codes type ZeResult uintptr + const ( - ZE_RESULT_SUCCESS ZeResult = 0 // ZE_RESULT_SUCCESS [Core] success - ZE_RESULT_NOT_READY ZeResult = 1 // ZE_RESULT_NOT_READY [Core] synchronization primitive not signaled - ZE_RESULT_ERROR_DEVICE_LOST ZeResult = 0x70000001 // ZE_RESULT_ERROR_DEVICE_LOST [Core] device hung, reset, was removed, or driver update occurred - ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY ZeResult = 0x70000002 // ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY [Core] insufficient host memory to satisfy call - ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY ZeResult = 0x70000003 // ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY [Core] insufficient device memory to satisfy call - ZE_RESULT_ERROR_MODULE_BUILD_FAILURE ZeResult = 0x70000004 // ZE_RESULT_ERROR_MODULE_BUILD_FAILURE [Core] error occurred when building module, see build log for details - ZE_RESULT_ERROR_MODULE_LINK_FAILURE ZeResult = 0x70000005 // ZE_RESULT_ERROR_MODULE_LINK_FAILURE [Core] error occurred when linking modules, see build log for details - ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET ZeResult = 0x70000006 // ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET [Core] device requires a reset - ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE ZeResult = 0x70000007 // ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE [Core] device currently in low power state - ZE_RESULT_EXP_ERROR_DEVICE_IS_NOT_VERTEX ZeResult = 0x7ff00001 // ZE_RESULT_EXP_ERROR_DEVICE_IS_NOT_VERTEX [Core, Experimental] device is not represented by a fabric vertex - ZE_RESULT_EXP_ERROR_VERTEX_IS_NOT_DEVICE ZeResult = 0x7ff00002 // ZE_RESULT_EXP_ERROR_VERTEX_IS_NOT_DEVICE [Core, Experimental] fabric vertex does not represent a device - ZE_RESULT_EXP_ERROR_REMOTE_DEVICE ZeResult = 0x7ff00003 // ZE_RESULT_EXP_ERROR_REMOTE_DEVICE [Core, Experimental] fabric vertex represents a remote device or + ZE_RESULT_SUCCESS ZeResult = 0 // ZE_RESULT_SUCCESS [Core] success + ZE_RESULT_NOT_READY ZeResult = 1 // ZE_RESULT_NOT_READY [Core] synchronization primitive not signaled + ZE_RESULT_ERROR_DEVICE_LOST ZeResult = 0x70000001 // ZE_RESULT_ERROR_DEVICE_LOST [Core] device hung, reset, was removed, or driver update occurred + ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY ZeResult = 0x70000002 // ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY [Core] insufficient host memory to satisfy call + ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY ZeResult = 0x70000003 // ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY [Core] insufficient device memory to satisfy call + ZE_RESULT_ERROR_MODULE_BUILD_FAILURE ZeResult = 0x70000004 // ZE_RESULT_ERROR_MODULE_BUILD_FAILURE [Core] error occurred when building module, see build log for details + ZE_RESULT_ERROR_MODULE_LINK_FAILURE ZeResult = 0x70000005 // ZE_RESULT_ERROR_MODULE_LINK_FAILURE [Core] error occurred when linking modules, see build log for details + ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET ZeResult = 0x70000006 // ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET [Core] device requires a reset + ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE ZeResult = 0x70000007 // ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE [Core] device currently in low power state + ZE_RESULT_EXP_ERROR_DEVICE_IS_NOT_VERTEX ZeResult = 0x7ff00001 // ZE_RESULT_EXP_ERROR_DEVICE_IS_NOT_VERTEX [Core, Experimental] device is not represented by a fabric vertex + ZE_RESULT_EXP_ERROR_VERTEX_IS_NOT_DEVICE ZeResult = 0x7ff00002 // ZE_RESULT_EXP_ERROR_VERTEX_IS_NOT_DEVICE [Core, Experimental] fabric vertex does not represent a device + ZE_RESULT_EXP_ERROR_REMOTE_DEVICE ZeResult = 0x7ff00003 // ZE_RESULT_EXP_ERROR_REMOTE_DEVICE [Core, Experimental] fabric vertex represents a remote device or ///< subdevice - ZE_RESULT_EXP_ERROR_OPERANDS_INCOMPATIBLE ZeResult = 0x7ff00004 // ZE_RESULT_EXP_ERROR_OPERANDS_INCOMPATIBLE [Core, Experimental] operands of comparison are not compatible - ZE_RESULT_EXP_RTAS_BUILD_RETRY ZeResult = 0x7ff00005 // ZE_RESULT_EXP_RTAS_BUILD_RETRY [Core, Experimental] ray tracing acceleration structure build + ZE_RESULT_EXP_ERROR_OPERANDS_INCOMPATIBLE ZeResult = 0x7ff00004 // ZE_RESULT_EXP_ERROR_OPERANDS_INCOMPATIBLE [Core, Experimental] operands of comparison are not compatible + ZE_RESULT_EXP_RTAS_BUILD_RETRY ZeResult = 0x7ff00005 // ZE_RESULT_EXP_RTAS_BUILD_RETRY [Core, Experimental] ray tracing acceleration structure build ///< operation failed due to insufficient resources, retry with a larger ///< acceleration structure buffer allocation - ZE_RESULT_EXP_RTAS_BUILD_DEFERRED ZeResult = 0x7ff00006 // ZE_RESULT_EXP_RTAS_BUILD_DEFERRED [Core, Experimental] ray tracing acceleration structure build + ZE_RESULT_EXP_RTAS_BUILD_DEFERRED ZeResult = 0x7ff00006 // ZE_RESULT_EXP_RTAS_BUILD_DEFERRED [Core, Experimental] ray tracing acceleration structure build ///< operation deferred to parallel operation join - ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS ZeResult = 0x70010000 // ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS [Sysman] access denied due to permission level - ZE_RESULT_ERROR_NOT_AVAILABLE ZeResult = 0x70010001 // ZE_RESULT_ERROR_NOT_AVAILABLE [Sysman] resource already in use and simultaneous access not allowed + ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS ZeResult = 0x70010000 // ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS [Sysman] access denied due to permission level + ZE_RESULT_ERROR_NOT_AVAILABLE ZeResult = 0x70010001 // ZE_RESULT_ERROR_NOT_AVAILABLE [Sysman] resource already in use and simultaneous access not allowed ///< or resource was removed - ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE ZeResult = 0x70020000 // ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE [Common] external required dependency is unavailable or missing - ZE_RESULT_WARNING_DROPPED_DATA ZeResult = 0x70020001 // ZE_RESULT_WARNING_DROPPED_DATA [Tools] data may have been dropped - ZE_RESULT_ERROR_UNINITIALIZED ZeResult = 0x78000001 // ZE_RESULT_ERROR_UNINITIALIZED [Validation] driver is not initialized - ZE_RESULT_ERROR_UNSUPPORTED_VERSION ZeResult = 0x78000002 // ZE_RESULT_ERROR_UNSUPPORTED_VERSION [Validation] generic error code for unsupported versions - ZE_RESULT_ERROR_UNSUPPORTED_FEATURE ZeResult = 0x78000003 // ZE_RESULT_ERROR_UNSUPPORTED_FEATURE [Validation] generic error code for unsupported features - ZE_RESULT_ERROR_INVALID_ARGUMENT ZeResult = 0x78000004 // ZE_RESULT_ERROR_INVALID_ARGUMENT [Validation] generic error code for invalid arguments - ZE_RESULT_ERROR_INVALID_NULL_HANDLE ZeResult = 0x78000005 // ZE_RESULT_ERROR_INVALID_NULL_HANDLE [Validation] handle argument is not valid - ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE ZeResult = 0x78000006 // ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE [Validation] object pointed to by handle still in-use by device - ZE_RESULT_ERROR_INVALID_NULL_POINTER ZeResult = 0x78000007 // ZE_RESULT_ERROR_INVALID_NULL_POINTER [Validation] pointer argument may not be nullptr - ZE_RESULT_ERROR_INVALID_SIZE ZeResult = 0x78000008 // ZE_RESULT_ERROR_INVALID_SIZE [Validation] size argument is invalid (e.g., must not be zero) - ZE_RESULT_ERROR_UNSUPPORTED_SIZE ZeResult = 0x78000009 // ZE_RESULT_ERROR_UNSUPPORTED_SIZE [Validation] size argument is not supported by the device (e.g., too + ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE ZeResult = 0x70020000 // ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE [Common] external required dependency is unavailable or missing + ZE_RESULT_WARNING_DROPPED_DATA ZeResult = 0x70020001 // ZE_RESULT_WARNING_DROPPED_DATA [Tools] data may have been dropped + ZE_RESULT_ERROR_UNINITIALIZED ZeResult = 0x78000001 // ZE_RESULT_ERROR_UNINITIALIZED [Validation] driver is not initialized + ZE_RESULT_ERROR_UNSUPPORTED_VERSION ZeResult = 0x78000002 // ZE_RESULT_ERROR_UNSUPPORTED_VERSION [Validation] generic error code for unsupported versions + ZE_RESULT_ERROR_UNSUPPORTED_FEATURE ZeResult = 0x78000003 // ZE_RESULT_ERROR_UNSUPPORTED_FEATURE [Validation] generic error code for unsupported features + ZE_RESULT_ERROR_INVALID_ARGUMENT ZeResult = 0x78000004 // ZE_RESULT_ERROR_INVALID_ARGUMENT [Validation] generic error code for invalid arguments + ZE_RESULT_ERROR_INVALID_NULL_HANDLE ZeResult = 0x78000005 // ZE_RESULT_ERROR_INVALID_NULL_HANDLE [Validation] handle argument is not valid + ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE ZeResult = 0x78000006 // ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE [Validation] object pointed to by handle still in-use by device + ZE_RESULT_ERROR_INVALID_NULL_POINTER ZeResult = 0x78000007 // ZE_RESULT_ERROR_INVALID_NULL_POINTER [Validation] pointer argument may not be nullptr + ZE_RESULT_ERROR_INVALID_SIZE ZeResult = 0x78000008 // ZE_RESULT_ERROR_INVALID_SIZE [Validation] size argument is invalid (e.g., must not be zero) + ZE_RESULT_ERROR_UNSUPPORTED_SIZE ZeResult = 0x78000009 // ZE_RESULT_ERROR_UNSUPPORTED_SIZE [Validation] size argument is not supported by the device (e.g., too ///< large) - ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT ZeResult = 0x7800000a // ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT [Validation] alignment argument is not supported by the device (e.g., + ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT ZeResult = 0x7800000a // ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT [Validation] alignment argument is not supported by the device (e.g., ///< too small) - ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT ZeResult = 0x7800000b // ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT [Validation] synchronization object in invalid state - ZE_RESULT_ERROR_INVALID_ENUMERATION ZeResult = 0x7800000c // ZE_RESULT_ERROR_INVALID_ENUMERATION [Validation] enumerator argument is not valid - ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZeResult = 0x7800000d // ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION [Validation] enumerator argument is not supported by the device - ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT ZeResult = 0x7800000e // ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT [Validation] image format is not supported by the device - ZE_RESULT_ERROR_INVALID_NATIVE_BINARY ZeResult = 0x7800000f // ZE_RESULT_ERROR_INVALID_NATIVE_BINARY [Validation] native binary is not supported by the device - ZE_RESULT_ERROR_INVALID_GLOBAL_NAME ZeResult = 0x78000010 // ZE_RESULT_ERROR_INVALID_GLOBAL_NAME [Validation] global variable is not found in the module - ZE_RESULT_ERROR_INVALID_KERNEL_NAME ZeResult = 0x78000011 // ZE_RESULT_ERROR_INVALID_KERNEL_NAME [Validation] kernel name is not found in the module - ZE_RESULT_ERROR_INVALID_FUNCTION_NAME ZeResult = 0x78000012 // ZE_RESULT_ERROR_INVALID_FUNCTION_NAME [Validation] function name is not found in the module - ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION ZeResult = 0x78000013 // ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION [Validation] group size dimension is not valid for the kernel or + ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT ZeResult = 0x7800000b // ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT [Validation] synchronization object in invalid state + ZE_RESULT_ERROR_INVALID_ENUMERATION ZeResult = 0x7800000c // ZE_RESULT_ERROR_INVALID_ENUMERATION [Validation] enumerator argument is not valid + ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION ZeResult = 0x7800000d // ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION [Validation] enumerator argument is not supported by the device + ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT ZeResult = 0x7800000e // ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT [Validation] image format is not supported by the device + ZE_RESULT_ERROR_INVALID_NATIVE_BINARY ZeResult = 0x7800000f // ZE_RESULT_ERROR_INVALID_NATIVE_BINARY [Validation] native binary is not supported by the device + ZE_RESULT_ERROR_INVALID_GLOBAL_NAME ZeResult = 0x78000010 // ZE_RESULT_ERROR_INVALID_GLOBAL_NAME [Validation] global variable is not found in the module + ZE_RESULT_ERROR_INVALID_KERNEL_NAME ZeResult = 0x78000011 // ZE_RESULT_ERROR_INVALID_KERNEL_NAME [Validation] kernel name is not found in the module + ZE_RESULT_ERROR_INVALID_FUNCTION_NAME ZeResult = 0x78000012 // ZE_RESULT_ERROR_INVALID_FUNCTION_NAME [Validation] function name is not found in the module + ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION ZeResult = 0x78000013 // ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION [Validation] group size dimension is not valid for the kernel or ///< device - ZE_RESULT_ERROR_INVALID_GLOBAL_WIDTH_DIMENSION ZeResult = 0x78000014 // ZE_RESULT_ERROR_INVALID_GLOBAL_WIDTH_DIMENSION [Validation] global width dimension is not valid for the kernel or + ZE_RESULT_ERROR_INVALID_GLOBAL_WIDTH_DIMENSION ZeResult = 0x78000014 // ZE_RESULT_ERROR_INVALID_GLOBAL_WIDTH_DIMENSION [Validation] global width dimension is not valid for the kernel or ///< device - ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX ZeResult = 0x78000015 // ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX [Validation] kernel argument index is not valid for kernel - ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE ZeResult = 0x78000016 // ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE [Validation] kernel argument size does not match kernel - ZE_RESULT_ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE ZeResult = 0x78000017 // ZE_RESULT_ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE [Validation] value of kernel attribute is not valid for the kernel or + ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX ZeResult = 0x78000015 // ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX [Validation] kernel argument index is not valid for kernel + ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE ZeResult = 0x78000016 // ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE [Validation] kernel argument size does not match kernel + ZE_RESULT_ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE ZeResult = 0x78000017 // ZE_RESULT_ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE [Validation] value of kernel attribute is not valid for the kernel or ///< device - ZE_RESULT_ERROR_INVALID_MODULE_UNLINKED ZeResult = 0x78000018 // ZE_RESULT_ERROR_INVALID_MODULE_UNLINKED [Validation] module with imports needs to be linked before kernels can + ZE_RESULT_ERROR_INVALID_MODULE_UNLINKED ZeResult = 0x78000018 // ZE_RESULT_ERROR_INVALID_MODULE_UNLINKED [Validation] module with imports needs to be linked before kernels can ///< be created from it. - ZE_RESULT_ERROR_INVALID_COMMAND_LIST_TYPE ZeResult = 0x78000019 // ZE_RESULT_ERROR_INVALID_COMMAND_LIST_TYPE [Validation] command list type does not match command queue type - ZE_RESULT_ERROR_OVERLAPPING_REGIONS ZeResult = 0x7800001a // ZE_RESULT_ERROR_OVERLAPPING_REGIONS [Validation] copy operations do not support overlapping regions of + ZE_RESULT_ERROR_INVALID_COMMAND_LIST_TYPE ZeResult = 0x78000019 // ZE_RESULT_ERROR_INVALID_COMMAND_LIST_TYPE [Validation] command list type does not match command queue type + ZE_RESULT_ERROR_OVERLAPPING_REGIONS ZeResult = 0x7800001a // ZE_RESULT_ERROR_OVERLAPPING_REGIONS [Validation] copy operations do not support overlapping regions of ///< memory - ZE_RESULT_WARNING_ACTION_REQUIRED ZeResult = 0x7800001b // ZE_RESULT_WARNING_ACTION_REQUIRED [Sysman] an action is required to complete the desired operation - ZE_RESULT_ERROR_INVALID_KERNEL_HANDLE ZeResult = 0x7800001c // ZE_RESULT_ERROR_INVALID_KERNEL_HANDLE [Core, Validation] kernel handle is invalid for the operation - ZE_RESULT_EXT_RTAS_BUILD_RETRY ZeResult = 0x7800001d // ZE_RESULT_EXT_RTAS_BUILD_RETRY [Core, Extension] ray tracing acceleration structure build operation + ZE_RESULT_WARNING_ACTION_REQUIRED ZeResult = 0x7800001b // ZE_RESULT_WARNING_ACTION_REQUIRED [Sysman] an action is required to complete the desired operation + ZE_RESULT_ERROR_INVALID_KERNEL_HANDLE ZeResult = 0x7800001c // ZE_RESULT_ERROR_INVALID_KERNEL_HANDLE [Core, Validation] kernel handle is invalid for the operation + ZE_RESULT_EXT_RTAS_BUILD_RETRY ZeResult = 0x7800001d // ZE_RESULT_EXT_RTAS_BUILD_RETRY [Core, Extension] ray tracing acceleration structure build operation ///< failed due to insufficient resources, retry with a larger acceleration ///< structure buffer allocation - ZE_RESULT_EXT_RTAS_BUILD_DEFERRED ZeResult = 0x7800001e // ZE_RESULT_EXT_RTAS_BUILD_DEFERRED [Core, Extension] ray tracing acceleration structure build operation + ZE_RESULT_EXT_RTAS_BUILD_DEFERRED ZeResult = 0x7800001e // ZE_RESULT_EXT_RTAS_BUILD_DEFERRED [Core, Extension] ray tracing acceleration structure build operation ///< deferred to parallel operation join - ZE_RESULT_EXT_ERROR_OPERANDS_INCOMPATIBLE ZeResult = 0x7800001f // ZE_RESULT_EXT_ERROR_OPERANDS_INCOMPATIBLE [Core, Extension] operands of comparison are not compatible - ZE_RESULT_ERROR_SURVIVABILITY_MODE_DETECTED ZeResult = 0x78000020 // ZE_RESULT_ERROR_SURVIVABILITY_MODE_DETECTED [Sysman] device is in survivability mode, firmware update needed - ZE_RESULT_ERROR_ADDRESS_NOT_FOUND ZeResult = 0x78000021 // ZE_RESULT_ERROR_ADDRESS_NOT_FOUND [Core] address not found within specified or current context - ZE_RESULT_ERROR_UNKNOWN ZeResult = 0x7ffffffe // ZE_RESULT_ERROR_UNKNOWN [Core] unknown or internal error - ZE_RESULT_FORCE_UINT32 ZeResult = 0x7fffffff // ZE_RESULT_FORCE_UINT32 Value marking end of ZE_RESULT_* ENUMs + ZE_RESULT_EXT_ERROR_OPERANDS_INCOMPATIBLE ZeResult = 0x7800001f // ZE_RESULT_EXT_ERROR_OPERANDS_INCOMPATIBLE [Core, Extension] operands of comparison are not compatible + ZE_RESULT_ERROR_SURVIVABILITY_MODE_DETECTED ZeResult = 0x78000020 // ZE_RESULT_ERROR_SURVIVABILITY_MODE_DETECTED [Sysman] device is in survivability mode, firmware update needed + ZE_RESULT_ERROR_ADDRESS_NOT_FOUND ZeResult = 0x78000021 // ZE_RESULT_ERROR_ADDRESS_NOT_FOUND [Core] address not found within specified or current context + ZE_RESULT_ERROR_UNKNOWN ZeResult = 0x7ffffffe // ZE_RESULT_ERROR_UNKNOWN [Core] unknown or internal error + ZE_RESULT_FORCE_UINT32 ZeResult = 0x7fffffff // ZE_RESULT_FORCE_UINT32 Value marking end of ZE_RESULT_* ENUMs ) // ZeStructureType (ze_structure_type_t) Defines structure types type ZeStructureType uintptr + const ( - ZE_STRUCTURE_TYPE_DRIVER_PROPERTIES ZeStructureType = 0x1 // ZE_STRUCTURE_TYPE_DRIVER_PROPERTIES ::ze_driver_properties_t - ZE_STRUCTURE_TYPE_DRIVER_IPC_PROPERTIES ZeStructureType = 0x2 // ZE_STRUCTURE_TYPE_DRIVER_IPC_PROPERTIES ::ze_driver_ipc_properties_t - ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES ZeStructureType = 0x3 // ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES ::ze_device_properties_t - ZE_STRUCTURE_TYPE_DEVICE_COMPUTE_PROPERTIES ZeStructureType = 0x4 // ZE_STRUCTURE_TYPE_DEVICE_COMPUTE_PROPERTIES ::ze_device_compute_properties_t - ZE_STRUCTURE_TYPE_DEVICE_MODULE_PROPERTIES ZeStructureType = 0x5 // ZE_STRUCTURE_TYPE_DEVICE_MODULE_PROPERTIES ::ze_device_module_properties_t - ZE_STRUCTURE_TYPE_COMMAND_QUEUE_GROUP_PROPERTIES ZeStructureType = 0x6 // ZE_STRUCTURE_TYPE_COMMAND_QUEUE_GROUP_PROPERTIES ::ze_command_queue_group_properties_t - ZE_STRUCTURE_TYPE_DEVICE_MEMORY_PROPERTIES ZeStructureType = 0x7 // ZE_STRUCTURE_TYPE_DEVICE_MEMORY_PROPERTIES ::ze_device_memory_properties_t - ZE_STRUCTURE_TYPE_DEVICE_MEMORY_ACCESS_PROPERTIES ZeStructureType = 0x8 // ZE_STRUCTURE_TYPE_DEVICE_MEMORY_ACCESS_PROPERTIES ::ze_device_memory_access_properties_t - ZE_STRUCTURE_TYPE_DEVICE_CACHE_PROPERTIES ZeStructureType = 0x9 // ZE_STRUCTURE_TYPE_DEVICE_CACHE_PROPERTIES ::ze_device_cache_properties_t - ZE_STRUCTURE_TYPE_DEVICE_IMAGE_PROPERTIES ZeStructureType = 0xa // ZE_STRUCTURE_TYPE_DEVICE_IMAGE_PROPERTIES ::ze_device_image_properties_t - ZE_STRUCTURE_TYPE_DEVICE_P2P_PROPERTIES ZeStructureType = 0xb // ZE_STRUCTURE_TYPE_DEVICE_P2P_PROPERTIES ::ze_device_p2p_properties_t - ZE_STRUCTURE_TYPE_DEVICE_EXTERNAL_MEMORY_PROPERTIES ZeStructureType = 0xc // ZE_STRUCTURE_TYPE_DEVICE_EXTERNAL_MEMORY_PROPERTIES ::ze_device_external_memory_properties_t - ZE_STRUCTURE_TYPE_CONTEXT_DESC ZeStructureType = 0xd // ZE_STRUCTURE_TYPE_CONTEXT_DESC ::ze_context_desc_t - ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC ZeStructureType = 0xe // ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC ::ze_command_queue_desc_t - ZE_STRUCTURE_TYPE_COMMAND_LIST_DESC ZeStructureType = 0xf // ZE_STRUCTURE_TYPE_COMMAND_LIST_DESC ::ze_command_list_desc_t - ZE_STRUCTURE_TYPE_EVENT_POOL_DESC ZeStructureType = 0x10 // ZE_STRUCTURE_TYPE_EVENT_POOL_DESC ::ze_event_pool_desc_t - ZE_STRUCTURE_TYPE_EVENT_DESC ZeStructureType = 0x11 // ZE_STRUCTURE_TYPE_EVENT_DESC ::ze_event_desc_t - ZE_STRUCTURE_TYPE_FENCE_DESC ZeStructureType = 0x12 // ZE_STRUCTURE_TYPE_FENCE_DESC ::ze_fence_desc_t - ZE_STRUCTURE_TYPE_IMAGE_DESC ZeStructureType = 0x13 // ZE_STRUCTURE_TYPE_IMAGE_DESC ::ze_image_desc_t - ZE_STRUCTURE_TYPE_IMAGE_PROPERTIES ZeStructureType = 0x14 // ZE_STRUCTURE_TYPE_IMAGE_PROPERTIES ::ze_image_properties_t - ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC ZeStructureType = 0x15 // ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC ::ze_device_mem_alloc_desc_t - ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC ZeStructureType = 0x16 // ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC ::ze_host_mem_alloc_desc_t - ZE_STRUCTURE_TYPE_MEMORY_ALLOCATION_PROPERTIES ZeStructureType = 0x17 // ZE_STRUCTURE_TYPE_MEMORY_ALLOCATION_PROPERTIES ::ze_memory_allocation_properties_t - ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_DESC ZeStructureType = 0x18 // ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_DESC ::ze_external_memory_export_desc_t - ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMPORT_FD ZeStructureType = 0x19 // ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMPORT_FD ::ze_external_memory_import_fd_t - ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_FD ZeStructureType = 0x1a // ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_FD ::ze_external_memory_export_fd_t - ZE_STRUCTURE_TYPE_MODULE_DESC ZeStructureType = 0x1b // ZE_STRUCTURE_TYPE_MODULE_DESC ::ze_module_desc_t - ZE_STRUCTURE_TYPE_MODULE_PROPERTIES ZeStructureType = 0x1c // ZE_STRUCTURE_TYPE_MODULE_PROPERTIES ::ze_module_properties_t - ZE_STRUCTURE_TYPE_KERNEL_DESC ZeStructureType = 0x1d // ZE_STRUCTURE_TYPE_KERNEL_DESC ::ze_kernel_desc_t - ZE_STRUCTURE_TYPE_KERNEL_PROPERTIES ZeStructureType = 0x1e // ZE_STRUCTURE_TYPE_KERNEL_PROPERTIES ::ze_kernel_properties_t - ZE_STRUCTURE_TYPE_SAMPLER_DESC ZeStructureType = 0x1f // ZE_STRUCTURE_TYPE_SAMPLER_DESC ::ze_sampler_desc_t - ZE_STRUCTURE_TYPE_PHYSICAL_MEM_DESC ZeStructureType = 0x20 // ZE_STRUCTURE_TYPE_PHYSICAL_MEM_DESC ::ze_physical_mem_desc_t - ZE_STRUCTURE_TYPE_KERNEL_PREFERRED_GROUP_SIZE_PROPERTIES ZeStructureType = 0x21 // ZE_STRUCTURE_TYPE_KERNEL_PREFERRED_GROUP_SIZE_PROPERTIES ::ze_kernel_preferred_group_size_properties_t - ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMPORT_WIN32 ZeStructureType = 0x22 // ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMPORT_WIN32 ::ze_external_memory_import_win32_handle_t - ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_WIN32 ZeStructureType = 0x23 // ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_WIN32 ::ze_external_memory_export_win32_handle_t - ZE_STRUCTURE_TYPE_DEVICE_RAYTRACING_EXT_PROPERTIES ZeStructureType = 0x00010001 // ZE_STRUCTURE_TYPE_DEVICE_RAYTRACING_EXT_PROPERTIES ::ze_device_raytracing_ext_properties_t - ZE_STRUCTURE_TYPE_RAYTRACING_MEM_ALLOC_EXT_DESC ZeStructureType = 0x10002 // ZE_STRUCTURE_TYPE_RAYTRACING_MEM_ALLOC_EXT_DESC ::ze_raytracing_mem_alloc_ext_desc_t - ZE_STRUCTURE_TYPE_FLOAT_ATOMIC_EXT_PROPERTIES ZeStructureType = 0x10003 // ZE_STRUCTURE_TYPE_FLOAT_ATOMIC_EXT_PROPERTIES ::ze_float_atomic_ext_properties_t - ZE_STRUCTURE_TYPE_CACHE_RESERVATION_EXT_DESC ZeStructureType = 0x10004 // ZE_STRUCTURE_TYPE_CACHE_RESERVATION_EXT_DESC ::ze_cache_reservation_ext_desc_t - ZE_STRUCTURE_TYPE_EU_COUNT_EXT ZeStructureType = 0x10005 // ZE_STRUCTURE_TYPE_EU_COUNT_EXT ::ze_eu_count_ext_t - ZE_STRUCTURE_TYPE_SRGB_EXT_DESC ZeStructureType = 0x10006 // ZE_STRUCTURE_TYPE_SRGB_EXT_DESC ::ze_srgb_ext_desc_t - ZE_STRUCTURE_TYPE_LINKAGE_INSPECTION_EXT_DESC ZeStructureType = 0x10007 // ZE_STRUCTURE_TYPE_LINKAGE_INSPECTION_EXT_DESC ::ze_linkage_inspection_ext_desc_t - ZE_STRUCTURE_TYPE_PCI_EXT_PROPERTIES ZeStructureType = 0x10008 // ZE_STRUCTURE_TYPE_PCI_EXT_PROPERTIES ::ze_pci_ext_properties_t - ZE_STRUCTURE_TYPE_DRIVER_MEMORY_FREE_EXT_PROPERTIES ZeStructureType = 0x10009 // ZE_STRUCTURE_TYPE_DRIVER_MEMORY_FREE_EXT_PROPERTIES ::ze_driver_memory_free_ext_properties_t - ZE_STRUCTURE_TYPE_MEMORY_FREE_EXT_DESC ZeStructureType = 0x1000a // ZE_STRUCTURE_TYPE_MEMORY_FREE_EXT_DESC ::ze_memory_free_ext_desc_t - ZE_STRUCTURE_TYPE_MEMORY_COMPRESSION_HINTS_EXT_DESC ZeStructureType = 0x1000b // ZE_STRUCTURE_TYPE_MEMORY_COMPRESSION_HINTS_EXT_DESC ::ze_memory_compression_hints_ext_desc_t - ZE_STRUCTURE_TYPE_IMAGE_ALLOCATION_EXT_PROPERTIES ZeStructureType = 0x1000c // ZE_STRUCTURE_TYPE_IMAGE_ALLOCATION_EXT_PROPERTIES ::ze_image_allocation_ext_properties_t - ZE_STRUCTURE_TYPE_DEVICE_LUID_EXT_PROPERTIES ZeStructureType = 0x1000d // ZE_STRUCTURE_TYPE_DEVICE_LUID_EXT_PROPERTIES ::ze_device_luid_ext_properties_t - ZE_STRUCTURE_TYPE_DEVICE_MEMORY_EXT_PROPERTIES ZeStructureType = 0x1000e // ZE_STRUCTURE_TYPE_DEVICE_MEMORY_EXT_PROPERTIES ::ze_device_memory_ext_properties_t - ZE_STRUCTURE_TYPE_DEVICE_IP_VERSION_EXT ZeStructureType = 0x1000f // ZE_STRUCTURE_TYPE_DEVICE_IP_VERSION_EXT ::ze_device_ip_version_ext_t - ZE_STRUCTURE_TYPE_IMAGE_VIEW_PLANAR_EXT_DESC ZeStructureType = 0x10010 // ZE_STRUCTURE_TYPE_IMAGE_VIEW_PLANAR_EXT_DESC ::ze_image_view_planar_ext_desc_t - ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_PROPERTIES ZeStructureType = 0x10011 // ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_PROPERTIES ::ze_event_query_kernel_timestamps_ext_properties_t - ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_RESULTS_EXT_PROPERTIES ZeStructureType = 0x10012 // ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_RESULTS_EXT_PROPERTIES ::ze_event_query_kernel_timestamps_results_ext_properties_t - ZE_STRUCTURE_TYPE_KERNEL_MAX_GROUP_SIZE_EXT_PROPERTIES ZeStructureType = 0x10013 // ZE_STRUCTURE_TYPE_KERNEL_MAX_GROUP_SIZE_EXT_PROPERTIES ::ze_kernel_max_group_size_ext_properties_t - ZE_STRUCTURE_TYPE_IMAGE_FORMAT_SUPPORT_EXT_PROPERTIES ZeStructureType = 0x10014 // ZE_STRUCTURE_TYPE_IMAGE_FORMAT_SUPPORT_EXT_PROPERTIES ::ze_image_format_support_ext_properties_t - ZE_STRUCTURE_TYPE_RELAXED_ALLOCATION_LIMITS_EXP_DESC ZeStructureType = 0x00020001 // ZE_STRUCTURE_TYPE_RELAXED_ALLOCATION_LIMITS_EXP_DESC ::ze_relaxed_allocation_limits_exp_desc_t - ZE_STRUCTURE_TYPE_MODULE_PROGRAM_EXP_DESC ZeStructureType = 0x00020002 // ZE_STRUCTURE_TYPE_MODULE_PROGRAM_EXP_DESC ::ze_module_program_exp_desc_t - ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_PROPERTIES ZeStructureType = 0x00020003 // ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_PROPERTIES ::ze_scheduling_hint_exp_properties_t - ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_DESC ZeStructureType = 0x00020004 // ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_DESC ::ze_scheduling_hint_exp_desc_t - ZE_STRUCTURE_TYPE_IMAGE_VIEW_PLANAR_EXP_DESC ZeStructureType = 0x00020005 // ZE_STRUCTURE_TYPE_IMAGE_VIEW_PLANAR_EXP_DESC ::ze_image_view_planar_exp_desc_t - ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2 ZeStructureType = 0x00020006 // ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2 ::ze_device_properties_t - ZE_STRUCTURE_TYPE_IMAGE_MEMORY_EXP_PROPERTIES ZeStructureType = 0x00020007 // ZE_STRUCTURE_TYPE_IMAGE_MEMORY_EXP_PROPERTIES ::ze_image_memory_properties_exp_t - ZE_STRUCTURE_TYPE_POWER_SAVING_HINT_EXP_DESC ZeStructureType = 0x00020008 // ZE_STRUCTURE_TYPE_POWER_SAVING_HINT_EXP_DESC ::ze_context_power_saving_hint_exp_desc_t - ZE_STRUCTURE_TYPE_COPY_BANDWIDTH_EXP_PROPERTIES ZeStructureType = 0x00020009 // ZE_STRUCTURE_TYPE_COPY_BANDWIDTH_EXP_PROPERTIES ::ze_copy_bandwidth_exp_properties_t - ZE_STRUCTURE_TYPE_DEVICE_P2P_BANDWIDTH_EXP_PROPERTIES ZeStructureType = 0x0002000A // ZE_STRUCTURE_TYPE_DEVICE_P2P_BANDWIDTH_EXP_PROPERTIES ::ze_device_p2p_bandwidth_exp_properties_t - ZE_STRUCTURE_TYPE_FABRIC_VERTEX_EXP_PROPERTIES ZeStructureType = 0x0002000B // ZE_STRUCTURE_TYPE_FABRIC_VERTEX_EXP_PROPERTIES ::ze_fabric_vertex_exp_properties_t - ZE_STRUCTURE_TYPE_FABRIC_EDGE_EXP_PROPERTIES ZeStructureType = 0x0002000C // ZE_STRUCTURE_TYPE_FABRIC_EDGE_EXP_PROPERTIES ::ze_fabric_edge_exp_properties_t - ZE_STRUCTURE_TYPE_MEMORY_SUB_ALLOCATIONS_EXP_PROPERTIES ZeStructureType = 0x0002000D // ZE_STRUCTURE_TYPE_MEMORY_SUB_ALLOCATIONS_EXP_PROPERTIES ::ze_memory_sub_allocations_exp_properties_t - ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXP_DESC ZeStructureType = 0x0002000E // ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXP_DESC ::ze_rtas_builder_exp_desc_t - ZE_STRUCTURE_TYPE_RTAS_BUILDER_BUILD_OP_EXP_DESC ZeStructureType = 0x0002000F // ZE_STRUCTURE_TYPE_RTAS_BUILDER_BUILD_OP_EXP_DESC ::ze_rtas_builder_build_op_exp_desc_t - ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXP_PROPERTIES ZeStructureType = 0x00020010 // ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXP_PROPERTIES ::ze_rtas_builder_exp_properties_t - ZE_STRUCTURE_TYPE_RTAS_PARALLEL_OPERATION_EXP_PROPERTIES ZeStructureType = 0x00020011 // ZE_STRUCTURE_TYPE_RTAS_PARALLEL_OPERATION_EXP_PROPERTIES ::ze_rtas_parallel_operation_exp_properties_t - ZE_STRUCTURE_TYPE_RTAS_DEVICE_EXP_PROPERTIES ZeStructureType = 0x00020012 // ZE_STRUCTURE_TYPE_RTAS_DEVICE_EXP_PROPERTIES ::ze_rtas_device_exp_properties_t - ZE_STRUCTURE_TYPE_RTAS_GEOMETRY_AABBS_EXP_CB_PARAMS ZeStructureType = 0x00020013 // ZE_STRUCTURE_TYPE_RTAS_GEOMETRY_AABBS_EXP_CB_PARAMS ::ze_rtas_geometry_aabbs_exp_cb_params_t - ZE_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC ZeStructureType = 0x00020014 // ZE_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC ::ze_event_pool_counter_based_exp_desc_t - ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_LIST_EXP_PROPERTIES ZeStructureType = 0x00020015 // ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_LIST_EXP_PROPERTIES ::ze_mutable_command_list_exp_properties_t - ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_LIST_EXP_DESC ZeStructureType = 0x00020016 // ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_LIST_EXP_DESC ::ze_mutable_command_list_exp_desc_t - ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_ID_EXP_DESC ZeStructureType = 0x00020017 // ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_ID_EXP_DESC ::ze_mutable_command_id_exp_desc_t - ZE_STRUCTURE_TYPE_MUTABLE_COMMANDS_EXP_DESC ZeStructureType = 0x00020018 // ZE_STRUCTURE_TYPE_MUTABLE_COMMANDS_EXP_DESC ::ze_mutable_commands_exp_desc_t - ZE_STRUCTURE_TYPE_MUTABLE_KERNEL_ARGUMENT_EXP_DESC ZeStructureType = 0x00020019 // ZE_STRUCTURE_TYPE_MUTABLE_KERNEL_ARGUMENT_EXP_DESC ::ze_mutable_kernel_argument_exp_desc_t - ZE_STRUCTURE_TYPE_MUTABLE_GROUP_COUNT_EXP_DESC ZeStructureType = 0x0002001A // ZE_STRUCTURE_TYPE_MUTABLE_GROUP_COUNT_EXP_DESC ::ze_mutable_group_count_exp_desc_t - ZE_STRUCTURE_TYPE_MUTABLE_GROUP_SIZE_EXP_DESC ZeStructureType = 0x0002001B // ZE_STRUCTURE_TYPE_MUTABLE_GROUP_SIZE_EXP_DESC ::ze_mutable_group_size_exp_desc_t - ZE_STRUCTURE_TYPE_MUTABLE_GLOBAL_OFFSET_EXP_DESC ZeStructureType = 0x0002001C // ZE_STRUCTURE_TYPE_MUTABLE_GLOBAL_OFFSET_EXP_DESC ::ze_mutable_global_offset_exp_desc_t - ZE_STRUCTURE_TYPE_PITCHED_ALLOC_DEVICE_EXP_PROPERTIES ZeStructureType = 0x0002001D // ZE_STRUCTURE_TYPE_PITCHED_ALLOC_DEVICE_EXP_PROPERTIES ::ze_device_pitched_alloc_exp_properties_t - ZE_STRUCTURE_TYPE_BINDLESS_IMAGE_EXP_DESC ZeStructureType = 0x0002001E // ZE_STRUCTURE_TYPE_BINDLESS_IMAGE_EXP_DESC ::ze_image_bindless_exp_desc_t - ZE_STRUCTURE_TYPE_PITCHED_IMAGE_EXP_DESC ZeStructureType = 0x0002001F // ZE_STRUCTURE_TYPE_PITCHED_IMAGE_EXP_DESC ::ze_image_pitched_exp_desc_t - ZE_STRUCTURE_TYPE_MUTABLE_GRAPH_ARGUMENT_EXP_DESC ZeStructureType = 0x00020020 // ZE_STRUCTURE_TYPE_MUTABLE_GRAPH_ARGUMENT_EXP_DESC ::ze_mutable_graph_argument_exp_desc_t - ZE_STRUCTURE_TYPE_INIT_DRIVER_TYPE_DESC ZeStructureType = 0x00020021 // ZE_STRUCTURE_TYPE_INIT_DRIVER_TYPE_DESC ::ze_init_driver_type_desc_t - ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_EXT_DESC ZeStructureType = 0x00020022 // ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_EXT_DESC ::ze_external_semaphore_ext_desc_t - ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WIN32_EXT_DESC ZeStructureType = 0x00020023 // ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WIN32_EXT_DESC ::ze_external_semaphore_win32_ext_desc_t - ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_FD_EXT_DESC ZeStructureType = 0x00020024 // ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_FD_EXT_DESC ::ze_external_semaphore_fd_ext_desc_t - ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_EXT ZeStructureType = 0x00020025 // ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_EXT ::ze_external_semaphore_signal_params_ext_t - ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WAIT_PARAMS_EXT ZeStructureType = 0x00020026 // ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WAIT_PARAMS_EXT ::ze_external_semaphore_wait_params_ext_t - ZE_STRUCTURE_TYPE_DRIVER_DDI_HANDLES_EXT_PROPERTIES ZeStructureType = 0x00020027 // ZE_STRUCTURE_TYPE_DRIVER_DDI_HANDLES_EXT_PROPERTIES ::ze_driver_ddi_handles_ext_properties_t - ZE_STRUCTURE_TYPE_DEVICE_CACHELINE_SIZE_EXT ZeStructureType = 0x00020028 // ZE_STRUCTURE_TYPE_DEVICE_CACHELINE_SIZE_EXT ::ze_device_cache_line_size_ext_t - ZE_STRUCTURE_TYPE_DEVICE_VECTOR_WIDTH_PROPERTIES_EXT ZeStructureType = 0x00020029 // ZE_STRUCTURE_TYPE_DEVICE_VECTOR_WIDTH_PROPERTIES_EXT ::ze_device_vector_width_properties_ext_t - ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXT_DESC ZeStructureType = 0x00020030 // ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXT_DESC ::ze_rtas_builder_ext_desc_t - ZE_STRUCTURE_TYPE_RTAS_BUILDER_BUILD_OP_EXT_DESC ZeStructureType = 0x00020031 // ZE_STRUCTURE_TYPE_RTAS_BUILDER_BUILD_OP_EXT_DESC ::ze_rtas_builder_build_op_ext_desc_t - ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXT_PROPERTIES ZeStructureType = 0x00020032 // ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXT_PROPERTIES ::ze_rtas_builder_ext_properties_t - ZE_STRUCTURE_TYPE_RTAS_PARALLEL_OPERATION_EXT_PROPERTIES ZeStructureType = 0x00020033 // ZE_STRUCTURE_TYPE_RTAS_PARALLEL_OPERATION_EXT_PROPERTIES ::ze_rtas_parallel_operation_ext_properties_t - ZE_STRUCTURE_TYPE_RTAS_DEVICE_EXT_PROPERTIES ZeStructureType = 0x00020034 // ZE_STRUCTURE_TYPE_RTAS_DEVICE_EXT_PROPERTIES ::ze_rtas_device_ext_properties_t - ZE_STRUCTURE_TYPE_RTAS_GEOMETRY_AABBS_EXT_CB_PARAMS ZeStructureType = 0x00020035 // ZE_STRUCTURE_TYPE_RTAS_GEOMETRY_AABBS_EXT_CB_PARAMS ::ze_rtas_geometry_aabbs_ext_cb_params_t - ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC ZeStructureType = 0x00020036 // ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC ::ze_command_list_append_launch_kernel_param_cooperative_desc_t - ZE_STRUCTURE_TYPE_EXTERNAL_MEMMAP_SYSMEM_EXT_DESC ZeStructureType = 0x00020037 // ZE_STRUCTURE_TYPE_EXTERNAL_MEMMAP_SYSMEM_EXT_DESC ::ze_external_memmap_sysmem_ext_desc_t - ZE_STRUCTURE_TYPE_PITCHED_ALLOC_2DIMAGE_LINEAR_PITCH_EXP_INFO ZeStructureType = 0x00020038 // ZE_STRUCTURE_TYPE_PITCHED_ALLOC_2DIMAGE_LINEAR_PITCH_EXP_INFO ::ze_pitched_alloc_2dimage_linear_pitch_exp_info_t - ZE_STRUCTURE_TYPE_KERNEL_ALLOCATION_PROPERTIES ZeStructureType = 0x00020039 // ZE_STRUCTURE_TYPE_KERNEL_ALLOCATION_PROPERTIES ::ze_kernel_allocation_exp_properties_t - ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_DESC ZeStructureType = 0x0002003A // ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_DESC ::ze_event_counter_based_desc_t - ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION_DESC ZeStructureType = 0x0002003B // ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION_DESC ::ze_event_counter_based_external_sync_allocation_desc_t - ZE_STRUCTURE_TYPE_EVENT_SYNC_MODE_DESC ZeStructureType = 0x0002003C // ZE_STRUCTURE_TYPE_EVENT_SYNC_MODE_DESC ::ze_event_sync_mode_desc_t - ZE_STRUCTURE_TYPE_IPC_MEM_HANDLE_TYPE_EXT_DESC ZeStructureType = 0x0002003D // ZE_STRUCTURE_TYPE_IPC_MEM_HANDLE_TYPE_EXT_DESC ::ze_ipc_mem_handle_type_ext_desc_t - ZE_STRUCTURE_TYPE_DEVICE_EVENT_PROPERTIES ZeStructureType = 0x0002003E // ZE_STRUCTURE_TYPE_DEVICE_EVENT_PROPERTIES ::ze_device_event_properties_t - ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE_DESC ZeStructureType = 0x0002003F // ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE_DESC ::ze_event_counter_based_external_aggregate_storage_desc_t - ZE_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES ZeStructureType = 0x00020040 // ZE_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES ::ze_physical_mem_properties_t - ZE_STRUCTURE_TYPE_DEVICE_USABLEMEM_SIZE_EXT_PROPERTIES ZeStructureType = 0x00020041 // ZE_STRUCTURE_TYPE_DEVICE_USABLEMEM_SIZE_EXT_PROPERTIES ::ze_device_usablemem_size_ext_properties_t - ZE_STRUCTURE_TYPE_CUSTOM_PITCH_EXP_DESC ZeStructureType = 0x00020042 // ZE_STRUCTURE_TYPE_CUSTOM_PITCH_EXP_DESC ::ze_custom_pitch_exp_desc_t - ZE_STRUCTURE_TYPE_FORCE_UINT32 ZeStructureType = 0x7fffffff // ZE_STRUCTURE_TYPE_FORCE_UINT32 Value marking end of ZE_STRUCTURE_TYPE_* ENUMs + ZE_STRUCTURE_TYPE_DRIVER_PROPERTIES ZeStructureType = 0x1 // ZE_STRUCTURE_TYPE_DRIVER_PROPERTIES ::ze_driver_properties_t + ZE_STRUCTURE_TYPE_DRIVER_IPC_PROPERTIES ZeStructureType = 0x2 // ZE_STRUCTURE_TYPE_DRIVER_IPC_PROPERTIES ::ze_driver_ipc_properties_t + ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES ZeStructureType = 0x3 // ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES ::ze_device_properties_t + ZE_STRUCTURE_TYPE_DEVICE_COMPUTE_PROPERTIES ZeStructureType = 0x4 // ZE_STRUCTURE_TYPE_DEVICE_COMPUTE_PROPERTIES ::ze_device_compute_properties_t + ZE_STRUCTURE_TYPE_DEVICE_MODULE_PROPERTIES ZeStructureType = 0x5 // ZE_STRUCTURE_TYPE_DEVICE_MODULE_PROPERTIES ::ze_device_module_properties_t + ZE_STRUCTURE_TYPE_COMMAND_QUEUE_GROUP_PROPERTIES ZeStructureType = 0x6 // ZE_STRUCTURE_TYPE_COMMAND_QUEUE_GROUP_PROPERTIES ::ze_command_queue_group_properties_t + ZE_STRUCTURE_TYPE_DEVICE_MEMORY_PROPERTIES ZeStructureType = 0x7 // ZE_STRUCTURE_TYPE_DEVICE_MEMORY_PROPERTIES ::ze_device_memory_properties_t + ZE_STRUCTURE_TYPE_DEVICE_MEMORY_ACCESS_PROPERTIES ZeStructureType = 0x8 // ZE_STRUCTURE_TYPE_DEVICE_MEMORY_ACCESS_PROPERTIES ::ze_device_memory_access_properties_t + ZE_STRUCTURE_TYPE_DEVICE_CACHE_PROPERTIES ZeStructureType = 0x9 // ZE_STRUCTURE_TYPE_DEVICE_CACHE_PROPERTIES ::ze_device_cache_properties_t + ZE_STRUCTURE_TYPE_DEVICE_IMAGE_PROPERTIES ZeStructureType = 0xa // ZE_STRUCTURE_TYPE_DEVICE_IMAGE_PROPERTIES ::ze_device_image_properties_t + ZE_STRUCTURE_TYPE_DEVICE_P2P_PROPERTIES ZeStructureType = 0xb // ZE_STRUCTURE_TYPE_DEVICE_P2P_PROPERTIES ::ze_device_p2p_properties_t + ZE_STRUCTURE_TYPE_DEVICE_EXTERNAL_MEMORY_PROPERTIES ZeStructureType = 0xc // ZE_STRUCTURE_TYPE_DEVICE_EXTERNAL_MEMORY_PROPERTIES ::ze_device_external_memory_properties_t + ZE_STRUCTURE_TYPE_CONTEXT_DESC ZeStructureType = 0xd // ZE_STRUCTURE_TYPE_CONTEXT_DESC ::ze_context_desc_t + ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC ZeStructureType = 0xe // ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC ::ze_command_queue_desc_t + ZE_STRUCTURE_TYPE_COMMAND_LIST_DESC ZeStructureType = 0xf // ZE_STRUCTURE_TYPE_COMMAND_LIST_DESC ::ze_command_list_desc_t + ZE_STRUCTURE_TYPE_EVENT_POOL_DESC ZeStructureType = 0x10 // ZE_STRUCTURE_TYPE_EVENT_POOL_DESC ::ze_event_pool_desc_t + ZE_STRUCTURE_TYPE_EVENT_DESC ZeStructureType = 0x11 // ZE_STRUCTURE_TYPE_EVENT_DESC ::ze_event_desc_t + ZE_STRUCTURE_TYPE_FENCE_DESC ZeStructureType = 0x12 // ZE_STRUCTURE_TYPE_FENCE_DESC ::ze_fence_desc_t + ZE_STRUCTURE_TYPE_IMAGE_DESC ZeStructureType = 0x13 // ZE_STRUCTURE_TYPE_IMAGE_DESC ::ze_image_desc_t + ZE_STRUCTURE_TYPE_IMAGE_PROPERTIES ZeStructureType = 0x14 // ZE_STRUCTURE_TYPE_IMAGE_PROPERTIES ::ze_image_properties_t + ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC ZeStructureType = 0x15 // ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC ::ze_device_mem_alloc_desc_t + ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC ZeStructureType = 0x16 // ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC ::ze_host_mem_alloc_desc_t + ZE_STRUCTURE_TYPE_MEMORY_ALLOCATION_PROPERTIES ZeStructureType = 0x17 // ZE_STRUCTURE_TYPE_MEMORY_ALLOCATION_PROPERTIES ::ze_memory_allocation_properties_t + ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_DESC ZeStructureType = 0x18 // ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_DESC ::ze_external_memory_export_desc_t + ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMPORT_FD ZeStructureType = 0x19 // ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMPORT_FD ::ze_external_memory_import_fd_t + ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_FD ZeStructureType = 0x1a // ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_FD ::ze_external_memory_export_fd_t + ZE_STRUCTURE_TYPE_MODULE_DESC ZeStructureType = 0x1b // ZE_STRUCTURE_TYPE_MODULE_DESC ::ze_module_desc_t + ZE_STRUCTURE_TYPE_MODULE_PROPERTIES ZeStructureType = 0x1c // ZE_STRUCTURE_TYPE_MODULE_PROPERTIES ::ze_module_properties_t + ZE_STRUCTURE_TYPE_KERNEL_DESC ZeStructureType = 0x1d // ZE_STRUCTURE_TYPE_KERNEL_DESC ::ze_kernel_desc_t + ZE_STRUCTURE_TYPE_KERNEL_PROPERTIES ZeStructureType = 0x1e // ZE_STRUCTURE_TYPE_KERNEL_PROPERTIES ::ze_kernel_properties_t + ZE_STRUCTURE_TYPE_SAMPLER_DESC ZeStructureType = 0x1f // ZE_STRUCTURE_TYPE_SAMPLER_DESC ::ze_sampler_desc_t + ZE_STRUCTURE_TYPE_PHYSICAL_MEM_DESC ZeStructureType = 0x20 // ZE_STRUCTURE_TYPE_PHYSICAL_MEM_DESC ::ze_physical_mem_desc_t + ZE_STRUCTURE_TYPE_KERNEL_PREFERRED_GROUP_SIZE_PROPERTIES ZeStructureType = 0x21 // ZE_STRUCTURE_TYPE_KERNEL_PREFERRED_GROUP_SIZE_PROPERTIES ::ze_kernel_preferred_group_size_properties_t + ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMPORT_WIN32 ZeStructureType = 0x22 // ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMPORT_WIN32 ::ze_external_memory_import_win32_handle_t + ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_WIN32 ZeStructureType = 0x23 // ZE_STRUCTURE_TYPE_EXTERNAL_MEMORY_EXPORT_WIN32 ::ze_external_memory_export_win32_handle_t + ZE_STRUCTURE_TYPE_DEVICE_RAYTRACING_EXT_PROPERTIES ZeStructureType = 0x00010001 // ZE_STRUCTURE_TYPE_DEVICE_RAYTRACING_EXT_PROPERTIES ::ze_device_raytracing_ext_properties_t + ZE_STRUCTURE_TYPE_RAYTRACING_MEM_ALLOC_EXT_DESC ZeStructureType = 0x10002 // ZE_STRUCTURE_TYPE_RAYTRACING_MEM_ALLOC_EXT_DESC ::ze_raytracing_mem_alloc_ext_desc_t + ZE_STRUCTURE_TYPE_FLOAT_ATOMIC_EXT_PROPERTIES ZeStructureType = 0x10003 // ZE_STRUCTURE_TYPE_FLOAT_ATOMIC_EXT_PROPERTIES ::ze_float_atomic_ext_properties_t + ZE_STRUCTURE_TYPE_CACHE_RESERVATION_EXT_DESC ZeStructureType = 0x10004 // ZE_STRUCTURE_TYPE_CACHE_RESERVATION_EXT_DESC ::ze_cache_reservation_ext_desc_t + ZE_STRUCTURE_TYPE_EU_COUNT_EXT ZeStructureType = 0x10005 // ZE_STRUCTURE_TYPE_EU_COUNT_EXT ::ze_eu_count_ext_t + ZE_STRUCTURE_TYPE_SRGB_EXT_DESC ZeStructureType = 0x10006 // ZE_STRUCTURE_TYPE_SRGB_EXT_DESC ::ze_srgb_ext_desc_t + ZE_STRUCTURE_TYPE_LINKAGE_INSPECTION_EXT_DESC ZeStructureType = 0x10007 // ZE_STRUCTURE_TYPE_LINKAGE_INSPECTION_EXT_DESC ::ze_linkage_inspection_ext_desc_t + ZE_STRUCTURE_TYPE_PCI_EXT_PROPERTIES ZeStructureType = 0x10008 // ZE_STRUCTURE_TYPE_PCI_EXT_PROPERTIES ::ze_pci_ext_properties_t + ZE_STRUCTURE_TYPE_DRIVER_MEMORY_FREE_EXT_PROPERTIES ZeStructureType = 0x10009 // ZE_STRUCTURE_TYPE_DRIVER_MEMORY_FREE_EXT_PROPERTIES ::ze_driver_memory_free_ext_properties_t + ZE_STRUCTURE_TYPE_MEMORY_FREE_EXT_DESC ZeStructureType = 0x1000a // ZE_STRUCTURE_TYPE_MEMORY_FREE_EXT_DESC ::ze_memory_free_ext_desc_t + ZE_STRUCTURE_TYPE_MEMORY_COMPRESSION_HINTS_EXT_DESC ZeStructureType = 0x1000b // ZE_STRUCTURE_TYPE_MEMORY_COMPRESSION_HINTS_EXT_DESC ::ze_memory_compression_hints_ext_desc_t + ZE_STRUCTURE_TYPE_IMAGE_ALLOCATION_EXT_PROPERTIES ZeStructureType = 0x1000c // ZE_STRUCTURE_TYPE_IMAGE_ALLOCATION_EXT_PROPERTIES ::ze_image_allocation_ext_properties_t + ZE_STRUCTURE_TYPE_DEVICE_LUID_EXT_PROPERTIES ZeStructureType = 0x1000d // ZE_STRUCTURE_TYPE_DEVICE_LUID_EXT_PROPERTIES ::ze_device_luid_ext_properties_t + ZE_STRUCTURE_TYPE_DEVICE_MEMORY_EXT_PROPERTIES ZeStructureType = 0x1000e // ZE_STRUCTURE_TYPE_DEVICE_MEMORY_EXT_PROPERTIES ::ze_device_memory_ext_properties_t + ZE_STRUCTURE_TYPE_DEVICE_IP_VERSION_EXT ZeStructureType = 0x1000f // ZE_STRUCTURE_TYPE_DEVICE_IP_VERSION_EXT ::ze_device_ip_version_ext_t + ZE_STRUCTURE_TYPE_IMAGE_VIEW_PLANAR_EXT_DESC ZeStructureType = 0x10010 // ZE_STRUCTURE_TYPE_IMAGE_VIEW_PLANAR_EXT_DESC ::ze_image_view_planar_ext_desc_t + ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_PROPERTIES ZeStructureType = 0x10011 // ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_PROPERTIES ::ze_event_query_kernel_timestamps_ext_properties_t + ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_RESULTS_EXT_PROPERTIES ZeStructureType = 0x10012 // ZE_STRUCTURE_TYPE_EVENT_QUERY_KERNEL_TIMESTAMPS_RESULTS_EXT_PROPERTIES ::ze_event_query_kernel_timestamps_results_ext_properties_t + ZE_STRUCTURE_TYPE_KERNEL_MAX_GROUP_SIZE_EXT_PROPERTIES ZeStructureType = 0x10013 // ZE_STRUCTURE_TYPE_KERNEL_MAX_GROUP_SIZE_EXT_PROPERTIES ::ze_kernel_max_group_size_ext_properties_t + ZE_STRUCTURE_TYPE_IMAGE_FORMAT_SUPPORT_EXT_PROPERTIES ZeStructureType = 0x10014 // ZE_STRUCTURE_TYPE_IMAGE_FORMAT_SUPPORT_EXT_PROPERTIES ::ze_image_format_support_ext_properties_t + ZE_STRUCTURE_TYPE_RELAXED_ALLOCATION_LIMITS_EXP_DESC ZeStructureType = 0x00020001 // ZE_STRUCTURE_TYPE_RELAXED_ALLOCATION_LIMITS_EXP_DESC ::ze_relaxed_allocation_limits_exp_desc_t + ZE_STRUCTURE_TYPE_MODULE_PROGRAM_EXP_DESC ZeStructureType = 0x00020002 // ZE_STRUCTURE_TYPE_MODULE_PROGRAM_EXP_DESC ::ze_module_program_exp_desc_t + ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_PROPERTIES ZeStructureType = 0x00020003 // ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_PROPERTIES ::ze_scheduling_hint_exp_properties_t + ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_DESC ZeStructureType = 0x00020004 // ZE_STRUCTURE_TYPE_SCHEDULING_HINT_EXP_DESC ::ze_scheduling_hint_exp_desc_t + ZE_STRUCTURE_TYPE_IMAGE_VIEW_PLANAR_EXP_DESC ZeStructureType = 0x00020005 // ZE_STRUCTURE_TYPE_IMAGE_VIEW_PLANAR_EXP_DESC ::ze_image_view_planar_exp_desc_t + ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2 ZeStructureType = 0x00020006 // ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2 ::ze_device_properties_t + ZE_STRUCTURE_TYPE_IMAGE_MEMORY_EXP_PROPERTIES ZeStructureType = 0x00020007 // ZE_STRUCTURE_TYPE_IMAGE_MEMORY_EXP_PROPERTIES ::ze_image_memory_properties_exp_t + ZE_STRUCTURE_TYPE_POWER_SAVING_HINT_EXP_DESC ZeStructureType = 0x00020008 // ZE_STRUCTURE_TYPE_POWER_SAVING_HINT_EXP_DESC ::ze_context_power_saving_hint_exp_desc_t + ZE_STRUCTURE_TYPE_COPY_BANDWIDTH_EXP_PROPERTIES ZeStructureType = 0x00020009 // ZE_STRUCTURE_TYPE_COPY_BANDWIDTH_EXP_PROPERTIES ::ze_copy_bandwidth_exp_properties_t + ZE_STRUCTURE_TYPE_DEVICE_P2P_BANDWIDTH_EXP_PROPERTIES ZeStructureType = 0x0002000A // ZE_STRUCTURE_TYPE_DEVICE_P2P_BANDWIDTH_EXP_PROPERTIES ::ze_device_p2p_bandwidth_exp_properties_t + ZE_STRUCTURE_TYPE_FABRIC_VERTEX_EXP_PROPERTIES ZeStructureType = 0x0002000B // ZE_STRUCTURE_TYPE_FABRIC_VERTEX_EXP_PROPERTIES ::ze_fabric_vertex_exp_properties_t + ZE_STRUCTURE_TYPE_FABRIC_EDGE_EXP_PROPERTIES ZeStructureType = 0x0002000C // ZE_STRUCTURE_TYPE_FABRIC_EDGE_EXP_PROPERTIES ::ze_fabric_edge_exp_properties_t + ZE_STRUCTURE_TYPE_MEMORY_SUB_ALLOCATIONS_EXP_PROPERTIES ZeStructureType = 0x0002000D // ZE_STRUCTURE_TYPE_MEMORY_SUB_ALLOCATIONS_EXP_PROPERTIES ::ze_memory_sub_allocations_exp_properties_t + ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXP_DESC ZeStructureType = 0x0002000E // ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXP_DESC ::ze_rtas_builder_exp_desc_t + ZE_STRUCTURE_TYPE_RTAS_BUILDER_BUILD_OP_EXP_DESC ZeStructureType = 0x0002000F // ZE_STRUCTURE_TYPE_RTAS_BUILDER_BUILD_OP_EXP_DESC ::ze_rtas_builder_build_op_exp_desc_t + ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXP_PROPERTIES ZeStructureType = 0x00020010 // ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXP_PROPERTIES ::ze_rtas_builder_exp_properties_t + ZE_STRUCTURE_TYPE_RTAS_PARALLEL_OPERATION_EXP_PROPERTIES ZeStructureType = 0x00020011 // ZE_STRUCTURE_TYPE_RTAS_PARALLEL_OPERATION_EXP_PROPERTIES ::ze_rtas_parallel_operation_exp_properties_t + ZE_STRUCTURE_TYPE_RTAS_DEVICE_EXP_PROPERTIES ZeStructureType = 0x00020012 // ZE_STRUCTURE_TYPE_RTAS_DEVICE_EXP_PROPERTIES ::ze_rtas_device_exp_properties_t + ZE_STRUCTURE_TYPE_RTAS_GEOMETRY_AABBS_EXP_CB_PARAMS ZeStructureType = 0x00020013 // ZE_STRUCTURE_TYPE_RTAS_GEOMETRY_AABBS_EXP_CB_PARAMS ::ze_rtas_geometry_aabbs_exp_cb_params_t + ZE_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC ZeStructureType = 0x00020014 // ZE_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC ::ze_event_pool_counter_based_exp_desc_t + ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_LIST_EXP_PROPERTIES ZeStructureType = 0x00020015 // ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_LIST_EXP_PROPERTIES ::ze_mutable_command_list_exp_properties_t + ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_LIST_EXP_DESC ZeStructureType = 0x00020016 // ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_LIST_EXP_DESC ::ze_mutable_command_list_exp_desc_t + ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_ID_EXP_DESC ZeStructureType = 0x00020017 // ZE_STRUCTURE_TYPE_MUTABLE_COMMAND_ID_EXP_DESC ::ze_mutable_command_id_exp_desc_t + ZE_STRUCTURE_TYPE_MUTABLE_COMMANDS_EXP_DESC ZeStructureType = 0x00020018 // ZE_STRUCTURE_TYPE_MUTABLE_COMMANDS_EXP_DESC ::ze_mutable_commands_exp_desc_t + ZE_STRUCTURE_TYPE_MUTABLE_KERNEL_ARGUMENT_EXP_DESC ZeStructureType = 0x00020019 // ZE_STRUCTURE_TYPE_MUTABLE_KERNEL_ARGUMENT_EXP_DESC ::ze_mutable_kernel_argument_exp_desc_t + ZE_STRUCTURE_TYPE_MUTABLE_GROUP_COUNT_EXP_DESC ZeStructureType = 0x0002001A // ZE_STRUCTURE_TYPE_MUTABLE_GROUP_COUNT_EXP_DESC ::ze_mutable_group_count_exp_desc_t + ZE_STRUCTURE_TYPE_MUTABLE_GROUP_SIZE_EXP_DESC ZeStructureType = 0x0002001B // ZE_STRUCTURE_TYPE_MUTABLE_GROUP_SIZE_EXP_DESC ::ze_mutable_group_size_exp_desc_t + ZE_STRUCTURE_TYPE_MUTABLE_GLOBAL_OFFSET_EXP_DESC ZeStructureType = 0x0002001C // ZE_STRUCTURE_TYPE_MUTABLE_GLOBAL_OFFSET_EXP_DESC ::ze_mutable_global_offset_exp_desc_t + ZE_STRUCTURE_TYPE_PITCHED_ALLOC_DEVICE_EXP_PROPERTIES ZeStructureType = 0x0002001D // ZE_STRUCTURE_TYPE_PITCHED_ALLOC_DEVICE_EXP_PROPERTIES ::ze_device_pitched_alloc_exp_properties_t + ZE_STRUCTURE_TYPE_BINDLESS_IMAGE_EXP_DESC ZeStructureType = 0x0002001E // ZE_STRUCTURE_TYPE_BINDLESS_IMAGE_EXP_DESC ::ze_image_bindless_exp_desc_t + ZE_STRUCTURE_TYPE_PITCHED_IMAGE_EXP_DESC ZeStructureType = 0x0002001F // ZE_STRUCTURE_TYPE_PITCHED_IMAGE_EXP_DESC ::ze_image_pitched_exp_desc_t + ZE_STRUCTURE_TYPE_MUTABLE_GRAPH_ARGUMENT_EXP_DESC ZeStructureType = 0x00020020 // ZE_STRUCTURE_TYPE_MUTABLE_GRAPH_ARGUMENT_EXP_DESC ::ze_mutable_graph_argument_exp_desc_t + ZE_STRUCTURE_TYPE_INIT_DRIVER_TYPE_DESC ZeStructureType = 0x00020021 // ZE_STRUCTURE_TYPE_INIT_DRIVER_TYPE_DESC ::ze_init_driver_type_desc_t + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_EXT_DESC ZeStructureType = 0x00020022 // ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_EXT_DESC ::ze_external_semaphore_ext_desc_t + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WIN32_EXT_DESC ZeStructureType = 0x00020023 // ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WIN32_EXT_DESC ::ze_external_semaphore_win32_ext_desc_t + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_FD_EXT_DESC ZeStructureType = 0x00020024 // ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_FD_EXT_DESC ::ze_external_semaphore_fd_ext_desc_t + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_EXT ZeStructureType = 0x00020025 // ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_EXT ::ze_external_semaphore_signal_params_ext_t + ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WAIT_PARAMS_EXT ZeStructureType = 0x00020026 // ZE_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_WAIT_PARAMS_EXT ::ze_external_semaphore_wait_params_ext_t + ZE_STRUCTURE_TYPE_DRIVER_DDI_HANDLES_EXT_PROPERTIES ZeStructureType = 0x00020027 // ZE_STRUCTURE_TYPE_DRIVER_DDI_HANDLES_EXT_PROPERTIES ::ze_driver_ddi_handles_ext_properties_t + ZE_STRUCTURE_TYPE_DEVICE_CACHELINE_SIZE_EXT ZeStructureType = 0x00020028 // ZE_STRUCTURE_TYPE_DEVICE_CACHELINE_SIZE_EXT ::ze_device_cache_line_size_ext_t + ZE_STRUCTURE_TYPE_DEVICE_VECTOR_WIDTH_PROPERTIES_EXT ZeStructureType = 0x00020029 // ZE_STRUCTURE_TYPE_DEVICE_VECTOR_WIDTH_PROPERTIES_EXT ::ze_device_vector_width_properties_ext_t + ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXT_DESC ZeStructureType = 0x00020030 // ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXT_DESC ::ze_rtas_builder_ext_desc_t + ZE_STRUCTURE_TYPE_RTAS_BUILDER_BUILD_OP_EXT_DESC ZeStructureType = 0x00020031 // ZE_STRUCTURE_TYPE_RTAS_BUILDER_BUILD_OP_EXT_DESC ::ze_rtas_builder_build_op_ext_desc_t + ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXT_PROPERTIES ZeStructureType = 0x00020032 // ZE_STRUCTURE_TYPE_RTAS_BUILDER_EXT_PROPERTIES ::ze_rtas_builder_ext_properties_t + ZE_STRUCTURE_TYPE_RTAS_PARALLEL_OPERATION_EXT_PROPERTIES ZeStructureType = 0x00020033 // ZE_STRUCTURE_TYPE_RTAS_PARALLEL_OPERATION_EXT_PROPERTIES ::ze_rtas_parallel_operation_ext_properties_t + ZE_STRUCTURE_TYPE_RTAS_DEVICE_EXT_PROPERTIES ZeStructureType = 0x00020034 // ZE_STRUCTURE_TYPE_RTAS_DEVICE_EXT_PROPERTIES ::ze_rtas_device_ext_properties_t + ZE_STRUCTURE_TYPE_RTAS_GEOMETRY_AABBS_EXT_CB_PARAMS ZeStructureType = 0x00020035 // ZE_STRUCTURE_TYPE_RTAS_GEOMETRY_AABBS_EXT_CB_PARAMS ::ze_rtas_geometry_aabbs_ext_cb_params_t + ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC ZeStructureType = 0x00020036 // ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC ::ze_command_list_append_launch_kernel_param_cooperative_desc_t + ZE_STRUCTURE_TYPE_EXTERNAL_MEMMAP_SYSMEM_EXT_DESC ZeStructureType = 0x00020037 // ZE_STRUCTURE_TYPE_EXTERNAL_MEMMAP_SYSMEM_EXT_DESC ::ze_external_memmap_sysmem_ext_desc_t + ZE_STRUCTURE_TYPE_PITCHED_ALLOC_2DIMAGE_LINEAR_PITCH_EXP_INFO ZeStructureType = 0x00020038 // ZE_STRUCTURE_TYPE_PITCHED_ALLOC_2DIMAGE_LINEAR_PITCH_EXP_INFO ::ze_pitched_alloc_2dimage_linear_pitch_exp_info_t + ZE_STRUCTURE_TYPE_KERNEL_ALLOCATION_PROPERTIES ZeStructureType = 0x00020039 // ZE_STRUCTURE_TYPE_KERNEL_ALLOCATION_PROPERTIES ::ze_kernel_allocation_exp_properties_t + ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_DESC ZeStructureType = 0x0002003A // ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_DESC ::ze_event_counter_based_desc_t + ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION_DESC ZeStructureType = 0x0002003B // ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION_DESC ::ze_event_counter_based_external_sync_allocation_desc_t + ZE_STRUCTURE_TYPE_EVENT_SYNC_MODE_DESC ZeStructureType = 0x0002003C // ZE_STRUCTURE_TYPE_EVENT_SYNC_MODE_DESC ::ze_event_sync_mode_desc_t + ZE_STRUCTURE_TYPE_IPC_MEM_HANDLE_TYPE_EXT_DESC ZeStructureType = 0x0002003D // ZE_STRUCTURE_TYPE_IPC_MEM_HANDLE_TYPE_EXT_DESC ::ze_ipc_mem_handle_type_ext_desc_t + ZE_STRUCTURE_TYPE_DEVICE_EVENT_PROPERTIES ZeStructureType = 0x0002003E // ZE_STRUCTURE_TYPE_DEVICE_EVENT_PROPERTIES ::ze_device_event_properties_t + ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE_DESC ZeStructureType = 0x0002003F // ZE_STRUCTURE_TYPE_EVENT_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE_DESC ::ze_event_counter_based_external_aggregate_storage_desc_t + ZE_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES ZeStructureType = 0x00020040 // ZE_STRUCTURE_TYPE_PHYSICAL_MEM_PROPERTIES ::ze_physical_mem_properties_t + ZE_STRUCTURE_TYPE_DEVICE_USABLEMEM_SIZE_EXT_PROPERTIES ZeStructureType = 0x00020041 // ZE_STRUCTURE_TYPE_DEVICE_USABLEMEM_SIZE_EXT_PROPERTIES ::ze_device_usablemem_size_ext_properties_t + ZE_STRUCTURE_TYPE_CUSTOM_PITCH_EXP_DESC ZeStructureType = 0x00020042 // ZE_STRUCTURE_TYPE_CUSTOM_PITCH_EXP_DESC ::ze_custom_pitch_exp_desc_t + ZE_STRUCTURE_TYPE_FORCE_UINT32 ZeStructureType = 0x7fffffff // ZE_STRUCTURE_TYPE_FORCE_UINT32 Value marking end of ZE_STRUCTURE_TYPE_* ENUMs ) // ZeExternalMemoryTypeFlags (ze_external_memory_type_flags_t) External memory type flags type ZeExternalMemoryTypeFlags uint32 + const ( - ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_FD ZeExternalMemoryTypeFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_FD an opaque POSIX file descriptor handle - ZE_EXTERNAL_MEMORY_TYPE_FLAG_DMA_BUF ZeExternalMemoryTypeFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_DMA_BUF a file descriptor handle for a Linux dma_buf - ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32 ZeExternalMemoryTypeFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32 an NT handle - ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32_KMT ZeExternalMemoryTypeFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32_KMT a global share (KMT) handle - ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D11_TEXTURE ZeExternalMemoryTypeFlags = /* ZE_BIT(4) */(( 1 << 4 )) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D11_TEXTURE an NT handle referring to a Direct3D 10 or 11 texture resource - ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D11_TEXTURE_KMT ZeExternalMemoryTypeFlags = /* ZE_BIT(5) */(( 1 << 5 )) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D11_TEXTURE_KMT a global share (KMT) handle referring to a Direct3D 10 or 11 texture + ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_FD ZeExternalMemoryTypeFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_FD an opaque POSIX file descriptor handle + ZE_EXTERNAL_MEMORY_TYPE_FLAG_DMA_BUF ZeExternalMemoryTypeFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_DMA_BUF a file descriptor handle for a Linux dma_buf + ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32 ZeExternalMemoryTypeFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32 an NT handle + ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32_KMT ZeExternalMemoryTypeFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32_KMT a global share (KMT) handle + ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D11_TEXTURE ZeExternalMemoryTypeFlags = /* ZE_BIT(4) */ (1 << 4) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D11_TEXTURE an NT handle referring to a Direct3D 10 or 11 texture resource + ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D11_TEXTURE_KMT ZeExternalMemoryTypeFlags = /* ZE_BIT(5) */ (1 << 5) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D11_TEXTURE_KMT a global share (KMT) handle referring to a Direct3D 10 or 11 texture ///< resource - ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_HEAP ZeExternalMemoryTypeFlags = /* ZE_BIT(6) */(( 1 << 6 )) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_HEAP an NT handle referring to a Direct3D 12 heap resource - ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_RESOURCE ZeExternalMemoryTypeFlags = /* ZE_BIT(7) */(( 1 << 7 )) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_RESOURCE an NT handle referring to a Direct3D 12 committed resource - ZE_EXTERNAL_MEMORY_TYPE_FLAG_FORCE_UINT32 ZeExternalMemoryTypeFlags = 0x7fffffff // ZE_EXTERNAL_MEMORY_TYPE_FLAG_FORCE_UINT32 Value marking end of ZE_EXTERNAL_MEMORY_TYPE_FLAG_* ENUMs + ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_HEAP ZeExternalMemoryTypeFlags = /* ZE_BIT(6) */ (1 << 6) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_HEAP an NT handle referring to a Direct3D 12 heap resource + ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_RESOURCE ZeExternalMemoryTypeFlags = /* ZE_BIT(7) */ (1 << 7) // ZE_EXTERNAL_MEMORY_TYPE_FLAG_D3D12_RESOURCE an NT handle referring to a Direct3D 12 committed resource + ZE_EXTERNAL_MEMORY_TYPE_FLAG_FORCE_UINT32 ZeExternalMemoryTypeFlags = 0x7fffffff // ZE_EXTERNAL_MEMORY_TYPE_FLAG_FORCE_UINT32 Value marking end of ZE_EXTERNAL_MEMORY_TYPE_FLAG_* ENUMs ) // ZeBandwidthUnit (ze_bandwidth_unit_t) Bandwidth unit type ZeBandwidthUnit uintptr + const ( - ZE_BANDWIDTH_UNIT_UNKNOWN ZeBandwidthUnit = 0 // ZE_BANDWIDTH_UNIT_UNKNOWN The unit used for bandwidth is unknown - ZE_BANDWIDTH_UNIT_BYTES_PER_NANOSEC ZeBandwidthUnit = 1 // ZE_BANDWIDTH_UNIT_BYTES_PER_NANOSEC Bandwidth is provided in bytes/nanosec - ZE_BANDWIDTH_UNIT_BYTES_PER_CLOCK ZeBandwidthUnit = 2 // ZE_BANDWIDTH_UNIT_BYTES_PER_CLOCK Bandwidth is provided in bytes/clock - ZE_BANDWIDTH_UNIT_FORCE_UINT32 ZeBandwidthUnit = 0x7fffffff // ZE_BANDWIDTH_UNIT_FORCE_UINT32 Value marking end of ZE_BANDWIDTH_UNIT_* ENUMs + ZE_BANDWIDTH_UNIT_UNKNOWN ZeBandwidthUnit = 0 // ZE_BANDWIDTH_UNIT_UNKNOWN The unit used for bandwidth is unknown + ZE_BANDWIDTH_UNIT_BYTES_PER_NANOSEC ZeBandwidthUnit = 1 // ZE_BANDWIDTH_UNIT_BYTES_PER_NANOSEC Bandwidth is provided in bytes/nanosec + ZE_BANDWIDTH_UNIT_BYTES_PER_CLOCK ZeBandwidthUnit = 2 // ZE_BANDWIDTH_UNIT_BYTES_PER_CLOCK Bandwidth is provided in bytes/clock + ZE_BANDWIDTH_UNIT_FORCE_UINT32 ZeBandwidthUnit = 0x7fffffff // ZE_BANDWIDTH_UNIT_FORCE_UINT32 Value marking end of ZE_BANDWIDTH_UNIT_* ENUMs ) // ZeLatencyUnit (ze_latency_unit_t) Latency unit type ZeLatencyUnit uintptr + const ( - ZE_LATENCY_UNIT_UNKNOWN ZeLatencyUnit = 0 // ZE_LATENCY_UNIT_UNKNOWN The unit used for latency is unknown - ZE_LATENCY_UNIT_NANOSEC ZeLatencyUnit = 1 // ZE_LATENCY_UNIT_NANOSEC Latency is provided in nanosecs - ZE_LATENCY_UNIT_CLOCK ZeLatencyUnit = 2 // ZE_LATENCY_UNIT_CLOCK Latency is provided in clocks - ZE_LATENCY_UNIT_HOP ZeLatencyUnit = 3 // ZE_LATENCY_UNIT_HOP Latency is provided in hops (normalized so that the lowest latency + ZE_LATENCY_UNIT_UNKNOWN ZeLatencyUnit = 0 // ZE_LATENCY_UNIT_UNKNOWN The unit used for latency is unknown + ZE_LATENCY_UNIT_NANOSEC ZeLatencyUnit = 1 // ZE_LATENCY_UNIT_NANOSEC Latency is provided in nanosecs + ZE_LATENCY_UNIT_CLOCK ZeLatencyUnit = 2 // ZE_LATENCY_UNIT_CLOCK Latency is provided in clocks + ZE_LATENCY_UNIT_HOP ZeLatencyUnit = 3 // ZE_LATENCY_UNIT_HOP Latency is provided in hops (normalized so that the lowest latency ///< link has a latency of 1 hop) - ZE_LATENCY_UNIT_FORCE_UINT32 ZeLatencyUnit = 0x7fffffff // ZE_LATENCY_UNIT_FORCE_UINT32 Value marking end of ZE_LATENCY_UNIT_* ENUMs + ZE_LATENCY_UNIT_FORCE_UINT32 ZeLatencyUnit = 0x7fffffff // ZE_LATENCY_UNIT_FORCE_UINT32 Value marking end of ZE_LATENCY_UNIT_* ENUMs ) @@ -373,34 +378,33 @@ const ZE_MAX_UUID_SIZE = 16 // ZeUuid (ze_uuid_t) Universal unique id (UUID) type ZeUuid struct { - Id [ZE_MAX_UUID_SIZE]uint8 // Id [out] opaque data representing a UUID + Id [ZE_MAX_UUID_SIZE]uint8 // Id [out] opaque data representing a UUID } // ZeBaseCbParams (ze_base_cb_params_t) Base for all callback function parameter types type ZeBaseCbParams struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). } // ZeBaseProperties (ze_base_properties_t) Base for all properties types type ZeBaseProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). } // ZeBaseDesc (ze_base_desc_t) Base for all descriptor types type ZeBaseDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). } // ZeIpcEventCounterBasedHandle (ze_ipc_event_counter_based_handle_t) IPC handle to counter based event type ZeIpcEventCounterBasedHandle struct { - Data [ZE_MAX_IPC_HANDLE_SIZE]byte // Data [out] Opaque data representing an IPC handle + Data [ZE_MAX_IPC_HANDLE_SIZE]byte // Data [out] Opaque data representing an IPC handle } - diff --git a/core_context.go b/core_context.go index bf452dd..3220215 100644 --- a/core_context.go +++ b/core_context.go @@ -21,162 +21,162 @@ import ( // ZeContextFlags (ze_context_flags_t) Supported context creation flags type ZeContextFlags uint32 + const ( - ZE_CONTEXT_FLAG_TBD ZeContextFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_CONTEXT_FLAG_TBD reserved for future use - ZE_CONTEXT_FLAG_FORCE_UINT32 ZeContextFlags = 0x7fffffff // ZE_CONTEXT_FLAG_FORCE_UINT32 Value marking end of ZE_CONTEXT_FLAG_* ENUMs + ZE_CONTEXT_FLAG_TBD ZeContextFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_CONTEXT_FLAG_TBD reserved for future use + ZE_CONTEXT_FLAG_FORCE_UINT32 ZeContextFlags = 0x7fffffff // ZE_CONTEXT_FLAG_FORCE_UINT32 Value marking end of ZE_CONTEXT_FLAG_* ENUMs ) // ZeContextDesc (ze_context_desc_t) Context descriptor type ZeContextDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeContextFlags // Flags [in] creation flags. must be 0 (default) or a valid combination of ::ze_context_flag_t; default behavior may use implicit driver-based heuristics. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeContextFlags // Flags [in] creation flags. must be 0 (default) or a valid combination of ::ze_context_flag_t; default behavior may use implicit driver-based heuristics. } // ZeContextCreate Creates a context for the driver. -/// -/// @details -/// - The application must only use the context for the driver which was -/// provided during creation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phContext` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x1 < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - The application must only use the context for the driver which was +// / provided during creation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phContext` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x1 < desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeContextCreate( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver object - desc *ZeContextDesc, // desc [in] pointer to context descriptor - phContext *ZeContextHandle, // phContext [out] pointer to handle of context object created + hDriver ZeDriverHandle, // hDriver [in] handle of the driver object + desc *ZeContextDesc, // desc [in] pointer to context descriptor + phContext *ZeContextHandle, // phContext [out] pointer to handle of context object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeContextCreate", uintptr(hDriver), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phContext))) } // ZeContextCreateEx Creates a context for the driver. -/// -/// @details -/// - The application must only use the context for the driver which was -/// provided during creation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phContext` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x1 < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phDevices) && (0 < numDevices)` +// / +// / @details +// / - The application must only use the context for the driver which was +// / provided during creation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phContext` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x1 < desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phDevices) && (0 < numDevices)` func ZeContextCreateEx( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver object - desc *ZeContextDesc, // desc [in] pointer to context descriptor - numDevices uint32, // numDevices [in][optional] number of device handles; must be 0 if `nullptr == phDevices` - phDevices *ZeDeviceHandle, // phDevices [in][optional][range(0, numDevices)] array of device handles which context has visibility. if nullptr, then all devices and any sub-devices supported by the driver instance are visible to the context. otherwise, the context only has visibility to the devices and any sub-devices of the devices in this array. - phContext *ZeContextHandle, // phContext [out] pointer to handle of context object created + hDriver ZeDriverHandle, // hDriver [in] handle of the driver object + desc *ZeContextDesc, // desc [in] pointer to context descriptor + numDevices uint32, // numDevices [in][optional] number of device handles; must be 0 if `nullptr == phDevices` + phDevices *ZeDeviceHandle, // phDevices [in][optional][range(0, numDevices)] array of device handles which context has visibility. if nullptr, then all devices and any sub-devices supported by the driver instance are visible to the context. otherwise, the context only has visibility to the devices and any sub-devices of the devices in this array. + phContext *ZeContextHandle, // phContext [out] pointer to handle of context object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeContextCreateEx", uintptr(hDriver), uintptr(unsafe.Pointer(desc)), uintptr(numDevices), uintptr(unsafe.Pointer(phDevices)), uintptr(unsafe.Pointer(phContext))) } // ZeContextDestroy Destroys a context. -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the context before it is deleted. -/// - The implementation of this function may immediately free all Host and -/// Device allocations associated with this context. -/// - The application must **not** call this function from simultaneous -/// threads with the same context handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the context before it is deleted. +// / - The implementation of this function may immediately free all Host and +// / Device allocations associated with this context. +// / - The application must **not** call this function from simultaneous +// / threads with the same context handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeContextDestroy( - hContext ZeContextHandle, // hContext [in][release] handle of context object to destroy + hContext ZeContextHandle, // hContext [in][release] handle of context object to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zeContextDestroy", uintptr(hContext)) } // ZeContextGetStatus Returns current status of the context. -/// -/// @details -/// - The application may call this function from simultaneous threads with -/// the same context handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_SUCCESS -/// + Context is available for use. -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// + Context is invalid; due to device lost or reset. +// / +// / @details +// / - The application may call this function from simultaneous threads with +// / the same context handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_SUCCESS +// / + Context is available for use. +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / + Context is invalid; due to device lost or reset. func ZeContextGetStatus( - hContext ZeContextHandle, // hContext [in] handle of context object + hContext ZeContextHandle, // hContext [in] handle of context object ) (ZeResult, error) { return zecall.Call[ZeResult]("zeContextGetStatus", uintptr(hContext)) } - diff --git a/core_copy.go b/core_copy.go index c8fd996..dfc58ad 100644 --- a/core_copy.go +++ b/core_copy.go @@ -20,600 +20,600 @@ import ( ) // ZeCommandListAppendMemoryCopy Copies host, device, or shared memory. -/// -/// @details -/// - The application must ensure the memory pointed to by dstptr and srcptr -/// is accessible by the device on which the command list was created. -/// - The implementation must not access the memory pointed to by dstptr and -/// srcptr as they are free to be modified by either the Host or device up -/// until execution. -/// - The application must ensure the events are accessible by the device on -/// which the command list was created. -/// - The application must ensure the command list and events were created, -/// and the memory was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **clEnqueueCopyBuffer** -/// - **clEnqueueReadBuffer** -/// - **clEnqueueWriteBuffer** -/// - **clEnqueueSVMMemcpy** -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == dstptr` -/// + `nullptr == srcptr` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the memory pointed to by dstptr and srcptr +// / is accessible by the device on which the command list was created. +// / - The implementation must not access the memory pointed to by dstptr and +// / srcptr as they are free to be modified by either the Host or device up +// / until execution. +// / - The application must ensure the events are accessible by the device on +// / which the command list was created. +// / - The application must ensure the command list and events were created, +// / and the memory was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **clEnqueueCopyBuffer** +// / - **clEnqueueReadBuffer** +// / - **clEnqueueWriteBuffer** +// / - **clEnqueueSVMMemcpy** +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == dstptr` +// / + `nullptr == srcptr` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendMemoryCopy( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list - dstptr unsafe.Pointer, // dstptr [in] pointer to destination memory to copy to - srcptr unsafe.Pointer, // srcptr [in] pointer to source memory to copy from - size uintptr, // size [in] size in bytes to copy - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list + dstptr unsafe.Pointer, // dstptr [in] pointer to destination memory to copy to + srcptr unsafe.Pointer, // srcptr [in] pointer to source memory to copy from + size uintptr, // size [in] size in bytes to copy + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendMemoryCopy", uintptr(hCommandList), uintptr(unsafe.Pointer(dstptr)), uintptr(unsafe.Pointer(srcptr)), uintptr(size), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListAppendMemoryFill Initializes host, device, or shared memory. -/// -/// @details -/// - The application must ensure the memory pointed to by ptr is accessible -/// by the device on which the command list was created. -/// - The implementation must not access the memory pointed to by ptr as it -/// is free to be modified by either the Host or device up until -/// execution. -/// - The ptr must be aligned to pattern_size -/// - The value to initialize memory to is described by the pattern and the -/// pattern size. -/// - The pattern size must be a power-of-two and less than or equal to the -/// `maxMemoryFillPatternSize` member of -/// ::ze_command_queue_group_properties_t. -/// - The application must ensure the events are accessible by the device on -/// which the command list was created. -/// - The application must ensure the command list and events were created, -/// and the memory was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **clEnqueueFillBuffer** -/// - **clEnqueueSVMMemFill** -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// + `nullptr == pattern` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the memory pointed to by ptr is accessible +// / by the device on which the command list was created. +// / - The implementation must not access the memory pointed to by ptr as it +// / is free to be modified by either the Host or device up until +// / execution. +// / - The ptr must be aligned to pattern_size +// / - The value to initialize memory to is described by the pattern and the +// / pattern size. +// / - The pattern size must be a power-of-two and less than or equal to the +// / `maxMemoryFillPatternSize` member of +// / ::ze_command_queue_group_properties_t. +// / - The application must ensure the events are accessible by the device on +// / which the command list was created. +// / - The application must ensure the command list and events were created, +// / and the memory was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **clEnqueueFillBuffer** +// / - **clEnqueueSVMMemFill** +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / + `nullptr == pattern` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendMemoryFill( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list - ptr unsafe.Pointer, // ptr [in] pointer to memory to initialize - pattern unsafe.Pointer, // pattern [in] pointer to value to initialize memory to - pattern_size uintptr, // pattern_size [in] size in bytes of the value to initialize memory to - size uintptr, // size [in] size in bytes to initialize - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list + ptr unsafe.Pointer, // ptr [in] pointer to memory to initialize + pattern unsafe.Pointer, // pattern [in] pointer to value to initialize memory to + pattern_size uintptr, // pattern_size [in] size in bytes of the value to initialize memory to + size uintptr, // size [in] size in bytes to initialize + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendMemoryFill", uintptr(hCommandList), uintptr(unsafe.Pointer(ptr)), uintptr(unsafe.Pointer(pattern)), uintptr(pattern_size), uintptr(size), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCopyRegion (ze_copy_region_t) Copy region descriptor type ZeCopyRegion struct { - Originx uint32 // Originx [in] The origin x offset for region in bytes - Originy uint32 // Originy [in] The origin y offset for region in rows - Originz uint32 // Originz [in] The origin z offset for region in slices - Width uint32 // Width [in] The region width relative to origin in bytes - Height uint32 // Height [in] The region height relative to origin in rows - Depth uint32 // Depth [in] The region depth relative to origin in slices. Set this to 0 for 2D copy. + Originx uint32 // Originx [in] The origin x offset for region in bytes + Originy uint32 // Originy [in] The origin y offset for region in rows + Originz uint32 // Originz [in] The origin z offset for region in slices + Width uint32 // Width [in] The region width relative to origin in bytes + Height uint32 // Height [in] The region height relative to origin in rows + Depth uint32 // Depth [in] The region depth relative to origin in slices. Set this to 0 for 2D copy. } // ZeCommandListAppendMemoryCopyRegion Copies a region from a 2D or 3D array of host, device, or shared -/// memory. -/// -/// @details -/// - The application must ensure the memory pointed to by dstptr and srcptr -/// is accessible by the device on which the command list was created. -/// - The implementation must not access the memory pointed to by dstptr and -/// srcptr as they are free to be modified by either the Host or device up -/// until execution. -/// - The region width, height, and depth for both src and dst must be same. -/// The origins can be different. -/// - The src and dst regions cannot be overlapping. -/// - The application must ensure the events are accessible by the device on -/// which the command list was created. -/// - The application must ensure the command list and events were created, -/// and the memory was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == dstptr` -/// + `nullptr == dstRegion` -/// + `nullptr == srcptr` -/// + `nullptr == srcRegion` -/// - ::ZE_RESULT_ERROR_OVERLAPPING_REGIONS -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / memory. +// / +// / @details +// / - The application must ensure the memory pointed to by dstptr and srcptr +// / is accessible by the device on which the command list was created. +// / - The implementation must not access the memory pointed to by dstptr and +// / srcptr as they are free to be modified by either the Host or device up +// / until execution. +// / - The region width, height, and depth for both src and dst must be same. +// / The origins can be different. +// / - The src and dst regions cannot be overlapping. +// / - The application must ensure the events are accessible by the device on +// / which the command list was created. +// / - The application must ensure the command list and events were created, +// / and the memory was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == dstptr` +// / + `nullptr == dstRegion` +// / + `nullptr == srcptr` +// / + `nullptr == srcRegion` +// / - ::ZE_RESULT_ERROR_OVERLAPPING_REGIONS +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendMemoryCopyRegion( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list - dstptr unsafe.Pointer, // dstptr [in] pointer to destination memory to copy to - dstRegion *ZeCopyRegion, // dstRegion [in] pointer to destination region to copy to - dstPitch uint32, // dstPitch [in] destination pitch in bytes - dstSlicePitch uint32, // dstSlicePitch [in] destination slice pitch in bytes. This is required for 3D region copies where the `depth` member of ::ze_copy_region_t is not 0, otherwise it's ignored. - srcptr unsafe.Pointer, // srcptr [in] pointer to source memory to copy from - srcRegion *ZeCopyRegion, // srcRegion [in] pointer to source region to copy from - srcPitch uint32, // srcPitch [in] source pitch in bytes - srcSlicePitch uint32, // srcSlicePitch [in] source slice pitch in bytes. This is required for 3D region copies where the `depth` member of ::ze_copy_region_t is not 0, otherwise it's ignored. - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list + dstptr unsafe.Pointer, // dstptr [in] pointer to destination memory to copy to + dstRegion *ZeCopyRegion, // dstRegion [in] pointer to destination region to copy to + dstPitch uint32, // dstPitch [in] destination pitch in bytes + dstSlicePitch uint32, // dstSlicePitch [in] destination slice pitch in bytes. This is required for 3D region copies where the `depth` member of ::ze_copy_region_t is not 0, otherwise it's ignored. + srcptr unsafe.Pointer, // srcptr [in] pointer to source memory to copy from + srcRegion *ZeCopyRegion, // srcRegion [in] pointer to source region to copy from + srcPitch uint32, // srcPitch [in] source pitch in bytes + srcSlicePitch uint32, // srcSlicePitch [in] source slice pitch in bytes. This is required for 3D region copies where the `depth` member of ::ze_copy_region_t is not 0, otherwise it's ignored. + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendMemoryCopyRegion", uintptr(hCommandList), uintptr(unsafe.Pointer(dstptr)), uintptr(unsafe.Pointer(dstRegion)), uintptr(dstPitch), uintptr(dstSlicePitch), uintptr(unsafe.Pointer(srcptr)), uintptr(unsafe.Pointer(srcRegion)), uintptr(srcPitch), uintptr(srcSlicePitch), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListAppendMemoryCopyFromContext Copies host, device, or shared memory from another context. -/// -/// @details -/// - The current active and source context must be from the same driver. -/// - The application must ensure the memory pointed to by dstptr and srcptr -/// is accessible by the device on which the command list was created. -/// - The implementation must not access the memory pointed to by dstptr and -/// srcptr as they are free to be modified by either the Host or device up -/// until execution. -/// - The application must ensure the events are accessible by the device on -/// which the command list was created. -/// - The application must ensure the command list and events were created, -/// and the memory was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hContextSrc` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == dstptr` -/// + `nullptr == srcptr` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The current active and source context must be from the same driver. +// / - The application must ensure the memory pointed to by dstptr and srcptr +// / is accessible by the device on which the command list was created. +// / - The implementation must not access the memory pointed to by dstptr and +// / srcptr as they are free to be modified by either the Host or device up +// / until execution. +// / - The application must ensure the events are accessible by the device on +// / which the command list was created. +// / - The application must ensure the command list and events were created, +// / and the memory was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hContextSrc` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == dstptr` +// / + `nullptr == srcptr` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendMemoryCopyFromContext( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list - dstptr unsafe.Pointer, // dstptr [in] pointer to destination memory to copy to - hContextSrc ZeContextHandle, // hContextSrc [in] handle of source context object - srcptr unsafe.Pointer, // srcptr [in] pointer to source memory to copy from - size uintptr, // size [in] size in bytes to copy - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list + dstptr unsafe.Pointer, // dstptr [in] pointer to destination memory to copy to + hContextSrc ZeContextHandle, // hContextSrc [in] handle of source context object + srcptr unsafe.Pointer, // srcptr [in] pointer to source memory to copy from + size uintptr, // size [in] size in bytes to copy + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendMemoryCopyFromContext", uintptr(hCommandList), uintptr(unsafe.Pointer(dstptr)), uintptr(hContextSrc), uintptr(unsafe.Pointer(srcptr)), uintptr(size), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListAppendImageCopy Copies an image. -/// -/// @details -/// - The application must ensure the image and events are accessible by the -/// device on which the command list was created. -/// - The application must ensure the image format descriptors for both -/// source and destination images are the same. -/// - The application must ensure the command list, images and events were -/// created on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **clEnqueueCopyImage** -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hDstImage` -/// + `nullptr == hSrcImage` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the image and events are accessible by the +// / device on which the command list was created. +// / - The application must ensure the image format descriptors for both +// / source and destination images are the same. +// / - The application must ensure the command list, images and events were +// / created on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **clEnqueueCopyImage** +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hDstImage` +// / + `nullptr == hSrcImage` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendImageCopy( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list - hDstImage ZeImageHandle, // hDstImage [in] handle of destination image to copy to - hSrcImage ZeImageHandle, // hSrcImage [in] handle of source image to copy from - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list + hDstImage ZeImageHandle, // hDstImage [in] handle of destination image to copy to + hSrcImage ZeImageHandle, // hSrcImage [in] handle of source image to copy from + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendImageCopy", uintptr(hCommandList), uintptr(hDstImage), uintptr(hSrcImage), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeImageRegion (ze_image_region_t) Region descriptor type ZeImageRegion struct { - Originx uint32 // Originx [in] The origin x offset for region in pixels - Originy uint32 // Originy [in] The origin y offset for region in pixels - Originz uint32 // Originz [in] The origin z offset for region in pixels - Width uint32 // Width [in] The region width relative to origin in pixels - Height uint32 // Height [in] The region height relative to origin in pixels - Depth uint32 // Depth [in] The region depth relative to origin. For 1D or 2D images, set this to 1. + Originx uint32 // Originx [in] The origin x offset for region in pixels + Originy uint32 // Originy [in] The origin y offset for region in pixels + Originz uint32 // Originz [in] The origin z offset for region in pixels + Width uint32 // Width [in] The region width relative to origin in pixels + Height uint32 // Height [in] The region height relative to origin in pixels + Depth uint32 // Depth [in] The region depth relative to origin. For 1D or 2D images, set this to 1. } // ZeCommandListAppendImageCopyRegion Copies a region of an image to another image. -/// -/// @details -/// - The application must ensure the image and events are accessible by the -/// device on which the command list was created. -/// - The region width and height for both src and dst must be same. The -/// origins can be different. -/// - The src and dst regions cannot be overlapping. -/// - The application must ensure the image format descriptors for both -/// source and destination images are the same. -/// - The application must ensure the command list, images and events were -/// created, and the memory was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hDstImage` -/// + `nullptr == hSrcImage` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_OVERLAPPING_REGIONS -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the image and events are accessible by the +// / device on which the command list was created. +// / - The region width and height for both src and dst must be same. The +// / origins can be different. +// / - The src and dst regions cannot be overlapping. +// / - The application must ensure the image format descriptors for both +// / source and destination images are the same. +// / - The application must ensure the command list, images and events were +// / created, and the memory was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hDstImage` +// / + `nullptr == hSrcImage` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_OVERLAPPING_REGIONS +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendImageCopyRegion( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list - hDstImage ZeImageHandle, // hDstImage [in] handle of destination image to copy to - hSrcImage ZeImageHandle, // hSrcImage [in] handle of source image to copy from - pDstRegion *ZeImageRegion, // pDstRegion [in][optional] destination region descriptor - pSrcRegion *ZeImageRegion, // pSrcRegion [in][optional] source region descriptor - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list + hDstImage ZeImageHandle, // hDstImage [in] handle of destination image to copy to + hSrcImage ZeImageHandle, // hSrcImage [in] handle of source image to copy from + pDstRegion *ZeImageRegion, // pDstRegion [in][optional] destination region descriptor + pSrcRegion *ZeImageRegion, // pSrcRegion [in][optional] source region descriptor + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendImageCopyRegion", uintptr(hCommandList), uintptr(hDstImage), uintptr(hSrcImage), uintptr(unsafe.Pointer(pDstRegion)), uintptr(unsafe.Pointer(pSrcRegion)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListAppendImageCopyToMemory Copies from an image to device or shared memory. -/// -/// @details -/// - The application must ensure the memory pointed to by dstptr is -/// accessible by the device on which the command list was created. -/// - The implementation must not access the memory pointed to by dstptr as -/// it is free to be modified by either the Host or device up until -/// execution. -/// - The application must ensure the image and events are accessible by the -/// device on which the command list was created. -/// - The application must ensure the image format descriptor for the source -/// image is a single-planar format. -/// - The application must ensure the command list, image and events were -/// created, and the memory was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clEnqueueReadImage -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hSrcImage` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == dstptr` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the memory pointed to by dstptr is +// / accessible by the device on which the command list was created. +// / - The implementation must not access the memory pointed to by dstptr as +// / it is free to be modified by either the Host or device up until +// / execution. +// / - The application must ensure the image and events are accessible by the +// / device on which the command list was created. +// / - The application must ensure the image format descriptor for the source +// / image is a single-planar format. +// / - The application must ensure the command list, image and events were +// / created, and the memory was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clEnqueueReadImage +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hSrcImage` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == dstptr` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendImageCopyToMemory( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list - dstptr unsafe.Pointer, // dstptr [in] pointer to destination memory to copy to - hSrcImage ZeImageHandle, // hSrcImage [in] handle of source image to copy from - pSrcRegion *ZeImageRegion, // pSrcRegion [in][optional] source region descriptor - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list + dstptr unsafe.Pointer, // dstptr [in] pointer to destination memory to copy to + hSrcImage ZeImageHandle, // hSrcImage [in] handle of source image to copy from + pSrcRegion *ZeImageRegion, // pSrcRegion [in][optional] source region descriptor + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendImageCopyToMemory", uintptr(hCommandList), uintptr(unsafe.Pointer(dstptr)), uintptr(hSrcImage), uintptr(unsafe.Pointer(pSrcRegion)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListAppendImageCopyFromMemory Copies to an image from device or shared memory. -/// -/// @details -/// - The application must ensure the memory pointed to by srcptr is -/// accessible by the device on which the command list was created. -/// - The implementation must not access the memory pointed to by srcptr as -/// it is free to be modified by either the Host or device up until -/// execution. -/// - The application must ensure the image and events are accessible by the -/// device on which the command list was created. -/// - The application must ensure the image format descriptor for the -/// destination image is a single-planar format. -/// - The application must ensure the command list, image and events were -/// created, and the memory was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clEnqueueWriteImage -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hDstImage` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == srcptr` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the memory pointed to by srcptr is +// / accessible by the device on which the command list was created. +// / - The implementation must not access the memory pointed to by srcptr as +// / it is free to be modified by either the Host or device up until +// / execution. +// / - The application must ensure the image and events are accessible by the +// / device on which the command list was created. +// / - The application must ensure the image format descriptor for the +// / destination image is a single-planar format. +// / - The application must ensure the command list, image and events were +// / created, and the memory was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clEnqueueWriteImage +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hDstImage` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == srcptr` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendImageCopyFromMemory( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list - hDstImage ZeImageHandle, // hDstImage [in] handle of destination image to copy to - srcptr unsafe.Pointer, // srcptr [in] pointer to source memory to copy from - pDstRegion *ZeImageRegion, // pDstRegion [in][optional] destination region descriptor - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list + hDstImage ZeImageHandle, // hDstImage [in] handle of destination image to copy to + srcptr unsafe.Pointer, // srcptr [in] pointer to source memory to copy from + pDstRegion *ZeImageRegion, // pDstRegion [in][optional] destination region descriptor + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendImageCopyFromMemory", uintptr(hCommandList), uintptr(hDstImage), uintptr(unsafe.Pointer(srcptr)), uintptr(unsafe.Pointer(pDstRegion)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListAppendMemoryPrefetch Asynchronously prefetches shared memory to the device associated with -/// the specified command list -/// -/// @details -/// - This is a hint to improve performance only and is not required for -/// correctness. -/// - Only prefetching to the device associated with the specified command -/// list is supported. -/// Prefetching to the host or to a peer device is not supported. -/// - Prefetching may not be supported for all allocation types for all devices. -/// If memory prefetching is not supported for the specified memory range -/// the prefetch hint may be ignored. -/// - Prefetching may only be supported at a device-specific granularity, -/// such as at a page boundary. -/// In this case, the memory range may be expanded such that the start and -/// end of the range satisfy granularity requirements. -/// - The application must ensure the memory pointed to by ptr is accessible -/// by the device on which the command list was created. -/// - The application must ensure the command list was created, and the -/// memory was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clEnqueueSVMMigrateMem -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` +// / the specified command list +// / +// / @details +// / - This is a hint to improve performance only and is not required for +// / correctness. +// / - Only prefetching to the device associated with the specified command +// / list is supported. +// / Prefetching to the host or to a peer device is not supported. +// / - Prefetching may not be supported for all allocation types for all devices. +// / If memory prefetching is not supported for the specified memory range +// / the prefetch hint may be ignored. +// / - Prefetching may only be supported at a device-specific granularity, +// / such as at a page boundary. +// / In this case, the memory range may be expanded such that the start and +// / end of the range satisfy granularity requirements. +// / - The application must ensure the memory pointed to by ptr is accessible +// / by the device on which the command list was created. +// / - The application must ensure the command list was created, and the +// / memory was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clEnqueueSVMMigrateMem +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` func ZeCommandListAppendMemoryPrefetch( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list - ptr unsafe.Pointer, // ptr [in] pointer to start of the memory range to prefetch - size uintptr, // size [in] size in bytes of the memory range to prefetch + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list + ptr unsafe.Pointer, // ptr [in] pointer to start of the memory range to prefetch + size uintptr, // size [in] size in bytes of the memory range to prefetch ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendMemoryPrefetch", uintptr(hCommandList), uintptr(unsafe.Pointer(ptr)), uintptr(size)) } // ZeMemoryAdvice (ze_memory_advice_t) Supported memory advice hints type ZeMemoryAdvice uintptr + const ( - ZE_MEMORY_ADVICE_SET_READ_MOSTLY ZeMemoryAdvice = 0 // ZE_MEMORY_ADVICE_SET_READ_MOSTLY hint that memory will be read from frequently and written to rarely - ZE_MEMORY_ADVICE_CLEAR_READ_MOSTLY ZeMemoryAdvice = 1 // ZE_MEMORY_ADVICE_CLEAR_READ_MOSTLY removes the effect of ::ZE_MEMORY_ADVICE_SET_READ_MOSTLY - ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION ZeMemoryAdvice = 2 // ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION hint that the preferred memory location is the specified device - ZE_MEMORY_ADVICE_CLEAR_PREFERRED_LOCATION ZeMemoryAdvice = 3 // ZE_MEMORY_ADVICE_CLEAR_PREFERRED_LOCATION removes the effect of ::ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION - ZE_MEMORY_ADVICE_SET_NON_ATOMIC_MOSTLY ZeMemoryAdvice = 4 // ZE_MEMORY_ADVICE_SET_NON_ATOMIC_MOSTLY hints that memory will mostly be accessed non-atomically - ZE_MEMORY_ADVICE_CLEAR_NON_ATOMIC_MOSTLY ZeMemoryAdvice = 5 // ZE_MEMORY_ADVICE_CLEAR_NON_ATOMIC_MOSTLY removes the effect of ::ZE_MEMORY_ADVICE_SET_NON_ATOMIC_MOSTLY - ZE_MEMORY_ADVICE_BIAS_CACHED ZeMemoryAdvice = 6 // ZE_MEMORY_ADVICE_BIAS_CACHED hints that memory should be cached - ZE_MEMORY_ADVICE_BIAS_UNCACHED ZeMemoryAdvice = 7 // ZE_MEMORY_ADVICE_BIAS_UNCACHED hints that memory should be not be cached - ZE_MEMORY_ADVICE_SET_SYSTEM_MEMORY_PREFERRED_LOCATION ZeMemoryAdvice = 8 // ZE_MEMORY_ADVICE_SET_SYSTEM_MEMORY_PREFERRED_LOCATION hint that the preferred memory location is host memory - ZE_MEMORY_ADVICE_CLEAR_SYSTEM_MEMORY_PREFERRED_LOCATION ZeMemoryAdvice = 9 // ZE_MEMORY_ADVICE_CLEAR_SYSTEM_MEMORY_PREFERRED_LOCATION removes the effect of + ZE_MEMORY_ADVICE_SET_READ_MOSTLY ZeMemoryAdvice = 0 // ZE_MEMORY_ADVICE_SET_READ_MOSTLY hint that memory will be read from frequently and written to rarely + ZE_MEMORY_ADVICE_CLEAR_READ_MOSTLY ZeMemoryAdvice = 1 // ZE_MEMORY_ADVICE_CLEAR_READ_MOSTLY removes the effect of ::ZE_MEMORY_ADVICE_SET_READ_MOSTLY + ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION ZeMemoryAdvice = 2 // ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION hint that the preferred memory location is the specified device + ZE_MEMORY_ADVICE_CLEAR_PREFERRED_LOCATION ZeMemoryAdvice = 3 // ZE_MEMORY_ADVICE_CLEAR_PREFERRED_LOCATION removes the effect of ::ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION + ZE_MEMORY_ADVICE_SET_NON_ATOMIC_MOSTLY ZeMemoryAdvice = 4 // ZE_MEMORY_ADVICE_SET_NON_ATOMIC_MOSTLY hints that memory will mostly be accessed non-atomically + ZE_MEMORY_ADVICE_CLEAR_NON_ATOMIC_MOSTLY ZeMemoryAdvice = 5 // ZE_MEMORY_ADVICE_CLEAR_NON_ATOMIC_MOSTLY removes the effect of ::ZE_MEMORY_ADVICE_SET_NON_ATOMIC_MOSTLY + ZE_MEMORY_ADVICE_BIAS_CACHED ZeMemoryAdvice = 6 // ZE_MEMORY_ADVICE_BIAS_CACHED hints that memory should be cached + ZE_MEMORY_ADVICE_BIAS_UNCACHED ZeMemoryAdvice = 7 // ZE_MEMORY_ADVICE_BIAS_UNCACHED hints that memory should be not be cached + ZE_MEMORY_ADVICE_SET_SYSTEM_MEMORY_PREFERRED_LOCATION ZeMemoryAdvice = 8 // ZE_MEMORY_ADVICE_SET_SYSTEM_MEMORY_PREFERRED_LOCATION hint that the preferred memory location is host memory + ZE_MEMORY_ADVICE_CLEAR_SYSTEM_MEMORY_PREFERRED_LOCATION ZeMemoryAdvice = 9 // ZE_MEMORY_ADVICE_CLEAR_SYSTEM_MEMORY_PREFERRED_LOCATION removes the effect of ///< ::ZE_MEMORY_ADVICE_SET_SYSTEM_MEMORY_PREFERRED_LOCATION - ZE_MEMORY_ADVICE_FORCE_UINT32 ZeMemoryAdvice = 0x7fffffff // ZE_MEMORY_ADVICE_FORCE_UINT32 Value marking end of ZE_MEMORY_ADVICE_* ENUMs + ZE_MEMORY_ADVICE_FORCE_UINT32 ZeMemoryAdvice = 0x7fffffff // ZE_MEMORY_ADVICE_FORCE_UINT32 Value marking end of ZE_MEMORY_ADVICE_* ENUMs ) // ZeCommandListAppendMemAdvise Provides advice about the use of a shared memory range -/// -/// @details -/// - Memory advice is a performance hint only and is not required for -/// functional correctness. -/// - Memory advice can be used to override driver heuristics to explicitly -/// control shared memory behavior. -/// - Not all memory advice hints may be supported for all allocation types -/// for all devices. -/// If a memory advice hint is not supported by the device it will be ignored. -/// - Memory advice may only be supported at a device-specific granularity, -/// such as at a page boundary. -/// In this case, the memory range may be expanded such that the start and -/// end of the range satisfy granularity requirements. -/// - The application must ensure the memory pointed to by ptr is accessible -/// by the device on which the command list was created. -/// - The application must ensure the command list was created, and memory -/// was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle, and the memory was -/// allocated. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_MEMORY_ADVICE_CLEAR_SYSTEM_MEMORY_PREFERRED_LOCATION < advice` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - Memory advice is a performance hint only and is not required for +// / functional correctness. +// / - Memory advice can be used to override driver heuristics to explicitly +// / control shared memory behavior. +// / - Not all memory advice hints may be supported for all allocation types +// / for all devices. +// / If a memory advice hint is not supported by the device it will be ignored. +// / - Memory advice may only be supported at a device-specific granularity, +// / such as at a page boundary. +// / In this case, the memory range may be expanded such that the start and +// / end of the range satisfy granularity requirements. +// / - The application must ensure the memory pointed to by ptr is accessible +// / by the device on which the command list was created. +// / - The application must ensure the command list was created, and memory +// / was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle, and the memory was +// / allocated. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_MEMORY_ADVICE_CLEAR_SYSTEM_MEMORY_PREFERRED_LOCATION < advice` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeCommandListAppendMemAdvise( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list - hDevice ZeDeviceHandle, // hDevice [in] device associated with the memory advice - ptr unsafe.Pointer, // ptr [in] Pointer to the start of the memory range - size uintptr, // size [in] Size in bytes of the memory range - advice ZeMemoryAdvice, // advice [in] Memory advice for the memory range + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list + hDevice ZeDeviceHandle, // hDevice [in] device associated with the memory advice + ptr unsafe.Pointer, // ptr [in] Pointer to the start of the memory range + size uintptr, // size [in] Size in bytes of the memory range + advice ZeMemoryAdvice, // advice [in] Memory advice for the memory range ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendMemAdvise", uintptr(hCommandList), uintptr(hDevice), uintptr(unsafe.Pointer(ptr)), uintptr(size), uintptr(advice)) } - diff --git a/core_counterbasedeventpool.go b/core_counterbasedeventpool.go index de790c5..a61e380 100644 --- a/core_counterbasedeventpool.go +++ b/core_counterbasedeventpool.go @@ -22,29 +22,30 @@ const ZE_EVENT_POOL_COUNTER_BASED_EXP_NAME = "ZE_experimental_event_pool_counter // ZeEventPoolCounterBasedExpVersion (ze_event_pool_counter_based_exp_version_t) Counter-based Event Pools Extension Version(s) type ZeEventPoolCounterBasedExpVersion uintptr + const ( - ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_1_0 ZeEventPoolCounterBasedExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_1_0 version 1.0 - ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_CURRENT ZeEventPoolCounterBasedExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_CURRENT latest known version - ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_FORCE_UINT32 ZeEventPoolCounterBasedExpVersion = 0x7fffffff // ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_* ENUMs + ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_1_0 ZeEventPoolCounterBasedExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_1_0 version 1.0 + ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_CURRENT ZeEventPoolCounterBasedExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_CURRENT latest known version + ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_FORCE_UINT32 ZeEventPoolCounterBasedExpVersion = 0x7fffffff // ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_EVENT_POOL_COUNTER_BASED_EXP_VERSION_* ENUMs ) // ZeEventPoolCounterBasedExpFlags (ze_event_pool_counter_based_exp_flags_t) Supported event flags for defining counter-based event pools. type ZeEventPoolCounterBasedExpFlags uint32 + const ( - ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_IMMEDIATE ZeEventPoolCounterBasedExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_IMMEDIATE Counter-based event pool is used for immediate command lists (default) - ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_NON_IMMEDIATE ZeEventPoolCounterBasedExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_NON_IMMEDIATE Counter-based event pool is for non-immediate command lists - ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_FORCE_UINT32 ZeEventPoolCounterBasedExpFlags = 0x7fffffff // ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_* ENUMs + ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_IMMEDIATE ZeEventPoolCounterBasedExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_IMMEDIATE Counter-based event pool is used for immediate command lists (default) + ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_NON_IMMEDIATE ZeEventPoolCounterBasedExpFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_NON_IMMEDIATE Counter-based event pool is for non-immediate command lists + ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_FORCE_UINT32 ZeEventPoolCounterBasedExpFlags = 0x7fffffff // ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_* ENUMs ) // ZeEventPoolCounterBasedExpDesc (ze_event_pool_counter_based_exp_desc_t) Event pool descriptor for counter-based events. This structure may be -/// passed to ::zeEventPoolCreate as pNext member of -/// ::ze_event_pool_desc_t. @deprecated since 1.15 +// / passed to ::zeEventPoolCreate as pNext member of +// / ::ze_event_pool_desc_t. @deprecated since 1.15 type ZeEventPoolCounterBasedExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeEventPoolCounterBasedExpFlags // Flags [in] mode flags. must be 0 (default) or a valid value of ::ze_event_pool_counter_based_exp_flag_t default behavior is counter-based event pool is only used for immediate command lists. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeEventPoolCounterBasedExpFlags // Flags [in] mode flags. must be 0 (default) or a valid value of ::ze_event_pool_counter_based_exp_flag_t default behavior is counter-based event pool is only used for immediate command lists. } - diff --git a/core_device.go b/core_device.go index 04ad9d0..06374a0 100644 --- a/core_device.go +++ b/core_device.go @@ -20,132 +20,133 @@ import ( ) // ZeDeviceGet Retrieves devices within a driver -/// -/// @details -/// - Multiple calls to this function will return identical device handles, -/// in the same order. -/// - The number and order of handles returned from this function is -/// affected by the `ZE_AFFINITY_MASK` and `ZE_ENABLE_PCI_ID_DEVICE_ORDER` -/// environment variables. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - Multiple calls to this function will return identical device handles, +// / in the same order. +// / - The number and order of handles returned from this function is +// / affected by the `ZE_AFFINITY_MASK` and `ZE_ENABLE_PCI_ID_DEVICE_ORDER` +// / environment variables. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeDeviceGet( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance - pCount *uint32, // pCount [in,out] pointer to the number of devices. if count is zero, then the driver shall update the value with the total number of devices available. if count is greater than the number of devices available, then the driver shall update the value with the correct number of devices available. - phDevices *ZeDeviceHandle, // phDevices [in,out][optional][range(0, *pCount)] array of handle of devices. if count is less than the number of devices available, then driver shall only retrieve that number of devices. + hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance + pCount *uint32, // pCount [in,out] pointer to the number of devices. if count is zero, then the driver shall update the value with the total number of devices available. if count is greater than the number of devices available, then the driver shall update the value with the correct number of devices available. + phDevices *ZeDeviceHandle, // phDevices [in,out][optional][range(0, *pCount)] array of handle of devices. if count is less than the number of devices available, then driver shall only retrieve that number of devices. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGet", uintptr(hDriver), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phDevices))) } // ZeDeviceGetRootDevice Retrieves the root-device of a device handle -/// -/// @details -/// - When the device handle passed does not belong to any root-device, -/// nullptr is returned. -/// - Multiple calls to this function will return the same device handle. -/// - The root-device handle returned by this function does not have access -/// automatically to the resources -/// created with the associated sub-device, unless those resources have -/// been created with a context -/// explicitly containing both handles. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phRootDevice` +// / +// / @details +// / - When the device handle passed does not belong to any root-device, +// / nullptr is returned. +// / - Multiple calls to this function will return the same device handle. +// / - The root-device handle returned by this function does not have access +// / automatically to the resources +// / created with the associated sub-device, unless those resources have +// / been created with a context +// / explicitly containing both handles. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phRootDevice` func ZeDeviceGetRootDevice( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device object - phRootDevice *ZeDeviceHandle, // phRootDevice [in,out] parent root device. + hDevice ZeDeviceHandle, // hDevice [in] handle of the device object + phRootDevice *ZeDeviceHandle, // phRootDevice [in,out] parent root device. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetRootDevice", uintptr(hDevice), uintptr(unsafe.Pointer(phRootDevice))) } // ZeDeviceGetSubDevices Retrieves a sub-device from a device -/// -/// @details -/// - When the device handle passed does not contain any sub-device, a -/// pCount of 0 is returned. -/// - Multiple calls to this function will return identical device handles, -/// in the same order. -/// - The number of handles returned from this function is affected by the -/// `ZE_AFFINITY_MASK` environment variable. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clCreateSubDevices -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - When the device handle passed does not contain any sub-device, a +// / pCount of 0 is returned. +// / - Multiple calls to this function will return identical device handles, +// / in the same order. +// / - The number of handles returned from this function is affected by the +// / `ZE_AFFINITY_MASK` environment variable. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clCreateSubDevices +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeDeviceGetSubDevices( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device object - pCount *uint32, // pCount [in,out] pointer to the number of sub-devices. if count is zero, then the driver shall update the value with the total number of sub-devices available. if count is greater than the number of sub-devices available, then the driver shall update the value with the correct number of sub-devices available. - phSubdevices *ZeDeviceHandle, // phSubdevices [in,out][optional][range(0, *pCount)] array of handle of sub-devices. if count is less than the number of sub-devices available, then driver shall only retrieve that number of sub-devices. + hDevice ZeDeviceHandle, // hDevice [in] handle of the device object + pCount *uint32, // pCount [in,out] pointer to the number of sub-devices. if count is zero, then the driver shall update the value with the total number of sub-devices available. if count is greater than the number of sub-devices available, then the driver shall update the value with the correct number of sub-devices available. + phSubdevices *ZeDeviceHandle, // phSubdevices [in,out][optional][range(0, *pCount)] array of handle of sub-devices. if count is less than the number of sub-devices available, then driver shall only retrieve that number of sub-devices. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetSubDevices", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phSubdevices))) } // ZeDeviceType (ze_device_type_t) Supported device types type ZeDeviceType uintptr + const ( - ZE_DEVICE_TYPE_GPU ZeDeviceType = 1 // ZE_DEVICE_TYPE_GPU Graphics Processing Unit - ZE_DEVICE_TYPE_CPU ZeDeviceType = 2 // ZE_DEVICE_TYPE_CPU Central Processing Unit - ZE_DEVICE_TYPE_FPGA ZeDeviceType = 3 // ZE_DEVICE_TYPE_FPGA Field Programmable Gate Array - ZE_DEVICE_TYPE_MCA ZeDeviceType = 4 // ZE_DEVICE_TYPE_MCA Memory Copy Accelerator - ZE_DEVICE_TYPE_VPU ZeDeviceType = 5 // ZE_DEVICE_TYPE_VPU Vision Processing Unit - ZE_DEVICE_TYPE_FORCE_UINT32 ZeDeviceType = 0x7fffffff // ZE_DEVICE_TYPE_FORCE_UINT32 Value marking end of ZE_DEVICE_TYPE_* ENUMs + ZE_DEVICE_TYPE_GPU ZeDeviceType = 1 // ZE_DEVICE_TYPE_GPU Graphics Processing Unit + ZE_DEVICE_TYPE_CPU ZeDeviceType = 2 // ZE_DEVICE_TYPE_CPU Central Processing Unit + ZE_DEVICE_TYPE_FPGA ZeDeviceType = 3 // ZE_DEVICE_TYPE_FPGA Field Programmable Gate Array + ZE_DEVICE_TYPE_MCA ZeDeviceType = 4 // ZE_DEVICE_TYPE_MCA Memory Copy Accelerator + ZE_DEVICE_TYPE_VPU ZeDeviceType = 5 // ZE_DEVICE_TYPE_VPU Vision Processing Unit + ZE_DEVICE_TYPE_FORCE_UINT32 ZeDeviceType = 0x7fffffff // ZE_DEVICE_TYPE_FORCE_UINT32 Value marking end of ZE_DEVICE_TYPE_* ENUMs ) @@ -154,7 +155,7 @@ const ZE_MAX_DEVICE_UUID_SIZE = 16 // ZeDeviceUuid (ze_device_uuid_t) Device universal unique id (UUID) type ZeDeviceUuid struct { - Id [ZE_MAX_DEVICE_UUID_SIZE]uint8 // Id [out] opaque data representing a device UUID + Id [ZE_MAX_DEVICE_UUID_SIZE]uint8 // Id [out] opaque data representing a device UUID } @@ -163,81 +164,82 @@ const ZE_MAX_DEVICE_NAME = 256 // ZeDevicePropertyFlags (ze_device_property_flags_t) Supported device property flags type ZeDevicePropertyFlags uint32 + const ( - ZE_DEVICE_PROPERTY_FLAG_INTEGRATED ZeDevicePropertyFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_DEVICE_PROPERTY_FLAG_INTEGRATED Device is integrated with the Host. - ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE ZeDevicePropertyFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE Device handle used for query represents a sub-device. - ZE_DEVICE_PROPERTY_FLAG_ECC ZeDevicePropertyFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_DEVICE_PROPERTY_FLAG_ECC Device supports error correction memory access. - ZE_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING ZeDevicePropertyFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING Device supports on-demand page-faulting. - ZE_DEVICE_PROPERTY_FLAG_FORCE_UINT32 ZeDevicePropertyFlags = 0x7fffffff // ZE_DEVICE_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_PROPERTY_FLAG_* ENUMs + ZE_DEVICE_PROPERTY_FLAG_INTEGRATED ZeDevicePropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_PROPERTY_FLAG_INTEGRATED Device is integrated with the Host. + ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE ZeDevicePropertyFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE Device handle used for query represents a sub-device. + ZE_DEVICE_PROPERTY_FLAG_ECC ZeDevicePropertyFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_DEVICE_PROPERTY_FLAG_ECC Device supports error correction memory access. + ZE_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING ZeDevicePropertyFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING Device supports on-demand page-faulting. + ZE_DEVICE_PROPERTY_FLAG_FORCE_UINT32 ZeDevicePropertyFlags = 0x7fffffff // ZE_DEVICE_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_PROPERTY_FLAG_* ENUMs ) // ZeDeviceProperties (ze_device_properties_t) Device properties queried using ::zeDeviceGetProperties type ZeDeviceProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZeDeviceType // Type [out] generic device type - Vendorid uint32 // Vendorid [out] vendor id from PCI configuration - Deviceid uint32 // Deviceid [out] device id from PCI configuration. Note, the device id uses little-endian format. - Flags ZeDevicePropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_device_property_flag_t - Subdeviceid uint32 // Subdeviceid [out] sub-device id. Only valid if ::ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE is set. - Coreclockrate uint32 // Coreclockrate [out] Clock rate for device core. - Maxmemallocsize uint64 // Maxmemallocsize [out] Maximum memory allocation size. - Maxhardwarecontexts uint32 // Maxhardwarecontexts [out] Maximum number of logical hardware contexts. - Maxcommandqueuepriority uint32 // Maxcommandqueuepriority [out] Maximum priority for command queues. Higher value is higher priority. - Numthreadspereu uint32 // Numthreadspereu [out] Maximum number of threads per EU. - Physicaleusimdwidth uint32 // Physicaleusimdwidth [out] The physical EU simd width. - Numeuspersubslice uint32 // Numeuspersubslice [out] Maximum number of EUs per sub-slice. - Numsubslicesperslice uint32 // Numsubslicesperslice [out] Maximum number of sub-slices per slice. - Numslices uint32 // Numslices [out] Maximum number of slices. - Timerresolution uint64 // Timerresolution [out] Returns the resolution of device timer used for profiling, timestamps, etc. When stype==::ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES the units are in nanoseconds. When stype==::ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2 units are in cycles/sec - Timestampvalidbits uint32 // Timestampvalidbits [out] Returns the number of valid bits in the timestamp value. - Kerneltimestampvalidbits uint32 // Kerneltimestampvalidbits [out] Returns the number of valid bits in the kernel timestamp values - Uuid ZeDeviceUuid // Uuid [out] universal unique identifier. Note: Subdevices will have their own uuid. - Name [ZE_MAX_DEVICE_NAME]byte // Name [out] Device name + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZeDeviceType // Type [out] generic device type + Vendorid uint32 // Vendorid [out] vendor id from PCI configuration + Deviceid uint32 // Deviceid [out] device id from PCI configuration. Note, the device id uses little-endian format. + Flags ZeDevicePropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_device_property_flag_t + Subdeviceid uint32 // Subdeviceid [out] sub-device id. Only valid if ::ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE is set. + Coreclockrate uint32 // Coreclockrate [out] Clock rate for device core. + Maxmemallocsize uint64 // Maxmemallocsize [out] Maximum memory allocation size. + Maxhardwarecontexts uint32 // Maxhardwarecontexts [out] Maximum number of logical hardware contexts. + Maxcommandqueuepriority uint32 // Maxcommandqueuepriority [out] Maximum priority for command queues. Higher value is higher priority. + Numthreadspereu uint32 // Numthreadspereu [out] Maximum number of threads per EU. + Physicaleusimdwidth uint32 // Physicaleusimdwidth [out] The physical EU simd width. + Numeuspersubslice uint32 // Numeuspersubslice [out] Maximum number of EUs per sub-slice. + Numsubslicesperslice uint32 // Numsubslicesperslice [out] Maximum number of sub-slices per slice. + Numslices uint32 // Numslices [out] Maximum number of slices. + Timerresolution uint64 // Timerresolution [out] Returns the resolution of device timer used for profiling, timestamps, etc. When stype==::ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES the units are in nanoseconds. When stype==::ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES_1_2 units are in cycles/sec + Timestampvalidbits uint32 // Timestampvalidbits [out] Returns the number of valid bits in the timestamp value. + Kerneltimestampvalidbits uint32 // Kerneltimestampvalidbits [out] Returns the number of valid bits in the kernel timestamp values + Uuid ZeDeviceUuid // Uuid [out] universal unique identifier. Note: Subdevices will have their own uuid. + Name [ZE_MAX_DEVICE_NAME]byte // Name [out] Device name } // ZeDeviceThread (ze_device_thread_t) Device thread identifier. type ZeDeviceThread struct { - Slice uint32 // Slice [in,out] the slice number. Must be `UINT32_MAX` (all) or less than the `numSlices` member of ::ze_device_properties_t. - Subslice uint32 // Subslice [in,out] the sub-slice number within its slice. Must be `UINT32_MAX` (all) or less than the `numSubslicesPerSlice` member of ::ze_device_properties_t. - Eu uint32 // Eu [in,out] the EU number within its sub-slice. Must be `UINT32_MAX` (all) or less than the `numEUsPerSubslice` member of ::ze_device_properties_t. - Thread uint32 // Thread [in,out] the thread number within its EU. Must be `UINT32_MAX` (all) or less than the `numThreadsPerEU` member of ::ze_device_properties_t. + Slice uint32 // Slice [in,out] the slice number. Must be `UINT32_MAX` (all) or less than the `numSlices` member of ::ze_device_properties_t. + Subslice uint32 // Subslice [in,out] the sub-slice number within its slice. Must be `UINT32_MAX` (all) or less than the `numSubslicesPerSlice` member of ::ze_device_properties_t. + Eu uint32 // Eu [in,out] the EU number within its sub-slice. Must be `UINT32_MAX` (all) or less than the `numEUsPerSubslice` member of ::ze_device_properties_t. + Thread uint32 // Thread [in,out] the thread number within its EU. Must be `UINT32_MAX` (all) or less than the `numThreadsPerEU` member of ::ze_device_properties_t. } // ZeDeviceGetProperties Retrieves properties of the device. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clGetDeviceInfo -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pDeviceProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clGetDeviceInfo +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pDeviceProperties` func ZeDeviceGetProperties( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - pDeviceProperties *ZeDeviceProperties, // pDeviceProperties [in,out] query result for device properties + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + pDeviceProperties *ZeDeviceProperties, // pDeviceProperties [in,out] query result for device properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pDeviceProperties))) } @@ -247,52 +249,52 @@ const ZE_SUBGROUPSIZE_COUNT = 8 // ZeDeviceComputeProperties (ze_device_compute_properties_t) Device compute properties queried using ::zeDeviceGetComputeProperties type ZeDeviceComputeProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Maxtotalgroupsize uint32 // Maxtotalgroupsize [out] Maximum items per compute group. (groupSizeX * groupSizeY * groupSizeZ) <= maxTotalGroupSize - Maxgroupsizex uint32 // Maxgroupsizex [out] Maximum items for X dimension in group - Maxgroupsizey uint32 // Maxgroupsizey [out] Maximum items for Y dimension in group - Maxgroupsizez uint32 // Maxgroupsizez [out] Maximum items for Z dimension in group - Maxgroupcountx uint32 // Maxgroupcountx [out] Maximum groups that can be launched for x dimension - Maxgroupcounty uint32 // Maxgroupcounty [out] Maximum groups that can be launched for y dimension - Maxgroupcountz uint32 // Maxgroupcountz [out] Maximum groups that can be launched for z dimension - Maxsharedlocalmemory uint32 // Maxsharedlocalmemory [out] Maximum shared local memory per group. - Numsubgroupsizes uint32 // Numsubgroupsizes [out] Number of subgroup sizes supported. This indicates number of entries in subGroupSizes. - Subgroupsizes [ZE_SUBGROUPSIZE_COUNT]uint32 // Subgroupsizes [out] Size group sizes supported. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Maxtotalgroupsize uint32 // Maxtotalgroupsize [out] Maximum items per compute group. (groupSizeX * groupSizeY * groupSizeZ) <= maxTotalGroupSize + Maxgroupsizex uint32 // Maxgroupsizex [out] Maximum items for X dimension in group + Maxgroupsizey uint32 // Maxgroupsizey [out] Maximum items for Y dimension in group + Maxgroupsizez uint32 // Maxgroupsizez [out] Maximum items for Z dimension in group + Maxgroupcountx uint32 // Maxgroupcountx [out] Maximum groups that can be launched for x dimension + Maxgroupcounty uint32 // Maxgroupcounty [out] Maximum groups that can be launched for y dimension + Maxgroupcountz uint32 // Maxgroupcountz [out] Maximum groups that can be launched for z dimension + Maxsharedlocalmemory uint32 // Maxsharedlocalmemory [out] Maximum shared local memory per group. + Numsubgroupsizes uint32 // Numsubgroupsizes [out] Number of subgroup sizes supported. This indicates number of entries in subGroupSizes. + Subgroupsizes [ZE_SUBGROUPSIZE_COUNT]uint32 // Subgroupsizes [out] Size group sizes supported. } // ZeDeviceGetComputeProperties Retrieves compute properties of the device. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clGetDeviceInfo -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pComputeProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clGetDeviceInfo +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pComputeProperties` func ZeDeviceGetComputeProperties( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - pComputeProperties *ZeDeviceComputeProperties, // pComputeProperties [in,out] query result for compute properties + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + pComputeProperties *ZeDeviceComputeProperties, // pComputeProperties [in,out] query result for compute properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetComputeProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pComputeProperties))) } @@ -302,673 +304,680 @@ const ZE_MAX_NATIVE_KERNEL_UUID_SIZE = 16 // ZeNativeKernelUuid (ze_native_kernel_uuid_t) Native kernel universal unique id (UUID) type ZeNativeKernelUuid struct { - Id [ZE_MAX_NATIVE_KERNEL_UUID_SIZE]uint8 // Id [out] opaque data representing a native kernel UUID + Id [ZE_MAX_NATIVE_KERNEL_UUID_SIZE]uint8 // Id [out] opaque data representing a native kernel UUID } // ZeDeviceModuleFlags (ze_device_module_flags_t) Supported device module flags type ZeDeviceModuleFlags uint32 + const ( - ZE_DEVICE_MODULE_FLAG_FP16 ZeDeviceModuleFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_DEVICE_MODULE_FLAG_FP16 Device supports 16-bit floating-point operations - ZE_DEVICE_MODULE_FLAG_FP64 ZeDeviceModuleFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_DEVICE_MODULE_FLAG_FP64 Device supports 64-bit floating-point operations - ZE_DEVICE_MODULE_FLAG_INT64_ATOMICS ZeDeviceModuleFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_DEVICE_MODULE_FLAG_INT64_ATOMICS Device supports 64-bit atomic operations - ZE_DEVICE_MODULE_FLAG_DP4A ZeDeviceModuleFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_DEVICE_MODULE_FLAG_DP4A Device supports four component dot product and accumulate operations - ZE_DEVICE_MODULE_FLAG_FORCE_UINT32 ZeDeviceModuleFlags = 0x7fffffff // ZE_DEVICE_MODULE_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_MODULE_FLAG_* ENUMs + ZE_DEVICE_MODULE_FLAG_FP16 ZeDeviceModuleFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_MODULE_FLAG_FP16 Device supports 16-bit floating-point operations + ZE_DEVICE_MODULE_FLAG_FP64 ZeDeviceModuleFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_DEVICE_MODULE_FLAG_FP64 Device supports 64-bit floating-point operations + ZE_DEVICE_MODULE_FLAG_INT64_ATOMICS ZeDeviceModuleFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_DEVICE_MODULE_FLAG_INT64_ATOMICS Device supports 64-bit atomic operations + ZE_DEVICE_MODULE_FLAG_DP4A ZeDeviceModuleFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_DEVICE_MODULE_FLAG_DP4A Device supports four component dot product and accumulate operations + ZE_DEVICE_MODULE_FLAG_FORCE_UINT32 ZeDeviceModuleFlags = 0x7fffffff // ZE_DEVICE_MODULE_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_MODULE_FLAG_* ENUMs ) // ZeDeviceFpFlags (ze_device_fp_flags_t) Supported floating-Point capability flags type ZeDeviceFpFlags uint32 + const ( - ZE_DEVICE_FP_FLAG_DENORM ZeDeviceFpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_DEVICE_FP_FLAG_DENORM Supports denorms - ZE_DEVICE_FP_FLAG_INF_NAN ZeDeviceFpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_DEVICE_FP_FLAG_INF_NAN Supports INF and quiet NaNs - ZE_DEVICE_FP_FLAG_ROUND_TO_NEAREST ZeDeviceFpFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_DEVICE_FP_FLAG_ROUND_TO_NEAREST Supports rounding to nearest even rounding mode - ZE_DEVICE_FP_FLAG_ROUND_TO_ZERO ZeDeviceFpFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_DEVICE_FP_FLAG_ROUND_TO_ZERO Supports rounding to zero. - ZE_DEVICE_FP_FLAG_ROUND_TO_INF ZeDeviceFpFlags = /* ZE_BIT(4) */(( 1 << 4 )) // ZE_DEVICE_FP_FLAG_ROUND_TO_INF Supports rounding to both positive and negative INF. - ZE_DEVICE_FP_FLAG_FMA ZeDeviceFpFlags = /* ZE_BIT(5) */(( 1 << 5 )) // ZE_DEVICE_FP_FLAG_FMA Supports IEEE754-2008 fused multiply-add. - ZE_DEVICE_FP_FLAG_ROUNDED_DIVIDE_SQRT ZeDeviceFpFlags = /* ZE_BIT(6) */(( 1 << 6 )) // ZE_DEVICE_FP_FLAG_ROUNDED_DIVIDE_SQRT Supports rounding as defined by IEEE754 for divide and sqrt + ZE_DEVICE_FP_FLAG_DENORM ZeDeviceFpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_FP_FLAG_DENORM Supports denorms + ZE_DEVICE_FP_FLAG_INF_NAN ZeDeviceFpFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_DEVICE_FP_FLAG_INF_NAN Supports INF and quiet NaNs + ZE_DEVICE_FP_FLAG_ROUND_TO_NEAREST ZeDeviceFpFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_DEVICE_FP_FLAG_ROUND_TO_NEAREST Supports rounding to nearest even rounding mode + ZE_DEVICE_FP_FLAG_ROUND_TO_ZERO ZeDeviceFpFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_DEVICE_FP_FLAG_ROUND_TO_ZERO Supports rounding to zero. + ZE_DEVICE_FP_FLAG_ROUND_TO_INF ZeDeviceFpFlags = /* ZE_BIT(4) */ (1 << 4) // ZE_DEVICE_FP_FLAG_ROUND_TO_INF Supports rounding to both positive and negative INF. + ZE_DEVICE_FP_FLAG_FMA ZeDeviceFpFlags = /* ZE_BIT(5) */ (1 << 5) // ZE_DEVICE_FP_FLAG_FMA Supports IEEE754-2008 fused multiply-add. + ZE_DEVICE_FP_FLAG_ROUNDED_DIVIDE_SQRT ZeDeviceFpFlags = /* ZE_BIT(6) */ (1 << 6) // ZE_DEVICE_FP_FLAG_ROUNDED_DIVIDE_SQRT Supports rounding as defined by IEEE754 for divide and sqrt ///< operations. - ZE_DEVICE_FP_FLAG_SOFT_FLOAT ZeDeviceFpFlags = /* ZE_BIT(7) */(( 1 << 7 )) // ZE_DEVICE_FP_FLAG_SOFT_FLOAT Uses software implementation for basic floating-point operations. - ZE_DEVICE_FP_FLAG_FORCE_UINT32 ZeDeviceFpFlags = 0x7fffffff // ZE_DEVICE_FP_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_FP_FLAG_* ENUMs + ZE_DEVICE_FP_FLAG_SOFT_FLOAT ZeDeviceFpFlags = /* ZE_BIT(7) */ (1 << 7) // ZE_DEVICE_FP_FLAG_SOFT_FLOAT Uses software implementation for basic floating-point operations. + ZE_DEVICE_FP_FLAG_FORCE_UINT32 ZeDeviceFpFlags = 0x7fffffff // ZE_DEVICE_FP_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_FP_FLAG_* ENUMs ) // ZeDeviceModuleProperties (ze_device_module_properties_t) Device module properties queried using ::zeDeviceGetModuleProperties type ZeDeviceModuleProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Spirvversionsupported uint32 // Spirvversionsupported [out] Maximum supported SPIR-V version. Returns zero if SPIR-V is not supported. Contains major and minor attributes, use ::ZE_MAJOR_VERSION and ::ZE_MINOR_VERSION. - Flags ZeDeviceModuleFlags // Flags [out] 0 or a valid combination of ::ze_device_module_flag_t - Fp16flags ZeDeviceFpFlags // Fp16flags [out] Capabilities for half-precision floating-point operations. returns 0 (if ::ZE_DEVICE_MODULE_FLAG_FP16 is not set) or a combination of ::ze_device_fp_flag_t. - Fp32flags ZeDeviceFpFlags // Fp32flags [out] Capabilities for single-precision floating-point operations. returns a combination of ::ze_device_fp_flag_t. - Fp64flags ZeDeviceFpFlags // Fp64flags [out] Capabilities for double-precision floating-point operations. returns 0 (if ::ZE_DEVICE_MODULE_FLAG_FP64 is not set) or a combination of ::ze_device_fp_flag_t. - Maxargumentssize uint32 // Maxargumentssize [out] Maximum kernel argument size that is supported. - Printfbuffersize uint32 // Printfbuffersize [out] Maximum size of internal buffer that holds output of printf calls from kernel. - Nativekernelsupported ZeNativeKernelUuid // Nativekernelsupported [out] Compatibility UUID of supported native kernel. UUID may or may not be the same across driver release, devices, or operating systems. Application is responsible for ensuring UUID matches before creating module using previously created native kernel. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Spirvversionsupported uint32 // Spirvversionsupported [out] Maximum supported SPIR-V version. Returns zero if SPIR-V is not supported. Contains major and minor attributes, use ::ZE_MAJOR_VERSION and ::ZE_MINOR_VERSION. + Flags ZeDeviceModuleFlags // Flags [out] 0 or a valid combination of ::ze_device_module_flag_t + Fp16flags ZeDeviceFpFlags // Fp16flags [out] Capabilities for half-precision floating-point operations. returns 0 (if ::ZE_DEVICE_MODULE_FLAG_FP16 is not set) or a combination of ::ze_device_fp_flag_t. + Fp32flags ZeDeviceFpFlags // Fp32flags [out] Capabilities for single-precision floating-point operations. returns a combination of ::ze_device_fp_flag_t. + Fp64flags ZeDeviceFpFlags // Fp64flags [out] Capabilities for double-precision floating-point operations. returns 0 (if ::ZE_DEVICE_MODULE_FLAG_FP64 is not set) or a combination of ::ze_device_fp_flag_t. + Maxargumentssize uint32 // Maxargumentssize [out] Maximum kernel argument size that is supported. + Printfbuffersize uint32 // Printfbuffersize [out] Maximum size of internal buffer that holds output of printf calls from kernel. + Nativekernelsupported ZeNativeKernelUuid // Nativekernelsupported [out] Compatibility UUID of supported native kernel. UUID may or may not be the same across driver release, devices, or operating systems. Application is responsible for ensuring UUID matches before creating module using previously created native kernel. } // ZeDeviceGetModuleProperties Retrieves module properties of the device -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pModuleProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pModuleProperties` func ZeDeviceGetModuleProperties( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - pModuleProperties *ZeDeviceModuleProperties, // pModuleProperties [in,out] query result for module properties + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + pModuleProperties *ZeDeviceModuleProperties, // pModuleProperties [in,out] query result for module properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetModuleProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pModuleProperties))) } // ZeCommandQueueGroupPropertyFlags (ze_command_queue_group_property_flags_t) Supported command queue group property flags type ZeCommandQueueGroupPropertyFlags uint32 + const ( - ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE ZeCommandQueueGroupPropertyFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE Command queue group supports enqueing compute commands. - ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY ZeCommandQueueGroupPropertyFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY Command queue group supports enqueing copy commands. - ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS ZeCommandQueueGroupPropertyFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS Command queue group supports cooperative kernels. + ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE ZeCommandQueueGroupPropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE Command queue group supports enqueing compute commands. + ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY ZeCommandQueueGroupPropertyFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY Command queue group supports enqueing copy commands. + ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS ZeCommandQueueGroupPropertyFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS Command queue group supports cooperative kernels. ///< See ::zeCommandListAppendLaunchCooperativeKernel for more details. - ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS ZeCommandQueueGroupPropertyFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS Command queue groups supports metric queries. - ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_FORCE_UINT32 ZeCommandQueueGroupPropertyFlags = 0x7fffffff // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_* ENUMs + ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS ZeCommandQueueGroupPropertyFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS Command queue groups supports metric queries. + ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_FORCE_UINT32 ZeCommandQueueGroupPropertyFlags = 0x7fffffff // ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_* ENUMs ) // ZeCommandQueueGroupProperties (ze_command_queue_group_properties_t) Command queue group properties queried using -/// ::zeDeviceGetCommandQueueGroupProperties +// / ::zeDeviceGetCommandQueueGroupProperties type ZeCommandQueueGroupProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeCommandQueueGroupPropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_command_queue_group_property_flag_t - Maxmemoryfillpatternsize uintptr // Maxmemoryfillpatternsize [out] maximum `pattern_size` supported by command queue group. See ::zeCommandListAppendMemoryFill for more details. - Numqueues uint32 // Numqueues [out] the number of physical engines within the group. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeCommandQueueGroupPropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_command_queue_group_property_flag_t + Maxmemoryfillpatternsize uintptr // Maxmemoryfillpatternsize [out] maximum `pattern_size` supported by command queue group. See ::zeCommandListAppendMemoryFill for more details. + Numqueues uint32 // Numqueues [out] the number of physical engines within the group. } // ZeDeviceGetCommandQueueGroupProperties Retrieves command queue group properties of the device. -/// -/// @details -/// - Properties are reported for each physical command queue group -/// available on the device. -/// - Multiple calls to this function will return properties in the same -/// order. -/// - The order in which the properties are returned is defined by the -/// command queue group's ordinal. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **vkGetPhysicalDeviceQueueFamilyProperties** -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - Properties are reported for each physical command queue group +// / available on the device. +// / - Multiple calls to this function will return properties in the same +// / order. +// / - The order in which the properties are returned is defined by the +// / command queue group's ordinal. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **vkGetPhysicalDeviceQueueFamilyProperties** +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeDeviceGetCommandQueueGroupProperties( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - pCount *uint32, // pCount [in,out] pointer to the number of available command queue groups. If count is zero, then the driver shall update the value with the total number of command queue groups available. If count is less than the number of command queue groups available, then the driver shall only retrieve command queue group properties for the given number of command queue groups. If count is greater than or equal to the number of command queue groups available, then the driver shall retrieve command queue group properties for all available command queue groups. - pCommandQueueGroupProperties *ZeCommandQueueGroupProperties, // pCommandQueueGroupProperties [in,out][optional][range(0, *pCount)] array of query results for command queue group properties. If count is less than the number of command queue groups available, then the driver shall only retrieve that number of command queue group properties. The order of properties in the array corresponds to the command queue group ordinal. + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + pCount *uint32, // pCount [in,out] pointer to the number of available command queue groups. If count is zero, then the driver shall update the value with the total number of command queue groups available. If count is less than the number of command queue groups available, then the driver shall only retrieve command queue group properties for the given number of command queue groups. If count is greater than or equal to the number of command queue groups available, then the driver shall retrieve command queue group properties for all available command queue groups. + pCommandQueueGroupProperties *ZeCommandQueueGroupProperties, // pCommandQueueGroupProperties [in,out][optional][range(0, *pCount)] array of query results for command queue group properties. If count is less than the number of command queue groups available, then the driver shall only retrieve that number of command queue group properties. The order of properties in the array corresponds to the command queue group ordinal. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetCommandQueueGroupProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pCommandQueueGroupProperties))) } // ZeDeviceMemoryPropertyFlags (ze_device_memory_property_flags_t) Supported device memory property flags type ZeDeviceMemoryPropertyFlags uint32 + const ( - ZE_DEVICE_MEMORY_PROPERTY_FLAG_TBD ZeDeviceMemoryPropertyFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_DEVICE_MEMORY_PROPERTY_FLAG_TBD reserved for future use - ZE_DEVICE_MEMORY_PROPERTY_FLAG_FORCE_UINT32 ZeDeviceMemoryPropertyFlags = 0x7fffffff // ZE_DEVICE_MEMORY_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_MEMORY_PROPERTY_FLAG_* ENUMs + ZE_DEVICE_MEMORY_PROPERTY_FLAG_TBD ZeDeviceMemoryPropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_MEMORY_PROPERTY_FLAG_TBD reserved for future use + ZE_DEVICE_MEMORY_PROPERTY_FLAG_FORCE_UINT32 ZeDeviceMemoryPropertyFlags = 0x7fffffff // ZE_DEVICE_MEMORY_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_MEMORY_PROPERTY_FLAG_* ENUMs ) // ZeDeviceMemoryProperties (ze_device_memory_properties_t) Device local memory properties queried using -/// ::zeDeviceGetMemoryProperties +// / ::zeDeviceGetMemoryProperties type ZeDeviceMemoryProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeDeviceMemoryPropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_device_memory_property_flag_t - Maxclockrate uint32 // Maxclockrate [out] Maximum clock rate for device memory. - Maxbuswidth uint32 // Maxbuswidth [out] Maximum bus width between device and memory. - Totalsize uint64 // Totalsize [out] Total memory size in bytes that is available to the device. - Name [ZE_MAX_DEVICE_NAME]byte // Name [out] Memory name + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeDeviceMemoryPropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_device_memory_property_flag_t + Maxclockrate uint32 // Maxclockrate [out] Maximum clock rate for device memory. + Maxbuswidth uint32 // Maxbuswidth [out] Maximum bus width between device and memory. + Totalsize uint64 // Totalsize [out] Total memory size in bytes that is available to the device. + Name [ZE_MAX_DEVICE_NAME]byte // Name [out] Memory name } // ZeDeviceGetMemoryProperties Retrieves local memory properties of the device. -/// -/// @details -/// - Properties are reported for each physical memory type supported by the -/// device. -/// - Multiple calls to this function will return properties in the same -/// order. -/// - The order in which the properties are returned defines the device's -/// local memory ordinal. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clGetDeviceInfo -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - Properties are reported for each physical memory type supported by the +// / device. +// / - Multiple calls to this function will return properties in the same +// / order. +// / - The order in which the properties are returned defines the device's +// / local memory ordinal. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clGetDeviceInfo +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeDeviceGetMemoryProperties( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - pCount *uint32, // pCount [in,out] pointer to the number of memory properties. if count is zero, then the driver shall update the value with the total number of memory properties available. if count is greater than the number of memory properties available, then the driver shall update the value with the correct number of memory properties available. - pMemProperties *ZeDeviceMemoryProperties, // pMemProperties [in,out][optional][range(0, *pCount)] array of query results for memory properties. if count is less than the number of memory properties available, then driver shall only retrieve that number of memory properties. + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + pCount *uint32, // pCount [in,out] pointer to the number of memory properties. if count is zero, then the driver shall update the value with the total number of memory properties available. if count is greater than the number of memory properties available, then the driver shall update the value with the correct number of memory properties available. + pMemProperties *ZeDeviceMemoryProperties, // pMemProperties [in,out][optional][range(0, *pCount)] array of query results for memory properties. if count is less than the number of memory properties available, then driver shall only retrieve that number of memory properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetMemoryProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pMemProperties))) } // ZeMemoryAccessCapFlags (ze_memory_access_cap_flags_t) Memory access capability flags -/// -/// @details -/// - Supported access capabilities for different types of memory -/// allocations +// / +// / @details +// / - Supported access capabilities for different types of memory +// / allocations type ZeMemoryAccessCapFlags uint32 + const ( - ZE_MEMORY_ACCESS_CAP_FLAG_RW ZeMemoryAccessCapFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_MEMORY_ACCESS_CAP_FLAG_RW Supports load/store access - ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC ZeMemoryAccessCapFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC Supports atomic access - ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT ZeMemoryAccessCapFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT Supports concurrent access - ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC ZeMemoryAccessCapFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC Supports concurrent atomic access - ZE_MEMORY_ACCESS_CAP_FLAG_FORCE_UINT32 ZeMemoryAccessCapFlags = 0x7fffffff // ZE_MEMORY_ACCESS_CAP_FLAG_FORCE_UINT32 Value marking end of ZE_MEMORY_ACCESS_CAP_FLAG_* ENUMs + ZE_MEMORY_ACCESS_CAP_FLAG_RW ZeMemoryAccessCapFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_MEMORY_ACCESS_CAP_FLAG_RW Supports load/store access + ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC ZeMemoryAccessCapFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC Supports atomic access + ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT ZeMemoryAccessCapFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT Supports concurrent access + ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC ZeMemoryAccessCapFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC Supports concurrent atomic access + ZE_MEMORY_ACCESS_CAP_FLAG_FORCE_UINT32 ZeMemoryAccessCapFlags = 0x7fffffff // ZE_MEMORY_ACCESS_CAP_FLAG_FORCE_UINT32 Value marking end of ZE_MEMORY_ACCESS_CAP_FLAG_* ENUMs ) // ZeDeviceMemoryAccessProperties (ze_device_memory_access_properties_t) Device memory access properties queried using -/// ::zeDeviceGetMemoryAccessProperties +// / ::zeDeviceGetMemoryAccessProperties type ZeDeviceMemoryAccessProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Hostalloccapabilities ZeMemoryAccessCapFlags // Hostalloccapabilities [out] host memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. - Devicealloccapabilities ZeMemoryAccessCapFlags // Devicealloccapabilities [out] device memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. - Sharedsingledevicealloccapabilities ZeMemoryAccessCapFlags // Sharedsingledevicealloccapabilities [out] shared, single-device memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. - Sharedcrossdevicealloccapabilities ZeMemoryAccessCapFlags // Sharedcrossdevicealloccapabilities [out] shared, cross-device memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. - Sharedsystemalloccapabilities ZeMemoryAccessCapFlags // Sharedsystemalloccapabilities [out] shared, system memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Hostalloccapabilities ZeMemoryAccessCapFlags // Hostalloccapabilities [out] host memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. + Devicealloccapabilities ZeMemoryAccessCapFlags // Devicealloccapabilities [out] device memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. + Sharedsingledevicealloccapabilities ZeMemoryAccessCapFlags // Sharedsingledevicealloccapabilities [out] shared, single-device memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. + Sharedcrossdevicealloccapabilities ZeMemoryAccessCapFlags // Sharedcrossdevicealloccapabilities [out] shared, cross-device memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. + Sharedsystemalloccapabilities ZeMemoryAccessCapFlags // Sharedsystemalloccapabilities [out] shared, system memory capabilities. returns 0 (unsupported) or a combination of ::ze_memory_access_cap_flag_t. } // ZeDeviceGetMemoryAccessProperties Retrieves memory access properties of the device. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clGetDeviceInfo -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pMemAccessProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clGetDeviceInfo +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pMemAccessProperties` func ZeDeviceGetMemoryAccessProperties( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - pMemAccessProperties *ZeDeviceMemoryAccessProperties, // pMemAccessProperties [in,out] query result for memory access properties + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + pMemAccessProperties *ZeDeviceMemoryAccessProperties, // pMemAccessProperties [in,out] query result for memory access properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetMemoryAccessProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pMemAccessProperties))) } // ZeDeviceCachePropertyFlags (ze_device_cache_property_flags_t) Supported cache control property flags type ZeDeviceCachePropertyFlags uint32 + const ( - ZE_DEVICE_CACHE_PROPERTY_FLAG_USER_CONTROL ZeDeviceCachePropertyFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_DEVICE_CACHE_PROPERTY_FLAG_USER_CONTROL Device support User Cache Control (i.e. SLM section vs Generic Cache) - ZE_DEVICE_CACHE_PROPERTY_FLAG_FORCE_UINT32 ZeDeviceCachePropertyFlags = 0x7fffffff // ZE_DEVICE_CACHE_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_CACHE_PROPERTY_FLAG_* ENUMs + ZE_DEVICE_CACHE_PROPERTY_FLAG_USER_CONTROL ZeDeviceCachePropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_CACHE_PROPERTY_FLAG_USER_CONTROL Device support User Cache Control (i.e. SLM section vs Generic Cache) + ZE_DEVICE_CACHE_PROPERTY_FLAG_FORCE_UINT32 ZeDeviceCachePropertyFlags = 0x7fffffff // ZE_DEVICE_CACHE_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_CACHE_PROPERTY_FLAG_* ENUMs ) // ZeDeviceCacheProperties (ze_device_cache_properties_t) Device cache properties queried using ::zeDeviceGetCacheProperties type ZeDeviceCacheProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeDeviceCachePropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_device_cache_property_flag_t - Cachesize uintptr // Cachesize [out] Per-cache size, in bytes + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeDeviceCachePropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_device_cache_property_flag_t + Cachesize uintptr // Cachesize [out] Per-cache size, in bytes } // ZeDeviceGetCacheProperties Retrieves cache properties of the device -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clGetDeviceInfo -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clGetDeviceInfo +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeDeviceGetCacheProperties( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - pCount *uint32, // pCount [in,out] pointer to the number of cache properties. if count is zero, then the driver shall update the value with the total number of cache properties available. if count is greater than the number of cache properties available, then the driver shall update the value with the correct number of cache properties available. - pCacheProperties *ZeDeviceCacheProperties, // pCacheProperties [in,out][optional][range(0, *pCount)] array of query results for cache properties. if count is less than the number of cache properties available, then driver shall only retrieve that number of cache properties. + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + pCount *uint32, // pCount [in,out] pointer to the number of cache properties. if count is zero, then the driver shall update the value with the total number of cache properties available. if count is greater than the number of cache properties available, then the driver shall update the value with the correct number of cache properties available. + pCacheProperties *ZeDeviceCacheProperties, // pCacheProperties [in,out][optional][range(0, *pCount)] array of query results for cache properties. if count is less than the number of cache properties available, then driver shall only retrieve that number of cache properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetCacheProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pCacheProperties))) } // ZeDeviceImageProperties (ze_device_image_properties_t) Device image properties queried using ::zeDeviceGetImageProperties type ZeDeviceImageProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Maximagedims1d uint32 // Maximagedims1d [out] Maximum image dimensions for 1D resources. if 0, then 1D images are unsupported. - Maximagedims2d uint32 // Maximagedims2d [out] Maximum image dimensions for 2D resources. if 0, then 2D images are unsupported. - Maximagedims3d uint32 // Maximagedims3d [out] Maximum image dimensions for 3D resources. if 0, then 3D images are unsupported. - Maximagebuffersize uint64 // Maximagebuffersize [out] Maximum image buffer size in bytes. if 0, then buffer images are unsupported. - Maximagearrayslices uint32 // Maximagearrayslices [out] Maximum image array slices. if 0, then image arrays are unsupported. - Maxsamplers uint32 // Maxsamplers [out] Max samplers that can be used in kernel. if 0, then sampling is unsupported. - Maxreadimageargs uint32 // Maxreadimageargs [out] Returns the maximum number of simultaneous image objects that can be read from by a kernel. if 0, then reading images is unsupported. - Maxwriteimageargs uint32 // Maxwriteimageargs [out] Returns the maximum number of simultaneous image objects that can be written to by a kernel. if 0, then writing images is unsupported. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Maximagedims1d uint32 // Maximagedims1d [out] Maximum image dimensions for 1D resources. if 0, then 1D images are unsupported. + Maximagedims2d uint32 // Maximagedims2d [out] Maximum image dimensions for 2D resources. if 0, then 2D images are unsupported. + Maximagedims3d uint32 // Maximagedims3d [out] Maximum image dimensions for 3D resources. if 0, then 3D images are unsupported. + Maximagebuffersize uint64 // Maximagebuffersize [out] Maximum image buffer size in bytes. if 0, then buffer images are unsupported. + Maximagearrayslices uint32 // Maximagearrayslices [out] Maximum image array slices. if 0, then image arrays are unsupported. + Maxsamplers uint32 // Maxsamplers [out] Max samplers that can be used in kernel. if 0, then sampling is unsupported. + Maxreadimageargs uint32 // Maxreadimageargs [out] Returns the maximum number of simultaneous image objects that can be read from by a kernel. if 0, then reading images is unsupported. + Maxwriteimageargs uint32 // Maxwriteimageargs [out] Returns the maximum number of simultaneous image objects that can be written to by a kernel. if 0, then writing images is unsupported. } // ZeDeviceGetImageProperties Retrieves image properties of the device -/// -/// @details -/// - See ::zeImageGetProperties for format-specific capabilities. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pImageProperties` +// / +// / @details +// / - See ::zeImageGetProperties for format-specific capabilities. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pImageProperties` func ZeDeviceGetImageProperties( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - pImageProperties *ZeDeviceImageProperties, // pImageProperties [in,out] query result for image properties + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + pImageProperties *ZeDeviceImageProperties, // pImageProperties [in,out] query result for image properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetImageProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pImageProperties))) } // ZeDeviceExternalMemoryProperties (ze_device_external_memory_properties_t) Device external memory import and export properties type ZeDeviceExternalMemoryProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Memoryallocationimporttypes ZeExternalMemoryTypeFlags // Memoryallocationimporttypes [out] Supported external memory import types for memory allocations. - Memoryallocationexporttypes ZeExternalMemoryTypeFlags // Memoryallocationexporttypes [out] Supported external memory export types for memory allocations. - Imageimporttypes ZeExternalMemoryTypeFlags // Imageimporttypes [out] Supported external memory import types for images. - Imageexporttypes ZeExternalMemoryTypeFlags // Imageexporttypes [out] Supported external memory export types for images. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Memoryallocationimporttypes ZeExternalMemoryTypeFlags // Memoryallocationimporttypes [out] Supported external memory import types for memory allocations. + Memoryallocationexporttypes ZeExternalMemoryTypeFlags // Memoryallocationexporttypes [out] Supported external memory export types for memory allocations. + Imageimporttypes ZeExternalMemoryTypeFlags // Imageimporttypes [out] Supported external memory import types for images. + Imageexporttypes ZeExternalMemoryTypeFlags // Imageexporttypes [out] Supported external memory export types for images. } // ZeDeviceGetExternalMemoryProperties Retrieves external memory import and export of the device -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pExternalMemoryProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pExternalMemoryProperties` func ZeDeviceGetExternalMemoryProperties( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - pExternalMemoryProperties *ZeDeviceExternalMemoryProperties, // pExternalMemoryProperties [in,out] query result for external memory properties + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + pExternalMemoryProperties *ZeDeviceExternalMemoryProperties, // pExternalMemoryProperties [in,out] query result for external memory properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetExternalMemoryProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pExternalMemoryProperties))) } // ZeDeviceP2pPropertyFlags (ze_device_p2p_property_flags_t) Supported device peer-to-peer property flags type ZeDeviceP2pPropertyFlags uint32 + const ( - ZE_DEVICE_P2P_PROPERTY_FLAG_ACCESS ZeDeviceP2pPropertyFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_DEVICE_P2P_PROPERTY_FLAG_ACCESS Device supports access between peer devices. - ZE_DEVICE_P2P_PROPERTY_FLAG_ATOMICS ZeDeviceP2pPropertyFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_DEVICE_P2P_PROPERTY_FLAG_ATOMICS Device supports atomics between peer devices. - ZE_DEVICE_P2P_PROPERTY_FLAG_FORCE_UINT32 ZeDeviceP2pPropertyFlags = 0x7fffffff // ZE_DEVICE_P2P_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_P2P_PROPERTY_FLAG_* ENUMs + ZE_DEVICE_P2P_PROPERTY_FLAG_ACCESS ZeDeviceP2pPropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_P2P_PROPERTY_FLAG_ACCESS Device supports access between peer devices. + ZE_DEVICE_P2P_PROPERTY_FLAG_ATOMICS ZeDeviceP2pPropertyFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_DEVICE_P2P_PROPERTY_FLAG_ATOMICS Device supports atomics between peer devices. + ZE_DEVICE_P2P_PROPERTY_FLAG_FORCE_UINT32 ZeDeviceP2pPropertyFlags = 0x7fffffff // ZE_DEVICE_P2P_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_P2P_PROPERTY_FLAG_* ENUMs ) // ZeDeviceP2pProperties (ze_device_p2p_properties_t) Device peer-to-peer properties queried using -/// ::zeDeviceGetP2PProperties +// / ::zeDeviceGetP2PProperties type ZeDeviceP2pProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeDeviceP2pPropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_device_p2p_property_flag_t + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeDeviceP2pPropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_device_p2p_property_flag_t } // ZeDeviceGetP2PProperties Retrieves peer-to-peer properties between one device and a peer -/// devices -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// + `nullptr == hPeerDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pP2PProperties` +// / devices +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / + `nullptr == hPeerDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pP2PProperties` func ZeDeviceGetP2PProperties( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device performing the access - hPeerDevice ZeDeviceHandle, // hPeerDevice [in] handle of the peer device with the allocation - pP2PProperties *ZeDeviceP2pProperties, // pP2PProperties [in,out] Peer-to-Peer properties between source and peer device + hDevice ZeDeviceHandle, // hDevice [in] handle of the device performing the access + hPeerDevice ZeDeviceHandle, // hPeerDevice [in] handle of the peer device with the allocation + pP2PProperties *ZeDeviceP2pProperties, // pP2PProperties [in,out] Peer-to-Peer properties between source and peer device ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetP2PProperties", uintptr(hDevice), uintptr(hPeerDevice), uintptr(unsafe.Pointer(pP2PProperties))) } // ZeDeviceCanAccessPeer Queries if one device can directly access peer device allocations -/// -/// @details -/// - Any device can access any other device within a node through a -/// scale-up fabric. -/// - The following are conditions for CanAccessPeer query. -/// + If both device and peer device are the same then return true. -/// + If both sub-device and peer sub-device are the same then return -/// true. -/// + If both are sub-devices and share the same parent device then -/// return true. -/// + If both device and remote device are connected by a direct or -/// indirect scale-up fabric or over PCIe (same root complex or shared -/// PCIe switch) then true. -/// + If both sub-device and remote parent device (and vice-versa) are -/// connected by a direct or indirect scale-up fabric or over PCIe -/// (same root complex or shared PCIe switch) then true. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// + `nullptr == hPeerDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == value` +// / +// / @details +// / - Any device can access any other device within a node through a +// / scale-up fabric. +// / - The following are conditions for CanAccessPeer query. +// / + If both device and peer device are the same then return true. +// / + If both sub-device and peer sub-device are the same then return +// / true. +// / + If both are sub-devices and share the same parent device then +// / return true. +// / + If both device and remote device are connected by a direct or +// / indirect scale-up fabric or over PCIe (same root complex or shared +// / PCIe switch) then true. +// / + If both sub-device and remote parent device (and vice-versa) are +// / connected by a direct or indirect scale-up fabric or over PCIe +// / (same root complex or shared PCIe switch) then true. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / + `nullptr == hPeerDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == value` func ZeDeviceCanAccessPeer( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device performing the access - hPeerDevice ZeDeviceHandle, // hPeerDevice [in] handle of the peer device with the allocation - value *ZeBool, // value [out] returned access capability + hDevice ZeDeviceHandle, // hDevice [in] handle of the device performing the access + hPeerDevice ZeDeviceHandle, // hPeerDevice [in] handle of the peer device with the allocation + value *ZeBool, // value [out] returned access capability ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceCanAccessPeer", uintptr(hDevice), uintptr(hPeerDevice), uintptr(unsafe.Pointer(value))) } // ZeDeviceGetStatus Returns current status of the device. -/// -/// @details -/// - Once a device is reset, this call will update the OS handle attached -/// to the device handle. -/// - The application may call this function from simultaneous threads with -/// the same device handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_SUCCESS -/// + Device is available for use. -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// + Device is lost; must be reset for use. +// / +// / @details +// / - Once a device is reset, this call will update the OS handle attached +// / to the device handle. +// / - The application may call this function from simultaneous threads with +// / the same device handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_SUCCESS +// / + Device is available for use. +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / + Device is lost; must be reset for use. func ZeDeviceGetStatus( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device + hDevice ZeDeviceHandle, // hDevice [in] handle of the device ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetStatus", uintptr(hDevice)) } // ZeDeviceGetGlobalTimestamps Returns synchronized Host and device global timestamps. -/// -/// @details -/// - The application may call this function from simultaneous threads with -/// the same device handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == hostTimestamp` -/// + `nullptr == deviceTimestamp` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + The feature is not supported by the underlying platform. +// / +// / @details +// / - The application may call this function from simultaneous threads with +// / the same device handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == hostTimestamp` +// / + `nullptr == deviceTimestamp` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + The feature is not supported by the underlying platform. func ZeDeviceGetGlobalTimestamps( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - hostTimestamp *uint64, // hostTimestamp [out] value of the Host's global timestamp that correlates with the Device's global timestamp value. - deviceTimestamp *uint64, // deviceTimestamp [out] value of the Device's global timestamp that correlates with the Host's global timestamp value. + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + hostTimestamp *uint64, // hostTimestamp [out] value of the Host's global timestamp that correlates with the Device's global timestamp value. + deviceTimestamp *uint64, // deviceTimestamp [out] value of the Device's global timestamp that correlates with the Host's global timestamp value. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetGlobalTimestamps", uintptr(hDevice), uintptr(unsafe.Pointer(hostTimestamp)), uintptr(unsafe.Pointer(deviceTimestamp))) } // ZeDeviceSynchronize Synchronizes all command queues related to the device. -/// -/// @details -/// - The application may call this function from simultaneous threads with -/// the same device handle. -/// - The implementation of this function should be thread-safe. -/// - This function blocks until all preceding submissions to all queues on -/// the device are completed. -/// - This function returns an error if device execution fails. -/// - This function hangs indefinitely if the device is blocked on a -/// non-signaled event. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` +// / +// / @details +// / - The application may call this function from simultaneous threads with +// / the same device handle. +// / - The implementation of this function should be thread-safe. +// / - This function blocks until all preceding submissions to all queues on +// / the device are completed. +// / - This function returns an error if device execution fails. +// / - This function hangs indefinitely if the device is blocked on a +// / non-signaled event. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` func ZeDeviceSynchronize( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device + hDevice ZeDeviceHandle, // hDevice [in] handle of the device ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceSynchronize", uintptr(hDevice)) } // ZeDeviceEventPropertiesFlags (ze_device_event_properties_flags_t) Supported Event properties flags type ZeDeviceEventPropertiesFlags uint32 + const ( - ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE ZeDeviceEventPropertiesFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE Counter-based Event with external aggregate storage supported - ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_IPC ZeDeviceEventPropertiesFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_IPC Counter-based Event IPC sharing supported - ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION ZeDeviceEventPropertiesFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION Counter-based Event with external sync allocation supported - ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_INTERRUPT_WAIT ZeDeviceEventPropertiesFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_INTERRUPT_WAIT Counter-based Event waiting for external interrupt id supported - ZE_DEVICE_EVENT_PROPERTIES_FLAG_FORCE_UINT32 ZeDeviceEventPropertiesFlags = 0x7fffffff // ZE_DEVICE_EVENT_PROPERTIES_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_EVENT_PROPERTIES_FLAG_* ENUMs + ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE ZeDeviceEventPropertiesFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_AGGREGATE_STORAGE Counter-based Event with external aggregate storage supported + ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_IPC ZeDeviceEventPropertiesFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_IPC Counter-based Event IPC sharing supported + ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION ZeDeviceEventPropertiesFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_SYNC_ALLOCATION Counter-based Event with external sync allocation supported + ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_INTERRUPT_WAIT ZeDeviceEventPropertiesFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_DEVICE_EVENT_PROPERTIES_FLAG_COUNTER_BASED_EXTERNAL_INTERRUPT_WAIT Counter-based Event waiting for external interrupt id supported + ZE_DEVICE_EVENT_PROPERTIES_FLAG_FORCE_UINT32 ZeDeviceEventPropertiesFlags = 0x7fffffff // ZE_DEVICE_EVENT_PROPERTIES_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_EVENT_PROPERTIES_FLAG_* ENUMs ) // ZeDeviceEventProperties (ze_device_event_properties_t) Device Event properties struct. Can be passed as pNext to -/// ::ze_device_properties_t to obtain properties +// / ::ze_device_properties_t to obtain properties type ZeDeviceEventProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeDeviceEventPropertiesFlags // Flags [out] Supported Event properties. Valid combination of ::ze_device_event_properties_flag_t. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeDeviceEventPropertiesFlags // Flags [out] Supported Event properties. Valid combination of ::ze_device_event_properties_flag_t. } // ZeDeviceGetAggregatedCopyOffloadIncrementValue Returns unified increment value that can be used for Counter Based -/// Events created with -/// ::ze_event_counter_based_external_aggregate_storage_desc_t -/// -/// @details -/// - Value is applicable only to this specific device -/// - It may be used, when user is not able define number of internal driver -/// operations during given append call, for example dividing copy into -/// multiple engines. More details can be found in programming guide. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == incrementValue` +// / Events created with +// / ::ze_event_counter_based_external_aggregate_storage_desc_t +// / +// / @details +// / - Value is applicable only to this specific device +// / - It may be used, when user is not able define number of internal driver +// / operations during given append call, for example dividing copy into +// / multiple engines. More details can be found in programming guide. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == incrementValue` func ZeDeviceGetAggregatedCopyOffloadIncrementValue( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - incrementValue *uint32, // incrementValue [out] increment value that can be used for Event creation + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + incrementValue *uint32, // incrementValue [out] increment value that can be used for Event creation ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetAggregatedCopyOffloadIncrementValue", uintptr(hDevice), uintptr(unsafe.Pointer(incrementValue))) } - diff --git a/core_deviceLUID.go b/core_deviceLUID.go index 923e3f6..1f54a1f 100644 --- a/core_deviceLUID.go +++ b/core_deviceLUID.go @@ -22,10 +22,11 @@ const ZE_DEVICE_LUID_EXT_NAME = "ZE_extension_device_luid" // ZeDeviceLuidExtVersion (ze_device_luid_ext_version_t) Device Local Identifier (LUID) Extension Version(s) type ZeDeviceLuidExtVersion uintptr + const ( - ZE_DEVICE_LUID_EXT_VERSION_1_0 ZeDeviceLuidExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_LUID_EXT_VERSION_1_0 version 1.0 - ZE_DEVICE_LUID_EXT_VERSION_CURRENT ZeDeviceLuidExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_LUID_EXT_VERSION_CURRENT latest known version - ZE_DEVICE_LUID_EXT_VERSION_FORCE_UINT32 ZeDeviceLuidExtVersion = 0x7fffffff // ZE_DEVICE_LUID_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_LUID_EXT_VERSION_* ENUMs + ZE_DEVICE_LUID_EXT_VERSION_1_0 ZeDeviceLuidExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_LUID_EXT_VERSION_1_0 version 1.0 + ZE_DEVICE_LUID_EXT_VERSION_CURRENT ZeDeviceLuidExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_LUID_EXT_VERSION_CURRENT latest known version + ZE_DEVICE_LUID_EXT_VERSION_FORCE_UINT32 ZeDeviceLuidExtVersion = 0x7fffffff // ZE_DEVICE_LUID_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_LUID_EXT_VERSION_* ENUMs ) @@ -34,20 +35,19 @@ const ZE_MAX_DEVICE_LUID_SIZE_EXT = 8 // ZeDeviceLuidExt (ze_device_luid_ext_t) Device local identifier (LUID) type ZeDeviceLuidExt struct { - Id [ZE_MAX_DEVICE_LUID_SIZE_EXT]uint8 // Id [out] opaque data representing a device LUID + Id [ZE_MAX_DEVICE_LUID_SIZE_EXT]uint8 // Id [out] opaque data representing a device LUID } // ZeDeviceLuidExtProperties (ze_device_luid_ext_properties_t) Device LUID properties queried using ::zeDeviceGetProperties -/// -/// @details -/// - This structure may be returned from ::zeDeviceGetProperties, via the -/// `pNext` member of ::ze_device_properties_t. +// / +// / @details +// / - This structure may be returned from ::zeDeviceGetProperties, via the +// / `pNext` member of ::ze_device_properties_t. type ZeDeviceLuidExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Luid ZeDeviceLuidExt // Luid [out] locally unique identifier (LUID). The returned LUID can be cast to a LUID object and must be equal to the locally unique identifier of an IDXGIAdapter1 object that corresponds to the device. - Nodemask uint32 // Nodemask [out] node mask. The returned node mask must contain exactly one bit. If the device is running on an operating system that supports the Direct3D 12 API and the device corresponds to an individual device in a linked device adapter, the returned node mask identifies the Direct3D 12 node corresponding to the device. Otherwise, the returned node mask must be 1. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Luid ZeDeviceLuidExt // Luid [out] locally unique identifier (LUID). The returned LUID can be cast to a LUID object and must be equal to the locally unique identifier of an IDXGIAdapter1 object that corresponds to the device. + Nodemask uint32 // Nodemask [out] node mask. The returned node mask must contain exactly one bit. If the device is running on an operating system that supports the Direct3D 12 API and the device corresponds to an individual device in a linked device adapter, the returned node mask identifies the Direct3D 12 node corresponding to the device. Otherwise, the returned node mask must be 1. } - diff --git a/core_deviceVectorSizes.go b/core_deviceVectorSizes.go index 77507d4..5900c9d 100644 --- a/core_deviceVectorSizes.go +++ b/core_deviceVectorSizes.go @@ -24,73 +24,73 @@ const ZE_DEVICE_VECTOR_SIZES_EXT_NAME = "ZE_extension_device_vector_sizes" // ZeDeviceVectorSizesExtVersion (ze_device_vector_sizes_ext_version_t) Device Vector Sizes Query Extension Version(s) type ZeDeviceVectorSizesExtVersion uintptr + const ( - ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_1_0 ZeDeviceVectorSizesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_1_0 version 1.0 - ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_CURRENT ZeDeviceVectorSizesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_CURRENT latest known version - ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_FORCE_UINT32 ZeDeviceVectorSizesExtVersion = 0x7fffffff // ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_* ENUMs + ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_1_0 ZeDeviceVectorSizesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_1_0 version 1.0 + ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_CURRENT ZeDeviceVectorSizesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_CURRENT latest known version + ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_FORCE_UINT32 ZeDeviceVectorSizesExtVersion = 0x7fffffff // ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_VECTOR_SIZES_EXT_VERSION_* ENUMs ) // ZeDeviceVectorWidthPropertiesExt (ze_device_vector_width_properties_ext_t) Device Vector Width Properties queried using -/// $DeviceGetVectorWidthPropertiesExt +// / $DeviceGetVectorWidthPropertiesExt type ZeDeviceVectorWidthPropertiesExt struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - VectorWidthSize uint32 // VectorWidthSize [out] The associated vector width size supported by the device. - PreferredVectorWidthChar uint32 // PreferredVectorWidthChar [out] The preferred vector width size for char type supported by the device. - PreferredVectorWidthShort uint32 // PreferredVectorWidthShort [out] The preferred vector width size for short type supported by the device. - PreferredVectorWidthInt uint32 // PreferredVectorWidthInt [out] The preferred vector width size for int type supported by the device. - PreferredVectorWidthLong uint32 // PreferredVectorWidthLong [out] The preferred vector width size for long type supported by the device. - PreferredVectorWidthFloat uint32 // PreferredVectorWidthFloat [out] The preferred vector width size for float type supported by the device. - PreferredVectorWidthDouble uint32 // PreferredVectorWidthDouble [out] The preferred vector width size for double type supported by the device. - PreferredVectorWidthHalf uint32 // PreferredVectorWidthHalf [out] The preferred vector width size for half type supported by the device. - NativeVectorWidthChar uint32 // NativeVectorWidthChar [out] The native vector width size for char type supported by the device. - NativeVectorWidthShort uint32 // NativeVectorWidthShort [out] The native vector width size for short type supported by the device. - NativeVectorWidthInt uint32 // NativeVectorWidthInt [out] The native vector width size for int type supported by the device. - NativeVectorWidthLong uint32 // NativeVectorWidthLong [out] The native vector width size for long type supported by the device. - NativeVectorWidthFloat uint32 // NativeVectorWidthFloat [out] The native vector width size for float type supported by the device. - NativeVectorWidthDouble uint32 // NativeVectorWidthDouble [out] The native vector width size for double type supported by the device. - NativeVectorWidthHalf uint32 // NativeVectorWidthHalf [out] The native vector width size for half type supported by the device. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + VectorWidthSize uint32 // VectorWidthSize [out] The associated vector width size supported by the device. + PreferredVectorWidthChar uint32 // PreferredVectorWidthChar [out] The preferred vector width size for char type supported by the device. + PreferredVectorWidthShort uint32 // PreferredVectorWidthShort [out] The preferred vector width size for short type supported by the device. + PreferredVectorWidthInt uint32 // PreferredVectorWidthInt [out] The preferred vector width size for int type supported by the device. + PreferredVectorWidthLong uint32 // PreferredVectorWidthLong [out] The preferred vector width size for long type supported by the device. + PreferredVectorWidthFloat uint32 // PreferredVectorWidthFloat [out] The preferred vector width size for float type supported by the device. + PreferredVectorWidthDouble uint32 // PreferredVectorWidthDouble [out] The preferred vector width size for double type supported by the device. + PreferredVectorWidthHalf uint32 // PreferredVectorWidthHalf [out] The preferred vector width size for half type supported by the device. + NativeVectorWidthChar uint32 // NativeVectorWidthChar [out] The native vector width size for char type supported by the device. + NativeVectorWidthShort uint32 // NativeVectorWidthShort [out] The native vector width size for short type supported by the device. + NativeVectorWidthInt uint32 // NativeVectorWidthInt [out] The native vector width size for int type supported by the device. + NativeVectorWidthLong uint32 // NativeVectorWidthLong [out] The native vector width size for long type supported by the device. + NativeVectorWidthFloat uint32 // NativeVectorWidthFloat [out] The native vector width size for float type supported by the device. + NativeVectorWidthDouble uint32 // NativeVectorWidthDouble [out] The native vector width size for double type supported by the device. + NativeVectorWidthHalf uint32 // NativeVectorWidthHalf [out] The native vector width size for half type supported by the device. } // ZeDeviceGetVectorWidthPropertiesExt Retrieves the vector width properties of the device. -/// -/// @details -/// - Properties are reported for each vector width supported by the device. -/// - Multiple calls to this function will return properties in the same -/// order. -/// - The number of vector width properties is reported thru the pCount -/// parameter which is updated by the driver given pCount == 0. -/// - The application may provide a buffer that is larger than the number of -/// properties, but the application must set pCount to the number of -/// properties to retrieve. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - Properties are reported for each vector width supported by the device. +// / - Multiple calls to this function will return properties in the same +// / order. +// / - The number of vector width properties is reported thru the pCount +// / parameter which is updated by the driver given pCount == 0. +// / - The application may provide a buffer that is larger than the number of +// / properties, but the application must set pCount to the number of +// / properties to retrieve. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeDeviceGetVectorWidthPropertiesExt( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - pCount *uint32, // pCount [in,out] pointer to the number of vector width properties. if count is zero, then the driver shall update the value with the total number of vector width properties available. if count is greater than the number of vector width properties available, then the driver shall update the value with the correct number of vector width properties available. - pVectorWidthProperties *ZeDeviceVectorWidthPropertiesExt, // pVectorWidthProperties [in,out][optional][range(0, *pCount)] array of vector width properties. if count is less than the number of properties available, then the driver will return only the number requested. + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + pCount *uint32, // pCount [in,out] pointer to the number of vector width properties. if count is zero, then the driver shall update the value with the total number of vector width properties available. if count is greater than the number of vector width properties available, then the driver shall update the value with the correct number of vector width properties available. + pVectorWidthProperties *ZeDeviceVectorWidthPropertiesExt, // pVectorWidthProperties [in,out][optional][range(0, *pCount)] array of vector width properties. if count is less than the number of properties available, then the driver will return only the number requested. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetVectorWidthPropertiesExt", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pVectorWidthProperties))) } - diff --git a/core_deviceipversion.go b/core_deviceipversion.go index bb11efd..6e9be3e 100644 --- a/core_deviceipversion.go +++ b/core_deviceipversion.go @@ -22,22 +22,22 @@ const ZE_DEVICE_IP_VERSION_EXT_NAME = "ZE_extension_device_ip_version" // ZeDeviceIpVersionVersion (ze_device_ip_version_version_t) Device IP Version Extension Version(s) type ZeDeviceIpVersionVersion uintptr + const ( - ZE_DEVICE_IP_VERSION_VERSION_1_0 ZeDeviceIpVersionVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_IP_VERSION_VERSION_1_0 version 1.0 - ZE_DEVICE_IP_VERSION_VERSION_CURRENT ZeDeviceIpVersionVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_IP_VERSION_VERSION_CURRENT latest known version - ZE_DEVICE_IP_VERSION_VERSION_FORCE_UINT32 ZeDeviceIpVersionVersion = 0x7fffffff // ZE_DEVICE_IP_VERSION_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_IP_VERSION_VERSION_* ENUMs + ZE_DEVICE_IP_VERSION_VERSION_1_0 ZeDeviceIpVersionVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_IP_VERSION_VERSION_1_0 version 1.0 + ZE_DEVICE_IP_VERSION_VERSION_CURRENT ZeDeviceIpVersionVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_IP_VERSION_VERSION_CURRENT latest known version + ZE_DEVICE_IP_VERSION_VERSION_FORCE_UINT32 ZeDeviceIpVersionVersion = 0x7fffffff // ZE_DEVICE_IP_VERSION_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_IP_VERSION_VERSION_* ENUMs ) // ZeDeviceIpVersionExt (ze_device_ip_version_ext_t) Device IP version queried using ::zeDeviceGetProperties -/// -/// @details -/// - This structure may be returned from ::zeDeviceGetProperties via the -/// `pNext` member of ::ze_device_properties_t +// / +// / @details +// / - This structure may be returned from ::zeDeviceGetProperties via the +// / `pNext` member of ::ze_device_properties_t type ZeDeviceIpVersionExt struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Ipversion uint32 // Ipversion [out] Device IP version. The meaning of the device IP version is implementation-defined, but newer devices should have a higher version than older devices. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Ipversion uint32 // Ipversion [out] Device IP version. The meaning of the device IP version is implementation-defined, but newer devices should have a higher version than older devices. } - diff --git a/core_deviceusablememproperties.go b/core_deviceusablememproperties.go index cb906d7..7016aa2 100644 --- a/core_deviceusablememproperties.go +++ b/core_deviceusablememproperties.go @@ -22,22 +22,22 @@ const ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_NAME = "ZE_extension_device_usable // ZeDeviceUsablememSizePropertiesExtVersion (ze_device_usablemem_size_properties_ext_version_t) Device Usable Mem Size Extension Version(s) type ZeDeviceUsablememSizePropertiesExtVersion uintptr + const ( - ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_1_0 ZeDeviceUsablememSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_1_0 version 1.0 - ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_CURRENT ZeDeviceUsablememSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_CURRENT latest known version - ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZeDeviceUsablememSizePropertiesExtVersion = 0x7fffffff // ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_* ENUMs + ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_1_0 ZeDeviceUsablememSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_1_0 version 1.0 + ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_CURRENT ZeDeviceUsablememSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_CURRENT latest known version + ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZeDeviceUsablememSizePropertiesExtVersion = 0x7fffffff // ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_USABLEMEM_SIZE_PROPERTIES_EXT_VERSION_* ENUMs ) // ZeDeviceUsablememSizeExtProperties (ze_device_usablemem_size_ext_properties_t) Memory access property to discover current status of usable memory -/// -/// @details -/// - This structure may be returned from ::zeDeviceGetProperties via the -/// `pNext` member of ::ze_device_properties_t +// / +// / @details +// / - This structure may be returned from ::zeDeviceGetProperties via the +// / `pNext` member of ::ze_device_properties_t type ZeDeviceUsablememSizeExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Currusablememsize uint64 // Currusablememsize [out] Returns the available usable memory at the device level. This is typically less than or equal to the available physical memory on the device. It important to note that usable memory size reported is transient in nature and cannot be used to reliably guarentee success of future allocations. The usable memory includes all the memory that the clients can allocate for their use and by L0 Core for its internal allocations. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Currusablememsize uint64 // Currusablememsize [out] Returns the available usable memory at the device level. This is typically less than or equal to the available physical memory on the device. It important to note that usable memory size reported is transient in nature and cannot be used to reliably guarentee success of future allocations. The usable memory includes all the memory that the clients can allocate for their use and by L0 Core for its internal allocations. } - diff --git a/core_driver.go b/core_driver.go index 6028d3b..ea635fc 100644 --- a/core_driver.go +++ b/core_driver.go @@ -21,247 +21,250 @@ import ( // ZeInitFlags (ze_init_flags_t) Supported initialization flags type ZeInitFlags uint32 + const ( - ZE_INIT_FLAG_GPU_ONLY ZeInitFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_INIT_FLAG_GPU_ONLY only initialize GPU drivers - ZE_INIT_FLAG_VPU_ONLY ZeInitFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_INIT_FLAG_VPU_ONLY only initialize VPU drivers - ZE_INIT_FLAG_FORCE_UINT32 ZeInitFlags = 0x7fffffff // ZE_INIT_FLAG_FORCE_UINT32 Value marking end of ZE_INIT_FLAG_* ENUMs + ZE_INIT_FLAG_GPU_ONLY ZeInitFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_INIT_FLAG_GPU_ONLY only initialize GPU drivers + ZE_INIT_FLAG_VPU_ONLY ZeInitFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_INIT_FLAG_VPU_ONLY only initialize VPU drivers + ZE_INIT_FLAG_FORCE_UINT32 ZeInitFlags = 0x7fffffff // ZE_INIT_FLAG_FORCE_UINT32 Value marking end of ZE_INIT_FLAG_* ENUMs ) // ZeInit Initialize the 'oneAPI' driver(s) -/// -/// @details -/// - @deprecated since 1.10. Please use zeInitDrivers() -/// - The application must call this function or zeInitDrivers before -/// calling any other function. -/// - If this function is not called then all other functions will return -/// ::ZE_RESULT_ERROR_UNINITIALIZED. -/// - Only one instance of each driver will be initialized per process. -/// - The application may call this function multiple times with different -/// flags or environment variables enabled. -/// - The application must call this function after forking new processes. -/// Each forked process must call this function. -/// - 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 driver(s) simultaneously. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3 < flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - @deprecated since 1.10. Please use zeInitDrivers() +// / - The application must call this function or zeInitDrivers before +// / calling any other function. +// / - If this function is not called then all other functions will return +// / ::ZE_RESULT_ERROR_UNINITIALIZED. +// / - Only one instance of each driver will be initialized per process. +// / - The application may call this function multiple times with different +// / flags or environment variables enabled. +// / - The application must call this function after forking new processes. +// / Each forked process must call this function. +// / - 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 driver(s) simultaneously. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x3 < flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeInit( - flags ZeInitFlags, // flags [in] initialization flags. must be 0 (default) or a combination of ::ze_init_flag_t. + flags ZeInitFlags, // flags [in] initialization flags. must be 0 (default) or a combination of ::ze_init_flag_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeInit", uintptr(flags)) } // ZeDriverGet Retrieves driver instances -/// -/// @details -/// - @deprecated since 1.10. Please use zeInitDrivers() -/// - Usage of zeInitDrivers and zeDriverGet is mutually exclusive and -/// should not be used together. Usage of them together will result in -/// undefined behavior. -/// - A driver represents a collection of physical devices. -/// - Multiple calls to this function will return identical driver handles, -/// in the same order. -/// - The application may pass nullptr for pDrivers when only querying the -/// number of drivers. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clGetPlatformIDs -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - @deprecated since 1.10. Please use zeInitDrivers() +// / - Usage of zeInitDrivers and zeDriverGet is mutually exclusive and +// / should not be used together. Usage of them together will result in +// / undefined behavior. +// / - A driver represents a collection of physical devices. +// / - Multiple calls to this function will return identical driver handles, +// / in the same order. +// / - The application may pass nullptr for pDrivers when only querying the +// / number of drivers. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clGetPlatformIDs +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeDriverGet( - pCount *uint32, // pCount [in,out] pointer to the number of driver instances. if count is zero, then the loader shall update the value with the total number of drivers available. if count is greater than the number of drivers available, then the loader shall update the value with the correct number of drivers available. - phDrivers *ZeDriverHandle, // phDrivers [in,out][optional][range(0, *pCount)] array of driver instance handles. if count is less than the number of drivers available, then the loader shall only retrieve that number of drivers. + pCount *uint32, // pCount [in,out] pointer to the number of driver instances. if count is zero, then the loader shall update the value with the total number of drivers available. if count is greater than the number of drivers available, then the loader shall update the value with the correct number of drivers available. + phDrivers *ZeDriverHandle, // phDrivers [in,out][optional][range(0, *pCount)] array of driver instance handles. if count is less than the number of drivers available, then the loader shall only retrieve that number of drivers. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDriverGet", uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phDrivers))) } // ZeInitDriverTypeFlags (ze_init_driver_type_flags_t) Supported driver initialization type flags -/// -/// @details -/// - Bit Field which details the driver types to be initialized and -/// returned to the user. -/// - Value Definition: -/// - 0, do not init or retrieve any drivers. -/// - ZE_INIT_DRIVER_TYPE_FLAG_GPU, GPU Drivers are Init and driver handles -/// retrieved. -/// - ZE_INIT_DRIVER_TYPE_FLAG_NPU, NPU Drivers are Init and driver handles -/// retrieved. -/// - ZE_INIT_DRIVER_TYPE_FLAG_GPU | ZE_INIT_DRIVER_TYPE_FLAG_NPU, NPU & GPU -/// Drivers are Init and driver handles retrieved. -/// - UINT32_MAX All Drivers of any type are Init and driver handles -/// retrieved. +// / +// / @details +// / - Bit Field which details the driver types to be initialized and +// / returned to the user. +// / - Value Definition: +// / - 0, do not init or retrieve any drivers. +// / - ZE_INIT_DRIVER_TYPE_FLAG_GPU, GPU Drivers are Init and driver handles +// / retrieved. +// / - ZE_INIT_DRIVER_TYPE_FLAG_NPU, NPU Drivers are Init and driver handles +// / retrieved. +// / - ZE_INIT_DRIVER_TYPE_FLAG_GPU | ZE_INIT_DRIVER_TYPE_FLAG_NPU, NPU & GPU +// / Drivers are Init and driver handles retrieved. +// / - UINT32_MAX All Drivers of any type are Init and driver handles +// / retrieved. type ZeInitDriverTypeFlags uint32 + const ( - ZE_INIT_DRIVER_TYPE_FLAG_GPU ZeInitDriverTypeFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_INIT_DRIVER_TYPE_FLAG_GPU initialize and retrieve GPU drivers - ZE_INIT_DRIVER_TYPE_FLAG_NPU ZeInitDriverTypeFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_INIT_DRIVER_TYPE_FLAG_NPU initialize and retrieve NPU drivers - ZE_INIT_DRIVER_TYPE_FLAG_FORCE_UINT32 ZeInitDriverTypeFlags = 0x7fffffff // ZE_INIT_DRIVER_TYPE_FLAG_FORCE_UINT32 Value marking end of ZE_INIT_DRIVER_TYPE_FLAG_* ENUMs + ZE_INIT_DRIVER_TYPE_FLAG_GPU ZeInitDriverTypeFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_INIT_DRIVER_TYPE_FLAG_GPU initialize and retrieve GPU drivers + ZE_INIT_DRIVER_TYPE_FLAG_NPU ZeInitDriverTypeFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_INIT_DRIVER_TYPE_FLAG_NPU initialize and retrieve NPU drivers + ZE_INIT_DRIVER_TYPE_FLAG_FORCE_UINT32 ZeInitDriverTypeFlags = 0x7fffffff // ZE_INIT_DRIVER_TYPE_FLAG_FORCE_UINT32 Value marking end of ZE_INIT_DRIVER_TYPE_FLAG_* ENUMs ) // ZeInitDriverTypeDesc (ze_init_driver_type_desc_t) Init Driver Type descriptor type ZeInitDriverTypeDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeInitDriverTypeFlags // Flags [in] driver type init flags. must be a valid combination of ::ze_init_driver_type_flag_t or UINT32_MAX; driver types are init and retrieved based on these init flags in zeInitDrivers(). + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeInitDriverTypeFlags // Flags [in] driver type init flags. must be a valid combination of ::ze_init_driver_type_flag_t or UINT32_MAX; driver types are init and retrieved based on these init flags in zeInitDrivers(). } // ZeInitDrivers Initialize the 'oneAPI' driver(s) based on the driver types requested -/// and retrieve the driver handles. -/// -/// @details -/// - The application must call this function or zeInit before calling any -/// other function. (zeInit is [Deprecated] and is replaced by -/// zeInitDrivers) -/// - Calls to zeInit[Deprecated] or InitDrivers will not alter the drivers -/// retrieved through either api. -/// - Drivers init through zeInit[Deprecated] or InitDrivers will not be -/// reInitialized once init in an application. The Loader will determine -/// if the already init driver needs to be delivered to the user through -/// the init type flags. -/// - Already init Drivers will not be uninitialized if the call to -/// InitDrivers does not include that driver's type. Those init drivers -/// which don't match the init flags will not have their driver handles -/// returned to the user in that InitDrivers call. -/// - If this function or zeInit[Deprecated] is not called, then all other -/// functions will return ::ZE_RESULT_ERROR_UNINITIALIZED. -/// - Only one instance of each driver will be initialized per process. -/// - A driver represents a collection of physical devices. -/// - Multiple calls to this function will return identical driver handles, -/// in the same order. -/// - The drivers returned to the caller will be based on the init types -/// which state the drivers to be included. -/// - The application may pass nullptr for pDrivers when only querying the -/// number of drivers. -/// - The application may call this function multiple times with different -/// flags or environment variables enabled. -/// - The application must call this function after forking new processes. -/// Each forked process must call this function. -/// - 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 driver(s) simultaneously. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` -/// + `nullptr == desc` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x0 == desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / and retrieve the driver handles. +// / +// / @details +// / - The application must call this function or zeInit before calling any +// / other function. (zeInit is [Deprecated] and is replaced by +// / zeInitDrivers) +// / - Calls to zeInit[Deprecated] or InitDrivers will not alter the drivers +// / retrieved through either api. +// / - Drivers init through zeInit[Deprecated] or InitDrivers will not be +// / reInitialized once init in an application. The Loader will determine +// / if the already init driver needs to be delivered to the user through +// / the init type flags. +// / - Already init Drivers will not be uninitialized if the call to +// / InitDrivers does not include that driver's type. Those init drivers +// / which don't match the init flags will not have their driver handles +// / returned to the user in that InitDrivers call. +// / - If this function or zeInit[Deprecated] is not called, then all other +// / functions will return ::ZE_RESULT_ERROR_UNINITIALIZED. +// / - Only one instance of each driver will be initialized per process. +// / - A driver represents a collection of physical devices. +// / - Multiple calls to this function will return identical driver handles, +// / in the same order. +// / - The drivers returned to the caller will be based on the init types +// / which state the drivers to be included. +// / - The application may pass nullptr for pDrivers when only querying the +// / number of drivers. +// / - The application may call this function multiple times with different +// / flags or environment variables enabled. +// / - The application must call this function after forking new processes. +// / Each forked process must call this function. +// / - 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 driver(s) simultaneously. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` +// / + `nullptr == desc` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x0 == desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeInitDrivers( - pCount *uint32, // pCount [in,out] pointer to the number of driver instances. if count is zero, then the loader shall update the value with the total number of drivers available. if count is greater than the number of drivers available, then the loader shall update the value with the correct number of drivers available. - phDrivers *ZeDriverHandle, // phDrivers [in,out][optional][range(0, *pCount)] array of driver instance handles. if count is less than the number of drivers available, then the loader shall only retrieve that number of drivers. - desc *ZeInitDriverTypeDesc, // desc [in] descriptor containing the driver type initialization details including ::ze_init_driver_type_flag_t combinations. + pCount *uint32, // pCount [in,out] pointer to the number of driver instances. if count is zero, then the loader shall update the value with the total number of drivers available. if count is greater than the number of drivers available, then the loader shall update the value with the correct number of drivers available. + phDrivers *ZeDriverHandle, // phDrivers [in,out][optional][range(0, *pCount)] array of driver instance handles. if count is less than the number of drivers available, then the loader shall only retrieve that number of drivers. + desc *ZeInitDriverTypeDesc, // desc [in] descriptor containing the driver type initialization details including ::ze_init_driver_type_flag_t combinations. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeInitDrivers", uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phDrivers)), uintptr(unsafe.Pointer(desc))) } // ZeApiVersion (ze_api_version_t) Supported API versions -/// -/// @details -/// - API versions contain major and minor attributes, use -/// ::ZE_MAJOR_VERSION and ::ZE_MINOR_VERSION +// / +// / @details +// / - API versions contain major and minor attributes, use +// / ::ZE_MAJOR_VERSION and ::ZE_MINOR_VERSION type ZeApiVersion uintptr + const ( - ZE_API_VERSION_1_0 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_API_VERSION_1_0 version 1.0 - ZE_API_VERSION_1_1 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 1 ) */((( 1 << 16 )|( 1 & 0x0000ffff))) // ZE_API_VERSION_1_1 version 1.1 - ZE_API_VERSION_1_2 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 2 ) */((( 1 << 16 )|( 2 & 0x0000ffff))) // ZE_API_VERSION_1_2 version 1.2 - ZE_API_VERSION_1_3 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 3 ) */((( 1 << 16 )|( 3 & 0x0000ffff))) // ZE_API_VERSION_1_3 version 1.3 - ZE_API_VERSION_1_4 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 4 ) */((( 1 << 16 )|( 4 & 0x0000ffff))) // ZE_API_VERSION_1_4 version 1.4 - ZE_API_VERSION_1_5 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 5 ) */((( 1 << 16 )|( 5 & 0x0000ffff))) // ZE_API_VERSION_1_5 version 1.5 - ZE_API_VERSION_1_6 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 6 ) */((( 1 << 16 )|( 6 & 0x0000ffff))) // ZE_API_VERSION_1_6 version 1.6 - ZE_API_VERSION_1_7 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 7 ) */((( 1 << 16 )|( 7 & 0x0000ffff))) // ZE_API_VERSION_1_7 version 1.7 - ZE_API_VERSION_1_8 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 8 ) */((( 1 << 16 )|( 8 & 0x0000ffff))) // ZE_API_VERSION_1_8 version 1.8 - ZE_API_VERSION_1_9 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 9 ) */((( 1 << 16 )|( 9 & 0x0000ffff))) // ZE_API_VERSION_1_9 version 1.9 - ZE_API_VERSION_1_10 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 10 ) */((( 1 << 16 )|( 10 & 0x0000ffff))) // ZE_API_VERSION_1_10 version 1.10 - ZE_API_VERSION_1_11 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 11 ) */((( 1 << 16 )|( 11 & 0x0000ffff))) // ZE_API_VERSION_1_11 version 1.11 - ZE_API_VERSION_1_12 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 12 ) */((( 1 << 16 )|( 12 & 0x0000ffff))) // ZE_API_VERSION_1_12 version 1.12 - ZE_API_VERSION_1_13 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 13 ) */((( 1 << 16 )|( 13 & 0x0000ffff))) // ZE_API_VERSION_1_13 version 1.13 - ZE_API_VERSION_1_14 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 14 ) */((( 1 << 16 )|( 14 & 0x0000ffff))) // ZE_API_VERSION_1_14 version 1.14 - ZE_API_VERSION_1_15 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 15 ) */((( 1 << 16 )|( 15 & 0x0000ffff))) // ZE_API_VERSION_1_15 version 1.15 - ZE_API_VERSION_CURRENT ZeApiVersion = /* ZE_MAKE_VERSION( 1, 15 ) */((( 1 << 16 )|( 15 & 0x0000ffff))) // ZE_API_VERSION_CURRENT latest known version - ZE_API_VERSION_FORCE_UINT32 ZeApiVersion = 0x7fffffff // ZE_API_VERSION_FORCE_UINT32 Value marking end of ZE_API_VERSION_* ENUMs + ZE_API_VERSION_1_0 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_API_VERSION_1_0 version 1.0 + ZE_API_VERSION_1_1 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 1 ) */ ((1 << 16) | (1 & 0x0000ffff)) // ZE_API_VERSION_1_1 version 1.1 + ZE_API_VERSION_1_2 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 2 ) */ ((1 << 16) | (2 & 0x0000ffff)) // ZE_API_VERSION_1_2 version 1.2 + ZE_API_VERSION_1_3 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 3 ) */ ((1 << 16) | (3 & 0x0000ffff)) // ZE_API_VERSION_1_3 version 1.3 + ZE_API_VERSION_1_4 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 4 ) */ ((1 << 16) | (4 & 0x0000ffff)) // ZE_API_VERSION_1_4 version 1.4 + ZE_API_VERSION_1_5 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 5 ) */ ((1 << 16) | (5 & 0x0000ffff)) // ZE_API_VERSION_1_5 version 1.5 + ZE_API_VERSION_1_6 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 6 ) */ ((1 << 16) | (6 & 0x0000ffff)) // ZE_API_VERSION_1_6 version 1.6 + ZE_API_VERSION_1_7 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 7 ) */ ((1 << 16) | (7 & 0x0000ffff)) // ZE_API_VERSION_1_7 version 1.7 + ZE_API_VERSION_1_8 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 8 ) */ ((1 << 16) | (8 & 0x0000ffff)) // ZE_API_VERSION_1_8 version 1.8 + ZE_API_VERSION_1_9 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 9 ) */ ((1 << 16) | (9 & 0x0000ffff)) // ZE_API_VERSION_1_9 version 1.9 + ZE_API_VERSION_1_10 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 10 ) */ ((1 << 16) | (10 & 0x0000ffff)) // ZE_API_VERSION_1_10 version 1.10 + ZE_API_VERSION_1_11 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 11 ) */ ((1 << 16) | (11 & 0x0000ffff)) // ZE_API_VERSION_1_11 version 1.11 + ZE_API_VERSION_1_12 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 12 ) */ ((1 << 16) | (12 & 0x0000ffff)) // ZE_API_VERSION_1_12 version 1.12 + ZE_API_VERSION_1_13 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 13 ) */ ((1 << 16) | (13 & 0x0000ffff)) // ZE_API_VERSION_1_13 version 1.13 + ZE_API_VERSION_1_14 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 14 ) */ ((1 << 16) | (14 & 0x0000ffff)) // ZE_API_VERSION_1_14 version 1.14 + ZE_API_VERSION_1_15 ZeApiVersion = /* ZE_MAKE_VERSION( 1, 15 ) */ ((1 << 16) | (15 & 0x0000ffff)) // ZE_API_VERSION_1_15 version 1.15 + ZE_API_VERSION_CURRENT ZeApiVersion = /* ZE_MAKE_VERSION( 1, 15 ) */ ((1 << 16) | (15 & 0x0000ffff)) // ZE_API_VERSION_CURRENT latest known version + ZE_API_VERSION_FORCE_UINT32 ZeApiVersion = 0x7fffffff // ZE_API_VERSION_FORCE_UINT32 Value marking end of ZE_API_VERSION_* ENUMs ) // ZE_API_VERSION_CURRENT_M Current API version as a macro -const ZE_API_VERSION_CURRENT_M = /* ZE_MAKE_VERSION( 1, 15 ) */((( 1 << 16 )|( 15 & 0x0000ffff))) +const ZE_API_VERSION_CURRENT_M = /* ZE_MAKE_VERSION( 1, 15 ) */ ((1 << 16) | (15 & 0x0000ffff)) // ZeDriverGetApiVersion Returns the API version supported by the specified driver -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == version` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == version` func ZeDriverGetApiVersion( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance - version *ZeApiVersion, // version [out] api version + hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance + version *ZeApiVersion, // version [out] api version ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDriverGetApiVersion", uintptr(hDriver), uintptr(unsafe.Pointer(version))) } @@ -271,104 +274,105 @@ const ZE_MAX_DRIVER_UUID_SIZE = 16 // ZeDriverUuid (ze_driver_uuid_t) Driver universal unique id (UUID) type ZeDriverUuid struct { - Id [ZE_MAX_DRIVER_UUID_SIZE]uint8 // Id [out] opaque data representing a driver UUID + Id [ZE_MAX_DRIVER_UUID_SIZE]uint8 // Id [out] opaque data representing a driver UUID } // ZeDriverProperties (ze_driver_properties_t) Driver properties queried using ::zeDriverGetProperties type ZeDriverProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Uuid ZeDriverUuid // Uuid [out] universal unique identifier. - Driverversion uint32 // Driverversion [out] driver version The driver version is a non-zero, monotonically increasing value where higher values always indicate a more recent version. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Uuid ZeDriverUuid // Uuid [out] universal unique identifier. + Driverversion uint32 // Driverversion [out] driver version The driver version is a non-zero, monotonically increasing value where higher values always indicate a more recent version. } // ZeDriverGetProperties Retrieves properties of the driver. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **clGetPlatformInfo** -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pDriverProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **clGetPlatformInfo** +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pDriverProperties` func ZeDriverGetProperties( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance - pDriverProperties *ZeDriverProperties, // pDriverProperties [in,out] query result for driver properties + hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance + pDriverProperties *ZeDriverProperties, // pDriverProperties [in,out] query result for driver properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDriverGetProperties", uintptr(hDriver), uintptr(unsafe.Pointer(pDriverProperties))) } // ZeIpcPropertyFlags (ze_ipc_property_flags_t) Supported IPC property flags type ZeIpcPropertyFlags uint32 + const ( - ZE_IPC_PROPERTY_FLAG_MEMORY ZeIpcPropertyFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_IPC_PROPERTY_FLAG_MEMORY Supports passing memory allocations between processes. See + ZE_IPC_PROPERTY_FLAG_MEMORY ZeIpcPropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_IPC_PROPERTY_FLAG_MEMORY Supports passing memory allocations between processes. See ///< ::zeMemGetIpcHandle. - ZE_IPC_PROPERTY_FLAG_EVENT_POOL ZeIpcPropertyFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_IPC_PROPERTY_FLAG_EVENT_POOL Supports passing event pools between processes. See + ZE_IPC_PROPERTY_FLAG_EVENT_POOL ZeIpcPropertyFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_IPC_PROPERTY_FLAG_EVENT_POOL Supports passing event pools between processes. See ///< ::zeEventPoolGetIpcHandle. - ZE_IPC_PROPERTY_FLAG_FORCE_UINT32 ZeIpcPropertyFlags = 0x7fffffff // ZE_IPC_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_IPC_PROPERTY_FLAG_* ENUMs + ZE_IPC_PROPERTY_FLAG_FORCE_UINT32 ZeIpcPropertyFlags = 0x7fffffff // ZE_IPC_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_IPC_PROPERTY_FLAG_* ENUMs ) // ZeDriverIpcProperties (ze_driver_ipc_properties_t) IPC properties queried using ::zeDriverGetIpcProperties type ZeDriverIpcProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeIpcPropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_ipc_property_flag_t + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeIpcPropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_ipc_property_flag_t } // ZeDriverGetIpcProperties Retrieves IPC attributes of the driver -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pIpcProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pIpcProperties` func ZeDriverGetIpcProperties( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance - pIpcProperties *ZeDriverIpcProperties, // pIpcProperties [in,out] query result for IPC properties + hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance + pIpcProperties *ZeDriverIpcProperties, // pIpcProperties [in,out] query result for IPC properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDriverGetIpcProperties", uintptr(hDriver), uintptr(unsafe.Pointer(pIpcProperties))) } @@ -378,136 +382,135 @@ const ZE_MAX_EXTENSION_NAME = 256 // ZeDriverExtensionProperties (ze_driver_extension_properties_t) Extension properties queried using ::zeDriverGetExtensionProperties type ZeDriverExtensionProperties struct { - Name [ZE_MAX_EXTENSION_NAME]byte // Name [out] extension name - Version uint32 // Version [out] extension version using ::ZE_MAKE_VERSION + Name [ZE_MAX_EXTENSION_NAME]byte // Name [out] extension name + Version uint32 // Version [out] extension version using ::ZE_MAKE_VERSION } // ZeDriverGetExtensionProperties Retrieves extension properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **vkEnumerateInstanceExtensionProperties** -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **vkEnumerateInstanceExtensionProperties** +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeDriverGetExtensionProperties( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance - pCount *uint32, // pCount [in,out] pointer to the number of extension properties. if count is zero, then the driver shall update the value with the total number of extension properties available. if count is greater than the number of extension properties available, then the driver shall update the value with the correct number of extension properties available. - pExtensionProperties *ZeDriverExtensionProperties, // pExtensionProperties [in,out][optional][range(0, *pCount)] array of query results for extension properties. if count is less than the number of extension properties available, then driver shall only retrieve that number of extension properties. + hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance + pCount *uint32, // pCount [in,out] pointer to the number of extension properties. if count is zero, then the driver shall update the value with the total number of extension properties available. if count is greater than the number of extension properties available, then the driver shall update the value with the correct number of extension properties available. + pExtensionProperties *ZeDriverExtensionProperties, // pExtensionProperties [in,out][optional][range(0, *pCount)] array of query results for extension properties. if count is less than the number of extension properties available, then driver shall only retrieve that number of extension properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDriverGetExtensionProperties", uintptr(hDriver), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pExtensionProperties))) } // ZeDriverGetExtensionFunctionAddress Retrieves function pointer for vendor-specific or experimental -/// extensions -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == name` -/// + `nullptr == ppFunctionAddress` +// / extensions +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == name` +// / + `nullptr == ppFunctionAddress` func ZeDriverGetExtensionFunctionAddress( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance - name *byte, // name [in] extension function name - ppFunctionAddress *unsafe.Pointer, // ppFunctionAddress [out] pointer to function pointer + hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance + name *byte, // name [in] extension function name + ppFunctionAddress *unsafe.Pointer, // ppFunctionAddress [out] pointer to function pointer ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDriverGetExtensionFunctionAddress", uintptr(hDriver), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(ppFunctionAddress))) } // ZeDriverGetLastErrorDescription Retrieves a string describing the last error code returned by the -/// driver in the current thread. -/// -/// @details -/// - String returned is thread local. -/// - String is only updated on calls returning an error, i.e., not on calls -/// returning ::ZE_RESULT_SUCCESS. -/// - String may be empty if driver considers error code is already explicit -/// enough to describe cause. -/// - Memory pointed to by ppString is owned by the driver. -/// - String returned is null-terminated. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ppString` +// / driver in the current thread. +// / +// / @details +// / - String returned is thread local. +// / - String is only updated on calls returning an error, i.e., not on calls +// / returning ::ZE_RESULT_SUCCESS. +// / - String may be empty if driver considers error code is already explicit +// / enough to describe cause. +// / - Memory pointed to by ppString is owned by the driver. +// / - String returned is null-terminated. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ppString` func ZeDriverGetLastErrorDescription( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance - ppString **byte, // ppString [in,out] pointer to a null-terminated array of characters describing cause of error. + hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance + ppString **byte, // ppString [in,out] pointer to a null-terminated array of characters describing cause of error. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDriverGetLastErrorDescription", uintptr(hDriver), uintptr(unsafe.Pointer(ppString))) } // ZeDriverGetDefaultContext Retrieves handle to default context from the driver. -/// -/// @details -/// - The implementation of this function should be lock-free. -/// - This returned context contains all the devices available in the -/// driver. -/// - This function does not return error code, to get info about failure -/// user may use ::zeDriverGetLastErrorDescription function. -/// - In case of failure, this function returns null. -/// - Details on the error can be retrieved using -/// ::zeDriverGetLastErrorDescription function. -/// -/// @returns -/// - handle of the default context -/// - nullptr +// / +// / @details +// / - The implementation of this function should be lock-free. +// / - This returned context contains all the devices available in the +// / driver. +// / - This function does not return error code, to get info about failure +// / user may use ::zeDriverGetLastErrorDescription function. +// / - In case of failure, this function returns null. +// / - Details on the error can be retrieved using +// / ::zeDriverGetLastErrorDescription function. +// / +// / @returns +// / - handle of the default context +// / - nullptr func ZeDriverGetDefaultContext( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance + hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance ) (ZeContextHandle, error) { return zecall.Call[ZeContextHandle]("zeDriverGetDefaultContext", uintptr(hDriver)) } - diff --git a/core_driverDDIHandles.go b/core_driverDDIHandles.go index 26a33bd..58632b6 100644 --- a/core_driverDDIHandles.go +++ b/core_driverDDIHandles.go @@ -22,31 +22,32 @@ const ZE_DRIVER_DDI_HANDLES_EXT_NAME = "ZE_extension_driver_ddi_handles" // ZeDriverDdiHandlesExtVersion (ze_driver_ddi_handles_ext_version_t) Driver Direct Device Interface (DDI) Handles Extension Version(s) type ZeDriverDdiHandlesExtVersion uintptr + const ( - ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_0 ZeDriverDdiHandlesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_0 version 1.0 - ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_1 ZeDriverDdiHandlesExtVersion = /* ZE_MAKE_VERSION( 1, 1 ) */((( 1 << 16 )|( 1 & 0x0000ffff))) // ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_1 version 1.1 - ZE_DRIVER_DDI_HANDLES_EXT_VERSION_CURRENT ZeDriverDdiHandlesExtVersion = /* ZE_MAKE_VERSION( 1, 1 ) */((( 1 << 16 )|( 1 & 0x0000ffff))) // ZE_DRIVER_DDI_HANDLES_EXT_VERSION_CURRENT latest known version - ZE_DRIVER_DDI_HANDLES_EXT_VERSION_FORCE_UINT32 ZeDriverDdiHandlesExtVersion = 0x7fffffff // ZE_DRIVER_DDI_HANDLES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DRIVER_DDI_HANDLES_EXT_VERSION_* ENUMs + ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_0 ZeDriverDdiHandlesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_0 version 1.0 + ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_1 ZeDriverDdiHandlesExtVersion = /* ZE_MAKE_VERSION( 1, 1 ) */ ((1 << 16) | (1 & 0x0000ffff)) // ZE_DRIVER_DDI_HANDLES_EXT_VERSION_1_1 version 1.1 + ZE_DRIVER_DDI_HANDLES_EXT_VERSION_CURRENT ZeDriverDdiHandlesExtVersion = /* ZE_MAKE_VERSION( 1, 1 ) */ ((1 << 16) | (1 & 0x0000ffff)) // ZE_DRIVER_DDI_HANDLES_EXT_VERSION_CURRENT latest known version + ZE_DRIVER_DDI_HANDLES_EXT_VERSION_FORCE_UINT32 ZeDriverDdiHandlesExtVersion = 0x7fffffff // ZE_DRIVER_DDI_HANDLES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DRIVER_DDI_HANDLES_EXT_VERSION_* ENUMs ) // ZeDriverDdiHandleExtFlags (ze_driver_ddi_handle_ext_flags_t) Driver Direct Device Interface (DDI) Handle Extension Flags type ZeDriverDdiHandleExtFlags uint32 + const ( - ZE_DRIVER_DDI_HANDLE_EXT_FLAG_DDI_HANDLE_EXT_SUPPORTED ZeDriverDdiHandleExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_DRIVER_DDI_HANDLE_EXT_FLAG_DDI_HANDLE_EXT_SUPPORTED Driver Supports DDI Handles Extension - ZE_DRIVER_DDI_HANDLE_EXT_FLAG_FORCE_UINT32 ZeDriverDdiHandleExtFlags = 0x7fffffff // ZE_DRIVER_DDI_HANDLE_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_DRIVER_DDI_HANDLE_EXT_FLAG_* ENUMs + ZE_DRIVER_DDI_HANDLE_EXT_FLAG_DDI_HANDLE_EXT_SUPPORTED ZeDriverDdiHandleExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DRIVER_DDI_HANDLE_EXT_FLAG_DDI_HANDLE_EXT_SUPPORTED Driver Supports DDI Handles Extension + ZE_DRIVER_DDI_HANDLE_EXT_FLAG_FORCE_UINT32 ZeDriverDdiHandleExtFlags = 0x7fffffff // ZE_DRIVER_DDI_HANDLE_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_DRIVER_DDI_HANDLE_EXT_FLAG_* ENUMs ) // ZeDriverDdiHandlesExtProperties (ze_driver_ddi_handles_ext_properties_t) Driver DDI Handles properties queried using ::zeDriverGetProperties -/// -/// @details -/// - This structure may be returned from ::zeDriverGetProperties, via the -/// `pNext` member of ::ze_driver_properties_t. +// / +// / @details +// / - This structure may be returned from ::zeDriverGetProperties, via the +// / `pNext` member of ::ze_driver_properties_t. type ZeDriverDdiHandlesExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeDriverDdiHandleExtFlags // Flags [out] 0 (none) or a valid combination of ::ze_driver_ddi_handle_ext_flags_t + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeDriverDdiHandleExtFlags // Flags [out] 0 (none) or a valid combination of ::ze_driver_ddi_handle_ext_flags_t } - diff --git a/core_event.go b/core_event.go index 7f446ee..ca9a617 100644 --- a/core_event.go +++ b/core_event.go @@ -21,140 +21,143 @@ import ( // ZeEventPoolFlags (ze_event_pool_flags_t) Supported event pool creation flags type ZeEventPoolFlags uint32 + const ( - ZE_EVENT_POOL_FLAG_HOST_VISIBLE ZeEventPoolFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_EVENT_POOL_FLAG_HOST_VISIBLE signals and waits are also visible to host - ZE_EVENT_POOL_FLAG_IPC ZeEventPoolFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_EVENT_POOL_FLAG_IPC signals and waits may be shared across processes - ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP ZeEventPoolFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP Indicates all events in pool will contain kernel timestamps - ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP ZeEventPoolFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP Indicates all events in pool will contain kernel timestamps + ZE_EVENT_POOL_FLAG_HOST_VISIBLE ZeEventPoolFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_EVENT_POOL_FLAG_HOST_VISIBLE signals and waits are also visible to host + ZE_EVENT_POOL_FLAG_IPC ZeEventPoolFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_EVENT_POOL_FLAG_IPC signals and waits may be shared across processes + ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP ZeEventPoolFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP Indicates all events in pool will contain kernel timestamps + ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP ZeEventPoolFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP Indicates all events in pool will contain kernel timestamps ///< synchronized to host time domain; cannot be combined with ///< ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP - ZE_EVENT_POOL_FLAG_FORCE_UINT32 ZeEventPoolFlags = 0x7fffffff // ZE_EVENT_POOL_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_POOL_FLAG_* ENUMs + ZE_EVENT_POOL_FLAG_FORCE_UINT32 ZeEventPoolFlags = 0x7fffffff // ZE_EVENT_POOL_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_POOL_FLAG_* ENUMs ) // ZeEventPoolDesc (ze_event_pool_desc_t) Event pool descriptor type ZeEventPoolDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeEventPoolFlags // Flags [in] creation flags. must be 0 (default) or a valid combination of ::ze_event_pool_flag_t; default behavior is signals and waits are visible to the entire device and peer devices. - Count uint32 // Count [in] number of events within the pool; must be greater than 0 + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeEventPoolFlags // Flags [in] creation flags. must be 0 (default) or a valid combination of ::ze_event_pool_flag_t; default behavior is signals and waits are visible to the entire device and peer devices. + Count uint32 // Count [in] number of events within the pool; must be greater than 0 } // ZeEventPoolCreate Creates a pool of events on the context. -/// -/// @details -/// - The application must only use events within the pool for the -/// device(s), or their sub-devices, which were provided during creation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phEventPool` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0xf < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `0 == desc->count` -/// + `(nullptr == phDevices) && (0 < numDevices)` +// / +// / @details +// / - The application must only use events within the pool for the +// / device(s), or their sub-devices, which were provided during creation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phEventPool` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0xf < desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `0 == desc->count` +// / + `(nullptr == phDevices) && (0 < numDevices)` func ZeEventPoolCreate( - hContext ZeContextHandle, // hContext [in] handle of the context object - desc *ZeEventPoolDesc, // desc [in] pointer to event pool descriptor - numDevices uint32, // numDevices [in][optional] number of device handles; must be 0 if `nullptr == phDevices` - phDevices *ZeDeviceHandle, // phDevices [in][optional][range(0, numDevices)] array of device handles which have visibility to the event pool. if nullptr, then event pool is visible to all devices supported by the driver instance. - phEventPool *ZeEventPoolHandle, // phEventPool [out] pointer handle of event pool object created + hContext ZeContextHandle, // hContext [in] handle of the context object + desc *ZeEventPoolDesc, // desc [in] pointer to event pool descriptor + numDevices uint32, // numDevices [in][optional] number of device handles; must be 0 if `nullptr == phDevices` + phDevices *ZeDeviceHandle, // phDevices [in][optional][range(0, numDevices)] array of device handles which have visibility to the event pool. if nullptr, then event pool is visible to all devices supported by the driver instance. + phEventPool *ZeEventPoolHandle, // phEventPool [out] pointer handle of event pool object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventPoolCreate", uintptr(hContext), uintptr(unsafe.Pointer(desc)), uintptr(numDevices), uintptr(unsafe.Pointer(phDevices)), uintptr(unsafe.Pointer(phEventPool))) } // ZeEventPoolDestroy Deletes an event pool object. -/// -/// @details -/// - The application must destroy all event handles created from the pool -/// before destroying the pool itself. -/// - The application must ensure the device is not currently referencing -/// the any event within the pool before it is deleted. -/// - The implementation of this function may immediately free all Host and -/// Device allocations associated with this event pool. -/// - The application must **not** call this function from simultaneous -/// threads with the same event pool handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEventPool` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must destroy all event handles created from the pool +// / before destroying the pool itself. +// / - The application must ensure the device is not currently referencing +// / the any event within the pool before it is deleted. +// / - The implementation of this function may immediately free all Host and +// / Device allocations associated with this event pool. +// / - The application must **not** call this function from simultaneous +// / threads with the same event pool handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEventPool` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeEventPoolDestroy( - hEventPool ZeEventPoolHandle, // hEventPool [in][release] handle of event pool object to destroy + hEventPool ZeEventPoolHandle, // hEventPool [in][release] handle of event pool object to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventPoolDestroy", uintptr(hEventPool)) } // ZeEventScopeFlags (ze_event_scope_flags_t) Supported event scope flags type ZeEventScopeFlags uint32 + const ( - ZE_EVENT_SCOPE_FLAG_SUBDEVICE ZeEventScopeFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_EVENT_SCOPE_FLAG_SUBDEVICE cache hierarchies are flushed or invalidated sufficient for local + ZE_EVENT_SCOPE_FLAG_SUBDEVICE ZeEventScopeFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_EVENT_SCOPE_FLAG_SUBDEVICE cache hierarchies are flushed or invalidated sufficient for local ///< sub-device access - ZE_EVENT_SCOPE_FLAG_DEVICE ZeEventScopeFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_EVENT_SCOPE_FLAG_DEVICE cache hierarchies are flushed or invalidated sufficient for global + ZE_EVENT_SCOPE_FLAG_DEVICE ZeEventScopeFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_EVENT_SCOPE_FLAG_DEVICE cache hierarchies are flushed or invalidated sufficient for global ///< device access and peer device access - ZE_EVENT_SCOPE_FLAG_HOST ZeEventScopeFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_EVENT_SCOPE_FLAG_HOST cache hierarchies are flushed or invalidated sufficient for device and + ZE_EVENT_SCOPE_FLAG_HOST ZeEventScopeFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_EVENT_SCOPE_FLAG_HOST cache hierarchies are flushed or invalidated sufficient for device and ///< host access - ZE_EVENT_SCOPE_FLAG_FORCE_UINT32 ZeEventScopeFlags = 0x7fffffff // ZE_EVENT_SCOPE_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_SCOPE_FLAG_* ENUMs + ZE_EVENT_SCOPE_FLAG_FORCE_UINT32 ZeEventScopeFlags = 0x7fffffff // ZE_EVENT_SCOPE_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_SCOPE_FLAG_* ENUMs ) // ZeEventCounterBasedFlags (ze_event_counter_based_flags_t) Supported flags for defining counter based event type ZeEventCounterBasedFlags uint32 + const ( - ZE_EVENT_COUNTER_BASED_FLAG_IMMEDIATE ZeEventCounterBasedFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_EVENT_COUNTER_BASED_FLAG_IMMEDIATE Counter-based event is used for immediate command lists (default) - ZE_EVENT_COUNTER_BASED_FLAG_NON_IMMEDIATE ZeEventCounterBasedFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_EVENT_COUNTER_BASED_FLAG_NON_IMMEDIATE Counter-based event is used for non-immediate command lists - ZE_EVENT_COUNTER_BASED_FLAG_HOST_VISIBLE ZeEventCounterBasedFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_EVENT_COUNTER_BASED_FLAG_HOST_VISIBLE Signals and waits are also visible to host - ZE_EVENT_COUNTER_BASED_FLAG_IPC ZeEventCounterBasedFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_EVENT_COUNTER_BASED_FLAG_IPC Event can be shared across processes for waiting - ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP ZeEventCounterBasedFlags = /* ZE_BIT(4) */(( 1 << 4 )) // ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP Event contains timestamps populated in the device time domain. + ZE_EVENT_COUNTER_BASED_FLAG_IMMEDIATE ZeEventCounterBasedFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_EVENT_COUNTER_BASED_FLAG_IMMEDIATE Counter-based event is used for immediate command lists (default) + ZE_EVENT_COUNTER_BASED_FLAG_NON_IMMEDIATE ZeEventCounterBasedFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_EVENT_COUNTER_BASED_FLAG_NON_IMMEDIATE Counter-based event is used for non-immediate command lists + ZE_EVENT_COUNTER_BASED_FLAG_HOST_VISIBLE ZeEventCounterBasedFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_EVENT_COUNTER_BASED_FLAG_HOST_VISIBLE Signals and waits are also visible to host + ZE_EVENT_COUNTER_BASED_FLAG_IPC ZeEventCounterBasedFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_EVENT_COUNTER_BASED_FLAG_IPC Event can be shared across processes for waiting + ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP ZeEventCounterBasedFlags = /* ZE_BIT(4) */ (1 << 4) // ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP Event contains timestamps populated in the device time domain. ///< Implementation of this can be vendor specific, but typically pulled ///< from timers on the offload device and not the host. ///< Cannot be combined with ::ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP - ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP ZeEventCounterBasedFlags = /* ZE_BIT(5) */(( 1 << 5 )) // ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP Indicates that event will contain timestamps converted to the host + ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP ZeEventCounterBasedFlags = /* ZE_BIT(5) */ (1 << 5) // ZE_EVENT_COUNTER_BASED_FLAG_HOST_TIMESTAMP Indicates that event will contain timestamps converted to the host ///< time domain ///< Cannot be combined with ::ZE_EVENT_COUNTER_BASED_FLAG_DEVICE_TIMESTAMP @@ -162,994 +165,994 @@ const ( ///< correlate timestamps from the host and device into a single timeline. ///< For host timestamps see ::zeDeviceGetGlobalTimestamps. - ZE_EVENT_COUNTER_BASED_FLAG_FORCE_UINT32 ZeEventCounterBasedFlags = 0x7fffffff // ZE_EVENT_COUNTER_BASED_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_COUNTER_BASED_FLAG_* ENUMs + ZE_EVENT_COUNTER_BASED_FLAG_FORCE_UINT32 ZeEventCounterBasedFlags = 0x7fffffff // ZE_EVENT_COUNTER_BASED_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_COUNTER_BASED_FLAG_* ENUMs ) // ZeEventSyncModeFlags (ze_event_sync_mode_flags_t) Supported event sync mode flags type ZeEventSyncModeFlags uint32 + const ( - ZE_EVENT_SYNC_MODE_FLAG_LOW_POWER_WAIT ZeEventSyncModeFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_EVENT_SYNC_MODE_FLAG_LOW_POWER_WAIT Low power host synchronization mode, for better CPU utilization - ZE_EVENT_SYNC_MODE_FLAG_SIGNAL_INTERRUPT ZeEventSyncModeFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_EVENT_SYNC_MODE_FLAG_SIGNAL_INTERRUPT Generate interrupt when Event is signalled on Device. It may be used + ZE_EVENT_SYNC_MODE_FLAG_LOW_POWER_WAIT ZeEventSyncModeFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_EVENT_SYNC_MODE_FLAG_LOW_POWER_WAIT Low power host synchronization mode, for better CPU utilization + ZE_EVENT_SYNC_MODE_FLAG_SIGNAL_INTERRUPT ZeEventSyncModeFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_EVENT_SYNC_MODE_FLAG_SIGNAL_INTERRUPT Generate interrupt when Event is signalled on Device. It may be used ///< to optimize low power CPU synchronization - ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT ZeEventSyncModeFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT Host synchronization APIs wait for external interrupt id. Can be used + ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT ZeEventSyncModeFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT Host synchronization APIs wait for external interrupt id. Can be used ///< only for Counter Based Events - ZE_EVENT_SYNC_MODE_FLAG_FORCE_UINT32 ZeEventSyncModeFlags = 0x7fffffff // ZE_EVENT_SYNC_MODE_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_SYNC_MODE_FLAG_* ENUMs + ZE_EVENT_SYNC_MODE_FLAG_FORCE_UINT32 ZeEventSyncModeFlags = 0x7fffffff // ZE_EVENT_SYNC_MODE_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_SYNC_MODE_FLAG_* ENUMs ) // ZeEventSyncModeDesc (ze_event_sync_mode_desc_t) Event sync mode descriptor type ZeEventSyncModeDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Syncmodeflags ZeEventSyncModeFlags // Syncmodeflags [in] valid combination of ::ze_event_sync_mode_flag_t - Externalinterruptid uint32 // Externalinterruptid [in] External interrupt id. Used only when ::ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT flag is set + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Syncmodeflags ZeEventSyncModeFlags // Syncmodeflags [in] valid combination of ::ze_event_sync_mode_flag_t + Externalinterruptid uint32 // Externalinterruptid [in] External interrupt id. Used only when ::ZE_EVENT_SYNC_MODE_FLAG_EXTERNAL_INTERRUPT_WAIT flag is set } // ZeEventDesc (ze_event_desc_t) Event descriptor type ZeEventDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Index uint32 // Index [in] index of the event within the pool; must be less than the count specified during pool creation - Signal ZeEventScopeFlags // Signal [in] defines the scope of relevant cache hierarchies to flush on a signal action before the event is triggered. must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; default behavior is synchronization within the command list only, no additional cache hierarchies are flushed. - Wait ZeEventScopeFlags // Wait [in] defines the scope of relevant cache hierarchies to invalidate on a wait action after the event is complete. must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; default behavior is synchronization within the command list only, no additional cache hierarchies are invalidated. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Index uint32 // Index [in] index of the event within the pool; must be less than the count specified during pool creation + Signal ZeEventScopeFlags // Signal [in] defines the scope of relevant cache hierarchies to flush on a signal action before the event is triggered. must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; default behavior is synchronization within the command list only, no additional cache hierarchies are flushed. + Wait ZeEventScopeFlags // Wait [in] defines the scope of relevant cache hierarchies to invalidate on a wait action after the event is complete. must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; default behavior is synchronization within the command list only, no additional cache hierarchies are invalidated. } // ZeEventCounterBasedDesc (ze_event_counter_based_desc_t) Counter Based Event descriptor type ZeEventCounterBasedDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeEventCounterBasedFlags // Flags [in] counter based event flags. Must be 0 (default) or a valid combination of ::ze_event_counter_based_flag_t - Signal ZeEventScopeFlags // Signal [in] defines the scope of relevant cache hierarchies to flush on a signal action before the event is triggered. must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; default behavior is synchronization within the command list only, no additional cache hierarchies are flushed. - Wait ZeEventScopeFlags // Wait [in] defines the scope of relevant cache hierarchies to invalidate on a wait action after the event is complete. must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; default behavior is synchronization within the command list only, no additional cache hierarchies are invalidated. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeEventCounterBasedFlags // Flags [in] counter based event flags. Must be 0 (default) or a valid combination of ::ze_event_counter_based_flag_t + Signal ZeEventScopeFlags // Signal [in] defines the scope of relevant cache hierarchies to flush on a signal action before the event is triggered. must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; default behavior is synchronization within the command list only, no additional cache hierarchies are flushed. + Wait ZeEventScopeFlags // Wait [in] defines the scope of relevant cache hierarchies to invalidate on a wait action after the event is complete. must be 0 (default) or a valid combination of ::ze_event_scope_flag_t; default behavior is synchronization within the command list only, no additional cache hierarchies are invalidated. } // ZeEventCounterBasedExternalSyncAllocationDesc (ze_event_counter_based_external_sync_allocation_desc_t) Counter Based Event external sync allocation descriptor. Passed as -/// pNext to ::ze_event_counter_based_desc_t +// / pNext to ::ze_event_counter_based_desc_t type ZeEventCounterBasedExternalSyncAllocationDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Deviceaddress *uint64 // Deviceaddress [in] device address for external synchronization allocation - Hostaddress *uint64 // Hostaddress [in] host address for external synchronization allocation - Completionvalue uint64 // Completionvalue [in] completion value for external synchronization allocation + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Deviceaddress *uint64 // Deviceaddress [in] device address for external synchronization allocation + Hostaddress *uint64 // Hostaddress [in] host address for external synchronization allocation + Completionvalue uint64 // Completionvalue [in] completion value for external synchronization allocation } // ZeEventCounterBasedExternalAggregateStorageDesc (ze_event_counter_based_external_aggregate_storage_desc_t) Counter Based Event external aggregate storage. Passed as pNext to -/// ::ze_event_counter_based_desc_t +// / ::ze_event_counter_based_desc_t type ZeEventCounterBasedExternalAggregateStorageDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Deviceaddress *uint64 // Deviceaddress [in] device address that would be updated with atomic_add upon signaling of this event, must be device USM memory - Incrementvalue uint64 // Incrementvalue [in] value which would by atomically added upon each completion - Completionvalue uint64 // Completionvalue [in] final completion value, when value under deviceAddress is equal or greater then this value then event is considered as completed + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Deviceaddress *uint64 // Deviceaddress [in] device address that would be updated with atomic_add upon signaling of this event, must be device USM memory + Incrementvalue uint64 // Incrementvalue [in] value which would by atomically added upon each completion + Completionvalue uint64 // Completionvalue [in] final completion value, when value under deviceAddress is equal or greater then this value then event is considered as completed } // ZeEventCreate Creates an event from the pool. -/// -/// @details -/// - An event is used to communicate fine-grain host-to-device, -/// device-to-host or device-to-device dependencies have completed. -/// - The application must ensure the location in the pool is not being used -/// by another event. -/// - The application must **not** call this function from simultaneous -/// threads with the same event pool handle. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **clCreateUserEvent** -/// - vkCreateEvent -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEventPool` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phEvent` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x7 < desc->signal` -/// + `0x7 < desc->wait` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - An event is used to communicate fine-grain host-to-device, +// / device-to-host or device-to-device dependencies have completed. +// / - The application must ensure the location in the pool is not being used +// / by another event. +// / - The application must **not** call this function from simultaneous +// / threads with the same event pool handle. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **clCreateUserEvent** +// / - vkCreateEvent +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEventPool` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phEvent` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x7 < desc->signal` +// / + `0x7 < desc->wait` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeEventCreate( - hEventPool ZeEventPoolHandle, // hEventPool [in] handle of the event pool - desc *ZeEventDesc, // desc [in] pointer to event descriptor - phEvent *ZeEventHandle, // phEvent [out] pointer to handle of event object created + hEventPool ZeEventPoolHandle, // hEventPool [in] handle of the event pool + desc *ZeEventDesc, // desc [in] pointer to event descriptor + phEvent *ZeEventHandle, // phEvent [out] pointer to handle of event object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventCreate", uintptr(hEventPool), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phEvent))) } // ZeEventCounterBasedCreate Creates Counter Based Event -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phEvent` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3f < desc->flags` -/// + `0x7 < desc->signal` -/// + `0x7 < desc->wait` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phEvent` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x3f < desc->flags` +// / + `0x7 < desc->signal` +// / + `0x7 < desc->wait` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT func ZeEventCounterBasedCreate( - hContext ZeContextHandle, // hContext [in] handle of the context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device object - desc *ZeEventCounterBasedDesc, // desc [in] pointer to counter based event descriptor - phEvent *ZeEventHandle, // phEvent [out] pointer to handle of event object created + hContext ZeContextHandle, // hContext [in] handle of the context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device object + desc *ZeEventCounterBasedDesc, // desc [in] pointer to counter based event descriptor + phEvent *ZeEventHandle, // phEvent [out] pointer to handle of event object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventCounterBasedCreate", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phEvent))) } // ZeEventDestroy Deletes an event object. -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the event before it is deleted. -/// - The implementation of this function may immediately free all Host and -/// Device allocations associated with this event. -/// - The application must **not** call this function from simultaneous -/// threads with the same event handle. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **clReleaseEvent** -/// - vkDestroyEvent -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the event before it is deleted. +// / - The implementation of this function may immediately free all Host and +// / Device allocations associated with this event. +// / - The application must **not** call this function from simultaneous +// / threads with the same event handle. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **clReleaseEvent** +// / - vkDestroyEvent +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeEventDestroy( - hEvent ZeEventHandle, // hEvent [in][release] handle of event object to destroy + hEvent ZeEventHandle, // hEvent [in][release] handle of event object to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventDestroy", uintptr(hEvent)) } // ZeEventPoolGetIpcHandle Gets an IPC event pool handle for the specified event handle that can -/// be shared with another process. -/// -/// @details -/// - Event pool must have been created with ::ZE_EVENT_POOL_FLAG_IPC. -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEventPool` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phIpc` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / be shared with another process. +// / +// / @details +// / - Event pool must have been created with ::ZE_EVENT_POOL_FLAG_IPC. +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEventPool` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phIpc` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT func ZeEventPoolGetIpcHandle( - hEventPool ZeEventPoolHandle, // hEventPool [in] handle of event pool object - phIpc *ZeIpcEventPoolHandle, // phIpc [out] Returned IPC event handle + hEventPool ZeEventPoolHandle, // hEventPool [in] handle of event pool object + phIpc *ZeIpcEventPoolHandle, // phIpc [out] Returned IPC event handle ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventPoolGetIpcHandle", uintptr(hEventPool), uintptr(unsafe.Pointer(phIpc))) } // ZeEventPoolPutIpcHandle Returns an IPC event pool handle to the driver -/// -/// @details -/// - This call must be used for IPC handles previously obtained with -/// ::zeEventPoolGetIpcHandle. -/// - Upon call, driver may release any underlying resources associated with -/// the IPC handle. -/// For instance, it may close the file descriptor contained in the IPC -/// handle, if such type of handle is being used by the driver. -/// - This call does not destroy the original event pool for which the IPC -/// handle was created. -/// - This function may **not** be called from simultaneous threads with the -/// same IPC handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` +// / +// / @details +// / - This call must be used for IPC handles previously obtained with +// / ::zeEventPoolGetIpcHandle. +// / - Upon call, driver may release any underlying resources associated with +// / the IPC handle. +// / For instance, it may close the file descriptor contained in the IPC +// / handle, if such type of handle is being used by the driver. +// / - This call does not destroy the original event pool for which the IPC +// / handle was created. +// / - This function may **not** be called from simultaneous threads with the +// / same IPC handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` func ZeEventPoolPutIpcHandle( - hContext ZeContextHandle, // hContext [in] handle of the context object associated with the IPC event pool handle - hIpc *ZeIpcEventPoolHandle, // hIpc [in] IPC event pool handle (gozel hack: converted to a hidden pointer from a struct value) + hContext ZeContextHandle, // hContext [in] handle of the context object associated with the IPC event pool handle + hIpc *ZeIpcEventPoolHandle, // hIpc [in] IPC event pool handle (gozel hack: converted to a hidden pointer from a struct value) ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventPoolPutIpcHandle", uintptr(hContext), uintptr(unsafe.Pointer(hIpc))) } // ZeEventPoolOpenIpcHandle Opens an IPC event pool handle to retrieve an event pool handle from -/// another process. -/// -/// @details -/// - Multiple calls to this function with the same IPC handle will return -/// unique event pool handles. -/// - The event handle in this process should not be freed with -/// ::zeEventPoolDestroy, but rather with ::zeEventPoolCloseIpcHandle. -/// - If the original event pool has been created for a device containing a -/// number of sub-devices, then the event pool -/// returned by this call may be used on a device containing the same -/// number of sub-devices, or on any of -/// those sub-devices. -/// - However, if the original event pool has been created for a sub-device, -/// then the event pool returned by this call -/// cannot be used on a device containing any number of sub-devices, and -/// must be used only in a sub-device. This ensures -/// functional correctness for any implementation or optimizations the -/// underlying Level Zero driver may do on -/// event pools and events. -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phEventPool` +// / another process. +// / +// / @details +// / - Multiple calls to this function with the same IPC handle will return +// / unique event pool handles. +// / - The event handle in this process should not be freed with +// / ::zeEventPoolDestroy, but rather with ::zeEventPoolCloseIpcHandle. +// / - If the original event pool has been created for a device containing a +// / number of sub-devices, then the event pool +// / returned by this call may be used on a device containing the same +// / number of sub-devices, or on any of +// / those sub-devices. +// / - However, if the original event pool has been created for a sub-device, +// / then the event pool returned by this call +// / cannot be used on a device containing any number of sub-devices, and +// / must be used only in a sub-device. This ensures +// / functional correctness for any implementation or optimizations the +// / underlying Level Zero driver may do on +// / event pools and events. +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phEventPool` func ZeEventPoolOpenIpcHandle( - hContext ZeContextHandle, // hContext [in] handle of the context object to associate with the IPC event pool handle - hIpc *ZeIpcEventPoolHandle, // hIpc [in] IPC event pool handle (gozel hack: converted to a hidden pointer from a struct value) - phEventPool *ZeEventPoolHandle, // phEventPool [out] pointer handle of event pool object created + hContext ZeContextHandle, // hContext [in] handle of the context object to associate with the IPC event pool handle + hIpc *ZeIpcEventPoolHandle, // hIpc [in] IPC event pool handle (gozel hack: converted to a hidden pointer from a struct value) + phEventPool *ZeEventPoolHandle, // phEventPool [out] pointer handle of event pool object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventPoolOpenIpcHandle", uintptr(hContext), uintptr(unsafe.Pointer(hIpc)), uintptr(unsafe.Pointer(phEventPool))) } // ZeEventPoolCloseIpcHandle Closes an IPC event handle in the current process. -/// -/// @details -/// - Closes an IPC event handle by destroying events that were opened in -/// this process using ::zeEventPoolOpenIpcHandle. -/// - The application must **not** call this function from simultaneous -/// threads with the same event pool handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEventPool` +// / +// / @details +// / - Closes an IPC event handle by destroying events that were opened in +// / this process using ::zeEventPoolOpenIpcHandle. +// / - The application must **not** call this function from simultaneous +// / threads with the same event pool handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEventPool` func ZeEventPoolCloseIpcHandle( - hEventPool ZeEventPoolHandle, // hEventPool [in][release] handle of event pool object + hEventPool ZeEventPoolHandle, // hEventPool [in][release] handle of event pool object ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventPoolCloseIpcHandle", uintptr(hEventPool)) } // ZeEventCounterBasedGetIpcHandle Gets an IPC counter based event handle that can be shared with another -/// process. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phIpc` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / process. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phIpc` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT func ZeEventCounterBasedGetIpcHandle( - hEvent ZeEventHandle, // hEvent [in] handle of event object - phIpc *ZeIpcEventCounterBasedHandle, // phIpc [out] Returned IPC event handle + hEvent ZeEventHandle, // hEvent [in] handle of event object + phIpc *ZeIpcEventCounterBasedHandle, // phIpc [out] Returned IPC event handle ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventCounterBasedGetIpcHandle", uintptr(hEvent), uintptr(unsafe.Pointer(phIpc))) } // ZeEventCounterBasedOpenIpcHandle Opens an IPC event handle to retrieve from another process. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phEvent` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phEvent` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT func ZeEventCounterBasedOpenIpcHandle( - hContext ZeContextHandle, // hContext [in] handle of the context object to associate with the IPC event handle - hIpc *ZeIpcEventCounterBasedHandle, // hIpc [in] IPC event handle (gozel hack: converted to a hidden pointer from a struct value) - phEvent *ZeEventHandle, // phEvent [out] pointer handle of event object created + hContext ZeContextHandle, // hContext [in] handle of the context object to associate with the IPC event handle + hIpc *ZeIpcEventCounterBasedHandle, // hIpc [in] IPC event handle (gozel hack: converted to a hidden pointer from a struct value) + phEvent *ZeEventHandle, // phEvent [out] pointer handle of event object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventCounterBasedOpenIpcHandle", uintptr(hContext), uintptr(unsafe.Pointer(hIpc)), uintptr(unsafe.Pointer(phEvent))) } // ZeEventCounterBasedCloseIpcHandle Closes an IPC event handle in the current process. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT func ZeEventCounterBasedCloseIpcHandle( - hEvent ZeEventHandle, // hEvent [in][release] handle of event object + hEvent ZeEventHandle, // hEvent [in][release] handle of event object ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventCounterBasedCloseIpcHandle", uintptr(hEvent)) } // ZeEventCounterBasedGetDeviceAddress Returns Counter Based Event completion value (counter) and its device -/// address -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == completionValue` -/// + `nullptr == deviceAddress` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / address +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == completionValue` +// / + `nullptr == deviceAddress` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT func ZeEventCounterBasedGetDeviceAddress( - hEvent ZeEventHandle, // hEvent [in] handle of event object - completionValue *uint64, // completionValue [in][out] completion value - deviceAddress *uint64, // deviceAddress [in][out] counter device address + hEvent ZeEventHandle, // hEvent [in] handle of event object + completionValue *uint64, // completionValue [in][out] completion value + deviceAddress *uint64, // deviceAddress [in][out] counter device address ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventCounterBasedGetDeviceAddress", uintptr(hEvent), uintptr(unsafe.Pointer(completionValue)), uintptr(unsafe.Pointer(deviceAddress))) } // ZeCommandListAppendSignalEvent Appends a signal of the event from the device into a command list. -/// -/// @details -/// - The application must ensure the events are accessible by the device on -/// which the command list was created. -/// - The duration of an event created from an event pool that was created -/// using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP or -/// ::ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flags is undefined. -/// However, for consistency and orthogonality the event will report -/// correctly as signaled when used by other event API functionality. -/// - The application must ensure the command list and events were created -/// on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **clSetUserEventStatus** -/// - vkCmdSetEvent -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / +// / @details +// / - The application must ensure the events are accessible by the device on +// / which the command list was created. +// / - The duration of an event created from an event pool that was created +// / using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP or +// / ::ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flags is undefined. +// / However, for consistency and orthogonality the event will report +// / correctly as signaled when used by other event API functionality. +// / - The application must ensure the command list and events were created +// / on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **clSetUserEventStatus** +// / - vkCmdSetEvent +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT func ZeCommandListAppendSignalEvent( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - hEvent ZeEventHandle, // hEvent [in] handle of the event + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + hEvent ZeEventHandle, // hEvent [in] handle of the event ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendSignalEvent", uintptr(hCommandList), uintptr(hEvent)) } // ZeCommandListAppendWaitOnEvents Appends wait on event(s) on the device into a command list. -/// -/// @details -/// - The application must ensure the events are accessible by the device on -/// which the command list was created. -/// - The application must ensure the command list and events were created -/// on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phEvents` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / +// / @details +// / - The application must ensure the events are accessible by the device on +// / which the command list was created. +// / - The application must ensure the command list and events were created +// / on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phEvents` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT func ZeCommandListAppendWaitOnEvents( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - numEvents uint32, // numEvents [in] number of events to wait on before continuing - phEvents *ZeEventHandle, // phEvents [in][range(0, numEvents)] handles of the events to wait on before continuing + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + numEvents uint32, // numEvents [in] number of events to wait on before continuing + phEvents *ZeEventHandle, // phEvents [in][range(0, numEvents)] handles of the events to wait on before continuing ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendWaitOnEvents", uintptr(hCommandList), uintptr(numEvents), uintptr(unsafe.Pointer(phEvents))) } // ZeEventHostSignal Signals a event from host. -/// -/// @details -/// - The duration of an event created from an event pool that was created -/// using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP or -/// ::ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flags is undefined. -/// However, for consistency and orthogonality the event will report -/// correctly as signaled when used by other event API functionality. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clSetUserEventStatus -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / +// / @details +// / - The duration of an event created from an event pool that was created +// / using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP or +// / ::ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flags is undefined. +// / However, for consistency and orthogonality the event will report +// / correctly as signaled when used by other event API functionality. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clSetUserEventStatus +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT func ZeEventHostSignal( - hEvent ZeEventHandle, // hEvent [in] handle of the event + hEvent ZeEventHandle, // hEvent [in] handle of the event ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventHostSignal", uintptr(hEvent)) } // ZeEventHostSynchronize The current host thread waits on an event to be signaled. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clWaitForEvents -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_NOT_READY -/// + timeout expired +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clWaitForEvents +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_NOT_READY +// / + timeout expired func ZeEventHostSynchronize( - hEvent ZeEventHandle, // hEvent [in] handle of the event - timeout uint64, // timeout [in] if non-zero, then indicates the maximum time (in nanoseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then operates exactly like ::zeEventQueryStatus; if `UINT64_MAX`, then function will not return until complete or device is lost. Due to external dependencies, timeout may be rounded to the closest value allowed by the accuracy of those dependencies. + hEvent ZeEventHandle, // hEvent [in] handle of the event + timeout uint64, // timeout [in] if non-zero, then indicates the maximum time (in nanoseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then operates exactly like ::zeEventQueryStatus; if `UINT64_MAX`, then function will not return until complete or device is lost. Due to external dependencies, timeout may be rounded to the closest value allowed by the accuracy of those dependencies. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventHostSynchronize", uintptr(hEvent), uintptr(timeout)) } // ZeEventQueryStatus Queries an event object's status on the host. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **clGetEventInfo** -/// - vkGetEventStatus -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_NOT_READY -/// + not signaled +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **clGetEventInfo** +// / - vkGetEventStatus +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_NOT_READY +// / + not signaled func ZeEventQueryStatus( - hEvent ZeEventHandle, // hEvent [in] handle of the event + hEvent ZeEventHandle, // hEvent [in] handle of the event ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventQueryStatus", uintptr(hEvent)) } // ZeCommandListAppendEventReset Appends a reset of an event back to not signaled state into a command -/// list. -/// -/// @details -/// - The application must ensure the events are accessible by the device on -/// which the command list was created. -/// - The application must ensure the command list and events were created -/// on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - vkResetEvent -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / list. +// / +// / @details +// / - The application must ensure the events are accessible by the device on +// / which the command list was created. +// / - The application must ensure the command list and events were created +// / on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - vkResetEvent +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT func ZeCommandListAppendEventReset( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - hEvent ZeEventHandle, // hEvent [in] handle of the event + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + hEvent ZeEventHandle, // hEvent [in] handle of the event ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendEventReset", uintptr(hCommandList), uintptr(hEvent)) } // ZeEventHostReset The current host thread resets an event back to not signaled state. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - vkResetEvent -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - vkResetEvent +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT func ZeEventHostReset( - hEvent ZeEventHandle, // hEvent [in] handle of the event + hEvent ZeEventHandle, // hEvent [in] handle of the event ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventHostReset", uintptr(hEvent)) } // ZeKernelTimestampData (ze_kernel_timestamp_data_t) Kernel timestamp clock data -/// -/// @details -/// - The timestamp frequency can be queried from the `timerResolution` -/// member of ::ze_device_properties_t. -/// - The number of valid bits in the timestamp value can be queried from -/// the `kernelTimestampValidBits` member of ::ze_device_properties_t. +// / +// / @details +// / - The timestamp frequency can be queried from the `timerResolution` +// / member of ::ze_device_properties_t. +// / - The number of valid bits in the timestamp value can be queried from +// / the `kernelTimestampValidBits` member of ::ze_device_properties_t. type ZeKernelTimestampData struct { - Kernelstart uint64 // Kernelstart [out] device clock at start of kernel execution - Kernelend uint64 // Kernelend [out] device clock at end of kernel execution + Kernelstart uint64 // Kernelstart [out] device clock at start of kernel execution + Kernelend uint64 // Kernelend [out] device clock at end of kernel execution } // ZeKernelTimestampResult (ze_kernel_timestamp_result_t) Kernel timestamp result type ZeKernelTimestampResult struct { - Global ZeKernelTimestampData // Global [out] wall-clock data - Context ZeKernelTimestampData // Context [out] context-active data; only includes clocks while device context was actively executing. + Global ZeKernelTimestampData // Global [out] wall-clock data + Context ZeKernelTimestampData // Context [out] context-active data; only includes clocks while device context was actively executing. } // ZeEventQueryKernelTimestamp Queries an event's timestamp value on the host. -/// -/// @details -/// - The application must ensure the event was created from an event pool -/// that was created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP or -/// ::ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flag. -/// - The destination memory will be unmodified if the event has not been -/// signaled. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == dstptr` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_NOT_READY -/// + not signaled +// / +// / @details +// / - The application must ensure the event was created from an event pool +// / that was created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP or +// / ::ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flag. +// / - The destination memory will be unmodified if the event has not been +// / signaled. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == dstptr` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_NOT_READY +// / + not signaled func ZeEventQueryKernelTimestamp( - hEvent ZeEventHandle, // hEvent [in] handle of the event - dstptr *ZeKernelTimestampResult, // dstptr [in,out] pointer to memory for where timestamp result will be written. + hEvent ZeEventHandle, // hEvent [in] handle of the event + dstptr *ZeKernelTimestampResult, // dstptr [in,out] pointer to memory for where timestamp result will be written. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventQueryKernelTimestamp", uintptr(hEvent), uintptr(unsafe.Pointer(dstptr))) } // ZeCommandListAppendQueryKernelTimestamps Appends a query of an events' timestamp value(s) into a command list. -/// -/// @details -/// - The application must ensure the events are accessible by the device on -/// which the command list was created. -/// - The application must ensure the events were created from an event pool -/// that was created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag. -/// - The application must ensure the memory pointed to by both dstptr and -/// pOffsets is accessible by the device on which the command list was -/// created. -/// - The value(s) written to the destination buffer are undefined if any -/// timestamp event has not been signaled. -/// - If pOffsets is nullptr, then multiple results will be appended -/// sequentially into memory in the same order as phEvents. -/// - The application must ensure the command list and events were created, -/// and the memory was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phEvents` -/// + `nullptr == dstptr` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the events are accessible by the device on +// / which the command list was created. +// / - The application must ensure the events were created from an event pool +// / that was created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag. +// / - The application must ensure the memory pointed to by both dstptr and +// / pOffsets is accessible by the device on which the command list was +// / created. +// / - The value(s) written to the destination buffer are undefined if any +// / timestamp event has not been signaled. +// / - If pOffsets is nullptr, then multiple results will be appended +// / sequentially into memory in the same order as phEvents. +// / - The application must ensure the command list and events were created, +// / and the memory was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phEvents` +// / + `nullptr == dstptr` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendQueryKernelTimestamps( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - numEvents uint32, // numEvents [in] the number of timestamp events to query - phEvents *ZeEventHandle, // phEvents [in][range(0, numEvents)] handles of timestamp events to query - dstptr unsafe.Pointer, // dstptr [in,out] pointer to memory where ::ze_kernel_timestamp_result_t will be written; must be size-aligned. - pOffsets *uintptr, // pOffsets [in][optional][range(0, numEvents)] offset, in bytes, to write results; address must be 4byte-aligned and offsets must be size-aligned. - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before executing query; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing query + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + numEvents uint32, // numEvents [in] the number of timestamp events to query + phEvents *ZeEventHandle, // phEvents [in][range(0, numEvents)] handles of timestamp events to query + dstptr unsafe.Pointer, // dstptr [in,out] pointer to memory where ::ze_kernel_timestamp_result_t will be written; must be size-aligned. + pOffsets *uintptr, // pOffsets [in][optional][range(0, numEvents)] offset, in bytes, to write results; address must be 4byte-aligned and offsets must be size-aligned. + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before executing query; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing query ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendQueryKernelTimestamps", uintptr(hCommandList), uintptr(numEvents), uintptr(unsafe.Pointer(phEvents)), uintptr(unsafe.Pointer(dstptr)), uintptr(unsafe.Pointer(pOffsets)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeEventGetEventPool Gets the handle of the event pool for the event. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phEventPool` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phEventPool` func ZeEventGetEventPool( - hEvent ZeEventHandle, // hEvent [in] handle of the event - phEventPool *ZeEventPoolHandle, // phEventPool [out] handle of the event pool for the event + hEvent ZeEventHandle, // hEvent [in] handle of the event + phEventPool *ZeEventPoolHandle, // phEventPool [out] handle of the event pool for the event ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventGetEventPool", uintptr(hEvent), uintptr(unsafe.Pointer(phEventPool))) } // ZeEventGetSignalScope Gets the signal event scope. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pSignalScope` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pSignalScope` func ZeEventGetSignalScope( - hEvent ZeEventHandle, // hEvent [in] handle of the event - pSignalScope *ZeEventScopeFlags, // pSignalScope [out] signal event scope. This is the scope of relevant cache hierarchies that are flushed on a signal action before the event is triggered. May be 0 or a valid combination of ::ze_event_scope_flag_t. + hEvent ZeEventHandle, // hEvent [in] handle of the event + pSignalScope *ZeEventScopeFlags, // pSignalScope [out] signal event scope. This is the scope of relevant cache hierarchies that are flushed on a signal action before the event is triggered. May be 0 or a valid combination of ::ze_event_scope_flag_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventGetSignalScope", uintptr(hEvent), uintptr(unsafe.Pointer(pSignalScope))) } // ZeEventGetWaitScope Gets the wait event scope. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pWaitScope` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pWaitScope` func ZeEventGetWaitScope( - hEvent ZeEventHandle, // hEvent [in] handle of the event - pWaitScope *ZeEventScopeFlags, // pWaitScope [out] wait event scope. This is the scope of relevant cache hierarchies invalidated on a wait action after the event is complete. May be 0 or a valid combination of ::ze_event_scope_flag_t. + hEvent ZeEventHandle, // hEvent [in] handle of the event + pWaitScope *ZeEventScopeFlags, // pWaitScope [out] wait event scope. This is the scope of relevant cache hierarchies invalidated on a wait action after the event is complete. May be 0 or a valid combination of ::ze_event_scope_flag_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventGetWaitScope", uintptr(hEvent), uintptr(unsafe.Pointer(pWaitScope))) } // ZeEventPoolGetContextHandle Gets the handle of the context on which the event pool was created. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEventPool` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phContext` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEventPool` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phContext` func ZeEventPoolGetContextHandle( - hEventPool ZeEventPoolHandle, // hEventPool [in] handle of the event pool - phContext *ZeContextHandle, // phContext [out] handle of the context on which the event pool was created + hEventPool ZeEventPoolHandle, // hEventPool [in] handle of the event pool + phContext *ZeContextHandle, // phContext [out] handle of the context on which the event pool was created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventPoolGetContextHandle", uintptr(hEventPool), uintptr(unsafe.Pointer(phContext))) } // ZeEventPoolGetFlags Gets the creation flags used to create the event pool. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEventPool` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pFlags` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEventPool` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pFlags` func ZeEventPoolGetFlags( - hEventPool ZeEventPoolHandle, // hEventPool [in] handle of the event pool - pFlags *ZeEventPoolFlags, // pFlags [out] creation flags used to create the event pool; may be 0 or a valid combination of ::ze_event_pool_flag_t + hEventPool ZeEventPoolHandle, // hEventPool [in] handle of the event pool + pFlags *ZeEventPoolFlags, // pFlags [out] creation flags used to create the event pool; may be 0 or a valid combination of ::ze_event_pool_flag_t ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventPoolGetFlags", uintptr(hEventPool), uintptr(unsafe.Pointer(pFlags))) } - diff --git a/core_eventQueryKernelTimestamps.go b/core_eventQueryKernelTimestamps.go index c38d03f..e9dcaa1 100644 --- a/core_eventQueryKernelTimestamps.go +++ b/core_eventQueryKernelTimestamps.go @@ -24,106 +24,107 @@ const ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME = "ZE_extension_event_query_kern // ZeEventQueryKernelTimestampsExtVersion (ze_event_query_kernel_timestamps_ext_version_t) Event Query Kernel Timestamps Extension Version(s) type ZeEventQueryKernelTimestampsExtVersion uintptr + const ( - ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_1_0 ZeEventQueryKernelTimestampsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_1_0 version 1.0 - ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_CURRENT ZeEventQueryKernelTimestampsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_CURRENT latest known version - ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_FORCE_UINT32 ZeEventQueryKernelTimestampsExtVersion = 0x7fffffff // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_* ENUMs + ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_1_0 ZeEventQueryKernelTimestampsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_1_0 version 1.0 + ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_CURRENT ZeEventQueryKernelTimestampsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_CURRENT latest known version + ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_FORCE_UINT32 ZeEventQueryKernelTimestampsExtVersion = 0x7fffffff // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_* ENUMs ) // ZeEventQueryKernelTimestampsExtFlags (ze_event_query_kernel_timestamps_ext_flags_t) Event query kernel timestamps flags type ZeEventQueryKernelTimestampsExtFlags uint32 + const ( - ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_KERNEL ZeEventQueryKernelTimestampsExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_KERNEL Kernel timestamp results - ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_SYNCHRONIZED ZeEventQueryKernelTimestampsExtFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_SYNCHRONIZED Device event timestamps synchronized to the host time domain - ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_FORCE_UINT32 ZeEventQueryKernelTimestampsExtFlags = 0x7fffffff // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_* ENUMs + ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_KERNEL ZeEventQueryKernelTimestampsExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_KERNEL Kernel timestamp results + ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_SYNCHRONIZED ZeEventQueryKernelTimestampsExtFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_SYNCHRONIZED Device event timestamps synchronized to the host time domain + ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_FORCE_UINT32 ZeEventQueryKernelTimestampsExtFlags = 0x7fffffff // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_* ENUMs ) // ZeEventQueryKernelTimestampsExtProperties (ze_event_query_kernel_timestamps_ext_properties_t) Event query kernel timestamps properties -/// -/// @details -/// - This structure may be returned from ::zeDeviceGetProperties, via the -/// `pNext` member of ::ze_device_properties_t. +// / +// / @details +// / - This structure may be returned from ::zeDeviceGetProperties, via the +// / `pNext` member of ::ze_device_properties_t. type ZeEventQueryKernelTimestampsExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeEventQueryKernelTimestampsExtFlags // Flags [out] 0 or some combination of ::ze_event_query_kernel_timestamps_ext_flag_t flags + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeEventQueryKernelTimestampsExtFlags // Flags [out] 0 or some combination of ::ze_event_query_kernel_timestamps_ext_flag_t flags } // ZeSynchronizedTimestampDataExt (ze_synchronized_timestamp_data_ext_t) Kernel timestamp clock data synchronized to the host time domain type ZeSynchronizedTimestampDataExt struct { - Kernelstart uint64 // Kernelstart [out] synchronized clock at start of kernel execution - Kernelend uint64 // Kernelend [out] synchronized clock at end of kernel execution + Kernelstart uint64 // Kernelstart [out] synchronized clock at start of kernel execution + Kernelend uint64 // Kernelend [out] synchronized clock at end of kernel execution } // ZeSynchronizedTimestampResultExt (ze_synchronized_timestamp_result_ext_t) Synchronized kernel timestamp result type ZeSynchronizedTimestampResultExt struct { - Global ZeSynchronizedTimestampDataExt // Global [out] wall-clock data - Context ZeSynchronizedTimestampDataExt // Context [out] context-active data; only includes clocks while device context was actively executing. + Global ZeSynchronizedTimestampDataExt // Global [out] wall-clock data + Context ZeSynchronizedTimestampDataExt // Context [out] context-active data; only includes clocks while device context was actively executing. } // ZeEventQueryKernelTimestampsResultsExtProperties (ze_event_query_kernel_timestamps_results_ext_properties_t) Event query kernel timestamps results properties type ZeEventQueryKernelTimestampsResultsExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Pkerneltimestampsbuffer *ZeKernelTimestampResult // Pkerneltimestampsbuffer [in,out][optional][range(0, *pCount)] pointer to destination buffer of kernel timestamp results - Psynchronizedtimestampsbuffer *ZeSynchronizedTimestampResultExt // Psynchronizedtimestampsbuffer [in,out][optional][range(0, *pCount)] pointer to destination buffer of synchronized timestamp results + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Pkerneltimestampsbuffer *ZeKernelTimestampResult // Pkerneltimestampsbuffer [in,out][optional][range(0, *pCount)] pointer to destination buffer of kernel timestamp results + Psynchronizedtimestampsbuffer *ZeSynchronizedTimestampResultExt // Psynchronizedtimestampsbuffer [in,out][optional][range(0, *pCount)] pointer to destination buffer of synchronized timestamp results } // ZeEventQueryKernelTimestampsExt Query an event's timestamp value on the host, with domain preference. -/// -/// @details -/// - For collecting *only* kernel timestamps, the application must ensure -/// the event was created from an event pool that was created using -/// ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag. -/// - For collecting synchronized timestamps, the application must ensure -/// the event was created from an event pool that was created using -/// ::ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flag. Kernel timestamps -/// are also available from this type of event pool, but there is a -/// performance cost. -/// - The destination memory will be unmodified if the event has not been -/// signaled. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// - The implementation must support -/// ::ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME extension. -/// - The implementation must return all timestamps for the specified event -/// and device pair. -/// - The implementation must return all timestamps for all sub-devices when -/// device handle is parent device. -/// - The implementation may return all timestamps for sub-devices when -/// device handle is sub-device or may return 0 for count. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - For collecting *only* kernel timestamps, the application must ensure +// / the event was created from an event pool that was created using +// / ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag. +// / - For collecting synchronized timestamps, the application must ensure +// / the event was created from an event pool that was created using +// / ::ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flag. Kernel timestamps +// / are also available from this type of event pool, but there is a +// / performance cost. +// / - The destination memory will be unmodified if the event has not been +// / signaled. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / - The implementation must support +// / ::ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME extension. +// / - The implementation must return all timestamps for the specified event +// / and device pair. +// / - The implementation must return all timestamps for all sub-devices when +// / device handle is parent device. +// / - The implementation may return all timestamps for sub-devices when +// / device handle is sub-device or may return 0 for count. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeEventQueryKernelTimestampsExt( - hEvent ZeEventHandle, // hEvent [in] handle of the event - hDevice ZeDeviceHandle, // hDevice [in] handle of the device to query - pCount *uint32, // pCount [in,out] pointer to the number of event packets available. - This value is implementation specific. - if `*pCount` is zero, then the driver shall update the value with the total number of event packets available. - if `*pCount` is greater than the number of event packets available, the driver shall update the value with the correct value. - Buffer(s) for query results must be sized by the application to accommodate a minimum of `*pCount` elements. - pResults *ZeEventQueryKernelTimestampsResultsExtProperties, // pResults [in,out][optional][range(0, *pCount)] pointer to event query properties structure(s). - This parameter may be null when `*pCount` is zero. - if `*pCount` is less than the number of event packets available, the driver may only update `*pCount` elements, starting at element zero. - if `*pCount` is greater than the number of event packets available, the driver may only update the valid elements. + hEvent ZeEventHandle, // hEvent [in] handle of the event + hDevice ZeDeviceHandle, // hDevice [in] handle of the device to query + pCount *uint32, // pCount [in,out] pointer to the number of event packets available. - This value is implementation specific. - if `*pCount` is zero, then the driver shall update the value with the total number of event packets available. - if `*pCount` is greater than the number of event packets available, the driver shall update the value with the correct value. - Buffer(s) for query results must be sized by the application to accommodate a minimum of `*pCount` elements. + pResults *ZeEventQueryKernelTimestampsResultsExtProperties, // pResults [in,out][optional][range(0, *pCount)] pointer to event query properties structure(s). - This parameter may be null when `*pCount` is zero. - if `*pCount` is less than the number of event packets available, the driver may only update `*pCount` elements, starting at element zero. - if `*pCount` is greater than the number of event packets available, the driver may only update the valid elements. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventQueryKernelTimestampsExt", uintptr(hEvent), uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pResults))) } - diff --git a/core_eventquerytimestamps.go b/core_eventquerytimestamps.go index c9610db..215335b 100644 --- a/core_eventquerytimestamps.go +++ b/core_eventquerytimestamps.go @@ -24,56 +24,56 @@ const ZE_EVENT_QUERY_TIMESTAMPS_EXP_NAME = "ZE_experimental_event_query_timestam // ZeEventQueryTimestampsExpVersion (ze_event_query_timestamps_exp_version_t) Event Query Timestamps Extension Version(s) type ZeEventQueryTimestampsExpVersion uintptr + const ( - ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_1_0 ZeEventQueryTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_1_0 version 1.0 - ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_CURRENT ZeEventQueryTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_CURRENT latest known version - ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 ZeEventQueryTimestampsExpVersion = 0x7fffffff // ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_* ENUMs + ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_1_0 ZeEventQueryTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_1_0 version 1.0 + ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_CURRENT ZeEventQueryTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_CURRENT latest known version + ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 ZeEventQueryTimestampsExpVersion = 0x7fffffff // ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_* ENUMs ) // ZeEventQueryTimestampsExp Query event timestamps for a device or sub-device. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_EVENT_QUERY_TIMESTAMPS_EXP_NAME -/// extension. -/// - The implementation must return all timestamps for the specified event -/// and device pair. -/// - The implementation must return all timestamps for all sub-devices when -/// device handle is parent device. -/// - The implementation may return all timestamps for sub-devices when -/// device handle is sub-device or may return 0 for count. -/// -/// @remarks -/// _Analogues_ -/// - None -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEvent` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / - The implementation must support ::ZE_EVENT_QUERY_TIMESTAMPS_EXP_NAME +// / extension. +// / - The implementation must return all timestamps for the specified event +// / and device pair. +// / - The implementation must return all timestamps for all sub-devices when +// / device handle is parent device. +// / - The implementation may return all timestamps for sub-devices when +// / device handle is sub-device or may return 0 for count. +// / +// / @remarks +// / _Analogues_ +// / - None +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEvent` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeEventQueryTimestampsExp( - hEvent ZeEventHandle, // hEvent [in] handle of the event - hDevice ZeDeviceHandle, // hDevice [in] handle of the device to query - pCount *uint32, // pCount [in,out] pointer to the number of timestamp results. if count is zero, then the driver shall update the value with the total number of timestamps available. if count is greater than the number of timestamps available, then the driver shall update the value with the correct number of timestamps available. - pTimestamps *ZeKernelTimestampResult, // pTimestamps [in,out][optional][range(0, *pCount)] array of timestamp results. if count is less than the number of timestamps available, then driver shall only retrieve that number of timestamps. + hEvent ZeEventHandle, // hEvent [in] handle of the event + hDevice ZeDeviceHandle, // hDevice [in] handle of the device to query + pCount *uint32, // pCount [in,out] pointer to the number of timestamp results. if count is zero, then the driver shall update the value with the total number of timestamps available. if count is greater than the number of timestamps available, then the driver shall update the value with the correct number of timestamps available. + pTimestamps *ZeKernelTimestampResult, // pTimestamps [in,out][optional][range(0, *pCount)] array of timestamp results. if count is less than the number of timestamps available, then driver shall only retrieve that number of timestamps. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeEventQueryTimestampsExp", uintptr(hEvent), uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pTimestamps))) } - diff --git a/core_externalMemMap.go b/core_externalMemMap.go index f144b58..66ab7f5 100644 --- a/core_externalMemMap.go +++ b/core_externalMemMap.go @@ -22,26 +22,26 @@ const ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME = "ZE_extension_external_memmap_sysmem // ZeExternalMemmapSysmemExtVersion (ze_external_memmap_sysmem_ext_version_t) External Memory Mapping Extension Version(s) type ZeExternalMemmapSysmemExtVersion uintptr + const ( - ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_1_0 ZeExternalMemmapSysmemExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_1_0 version 1.0 - ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_CURRENT ZeExternalMemmapSysmemExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_CURRENT latest known version - ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_FORCE_UINT32 ZeExternalMemmapSysmemExtVersion = 0x7fffffff // ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_* ENUMs + ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_1_0 ZeExternalMemmapSysmemExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_1_0 version 1.0 + ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_CURRENT ZeExternalMemmapSysmemExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_CURRENT latest known version + ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_FORCE_UINT32 ZeExternalMemmapSysmemExtVersion = 0x7fffffff // ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_EXTERNAL_MEMMAP_SYSMEM_EXT_VERSION_* ENUMs ) // ZeExternalMemmapSysmemExtDesc (ze_external_memmap_sysmem_ext_desc_t) Maps external system memory for an allocation -/// -/// @details -/// - This structure may be passed to ::zeMemAllocHost, via the `pNext` -/// member of ::ze_host_mem_alloc_desc_t to map system memory for a host -/// allocation. -/// - The system memory pointer and size being mapped must be page aligned -/// based on the supported page sizes on the device. +// / +// / @details +// / - This structure may be passed to ::zeMemAllocHost, via the `pNext` +// / member of ::ze_host_mem_alloc_desc_t to map system memory for a host +// / allocation. +// / - The system memory pointer and size being mapped must be page aligned +// / based on the supported page sizes on the device. type ZeExternalMemmapSysmemExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Psystemmemory unsafe.Pointer // Psystemmemory [in] system memory pointer to map; must be page-aligned. - Size uint64 // Size [in] size of the system memory to map; must be page-aligned. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Psystemmemory unsafe.Pointer // Psystemmemory [in] system memory pointer to map; must be page-aligned. + Size uint64 // Size [in] size of the system memory to map; must be page-aligned. } - diff --git a/core_externalSemaphores.go b/core_externalSemaphores.go index 858486c..aedf652 100644 --- a/core_externalSemaphores.go +++ b/core_externalSemaphores.go @@ -24,10 +24,11 @@ const ZE_EXTERNAL_SEMAPHORES_EXTENSION_NAME = "ZE_extension_external_semaphores" // ZeExternalSemaphoreExtVersion (ze_external_semaphore_ext_version_t) External Semaphores Extension Version type ZeExternalSemaphoreExtVersion uintptr + const ( - ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_1_0 ZeExternalSemaphoreExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_1_0 version 1.0 - ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_CURRENT ZeExternalSemaphoreExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_CURRENT latest known version - ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_FORCE_UINT32 ZeExternalSemaphoreExtVersion = 0x7fffffff // ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_* ENUMs + ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_1_0 ZeExternalSemaphoreExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_1_0 version 1.0 + ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_CURRENT ZeExternalSemaphoreExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_CURRENT latest known version + ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_FORCE_UINT32 ZeExternalSemaphoreExtVersion = 0x7fffffff // ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_EXTERNAL_SEMAPHORE_EXT_VERSION_* ENUMs ) @@ -36,220 +37,220 @@ type ZeExternalSemaphoreExtHandle uintptr // ZeExternalSemaphoreExtFlags (ze_external_semaphore_ext_flags_t) External Semaphores Type Flags type ZeExternalSemaphoreExtFlags uint32 + const ( - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_FD ZeExternalSemaphoreExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_FD Semaphore is an Linux opaque file descriptor - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_WIN32 ZeExternalSemaphoreExtFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_WIN32 Semaphore is an opaque Win32 handle for monitored fence - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_WIN32_KMT ZeExternalSemaphoreExtFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_WIN32_KMT Semaphore is an opaque Win32 KMT handle for monitored fence - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE ZeExternalSemaphoreExtFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE Semaphore is a D3D12 fence - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D11_FENCE ZeExternalSemaphoreExtFlags = /* ZE_BIT(4) */(( 1 << 4 )) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D11_FENCE Semaphore is a D3D11 fence - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_KEYED_MUTEX ZeExternalSemaphoreExtFlags = /* ZE_BIT(5) */(( 1 << 5 )) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_KEYED_MUTEX Semaphore is a keyed mutex for Win32 - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_KEYED_MUTEX_KMT ZeExternalSemaphoreExtFlags = /* ZE_BIT(6) */(( 1 << 6 )) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_KEYED_MUTEX_KMT Semaphore is a keyed mutex for Win32 KMT - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_FD ZeExternalSemaphoreExtFlags = /* ZE_BIT(7) */(( 1 << 7 )) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_FD Semaphore is a Vulkan Timeline semaphore for Linux - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_WIN32 ZeExternalSemaphoreExtFlags = /* ZE_BIT(8) */(( 1 << 8 )) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_WIN32 Semaphore is a Vulkan Timeline semaphore for Win32 - ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_FORCE_UINT32 ZeExternalSemaphoreExtFlags = 0x7fffffff // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_* ENUMs + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_FD ZeExternalSemaphoreExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_FD Semaphore is an Linux opaque file descriptor + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_WIN32 ZeExternalSemaphoreExtFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_WIN32 Semaphore is an opaque Win32 handle for monitored fence + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_WIN32_KMT ZeExternalSemaphoreExtFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_OPAQUE_WIN32_KMT Semaphore is an opaque Win32 KMT handle for monitored fence + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE ZeExternalSemaphoreExtFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE Semaphore is a D3D12 fence + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D11_FENCE ZeExternalSemaphoreExtFlags = /* ZE_BIT(4) */ (1 << 4) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D11_FENCE Semaphore is a D3D11 fence + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_KEYED_MUTEX ZeExternalSemaphoreExtFlags = /* ZE_BIT(5) */ (1 << 5) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_KEYED_MUTEX Semaphore is a keyed mutex for Win32 + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_KEYED_MUTEX_KMT ZeExternalSemaphoreExtFlags = /* ZE_BIT(6) */ (1 << 6) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_KEYED_MUTEX_KMT Semaphore is a keyed mutex for Win32 KMT + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_FD ZeExternalSemaphoreExtFlags = /* ZE_BIT(7) */ (1 << 7) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_FD Semaphore is a Vulkan Timeline semaphore for Linux + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_WIN32 ZeExternalSemaphoreExtFlags = /* ZE_BIT(8) */ (1 << 8) // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_VK_TIMELINE_SEMAPHORE_WIN32 Semaphore is a Vulkan Timeline semaphore for Win32 + ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_FORCE_UINT32 ZeExternalSemaphoreExtFlags = 0x7fffffff // ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_* ENUMs ) // ZeExternalSemaphoreExtDesc (ze_external_semaphore_ext_desc_t) External Semaphore Descriptor type ZeExternalSemaphoreExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeExternalSemaphoreExtFlags // Flags [in] The flags describing the type of the semaphore. must be 0 (default) or a valid combination of ::ze_external_semaphore_ext_flag_t. When importing a semaphore, pNext should be pointing to one of the following structures: ::ze_external_semaphore_win32_ext_desc_t or ::ze_external_semaphore_fd_ext_desc_t. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeExternalSemaphoreExtFlags // Flags [in] The flags describing the type of the semaphore. must be 0 (default) or a valid combination of ::ze_external_semaphore_ext_flag_t. When importing a semaphore, pNext should be pointing to one of the following structures: ::ze_external_semaphore_win32_ext_desc_t or ::ze_external_semaphore_fd_ext_desc_t. } // ZeExternalSemaphoreWin32ExtDesc (ze_external_semaphore_win32_ext_desc_t) External Semaphore Win32 Descriptor type ZeExternalSemaphoreWin32ExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Handle unsafe.Pointer // Handle [in] Win32 handle of the semaphore. Must be a valid Win32 handle. - Name *byte // Name [in] Name of the semaphore. Must be a valid null-terminated string. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Handle unsafe.Pointer // Handle [in] Win32 handle of the semaphore. Must be a valid Win32 handle. + Name *byte // Name [in] Name of the semaphore. Must be a valid null-terminated string. } // ZeExternalSemaphoreFdExtDesc (ze_external_semaphore_fd_ext_desc_t) External Semaphore FD Descriptor type ZeExternalSemaphoreFdExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Fd int32 // Fd [in] File descriptor of the semaphore. Must be a valid file descriptor. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Fd int32 // Fd [in] File descriptor of the semaphore. Must be a valid file descriptor. } // ZeExternalSemaphoreSignalParamsExt (ze_external_semaphore_signal_params_ext_t) External Semaphore Signal parameters type ZeExternalSemaphoreSignalParamsExt struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Value uint64 // Value [in] [optional] Value to signal. Specified by user as an expected value with some of semaphore types, such as ::ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Value uint64 // Value [in] [optional] Value to signal. Specified by user as an expected value with some of semaphore types, such as ::ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE. } // ZeExternalSemaphoreWaitParamsExt (ze_external_semaphore_wait_params_ext_t) External Semaphore Wait parameters type ZeExternalSemaphoreWaitParamsExt struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Value uint64 // Value [in] [optional] Value to wait for. Specified by user as an expected value with some of semaphore types, such as ::ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Value uint64 // Value [in] [optional] Value to wait for. Specified by user as an expected value with some of semaphore types, such as ::ZE_EXTERNAL_SEMAPHORE_EXT_FLAG_D3D12_FENCE. } // ZeDeviceImportExternalSemaphoreExt Import an external semaphore -/// -/// @details -/// - Imports an external semaphore. -/// - This function may be called from simultaneous threads with the same -/// device handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phSemaphore` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x1ff < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - Imports an external semaphore. +// / - This function may be called from simultaneous threads with the same +// / device handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phSemaphore` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x1ff < desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeDeviceImportExternalSemaphoreExt( - hDevice ZeDeviceHandle, // hDevice [in] The device handle. - desc *ZeExternalSemaphoreExtDesc, // desc [in] The pointer to external semaphore descriptor. - phSemaphore *ZeExternalSemaphoreExtHandle, // phSemaphore [out] The handle of the external semaphore imported. + hDevice ZeDeviceHandle, // hDevice [in] The device handle. + desc *ZeExternalSemaphoreExtDesc, // desc [in] The pointer to external semaphore descriptor. + phSemaphore *ZeExternalSemaphoreExtHandle, // phSemaphore [out] The handle of the external semaphore imported. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceImportExternalSemaphoreExt", uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phSemaphore))) } // ZeDeviceReleaseExternalSemaphoreExt Release an external semaphore -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the semaphore before it is released. -/// - The application must **not** call this function from simultaneous -/// threads with the same semaphore handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hSemaphore` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the semaphore before it is released. +// / - The application must **not** call this function from simultaneous +// / threads with the same semaphore handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hSemaphore` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeDeviceReleaseExternalSemaphoreExt( - hSemaphore ZeExternalSemaphoreExtHandle, // hSemaphore [in] The handle of the external semaphore. + hSemaphore ZeExternalSemaphoreExtHandle, // hSemaphore [in] The handle of the external semaphore. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceReleaseExternalSemaphoreExt", uintptr(hSemaphore)) } // ZeCommandListAppendSignalExternalSemaphoreExt Signal an external semaphore -/// -/// @details -/// - Signals an external semaphore. -/// - This function must only be used with an immediate command list. -/// - This function may be called from simultaneous threads with the same -/// command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phSemaphores` -/// + `nullptr == signalParams` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` -/// + `(nullptr == phSemaphores) && (0 < numSemaphores)` -/// + `(nullptr == signalParams) && (0 < numSemaphores)` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + Commandlist handle does not correspond to an immediate command list +// / +// / @details +// / - Signals an external semaphore. +// / - This function must only be used with an immediate command list. +// / - This function may be called from simultaneous threads with the same +// / command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phSemaphores` +// / + `nullptr == signalParams` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / + `(nullptr == phSemaphores) && (0 < numSemaphores)` +// / + `(nullptr == signalParams) && (0 < numSemaphores)` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + Commandlist handle does not correspond to an immediate command list func ZeCommandListAppendSignalExternalSemaphoreExt( - hCommandList ZeCommandListHandle, // hCommandList [in] The command list handle. - numSemaphores uint32, // numSemaphores [in] The number of external semaphores. - phSemaphores *ZeExternalSemaphoreExtHandle, // phSemaphores [in][range(0, numSemaphores)] The array of pointers to external semaphore handles to be appended into command list. - signalParams *ZeExternalSemaphoreSignalParamsExt, // signalParams [in][range(0, numSemaphores)] The array of pointers to external semaphore signal parameters. - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] The command list handle. + numSemaphores uint32, // numSemaphores [in] The number of external semaphores. + phSemaphores *ZeExternalSemaphoreExtHandle, // phSemaphores [in][range(0, numSemaphores)] The array of pointers to external semaphore handles to be appended into command list. + signalParams *ZeExternalSemaphoreSignalParamsExt, // signalParams [in][range(0, numSemaphores)] The array of pointers to external semaphore signal parameters. + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendSignalExternalSemaphoreExt", uintptr(hCommandList), uintptr(numSemaphores), uintptr(unsafe.Pointer(phSemaphores)), uintptr(unsafe.Pointer(signalParams)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListAppendWaitExternalSemaphoreExt Wait on external semaphores -/// -/// @details -/// - Waits on external semaphores. -/// - This function must only be used with an immediate command list. -/// - This function may be called from simultaneous threads with the same -/// command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phSemaphores` -/// + `nullptr == waitParams` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` -/// + `(nullptr == phSemaphores) && (0 < numSemaphores)` -/// + `(nullptr == waitParams) && (0 < numSemaphores)` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + Commandlist handle does not correspond to an immediate command list +// / +// / @details +// / - Waits on external semaphores. +// / - This function must only be used with an immediate command list. +// / - This function may be called from simultaneous threads with the same +// / command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phSemaphores` +// / + `nullptr == waitParams` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / + `(nullptr == phSemaphores) && (0 < numSemaphores)` +// / + `(nullptr == waitParams) && (0 < numSemaphores)` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + Commandlist handle does not correspond to an immediate command list func ZeCommandListAppendWaitExternalSemaphoreExt( - hCommandList ZeCommandListHandle, // hCommandList [in] The command list handle. - numSemaphores uint32, // numSemaphores [in] The number of external semaphores. - phSemaphores *ZeExternalSemaphoreExtHandle, // phSemaphores [in][range(0,numSemaphores)] The array of pointers to external semaphore handles to append into command list. - waitParams *ZeExternalSemaphoreWaitParamsExt, // waitParams [in][range(0,numSemaphores)] The array of pointers to external semaphore wait parameters. - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] The command list handle. + numSemaphores uint32, // numSemaphores [in] The number of external semaphores. + phSemaphores *ZeExternalSemaphoreExtHandle, // phSemaphores [in][range(0,numSemaphores)] The array of pointers to external semaphore handles to append into command list. + waitParams *ZeExternalSemaphoreWaitParamsExt, // waitParams [in][range(0,numSemaphores)] The array of pointers to external semaphore wait parameters. + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendWaitExternalSemaphoreExt", uintptr(hCommandList), uintptr(numSemaphores), uintptr(unsafe.Pointer(phSemaphores)), uintptr(unsafe.Pointer(waitParams)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } - diff --git a/core_fabric.go b/core_fabric.go index b5e1f6e..ed1f3df 100644 --- a/core_fabric.go +++ b/core_fabric.go @@ -24,10 +24,11 @@ const ZE_FABRIC_EXP_NAME = "ZE_experimental_fabric" // ZeFabricExpVersion (ze_fabric_exp_version_t) Fabric Topology Discovery Extension Version(s) type ZeFabricExpVersion uintptr + const ( - ZE_FABRIC_EXP_VERSION_1_0 ZeFabricExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_FABRIC_EXP_VERSION_1_0 version 1.0 - ZE_FABRIC_EXP_VERSION_CURRENT ZeFabricExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_FABRIC_EXP_VERSION_CURRENT latest known version - ZE_FABRIC_EXP_VERSION_FORCE_UINT32 ZeFabricExpVersion = 0x7fffffff // ZE_FABRIC_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_FABRIC_EXP_VERSION_* ENUMs + ZE_FABRIC_EXP_VERSION_1_0 ZeFabricExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_FABRIC_EXP_VERSION_1_0 version 1.0 + ZE_FABRIC_EXP_VERSION_CURRENT ZeFabricExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_FABRIC_EXP_VERSION_CURRENT latest known version + ZE_FABRIC_EXP_VERSION_FORCE_UINT32 ZeFabricExpVersion = 0x7fffffff // ZE_FABRIC_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_FABRIC_EXP_VERSION_* ENUMs ) @@ -36,337 +37,338 @@ const ZE_MAX_FABRIC_EDGE_MODEL_EXP_SIZE = 256 // ZeFabricVertexExpType (ze_fabric_vertex_exp_type_t) Fabric Vertex types type ZeFabricVertexExpType uintptr + const ( - ZE_FABRIC_VERTEX_EXP_TYPE_UNKNOWN ZeFabricVertexExpType = 0 // ZE_FABRIC_VERTEX_EXP_TYPE_UNKNOWN Fabric vertex type is unknown - ZE_FABRIC_VERTEX_EXP_TYPE_DEVICE ZeFabricVertexExpType = 1 // ZE_FABRIC_VERTEX_EXP_TYPE_DEVICE Fabric vertex represents a device - ZE_FABRIC_VERTEX_EXP_TYPE_SUBDEVICE ZeFabricVertexExpType = 2 // ZE_FABRIC_VERTEX_EXP_TYPE_SUBDEVICE Fabric vertex represents a subdevice - ZE_FABRIC_VERTEX_EXP_TYPE_SWITCH ZeFabricVertexExpType = 3 // ZE_FABRIC_VERTEX_EXP_TYPE_SWITCH Fabric vertex represents a switch - ZE_FABRIC_VERTEX_EXP_TYPE_FORCE_UINT32 ZeFabricVertexExpType = 0x7fffffff // ZE_FABRIC_VERTEX_EXP_TYPE_FORCE_UINT32 Value marking end of ZE_FABRIC_VERTEX_EXP_TYPE_* ENUMs + ZE_FABRIC_VERTEX_EXP_TYPE_UNKNOWN ZeFabricVertexExpType = 0 // ZE_FABRIC_VERTEX_EXP_TYPE_UNKNOWN Fabric vertex type is unknown + ZE_FABRIC_VERTEX_EXP_TYPE_DEVICE ZeFabricVertexExpType = 1 // ZE_FABRIC_VERTEX_EXP_TYPE_DEVICE Fabric vertex represents a device + ZE_FABRIC_VERTEX_EXP_TYPE_SUBDEVICE ZeFabricVertexExpType = 2 // ZE_FABRIC_VERTEX_EXP_TYPE_SUBDEVICE Fabric vertex represents a subdevice + ZE_FABRIC_VERTEX_EXP_TYPE_SWITCH ZeFabricVertexExpType = 3 // ZE_FABRIC_VERTEX_EXP_TYPE_SWITCH Fabric vertex represents a switch + ZE_FABRIC_VERTEX_EXP_TYPE_FORCE_UINT32 ZeFabricVertexExpType = 0x7fffffff // ZE_FABRIC_VERTEX_EXP_TYPE_FORCE_UINT32 Value marking end of ZE_FABRIC_VERTEX_EXP_TYPE_* ENUMs ) // ZeFabricEdgeExpDuplexity (ze_fabric_edge_exp_duplexity_t) Fabric edge duplexity type ZeFabricEdgeExpDuplexity uintptr + const ( - ZE_FABRIC_EDGE_EXP_DUPLEXITY_UNKNOWN ZeFabricEdgeExpDuplexity = 0 // ZE_FABRIC_EDGE_EXP_DUPLEXITY_UNKNOWN Fabric edge duplexity is unknown - ZE_FABRIC_EDGE_EXP_DUPLEXITY_HALF_DUPLEX ZeFabricEdgeExpDuplexity = 1 // ZE_FABRIC_EDGE_EXP_DUPLEXITY_HALF_DUPLEX Fabric edge is half duplex, i.e. stated bandwidth is obtained in only + ZE_FABRIC_EDGE_EXP_DUPLEXITY_UNKNOWN ZeFabricEdgeExpDuplexity = 0 // ZE_FABRIC_EDGE_EXP_DUPLEXITY_UNKNOWN Fabric edge duplexity is unknown + ZE_FABRIC_EDGE_EXP_DUPLEXITY_HALF_DUPLEX ZeFabricEdgeExpDuplexity = 1 // ZE_FABRIC_EDGE_EXP_DUPLEXITY_HALF_DUPLEX Fabric edge is half duplex, i.e. stated bandwidth is obtained in only ///< one direction at time - ZE_FABRIC_EDGE_EXP_DUPLEXITY_FULL_DUPLEX ZeFabricEdgeExpDuplexity = 2 // ZE_FABRIC_EDGE_EXP_DUPLEXITY_FULL_DUPLEX Fabric edge is full duplex, i.e. stated bandwidth is supported in both + ZE_FABRIC_EDGE_EXP_DUPLEXITY_FULL_DUPLEX ZeFabricEdgeExpDuplexity = 2 // ZE_FABRIC_EDGE_EXP_DUPLEXITY_FULL_DUPLEX Fabric edge is full duplex, i.e. stated bandwidth is supported in both ///< directions simultaneously - ZE_FABRIC_EDGE_EXP_DUPLEXITY_FORCE_UINT32 ZeFabricEdgeExpDuplexity = 0x7fffffff // ZE_FABRIC_EDGE_EXP_DUPLEXITY_FORCE_UINT32 Value marking end of ZE_FABRIC_EDGE_EXP_DUPLEXITY_* ENUMs + ZE_FABRIC_EDGE_EXP_DUPLEXITY_FORCE_UINT32 ZeFabricEdgeExpDuplexity = 0x7fffffff // ZE_FABRIC_EDGE_EXP_DUPLEXITY_FORCE_UINT32 Value marking end of ZE_FABRIC_EDGE_EXP_DUPLEXITY_* ENUMs ) // ZeFabricVertexPciExpAddress (ze_fabric_vertex_pci_exp_address_t) PCI address -/// -/// @details -/// - A PCI BDF address is the bus:device:function address of the device and -/// is useful for locating the device in the PCI switch fabric. +// / +// / @details +// / - A PCI BDF address is the bus:device:function address of the device and +// / is useful for locating the device in the PCI switch fabric. type ZeFabricVertexPciExpAddress struct { - Domain uint32 // Domain [out] PCI domain number - Bus uint32 // Bus [out] PCI BDF bus number - Device uint32 // Device [out] PCI BDF device number - Function uint32 // Function [out] PCI BDF function number + Domain uint32 // Domain [out] PCI domain number + Bus uint32 // Bus [out] PCI BDF bus number + Device uint32 // Device [out] PCI BDF device number + Function uint32 // Function [out] PCI BDF function number } // ZeFabricVertexExpProperties (ze_fabric_vertex_exp_properties_t) Fabric Vertex properties type ZeFabricVertexExpProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Uuid ZeUuid // Uuid [out] universal unique identifier. If the vertex is co-located with a device/subdevice, then this uuid will match that of the corresponding device/subdevice - Type ZeFabricVertexExpType // Type [out] does the fabric vertex represent a device, subdevice, or switch? - Remote ZeBool // Remote [out] does the fabric vertex live on the local node or on a remote node? - Address ZeFabricVertexPciExpAddress // Address [out] B/D/F address of fabric vertex & associated device/subdevice if available + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Uuid ZeUuid // Uuid [out] universal unique identifier. If the vertex is co-located with a device/subdevice, then this uuid will match that of the corresponding device/subdevice + Type ZeFabricVertexExpType // Type [out] does the fabric vertex represent a device, subdevice, or switch? + Remote ZeBool // Remote [out] does the fabric vertex live on the local node or on a remote node? + Address ZeFabricVertexPciExpAddress // Address [out] B/D/F address of fabric vertex & associated device/subdevice if available } // ZeFabricEdgeExpProperties (ze_fabric_edge_exp_properties_t) Fabric Edge properties type ZeFabricEdgeExpProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Uuid ZeUuid // Uuid [out] universal unique identifier. - Model [ZE_MAX_FABRIC_EDGE_MODEL_EXP_SIZE]byte // Model [out] Description of fabric edge technology. Will be set to the string "unkown" if this cannot be determined for this edge - Bandwidth uint32 // Bandwidth [out] design bandwidth - Bandwidthunit ZeBandwidthUnit // Bandwidthunit [out] bandwidth unit - Latency uint32 // Latency [out] design latency - Latencyunit ZeLatencyUnit // Latencyunit [out] latency unit - Duplexity ZeFabricEdgeExpDuplexity // Duplexity [out] Duplexity of the fabric edge + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Uuid ZeUuid // Uuid [out] universal unique identifier. + Model [ZE_MAX_FABRIC_EDGE_MODEL_EXP_SIZE]byte // Model [out] Description of fabric edge technology. Will be set to the string "unkown" if this cannot be determined for this edge + Bandwidth uint32 // Bandwidth [out] design bandwidth + Bandwidthunit ZeBandwidthUnit // Bandwidthunit [out] bandwidth unit + Latency uint32 // Latency [out] design latency + Latencyunit ZeLatencyUnit // Latencyunit [out] latency unit + Duplexity ZeFabricEdgeExpDuplexity // Duplexity [out] Duplexity of the fabric edge } // ZeFabricVertexGetExp Retrieves fabric vertices within a driver -/// -/// @details -/// - A fabric vertex represents either a device or a switch connected to -/// other fabric vertices. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - A fabric vertex represents either a device or a switch connected to +// / other fabric vertices. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeFabricVertexGetExp( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance - pCount *uint32, // pCount [in,out] pointer to the number of fabric vertices. if count is zero, then the driver shall update the value with the total number of fabric vertices available. if count is greater than the number of fabric vertices available, then the driver shall update the value with the correct number of fabric vertices available. - phVertices *ZeFabricVertexHandle, // phVertices [in,out][optional][range(0, *pCount)] array of handle of fabric vertices. if count is less than the number of fabric vertices available, then driver shall only retrieve that number of fabric vertices. + hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance + pCount *uint32, // pCount [in,out] pointer to the number of fabric vertices. if count is zero, then the driver shall update the value with the total number of fabric vertices available. if count is greater than the number of fabric vertices available, then the driver shall update the value with the correct number of fabric vertices available. + phVertices *ZeFabricVertexHandle, // phVertices [in,out][optional][range(0, *pCount)] array of handle of fabric vertices. if count is less than the number of fabric vertices available, then driver shall only retrieve that number of fabric vertices. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeFabricVertexGetExp", uintptr(hDriver), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phVertices))) } // ZeFabricVertexGetSubVerticesExp Retrieves a fabric sub-vertex from a fabric vertex -/// -/// @details -/// - Multiple calls to this function will return identical fabric vertex -/// handles, in the same order. -/// - The number of handles returned from this function is affected by the -/// `ZE_AFFINITY_MASK` environment variable. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hVertex` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - Multiple calls to this function will return identical fabric vertex +// / handles, in the same order. +// / - The number of handles returned from this function is affected by the +// / `ZE_AFFINITY_MASK` environment variable. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hVertex` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeFabricVertexGetSubVerticesExp( - hVertex ZeFabricVertexHandle, // hVertex [in] handle of the fabric vertex object - pCount *uint32, // pCount [in,out] pointer to the number of sub-vertices. if count is zero, then the driver shall update the value with the total number of sub-vertices available. if count is greater than the number of sub-vertices available, then the driver shall update the value with the correct number of sub-vertices available. - phSubvertices *ZeFabricVertexHandle, // phSubvertices [in,out][optional][range(0, *pCount)] array of handle of sub-vertices. if count is less than the number of sub-vertices available, then driver shall only retrieve that number of sub-vertices. + hVertex ZeFabricVertexHandle, // hVertex [in] handle of the fabric vertex object + pCount *uint32, // pCount [in,out] pointer to the number of sub-vertices. if count is zero, then the driver shall update the value with the total number of sub-vertices available. if count is greater than the number of sub-vertices available, then the driver shall update the value with the correct number of sub-vertices available. + phSubvertices *ZeFabricVertexHandle, // phSubvertices [in,out][optional][range(0, *pCount)] array of handle of sub-vertices. if count is less than the number of sub-vertices available, then driver shall only retrieve that number of sub-vertices. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeFabricVertexGetSubVerticesExp", uintptr(hVertex), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phSubvertices))) } // ZeFabricVertexGetPropertiesExp Retrieves properties of the fabric vertex. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hVertex` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pVertexProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hVertex` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pVertexProperties` func ZeFabricVertexGetPropertiesExp( - hVertex ZeFabricVertexHandle, // hVertex [in] handle of the fabric vertex - pVertexProperties *ZeFabricVertexExpProperties, // pVertexProperties [in,out] query result for fabric vertex properties + hVertex ZeFabricVertexHandle, // hVertex [in] handle of the fabric vertex + pVertexProperties *ZeFabricVertexExpProperties, // pVertexProperties [in,out] query result for fabric vertex properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeFabricVertexGetPropertiesExp", uintptr(hVertex), uintptr(unsafe.Pointer(pVertexProperties))) } // ZeFabricVertexGetDeviceExp Returns device handle from fabric vertex handle. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hVertex` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phDevice` -/// - ::ZE_RESULT_EXP_ERROR_VERTEX_IS_NOT_DEVICE -/// + Provided fabric vertex handle does not correspond to a device or subdevice. -/// - ::ZE_RESULT_EXP_ERROR_REMOTE_DEVICE -/// + Provided fabric vertex handle corresponds to remote device or subdevice. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hVertex` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phDevice` +// / - ::ZE_RESULT_EXP_ERROR_VERTEX_IS_NOT_DEVICE +// / + Provided fabric vertex handle does not correspond to a device or subdevice. +// / - ::ZE_RESULT_EXP_ERROR_REMOTE_DEVICE +// / + Provided fabric vertex handle corresponds to remote device or subdevice. func ZeFabricVertexGetDeviceExp( - hVertex ZeFabricVertexHandle, // hVertex [in] handle of the fabric vertex - phDevice *ZeDeviceHandle, // phDevice [out] device handle corresponding to fabric vertex + hVertex ZeFabricVertexHandle, // hVertex [in] handle of the fabric vertex + phDevice *ZeDeviceHandle, // phDevice [out] device handle corresponding to fabric vertex ) (ZeResult, error) { return zecall.Call[ZeResult]("zeFabricVertexGetDeviceExp", uintptr(hVertex), uintptr(unsafe.Pointer(phDevice))) } // ZeDeviceGetFabricVertexExp Returns fabric vertex handle from device handle. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phVertex` -/// - ::ZE_RESULT_EXP_ERROR_DEVICE_IS_NOT_VERTEX -/// + Provided device handle does not correspond to a fabric vertex. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phVertex` +// / - ::ZE_RESULT_EXP_ERROR_DEVICE_IS_NOT_VERTEX +// / + Provided device handle does not correspond to a fabric vertex. func ZeDeviceGetFabricVertexExp( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - phVertex *ZeFabricVertexHandle, // phVertex [out] fabric vertex handle corresponding to device + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + phVertex *ZeFabricVertexHandle, // phVertex [out] fabric vertex handle corresponding to device ) (ZeResult, error) { return zecall.Call[ZeResult]("zeDeviceGetFabricVertexExp", uintptr(hDevice), uintptr(unsafe.Pointer(phVertex))) } // ZeFabricEdgeGetExp Retrieves all fabric edges between provided pair of fabric vertices -/// -/// @details -/// - A fabric edge represents one or more physical links between two fabric -/// vertices. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hVertexA` -/// + `nullptr == hVertexB` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - A fabric edge represents one or more physical links between two fabric +// / vertices. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hVertexA` +// / + `nullptr == hVertexB` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeFabricEdgeGetExp( - hVertexA ZeFabricVertexHandle, // hVertexA [in] handle of first fabric vertex instance - hVertexB ZeFabricVertexHandle, // hVertexB [in] handle of second fabric vertex instance - pCount *uint32, // pCount [in,out] pointer to the number of fabric edges. if count is zero, then the driver shall update the value with the total number of fabric edges available. if count is greater than the number of fabric edges available, then the driver shall update the value with the correct number of fabric edges available. - phEdges *ZeFabricEdgeHandle, // phEdges [in,out][optional][range(0, *pCount)] array of handle of fabric edges. if count is less than the number of fabric edges available, then driver shall only retrieve that number of fabric edges. + hVertexA ZeFabricVertexHandle, // hVertexA [in] handle of first fabric vertex instance + hVertexB ZeFabricVertexHandle, // hVertexB [in] handle of second fabric vertex instance + pCount *uint32, // pCount [in,out] pointer to the number of fabric edges. if count is zero, then the driver shall update the value with the total number of fabric edges available. if count is greater than the number of fabric edges available, then the driver shall update the value with the correct number of fabric edges available. + phEdges *ZeFabricEdgeHandle, // phEdges [in,out][optional][range(0, *pCount)] array of handle of fabric edges. if count is less than the number of fabric edges available, then driver shall only retrieve that number of fabric edges. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeFabricEdgeGetExp", uintptr(hVertexA), uintptr(hVertexB), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phEdges))) } // ZeFabricEdgeGetVerticesExp Retrieves fabric vertices connected by a fabric edge -/// -/// @details -/// - A fabric vertex represents either a device or a switch connected to -/// other fabric vertices via a fabric edge. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEdge` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phVertexA` -/// + `nullptr == phVertexB` +// / +// / @details +// / - A fabric vertex represents either a device or a switch connected to +// / other fabric vertices via a fabric edge. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEdge` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phVertexA` +// / + `nullptr == phVertexB` func ZeFabricEdgeGetVerticesExp( - hEdge ZeFabricEdgeHandle, // hEdge [in] handle of the fabric edge instance - phVertexA *ZeFabricVertexHandle, // phVertexA [out] fabric vertex connected to one end of the given fabric edge. - phVertexB *ZeFabricVertexHandle, // phVertexB [out] fabric vertex connected to other end of the given fabric edge. + hEdge ZeFabricEdgeHandle, // hEdge [in] handle of the fabric edge instance + phVertexA *ZeFabricVertexHandle, // phVertexA [out] fabric vertex connected to one end of the given fabric edge. + phVertexB *ZeFabricVertexHandle, // phVertexB [out] fabric vertex connected to other end of the given fabric edge. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeFabricEdgeGetVerticesExp", uintptr(hEdge), uintptr(unsafe.Pointer(phVertexA)), uintptr(unsafe.Pointer(phVertexB))) } // ZeFabricEdgeGetPropertiesExp Retrieves properties of the fabric edge. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEdge` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pEdgeProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEdge` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pEdgeProperties` func ZeFabricEdgeGetPropertiesExp( - hEdge ZeFabricEdgeHandle, // hEdge [in] handle of the fabric edge - pEdgeProperties *ZeFabricEdgeExpProperties, // pEdgeProperties [in,out] query result for fabric edge properties + hEdge ZeFabricEdgeHandle, // hEdge [in] handle of the fabric edge + pEdgeProperties *ZeFabricEdgeExpProperties, // pEdgeProperties [in,out] query result for fabric edge properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeFabricEdgeGetPropertiesExp", uintptr(hEdge), uintptr(unsafe.Pointer(pEdgeProperties))) } - diff --git a/core_fence.go b/core_fence.go index 0ddab61..43cab8c 100644 --- a/core_fence.go +++ b/core_fence.go @@ -21,202 +21,202 @@ import ( // ZeFenceFlags (ze_fence_flags_t) Supported fence creation flags type ZeFenceFlags uint32 + const ( - ZE_FENCE_FLAG_SIGNALED ZeFenceFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_FENCE_FLAG_SIGNALED fence is created in the signaled state, otherwise not signaled. - ZE_FENCE_FLAG_FORCE_UINT32 ZeFenceFlags = 0x7fffffff // ZE_FENCE_FLAG_FORCE_UINT32 Value marking end of ZE_FENCE_FLAG_* ENUMs + ZE_FENCE_FLAG_SIGNALED ZeFenceFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_FENCE_FLAG_SIGNALED fence is created in the signaled state, otherwise not signaled. + ZE_FENCE_FLAG_FORCE_UINT32 ZeFenceFlags = 0x7fffffff // ZE_FENCE_FLAG_FORCE_UINT32 Value marking end of ZE_FENCE_FLAG_* ENUMs ) // ZeFenceDesc (ze_fence_desc_t) Fence descriptor type ZeFenceDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeFenceFlags // Flags [in] creation flags. must be 0 (default) or a valid combination of ::ze_fence_flag_t. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeFenceFlags // Flags [in] creation flags. must be 0 (default) or a valid combination of ::ze_fence_flag_t. } // ZeFenceCreate Creates a fence for the command queue. -/// -/// @details -/// - A fence is a heavyweight synchronization primitive used to communicate -/// to the host that command list execution has completed. -/// - The application must only use the fence for the command queue which -/// was provided during creation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @remarks -/// _Analogues_ -/// - **vkCreateFence** -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandQueue` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phFence` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x1 < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - A fence is a heavyweight synchronization primitive used to communicate +// / to the host that command list execution has completed. +// / - The application must only use the fence for the command queue which +// / was provided during creation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @remarks +// / _Analogues_ +// / - **vkCreateFence** +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandQueue` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phFence` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x1 < desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeFenceCreate( - hCommandQueue ZeCommandQueueHandle, // hCommandQueue [in] handle of command queue - desc *ZeFenceDesc, // desc [in] pointer to fence descriptor - phFence *ZeFenceHandle, // phFence [out] pointer to handle of fence object created + hCommandQueue ZeCommandQueueHandle, // hCommandQueue [in] handle of command queue + desc *ZeFenceDesc, // desc [in] pointer to fence descriptor + phFence *ZeFenceHandle, // phFence [out] pointer to handle of fence object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeFenceCreate", uintptr(hCommandQueue), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phFence))) } // ZeFenceDestroy Deletes a fence object. -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the fence before it is deleted. -/// - The implementation of this function may immediately free all Host and -/// Device allocations associated with this fence. -/// - The application must **not** call this function from simultaneous -/// threads with the same fence handle. -/// - The implementation of this function must be thread-safe. -/// -/// @remarks -/// _Analogues_ -/// - **vkDestroyFence** -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFence` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the fence before it is deleted. +// / - The implementation of this function may immediately free all Host and +// / Device allocations associated with this fence. +// / - The application must **not** call this function from simultaneous +// / threads with the same fence handle. +// / - The implementation of this function must be thread-safe. +// / +// / @remarks +// / _Analogues_ +// / - **vkDestroyFence** +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFence` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeFenceDestroy( - hFence ZeFenceHandle, // hFence [in][release] handle of fence object to destroy + hFence ZeFenceHandle, // hFence [in][release] handle of fence object to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zeFenceDestroy", uintptr(hFence)) } // ZeFenceHostSynchronize The current host thread waits on a fence to be signaled. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **vkWaitForFences** -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFence` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_NOT_READY -/// + timeout expired +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **vkWaitForFences** +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFence` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_NOT_READY +// / + timeout expired func ZeFenceHostSynchronize( - hFence ZeFenceHandle, // hFence [in] handle of the fence - timeout uint64, // timeout [in] if non-zero, then indicates the maximum time (in nanoseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then operates exactly like ::zeFenceQueryStatus; if `UINT64_MAX`, then function will not return until complete or device is lost. Due to external dependencies, timeout may be rounded to the closest value allowed by the accuracy of those dependencies. + hFence ZeFenceHandle, // hFence [in] handle of the fence + timeout uint64, // timeout [in] if non-zero, then indicates the maximum time (in nanoseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then operates exactly like ::zeFenceQueryStatus; if `UINT64_MAX`, then function will not return until complete or device is lost. Due to external dependencies, timeout may be rounded to the closest value allowed by the accuracy of those dependencies. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeFenceHostSynchronize", uintptr(hFence), uintptr(timeout)) } // ZeFenceQueryStatus Queries a fence object's status. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **vkGetFenceStatus** -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFence` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_NOT_READY -/// + not signaled +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **vkGetFenceStatus** +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFence` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_NOT_READY +// / + not signaled func ZeFenceQueryStatus( - hFence ZeFenceHandle, // hFence [in] handle of the fence + hFence ZeFenceHandle, // hFence [in] handle of the fence ) (ZeResult, error) { return zecall.Call[ZeResult]("zeFenceQueryStatus", uintptr(hFence)) } // ZeFenceReset Reset a fence back to the not signaled state. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - **vkResetFences** -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFence` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - **vkResetFences** +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFence` func ZeFenceReset( - hFence ZeFenceHandle, // hFence [in] handle of the fence + hFence ZeFenceHandle, // hFence [in] handle of the fence ) (ZeResult, error) { return zecall.Call[ZeResult]("zeFenceReset", uintptr(hFence)) } - diff --git a/core_floatAtomics.go b/core_floatAtomics.go index e7ab75d..2d8eb01 100644 --- a/core_floatAtomics.go +++ b/core_floatAtomics.go @@ -22,38 +22,39 @@ const ZE_FLOAT_ATOMICS_EXT_NAME = "ZE_extension_float_atomics" // ZeFloatAtomicsExtVersion (ze_float_atomics_ext_version_t) Floating-Point Atomics Extension Version(s) type ZeFloatAtomicsExtVersion uintptr + const ( - ZE_FLOAT_ATOMICS_EXT_VERSION_1_0 ZeFloatAtomicsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_FLOAT_ATOMICS_EXT_VERSION_1_0 version 1.0 - ZE_FLOAT_ATOMICS_EXT_VERSION_CURRENT ZeFloatAtomicsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_FLOAT_ATOMICS_EXT_VERSION_CURRENT latest known version - ZE_FLOAT_ATOMICS_EXT_VERSION_FORCE_UINT32 ZeFloatAtomicsExtVersion = 0x7fffffff // ZE_FLOAT_ATOMICS_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_FLOAT_ATOMICS_EXT_VERSION_* ENUMs + ZE_FLOAT_ATOMICS_EXT_VERSION_1_0 ZeFloatAtomicsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_FLOAT_ATOMICS_EXT_VERSION_1_0 version 1.0 + ZE_FLOAT_ATOMICS_EXT_VERSION_CURRENT ZeFloatAtomicsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_FLOAT_ATOMICS_EXT_VERSION_CURRENT latest known version + ZE_FLOAT_ATOMICS_EXT_VERSION_FORCE_UINT32 ZeFloatAtomicsExtVersion = 0x7fffffff // ZE_FLOAT_ATOMICS_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_FLOAT_ATOMICS_EXT_VERSION_* ENUMs ) // ZeDeviceFpAtomicExtFlags (ze_device_fp_atomic_ext_flags_t) Supported floating-point atomic capability flags type ZeDeviceFpAtomicExtFlags uint32 + const ( - ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE ZeDeviceFpAtomicExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE Supports atomic load, store, and exchange - ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_ADD ZeDeviceFpAtomicExtFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_ADD Supports atomic add and subtract - ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX ZeDeviceFpAtomicExtFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX Supports atomic min and max - ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE ZeDeviceFpAtomicExtFlags = /* ZE_BIT(16) */(( 1 << 16 )) // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE Supports atomic load, store, and exchange - ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_ADD ZeDeviceFpAtomicExtFlags = /* ZE_BIT(17) */(( 1 << 17 )) // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_ADD Supports atomic add and subtract - ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX ZeDeviceFpAtomicExtFlags = /* ZE_BIT(18) */(( 1 << 18 )) // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX Supports atomic min and max - ZE_DEVICE_FP_ATOMIC_EXT_FLAG_FORCE_UINT32 ZeDeviceFpAtomicExtFlags = 0x7fffffff // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_FP_ATOMIC_EXT_FLAG_* ENUMs + ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE ZeDeviceFpAtomicExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE Supports atomic load, store, and exchange + ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_ADD ZeDeviceFpAtomicExtFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_ADD Supports atomic add and subtract + ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX ZeDeviceFpAtomicExtFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX Supports atomic min and max + ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE ZeDeviceFpAtomicExtFlags = /* ZE_BIT(16) */ (1 << 16) // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_LOAD_STORE Supports atomic load, store, and exchange + ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_ADD ZeDeviceFpAtomicExtFlags = /* ZE_BIT(17) */ (1 << 17) // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_ADD Supports atomic add and subtract + ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX ZeDeviceFpAtomicExtFlags = /* ZE_BIT(18) */ (1 << 18) // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_LOCAL_MIN_MAX Supports atomic min and max + ZE_DEVICE_FP_ATOMIC_EXT_FLAG_FORCE_UINT32 ZeDeviceFpAtomicExtFlags = 0x7fffffff // ZE_DEVICE_FP_ATOMIC_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_FP_ATOMIC_EXT_FLAG_* ENUMs ) // ZeFloatAtomicExtProperties (ze_float_atomic_ext_properties_t) Device floating-point atomic properties queried using -/// ::zeDeviceGetModuleProperties -/// -/// @details -/// - This structure may be returned from ::zeDeviceGetModuleProperties, via -/// the `pNext` member of ::ze_device_module_properties_t. +// / ::zeDeviceGetModuleProperties +// / +// / @details +// / - This structure may be returned from ::zeDeviceGetModuleProperties, via +// / the `pNext` member of ::ze_device_module_properties_t. type ZeFloatAtomicExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Fp16flags ZeDeviceFpAtomicExtFlags // Fp16flags [out] Capabilities for half-precision floating-point atomic operations - Fp32flags ZeDeviceFpAtomicExtFlags // Fp32flags [out] Capabilities for single-precision floating-point atomic operations - Fp64flags ZeDeviceFpAtomicExtFlags // Fp64flags [out] Capabilities for double-precision floating-point atomic operations + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Fp16flags ZeDeviceFpAtomicExtFlags // Fp16flags [out] Capabilities for half-precision floating-point atomic operations + Fp32flags ZeDeviceFpAtomicExtFlags // Fp32flags [out] Capabilities for single-precision floating-point atomic operations + Fp64flags ZeDeviceFpAtomicExtFlags // Fp64flags [out] Capabilities for double-precision floating-point atomic operations } - diff --git a/core_globaloffset.go b/core_globaloffset.go index 7a132c3..a4fb230 100644 --- a/core_globaloffset.go +++ b/core_globaloffset.go @@ -22,44 +22,44 @@ const ZE_GLOBAL_OFFSET_EXP_NAME = "ZE_experimental_global_offset" // ZeGlobalOffsetExpVersion (ze_global_offset_exp_version_t) Global Offset Extension Version(s) type ZeGlobalOffsetExpVersion uintptr + const ( - ZE_GLOBAL_OFFSET_EXP_VERSION_1_0 ZeGlobalOffsetExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_GLOBAL_OFFSET_EXP_VERSION_1_0 version 1.0 - ZE_GLOBAL_OFFSET_EXP_VERSION_CURRENT ZeGlobalOffsetExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_GLOBAL_OFFSET_EXP_VERSION_CURRENT latest known version - ZE_GLOBAL_OFFSET_EXP_VERSION_FORCE_UINT32 ZeGlobalOffsetExpVersion = 0x7fffffff // ZE_GLOBAL_OFFSET_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_GLOBAL_OFFSET_EXP_VERSION_* ENUMs + ZE_GLOBAL_OFFSET_EXP_VERSION_1_0 ZeGlobalOffsetExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_GLOBAL_OFFSET_EXP_VERSION_1_0 version 1.0 + ZE_GLOBAL_OFFSET_EXP_VERSION_CURRENT ZeGlobalOffsetExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_GLOBAL_OFFSET_EXP_VERSION_CURRENT latest known version + ZE_GLOBAL_OFFSET_EXP_VERSION_FORCE_UINT32 ZeGlobalOffsetExpVersion = 0x7fffffff // ZE_GLOBAL_OFFSET_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_GLOBAL_OFFSET_EXP_VERSION_* ENUMs ) // ZeKernelSetGlobalOffsetExp Set global work offset for a kernel. -/// -/// @details -/// - The global work offset will be used when a -/// ::zeCommandListAppendLaunchKernel() variant is called. -/// - The application must **not** call this function from simultaneous -/// threads with the same kernel handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` +// / +// / @details +// / - The global work offset will be used when a +// / ::zeCommandListAppendLaunchKernel() variant is called. +// / - The application must **not** call this function from simultaneous +// / threads with the same kernel handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` func ZeKernelSetGlobalOffsetExp( - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - offsetX uint32, // offsetX [in] global offset for X dimension to use for this kernel - offsetY uint32, // offsetY [in] global offset for Y dimension to use for this kernel - offsetZ uint32, // offsetZ [in] global offset for Z dimension to use for this kernel + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + offsetX uint32, // offsetX [in] global offset for X dimension to use for this kernel + offsetY uint32, // offsetY [in] global offset for Y dimension to use for this kernel + offsetZ uint32, // offsetZ [in] global offset for Z dimension to use for this kernel ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelSetGlobalOffsetExp", uintptr(hKernel), uintptr(offsetX), uintptr(offsetY), uintptr(offsetZ)) } - diff --git a/core_image.go b/core_image.go index f82acd6..ea91bc2 100644 --- a/core_image.go +++ b/core_image.go @@ -21,263 +21,268 @@ import ( // ZeImageFlags (ze_image_flags_t) Supported image creation flags type ZeImageFlags uint32 + const ( - ZE_IMAGE_FLAG_KERNEL_WRITE ZeImageFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_IMAGE_FLAG_KERNEL_WRITE kernels will write contents - ZE_IMAGE_FLAG_BIAS_UNCACHED ZeImageFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_IMAGE_FLAG_BIAS_UNCACHED device should not cache contents - ZE_IMAGE_FLAG_FORCE_UINT32 ZeImageFlags = 0x7fffffff // ZE_IMAGE_FLAG_FORCE_UINT32 Value marking end of ZE_IMAGE_FLAG_* ENUMs + ZE_IMAGE_FLAG_KERNEL_WRITE ZeImageFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_IMAGE_FLAG_KERNEL_WRITE kernels will write contents + ZE_IMAGE_FLAG_BIAS_UNCACHED ZeImageFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_IMAGE_FLAG_BIAS_UNCACHED device should not cache contents + ZE_IMAGE_FLAG_FORCE_UINT32 ZeImageFlags = 0x7fffffff // ZE_IMAGE_FLAG_FORCE_UINT32 Value marking end of ZE_IMAGE_FLAG_* ENUMs ) // ZeImageType (ze_image_type_t) Supported image types type ZeImageType uintptr + const ( - ZE_IMAGE_TYPE_1D ZeImageType = 0 // ZE_IMAGE_TYPE_1D 1D - ZE_IMAGE_TYPE_1DARRAY ZeImageType = 1 // ZE_IMAGE_TYPE_1DARRAY 1D array - ZE_IMAGE_TYPE_2D ZeImageType = 2 // ZE_IMAGE_TYPE_2D 2D - ZE_IMAGE_TYPE_2DARRAY ZeImageType = 3 // ZE_IMAGE_TYPE_2DARRAY 2D array - ZE_IMAGE_TYPE_3D ZeImageType = 4 // ZE_IMAGE_TYPE_3D 3D - ZE_IMAGE_TYPE_BUFFER ZeImageType = 5 // ZE_IMAGE_TYPE_BUFFER Buffer - ZE_IMAGE_TYPE_FORCE_UINT32 ZeImageType = 0x7fffffff // ZE_IMAGE_TYPE_FORCE_UINT32 Value marking end of ZE_IMAGE_TYPE_* ENUMs + ZE_IMAGE_TYPE_1D ZeImageType = 0 // ZE_IMAGE_TYPE_1D 1D + ZE_IMAGE_TYPE_1DARRAY ZeImageType = 1 // ZE_IMAGE_TYPE_1DARRAY 1D array + ZE_IMAGE_TYPE_2D ZeImageType = 2 // ZE_IMAGE_TYPE_2D 2D + ZE_IMAGE_TYPE_2DARRAY ZeImageType = 3 // ZE_IMAGE_TYPE_2DARRAY 2D array + ZE_IMAGE_TYPE_3D ZeImageType = 4 // ZE_IMAGE_TYPE_3D 3D + ZE_IMAGE_TYPE_BUFFER ZeImageType = 5 // ZE_IMAGE_TYPE_BUFFER Buffer + ZE_IMAGE_TYPE_FORCE_UINT32 ZeImageType = 0x7fffffff // ZE_IMAGE_TYPE_FORCE_UINT32 Value marking end of ZE_IMAGE_TYPE_* ENUMs ) // ZeImageFormatLayout (ze_image_format_layout_t) Supported image format layouts type ZeImageFormatLayout uintptr + const ( - ZE_IMAGE_FORMAT_LAYOUT_8 ZeImageFormatLayout = 0 // ZE_IMAGE_FORMAT_LAYOUT_8 8-bit single component layout - ZE_IMAGE_FORMAT_LAYOUT_16 ZeImageFormatLayout = 1 // ZE_IMAGE_FORMAT_LAYOUT_16 16-bit single component layout - ZE_IMAGE_FORMAT_LAYOUT_32 ZeImageFormatLayout = 2 // ZE_IMAGE_FORMAT_LAYOUT_32 32-bit single component layout - ZE_IMAGE_FORMAT_LAYOUT_8_8 ZeImageFormatLayout = 3 // ZE_IMAGE_FORMAT_LAYOUT_8_8 2-component 8-bit layout - ZE_IMAGE_FORMAT_LAYOUT_8_8_8_8 ZeImageFormatLayout = 4 // ZE_IMAGE_FORMAT_LAYOUT_8_8_8_8 4-component 8-bit layout - ZE_IMAGE_FORMAT_LAYOUT_16_16 ZeImageFormatLayout = 5 // ZE_IMAGE_FORMAT_LAYOUT_16_16 2-component 16-bit layout - ZE_IMAGE_FORMAT_LAYOUT_16_16_16_16 ZeImageFormatLayout = 6 // ZE_IMAGE_FORMAT_LAYOUT_16_16_16_16 4-component 16-bit layout - ZE_IMAGE_FORMAT_LAYOUT_32_32 ZeImageFormatLayout = 7 // ZE_IMAGE_FORMAT_LAYOUT_32_32 2-component 32-bit layout - ZE_IMAGE_FORMAT_LAYOUT_32_32_32_32 ZeImageFormatLayout = 8 // ZE_IMAGE_FORMAT_LAYOUT_32_32_32_32 4-component 32-bit layout - ZE_IMAGE_FORMAT_LAYOUT_10_10_10_2 ZeImageFormatLayout = 9 // ZE_IMAGE_FORMAT_LAYOUT_10_10_10_2 4-component 10_10_10_2 layout - ZE_IMAGE_FORMAT_LAYOUT_11_11_10 ZeImageFormatLayout = 10 // ZE_IMAGE_FORMAT_LAYOUT_11_11_10 3-component 11_11_10 layout - ZE_IMAGE_FORMAT_LAYOUT_5_6_5 ZeImageFormatLayout = 11 // ZE_IMAGE_FORMAT_LAYOUT_5_6_5 3-component 5_6_5 layout - ZE_IMAGE_FORMAT_LAYOUT_5_5_5_1 ZeImageFormatLayout = 12 // ZE_IMAGE_FORMAT_LAYOUT_5_5_5_1 4-component 5_5_5_1 layout - ZE_IMAGE_FORMAT_LAYOUT_4_4_4_4 ZeImageFormatLayout = 13 // ZE_IMAGE_FORMAT_LAYOUT_4_4_4_4 4-component 4_4_4_4 layout - ZE_IMAGE_FORMAT_LAYOUT_Y8 ZeImageFormatLayout = 14 // ZE_IMAGE_FORMAT_LAYOUT_Y8 Media Format: Y8. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_NV12 ZeImageFormatLayout = 15 // ZE_IMAGE_FORMAT_LAYOUT_NV12 Media Format: NV12. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_YUYV ZeImageFormatLayout = 16 // ZE_IMAGE_FORMAT_LAYOUT_YUYV Media Format: YUYV. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_VYUY ZeImageFormatLayout = 17 // ZE_IMAGE_FORMAT_LAYOUT_VYUY Media Format: VYUY. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_YVYU ZeImageFormatLayout = 18 // ZE_IMAGE_FORMAT_LAYOUT_YVYU Media Format: YVYU. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_UYVY ZeImageFormatLayout = 19 // ZE_IMAGE_FORMAT_LAYOUT_UYVY Media Format: UYVY. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_AYUV ZeImageFormatLayout = 20 // ZE_IMAGE_FORMAT_LAYOUT_AYUV Media Format: AYUV. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_P010 ZeImageFormatLayout = 21 // ZE_IMAGE_FORMAT_LAYOUT_P010 Media Format: P010. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_Y410 ZeImageFormatLayout = 22 // ZE_IMAGE_FORMAT_LAYOUT_Y410 Media Format: Y410. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_P012 ZeImageFormatLayout = 23 // ZE_IMAGE_FORMAT_LAYOUT_P012 Media Format: P012. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_Y16 ZeImageFormatLayout = 24 // ZE_IMAGE_FORMAT_LAYOUT_Y16 Media Format: Y16. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_P016 ZeImageFormatLayout = 25 // ZE_IMAGE_FORMAT_LAYOUT_P016 Media Format: P016. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_Y216 ZeImageFormatLayout = 26 // ZE_IMAGE_FORMAT_LAYOUT_Y216 Media Format: Y216. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_P216 ZeImageFormatLayout = 27 // ZE_IMAGE_FORMAT_LAYOUT_P216 Media Format: P216. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_P8 ZeImageFormatLayout = 28 // ZE_IMAGE_FORMAT_LAYOUT_P8 Media Format: P8. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_YUY2 ZeImageFormatLayout = 29 // ZE_IMAGE_FORMAT_LAYOUT_YUY2 Media Format: YUY2. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_A8P8 ZeImageFormatLayout = 30 // ZE_IMAGE_FORMAT_LAYOUT_A8P8 Media Format: A8P8. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_IA44 ZeImageFormatLayout = 31 // ZE_IMAGE_FORMAT_LAYOUT_IA44 Media Format: IA44. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_AI44 ZeImageFormatLayout = 32 // ZE_IMAGE_FORMAT_LAYOUT_AI44 Media Format: AI44. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_Y416 ZeImageFormatLayout = 33 // ZE_IMAGE_FORMAT_LAYOUT_Y416 Media Format: Y416. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_Y210 ZeImageFormatLayout = 34 // ZE_IMAGE_FORMAT_LAYOUT_Y210 Media Format: Y210. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_I420 ZeImageFormatLayout = 35 // ZE_IMAGE_FORMAT_LAYOUT_I420 Media Format: I420. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_YV12 ZeImageFormatLayout = 36 // ZE_IMAGE_FORMAT_LAYOUT_YV12 Media Format: YV12. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_400P ZeImageFormatLayout = 37 // ZE_IMAGE_FORMAT_LAYOUT_400P Media Format: 400P. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_422H ZeImageFormatLayout = 38 // ZE_IMAGE_FORMAT_LAYOUT_422H Media Format: 422H. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_422V ZeImageFormatLayout = 39 // ZE_IMAGE_FORMAT_LAYOUT_422V Media Format: 422V. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_444P ZeImageFormatLayout = 40 // ZE_IMAGE_FORMAT_LAYOUT_444P Media Format: 444P. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_RGBP ZeImageFormatLayout = 41 // ZE_IMAGE_FORMAT_LAYOUT_RGBP Media Format: RGBP. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_BRGP ZeImageFormatLayout = 42 // ZE_IMAGE_FORMAT_LAYOUT_BRGP Media Format: BRGP. Format type and swizzle is ignored for this. - ZE_IMAGE_FORMAT_LAYOUT_8_8_8 ZeImageFormatLayout = 43 // ZE_IMAGE_FORMAT_LAYOUT_8_8_8 3-component 8-bit layout - ZE_IMAGE_FORMAT_LAYOUT_16_16_16 ZeImageFormatLayout = 44 // ZE_IMAGE_FORMAT_LAYOUT_16_16_16 3-component 16-bit layout - ZE_IMAGE_FORMAT_LAYOUT_32_32_32 ZeImageFormatLayout = 45 // ZE_IMAGE_FORMAT_LAYOUT_32_32_32 3-component 32-bit layout - ZE_IMAGE_FORMAT_LAYOUT_FORCE_UINT32 ZeImageFormatLayout = 0x7fffffff // ZE_IMAGE_FORMAT_LAYOUT_FORCE_UINT32 Value marking end of ZE_IMAGE_FORMAT_LAYOUT_* ENUMs + ZE_IMAGE_FORMAT_LAYOUT_8 ZeImageFormatLayout = 0 // ZE_IMAGE_FORMAT_LAYOUT_8 8-bit single component layout + ZE_IMAGE_FORMAT_LAYOUT_16 ZeImageFormatLayout = 1 // ZE_IMAGE_FORMAT_LAYOUT_16 16-bit single component layout + ZE_IMAGE_FORMAT_LAYOUT_32 ZeImageFormatLayout = 2 // ZE_IMAGE_FORMAT_LAYOUT_32 32-bit single component layout + ZE_IMAGE_FORMAT_LAYOUT_8_8 ZeImageFormatLayout = 3 // ZE_IMAGE_FORMAT_LAYOUT_8_8 2-component 8-bit layout + ZE_IMAGE_FORMAT_LAYOUT_8_8_8_8 ZeImageFormatLayout = 4 // ZE_IMAGE_FORMAT_LAYOUT_8_8_8_8 4-component 8-bit layout + ZE_IMAGE_FORMAT_LAYOUT_16_16 ZeImageFormatLayout = 5 // ZE_IMAGE_FORMAT_LAYOUT_16_16 2-component 16-bit layout + ZE_IMAGE_FORMAT_LAYOUT_16_16_16_16 ZeImageFormatLayout = 6 // ZE_IMAGE_FORMAT_LAYOUT_16_16_16_16 4-component 16-bit layout + ZE_IMAGE_FORMAT_LAYOUT_32_32 ZeImageFormatLayout = 7 // ZE_IMAGE_FORMAT_LAYOUT_32_32 2-component 32-bit layout + ZE_IMAGE_FORMAT_LAYOUT_32_32_32_32 ZeImageFormatLayout = 8 // ZE_IMAGE_FORMAT_LAYOUT_32_32_32_32 4-component 32-bit layout + ZE_IMAGE_FORMAT_LAYOUT_10_10_10_2 ZeImageFormatLayout = 9 // ZE_IMAGE_FORMAT_LAYOUT_10_10_10_2 4-component 10_10_10_2 layout + ZE_IMAGE_FORMAT_LAYOUT_11_11_10 ZeImageFormatLayout = 10 // ZE_IMAGE_FORMAT_LAYOUT_11_11_10 3-component 11_11_10 layout + ZE_IMAGE_FORMAT_LAYOUT_5_6_5 ZeImageFormatLayout = 11 // ZE_IMAGE_FORMAT_LAYOUT_5_6_5 3-component 5_6_5 layout + ZE_IMAGE_FORMAT_LAYOUT_5_5_5_1 ZeImageFormatLayout = 12 // ZE_IMAGE_FORMAT_LAYOUT_5_5_5_1 4-component 5_5_5_1 layout + ZE_IMAGE_FORMAT_LAYOUT_4_4_4_4 ZeImageFormatLayout = 13 // ZE_IMAGE_FORMAT_LAYOUT_4_4_4_4 4-component 4_4_4_4 layout + ZE_IMAGE_FORMAT_LAYOUT_Y8 ZeImageFormatLayout = 14 // ZE_IMAGE_FORMAT_LAYOUT_Y8 Media Format: Y8. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_NV12 ZeImageFormatLayout = 15 // ZE_IMAGE_FORMAT_LAYOUT_NV12 Media Format: NV12. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_YUYV ZeImageFormatLayout = 16 // ZE_IMAGE_FORMAT_LAYOUT_YUYV Media Format: YUYV. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_VYUY ZeImageFormatLayout = 17 // ZE_IMAGE_FORMAT_LAYOUT_VYUY Media Format: VYUY. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_YVYU ZeImageFormatLayout = 18 // ZE_IMAGE_FORMAT_LAYOUT_YVYU Media Format: YVYU. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_UYVY ZeImageFormatLayout = 19 // ZE_IMAGE_FORMAT_LAYOUT_UYVY Media Format: UYVY. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_AYUV ZeImageFormatLayout = 20 // ZE_IMAGE_FORMAT_LAYOUT_AYUV Media Format: AYUV. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_P010 ZeImageFormatLayout = 21 // ZE_IMAGE_FORMAT_LAYOUT_P010 Media Format: P010. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_Y410 ZeImageFormatLayout = 22 // ZE_IMAGE_FORMAT_LAYOUT_Y410 Media Format: Y410. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_P012 ZeImageFormatLayout = 23 // ZE_IMAGE_FORMAT_LAYOUT_P012 Media Format: P012. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_Y16 ZeImageFormatLayout = 24 // ZE_IMAGE_FORMAT_LAYOUT_Y16 Media Format: Y16. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_P016 ZeImageFormatLayout = 25 // ZE_IMAGE_FORMAT_LAYOUT_P016 Media Format: P016. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_Y216 ZeImageFormatLayout = 26 // ZE_IMAGE_FORMAT_LAYOUT_Y216 Media Format: Y216. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_P216 ZeImageFormatLayout = 27 // ZE_IMAGE_FORMAT_LAYOUT_P216 Media Format: P216. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_P8 ZeImageFormatLayout = 28 // ZE_IMAGE_FORMAT_LAYOUT_P8 Media Format: P8. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_YUY2 ZeImageFormatLayout = 29 // ZE_IMAGE_FORMAT_LAYOUT_YUY2 Media Format: YUY2. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_A8P8 ZeImageFormatLayout = 30 // ZE_IMAGE_FORMAT_LAYOUT_A8P8 Media Format: A8P8. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_IA44 ZeImageFormatLayout = 31 // ZE_IMAGE_FORMAT_LAYOUT_IA44 Media Format: IA44. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_AI44 ZeImageFormatLayout = 32 // ZE_IMAGE_FORMAT_LAYOUT_AI44 Media Format: AI44. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_Y416 ZeImageFormatLayout = 33 // ZE_IMAGE_FORMAT_LAYOUT_Y416 Media Format: Y416. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_Y210 ZeImageFormatLayout = 34 // ZE_IMAGE_FORMAT_LAYOUT_Y210 Media Format: Y210. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_I420 ZeImageFormatLayout = 35 // ZE_IMAGE_FORMAT_LAYOUT_I420 Media Format: I420. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_YV12 ZeImageFormatLayout = 36 // ZE_IMAGE_FORMAT_LAYOUT_YV12 Media Format: YV12. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_400P ZeImageFormatLayout = 37 // ZE_IMAGE_FORMAT_LAYOUT_400P Media Format: 400P. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_422H ZeImageFormatLayout = 38 // ZE_IMAGE_FORMAT_LAYOUT_422H Media Format: 422H. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_422V ZeImageFormatLayout = 39 // ZE_IMAGE_FORMAT_LAYOUT_422V Media Format: 422V. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_444P ZeImageFormatLayout = 40 // ZE_IMAGE_FORMAT_LAYOUT_444P Media Format: 444P. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_RGBP ZeImageFormatLayout = 41 // ZE_IMAGE_FORMAT_LAYOUT_RGBP Media Format: RGBP. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_BRGP ZeImageFormatLayout = 42 // ZE_IMAGE_FORMAT_LAYOUT_BRGP Media Format: BRGP. Format type and swizzle is ignored for this. + ZE_IMAGE_FORMAT_LAYOUT_8_8_8 ZeImageFormatLayout = 43 // ZE_IMAGE_FORMAT_LAYOUT_8_8_8 3-component 8-bit layout + ZE_IMAGE_FORMAT_LAYOUT_16_16_16 ZeImageFormatLayout = 44 // ZE_IMAGE_FORMAT_LAYOUT_16_16_16 3-component 16-bit layout + ZE_IMAGE_FORMAT_LAYOUT_32_32_32 ZeImageFormatLayout = 45 // ZE_IMAGE_FORMAT_LAYOUT_32_32_32 3-component 32-bit layout + ZE_IMAGE_FORMAT_LAYOUT_FORCE_UINT32 ZeImageFormatLayout = 0x7fffffff // ZE_IMAGE_FORMAT_LAYOUT_FORCE_UINT32 Value marking end of ZE_IMAGE_FORMAT_LAYOUT_* ENUMs ) // ZeImageFormatType (ze_image_format_type_t) Supported image format types type ZeImageFormatType uintptr + const ( - ZE_IMAGE_FORMAT_TYPE_UINT ZeImageFormatType = 0 // ZE_IMAGE_FORMAT_TYPE_UINT Unsigned integer - ZE_IMAGE_FORMAT_TYPE_SINT ZeImageFormatType = 1 // ZE_IMAGE_FORMAT_TYPE_SINT Signed integer - ZE_IMAGE_FORMAT_TYPE_UNORM ZeImageFormatType = 2 // ZE_IMAGE_FORMAT_TYPE_UNORM Unsigned normalized integer - ZE_IMAGE_FORMAT_TYPE_SNORM ZeImageFormatType = 3 // ZE_IMAGE_FORMAT_TYPE_SNORM Signed normalized integer - ZE_IMAGE_FORMAT_TYPE_FLOAT ZeImageFormatType = 4 // ZE_IMAGE_FORMAT_TYPE_FLOAT Float - ZE_IMAGE_FORMAT_TYPE_FORCE_UINT32 ZeImageFormatType = 0x7fffffff // ZE_IMAGE_FORMAT_TYPE_FORCE_UINT32 Value marking end of ZE_IMAGE_FORMAT_TYPE_* ENUMs + ZE_IMAGE_FORMAT_TYPE_UINT ZeImageFormatType = 0 // ZE_IMAGE_FORMAT_TYPE_UINT Unsigned integer + ZE_IMAGE_FORMAT_TYPE_SINT ZeImageFormatType = 1 // ZE_IMAGE_FORMAT_TYPE_SINT Signed integer + ZE_IMAGE_FORMAT_TYPE_UNORM ZeImageFormatType = 2 // ZE_IMAGE_FORMAT_TYPE_UNORM Unsigned normalized integer + ZE_IMAGE_FORMAT_TYPE_SNORM ZeImageFormatType = 3 // ZE_IMAGE_FORMAT_TYPE_SNORM Signed normalized integer + ZE_IMAGE_FORMAT_TYPE_FLOAT ZeImageFormatType = 4 // ZE_IMAGE_FORMAT_TYPE_FLOAT Float + ZE_IMAGE_FORMAT_TYPE_FORCE_UINT32 ZeImageFormatType = 0x7fffffff // ZE_IMAGE_FORMAT_TYPE_FORCE_UINT32 Value marking end of ZE_IMAGE_FORMAT_TYPE_* ENUMs ) // ZeImageFormatSwizzle (ze_image_format_swizzle_t) Supported image format component swizzle into channel type ZeImageFormatSwizzle uintptr + const ( - ZE_IMAGE_FORMAT_SWIZZLE_R ZeImageFormatSwizzle = 0 // ZE_IMAGE_FORMAT_SWIZZLE_R Red component - ZE_IMAGE_FORMAT_SWIZZLE_G ZeImageFormatSwizzle = 1 // ZE_IMAGE_FORMAT_SWIZZLE_G Green component - ZE_IMAGE_FORMAT_SWIZZLE_B ZeImageFormatSwizzle = 2 // ZE_IMAGE_FORMAT_SWIZZLE_B Blue component - ZE_IMAGE_FORMAT_SWIZZLE_A ZeImageFormatSwizzle = 3 // ZE_IMAGE_FORMAT_SWIZZLE_A Alpha component - ZE_IMAGE_FORMAT_SWIZZLE_0 ZeImageFormatSwizzle = 4 // ZE_IMAGE_FORMAT_SWIZZLE_0 Zero - ZE_IMAGE_FORMAT_SWIZZLE_1 ZeImageFormatSwizzle = 5 // ZE_IMAGE_FORMAT_SWIZZLE_1 One - ZE_IMAGE_FORMAT_SWIZZLE_X ZeImageFormatSwizzle = 6 // ZE_IMAGE_FORMAT_SWIZZLE_X Don't care - ZE_IMAGE_FORMAT_SWIZZLE_D ZeImageFormatSwizzle = 7 // ZE_IMAGE_FORMAT_SWIZZLE_D Depth Component - ZE_IMAGE_FORMAT_SWIZZLE_FORCE_UINT32 ZeImageFormatSwizzle = 0x7fffffff // ZE_IMAGE_FORMAT_SWIZZLE_FORCE_UINT32 Value marking end of ZE_IMAGE_FORMAT_SWIZZLE_* ENUMs + ZE_IMAGE_FORMAT_SWIZZLE_R ZeImageFormatSwizzle = 0 // ZE_IMAGE_FORMAT_SWIZZLE_R Red component + ZE_IMAGE_FORMAT_SWIZZLE_G ZeImageFormatSwizzle = 1 // ZE_IMAGE_FORMAT_SWIZZLE_G Green component + ZE_IMAGE_FORMAT_SWIZZLE_B ZeImageFormatSwizzle = 2 // ZE_IMAGE_FORMAT_SWIZZLE_B Blue component + ZE_IMAGE_FORMAT_SWIZZLE_A ZeImageFormatSwizzle = 3 // ZE_IMAGE_FORMAT_SWIZZLE_A Alpha component + ZE_IMAGE_FORMAT_SWIZZLE_0 ZeImageFormatSwizzle = 4 // ZE_IMAGE_FORMAT_SWIZZLE_0 Zero + ZE_IMAGE_FORMAT_SWIZZLE_1 ZeImageFormatSwizzle = 5 // ZE_IMAGE_FORMAT_SWIZZLE_1 One + ZE_IMAGE_FORMAT_SWIZZLE_X ZeImageFormatSwizzle = 6 // ZE_IMAGE_FORMAT_SWIZZLE_X Don't care + ZE_IMAGE_FORMAT_SWIZZLE_D ZeImageFormatSwizzle = 7 // ZE_IMAGE_FORMAT_SWIZZLE_D Depth Component + ZE_IMAGE_FORMAT_SWIZZLE_FORCE_UINT32 ZeImageFormatSwizzle = 0x7fffffff // ZE_IMAGE_FORMAT_SWIZZLE_FORCE_UINT32 Value marking end of ZE_IMAGE_FORMAT_SWIZZLE_* ENUMs ) -// ZeImageFormat (ze_image_format_t) Image format +// ZeImageFormat (ze_image_format_t) Image format type ZeImageFormat struct { - Layout ZeImageFormatLayout // Layout [in] image format component layout (e.g. N-component layouts and media formats) - Type ZeImageFormatType // Type [in] image format type - X ZeImageFormatSwizzle // X [in] image component swizzle into channel x - Y ZeImageFormatSwizzle // Y [in] image component swizzle into channel y - Z ZeImageFormatSwizzle // Z [in] image component swizzle into channel z - W ZeImageFormatSwizzle // W [in] image component swizzle into channel w + Layout ZeImageFormatLayout // Layout [in] image format component layout (e.g. N-component layouts and media formats) + Type ZeImageFormatType // Type [in] image format type + X ZeImageFormatSwizzle // X [in] image component swizzle into channel x + Y ZeImageFormatSwizzle // Y [in] image component swizzle into channel y + Z ZeImageFormatSwizzle // Z [in] image component swizzle into channel z + W ZeImageFormatSwizzle // W [in] image component swizzle into channel w } // ZeImageDesc (ze_image_desc_t) Image descriptor type ZeImageDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeImageFlags // Flags [in] creation flags. must be 0 (default) or a valid combination of ::ze_image_flag_t; default is read-only, cached access. - Type ZeImageType // Type [in] image type. Media format layouts are unsupported for ::ZE_IMAGE_TYPE_BUFFER - Format ZeImageFormat // Format [in] image format - Width uint64 // Width [in] width dimension. ::ZE_IMAGE_TYPE_BUFFER: size in bytes; see the `maxImageBufferSize` member of ::ze_device_image_properties_t for limits. ::ZE_IMAGE_TYPE_1D, ::ZE_IMAGE_TYPE_1DARRAY: width in pixels; see the `maxImageDims1D` member of ::ze_device_image_properties_t for limits. ::ZE_IMAGE_TYPE_2D, ::ZE_IMAGE_TYPE_2DARRAY: width in pixels; see the `maxImageDims2D` member of ::ze_device_image_properties_t for limits. ::ZE_IMAGE_TYPE_3D: width in pixels; see the `maxImageDims3D` member of ::ze_device_image_properties_t for limits. - Height uint32 // Height [in] height dimension. ::ZE_IMAGE_TYPE_2D, ::ZE_IMAGE_TYPE_2DARRAY: height in pixels; see the `maxImageDims2D` member of ::ze_device_image_properties_t for limits. ::ZE_IMAGE_TYPE_3D: height in pixels; see the `maxImageDims3D` member of ::ze_device_image_properties_t for limits. other: ignored. - Depth uint32 // Depth [in] depth dimension. ::ZE_IMAGE_TYPE_3D: depth in pixels; see the `maxImageDims3D` member of ::ze_device_image_properties_t for limits. other: ignored. - Arraylevels uint32 // Arraylevels [in] array levels. ::ZE_IMAGE_TYPE_1DARRAY, ::ZE_IMAGE_TYPE_2DARRAY: see the `maxImageArraySlices` member of ::ze_device_image_properties_t for limits. other: ignored. - Miplevels uint32 // Miplevels [in] mipmap levels (must be 0) + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeImageFlags // Flags [in] creation flags. must be 0 (default) or a valid combination of ::ze_image_flag_t; default is read-only, cached access. + Type ZeImageType // Type [in] image type. Media format layouts are unsupported for ::ZE_IMAGE_TYPE_BUFFER + Format ZeImageFormat // Format [in] image format + Width uint64 // Width [in] width dimension. ::ZE_IMAGE_TYPE_BUFFER: size in bytes; see the `maxImageBufferSize` member of ::ze_device_image_properties_t for limits. ::ZE_IMAGE_TYPE_1D, ::ZE_IMAGE_TYPE_1DARRAY: width in pixels; see the `maxImageDims1D` member of ::ze_device_image_properties_t for limits. ::ZE_IMAGE_TYPE_2D, ::ZE_IMAGE_TYPE_2DARRAY: width in pixels; see the `maxImageDims2D` member of ::ze_device_image_properties_t for limits. ::ZE_IMAGE_TYPE_3D: width in pixels; see the `maxImageDims3D` member of ::ze_device_image_properties_t for limits. + Height uint32 // Height [in] height dimension. ::ZE_IMAGE_TYPE_2D, ::ZE_IMAGE_TYPE_2DARRAY: height in pixels; see the `maxImageDims2D` member of ::ze_device_image_properties_t for limits. ::ZE_IMAGE_TYPE_3D: height in pixels; see the `maxImageDims3D` member of ::ze_device_image_properties_t for limits. other: ignored. + Depth uint32 // Depth [in] depth dimension. ::ZE_IMAGE_TYPE_3D: depth in pixels; see the `maxImageDims3D` member of ::ze_device_image_properties_t for limits. other: ignored. + Arraylevels uint32 // Arraylevels [in] array levels. ::ZE_IMAGE_TYPE_1DARRAY, ::ZE_IMAGE_TYPE_2DARRAY: see the `maxImageArraySlices` member of ::ze_device_image_properties_t for limits. other: ignored. + Miplevels uint32 // Miplevels [in] mipmap levels (must be 0) } // ZeImageSamplerFilterFlags (ze_image_sampler_filter_flags_t) Supported sampler filtering flags type ZeImageSamplerFilterFlags uint32 + const ( - ZE_IMAGE_SAMPLER_FILTER_FLAG_POINT ZeImageSamplerFilterFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_IMAGE_SAMPLER_FILTER_FLAG_POINT device supports point filtering - ZE_IMAGE_SAMPLER_FILTER_FLAG_LINEAR ZeImageSamplerFilterFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_IMAGE_SAMPLER_FILTER_FLAG_LINEAR device supports linear filtering - ZE_IMAGE_SAMPLER_FILTER_FLAG_FORCE_UINT32 ZeImageSamplerFilterFlags = 0x7fffffff // ZE_IMAGE_SAMPLER_FILTER_FLAG_FORCE_UINT32 Value marking end of ZE_IMAGE_SAMPLER_FILTER_FLAG_* ENUMs + ZE_IMAGE_SAMPLER_FILTER_FLAG_POINT ZeImageSamplerFilterFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_IMAGE_SAMPLER_FILTER_FLAG_POINT device supports point filtering + ZE_IMAGE_SAMPLER_FILTER_FLAG_LINEAR ZeImageSamplerFilterFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_IMAGE_SAMPLER_FILTER_FLAG_LINEAR device supports linear filtering + ZE_IMAGE_SAMPLER_FILTER_FLAG_FORCE_UINT32 ZeImageSamplerFilterFlags = 0x7fffffff // ZE_IMAGE_SAMPLER_FILTER_FLAG_FORCE_UINT32 Value marking end of ZE_IMAGE_SAMPLER_FILTER_FLAG_* ENUMs ) // ZeImageProperties (ze_image_properties_t) Image properties type ZeImageProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Samplerfilterflags ZeImageSamplerFilterFlags // Samplerfilterflags [out] supported sampler filtering. returns 0 (unsupported) or a combination of ::ze_image_sampler_filter_flag_t. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Samplerfilterflags ZeImageSamplerFilterFlags // Samplerfilterflags [out] supported sampler filtering. returns 0 (unsupported) or a combination of ::ze_image_sampler_filter_flag_t. } // ZeImageGetProperties Retrieves supported properties of an image. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == pImageProperties` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3 < desc->flags` -/// + `::ZE_IMAGE_TYPE_BUFFER < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == pImageProperties` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x3 < desc->flags` +// / + `::ZE_IMAGE_TYPE_BUFFER < desc->type` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeImageGetProperties( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - desc *ZeImageDesc, // desc [in] pointer to image descriptor - pImageProperties *ZeImageProperties, // pImageProperties [out] pointer to image properties + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + desc *ZeImageDesc, // desc [in] pointer to image descriptor + pImageProperties *ZeImageProperties, // pImageProperties [out] pointer to image properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeImageGetProperties", uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(pImageProperties))) } // ZeImageCreate Creates an image on the context. -/// -/// @details -/// - The application must only use the image for the device, or its -/// sub-devices, which was provided during creation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @remarks -/// _Analogues_ -/// - clCreateImage -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phImage` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3 < desc->flags` -/// + `::ZE_IMAGE_TYPE_BUFFER < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT +// / +// / @details +// / - The application must only use the image for the device, or its +// / sub-devices, which was provided during creation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @remarks +// / _Analogues_ +// / - clCreateImage +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phImage` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x3 < desc->flags` +// / + `::ZE_IMAGE_TYPE_BUFFER < desc->type` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT func ZeImageCreate( - hContext ZeContextHandle, // hContext [in] handle of the context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - desc *ZeImageDesc, // desc [in] pointer to image descriptor - phImage *ZeImageHandle, // phImage [out] pointer to handle of image object created + hContext ZeContextHandle, // hContext [in] handle of the context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + desc *ZeImageDesc, // desc [in] pointer to image descriptor + phImage *ZeImageHandle, // phImage [out] pointer to handle of image object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zeImageCreate", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phImage))) } // ZeImageDestroy Deletes an image object. -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the image before it is deleted. -/// - The implementation of this function may immediately free all Host and -/// Device allocations associated with this image. -/// - The application must **not** call this function from simultaneous -/// threads with the same image handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hImage` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the image before it is deleted. +// / - The implementation of this function may immediately free all Host and +// / Device allocations associated with this image. +// / - The application must **not** call this function from simultaneous +// / threads with the same image handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hImage` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeImageDestroy( - hImage ZeImageHandle, // hImage [in][release] handle of image object to destroy + hImage ZeImageHandle, // hImage [in][release] handle of image object to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zeImageDestroy", uintptr(hImage)) } - diff --git a/core_imageCopy.go b/core_imageCopy.go index 3f9b61e..aa32a30 100644 --- a/core_imageCopy.go +++ b/core_imageCopy.go @@ -24,146 +24,146 @@ const ZE_IMAGE_COPY_EXT_NAME = "ZE_extension_image_copy" // ZeImageCopyExtVersion (ze_image_copy_ext_version_t) Image Copy Extension Version(s) type ZeImageCopyExtVersion uintptr + const ( - ZE_IMAGE_COPY_EXT_VERSION_1_0 ZeImageCopyExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_COPY_EXT_VERSION_1_0 version 1.0 - ZE_IMAGE_COPY_EXT_VERSION_CURRENT ZeImageCopyExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_COPY_EXT_VERSION_CURRENT latest known version - ZE_IMAGE_COPY_EXT_VERSION_FORCE_UINT32 ZeImageCopyExtVersion = 0x7fffffff // ZE_IMAGE_COPY_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_COPY_EXT_VERSION_* ENUMs + ZE_IMAGE_COPY_EXT_VERSION_1_0 ZeImageCopyExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_COPY_EXT_VERSION_1_0 version 1.0 + ZE_IMAGE_COPY_EXT_VERSION_CURRENT ZeImageCopyExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_COPY_EXT_VERSION_CURRENT latest known version + ZE_IMAGE_COPY_EXT_VERSION_FORCE_UINT32 ZeImageCopyExtVersion = 0x7fffffff // ZE_IMAGE_COPY_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_COPY_EXT_VERSION_* ENUMs ) // ZeCommandListAppendImageCopyToMemoryExt Copies from an image to device or shared memory. -/// -/// @details -/// - The application must ensure the memory pointed to by dstptr is -/// accessible by the device on which the command list was created. -/// - The implementation must not access the memory pointed to by dstptr as -/// it is free to be modified by either the Host or device up until -/// execution. -/// - The application must ensure the image and events are accessible by the -/// device on which the command list was created. -/// - The application must ensure the image format descriptor for the source -/// image is a single-planar format. -/// - The application must ensure that the rowPitch is set to 0 if image is -/// a 1D image. Otherwise the rowPitch must be greater than or equal to -/// the element size in bytes x width. -/// - If rowPitch is set to 0, the appropriate row pitch is calculated based -/// on the size of each element in bytes multiplied by width -/// - The application must ensure that the slicePitch is set to 0 if image -/// is a 1D or 2D image. Otherwise this value must be greater than or -/// equal to rowPitch x height. -/// - If slicePitch is set to 0, the appropriate slice pitch is calculated -/// based on the rowPitch x height. -/// - The application must ensure the command list, image and events were -/// created, and the memory was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clEnqueueReadImage -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hSrcImage` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == dstptr` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the memory pointed to by dstptr is +// / accessible by the device on which the command list was created. +// / - The implementation must not access the memory pointed to by dstptr as +// / it is free to be modified by either the Host or device up until +// / execution. +// / - The application must ensure the image and events are accessible by the +// / device on which the command list was created. +// / - The application must ensure the image format descriptor for the source +// / image is a single-planar format. +// / - The application must ensure that the rowPitch is set to 0 if image is +// / a 1D image. Otherwise the rowPitch must be greater than or equal to +// / the element size in bytes x width. +// / - If rowPitch is set to 0, the appropriate row pitch is calculated based +// / on the size of each element in bytes multiplied by width +// / - The application must ensure that the slicePitch is set to 0 if image +// / is a 1D or 2D image. Otherwise this value must be greater than or +// / equal to rowPitch x height. +// / - If slicePitch is set to 0, the appropriate slice pitch is calculated +// / based on the rowPitch x height. +// / - The application must ensure the command list, image and events were +// / created, and the memory was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clEnqueueReadImage +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hSrcImage` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == dstptr` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendImageCopyToMemoryExt( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list - dstptr unsafe.Pointer, // dstptr [in] pointer to destination memory to copy to - hSrcImage ZeImageHandle, // hSrcImage [in] handle of source image to copy from - pSrcRegion *ZeImageRegion, // pSrcRegion [in][optional] source region descriptor - destRowPitch uint32, // destRowPitch [in] size in bytes of the 1D slice of the 2D region of a 2D or 3D image or each image of a 1D or 2D image array being written - destSlicePitch uint32, // destSlicePitch [in] size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being written - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list + dstptr unsafe.Pointer, // dstptr [in] pointer to destination memory to copy to + hSrcImage ZeImageHandle, // hSrcImage [in] handle of source image to copy from + pSrcRegion *ZeImageRegion, // pSrcRegion [in][optional] source region descriptor + destRowPitch uint32, // destRowPitch [in] size in bytes of the 1D slice of the 2D region of a 2D or 3D image or each image of a 1D or 2D image array being written + destSlicePitch uint32, // destSlicePitch [in] size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being written + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendImageCopyToMemoryExt", uintptr(hCommandList), uintptr(unsafe.Pointer(dstptr)), uintptr(hSrcImage), uintptr(unsafe.Pointer(pSrcRegion)), uintptr(destRowPitch), uintptr(destSlicePitch), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListAppendImageCopyFromMemoryExt Copies to an image from device or shared memory. -/// -/// @details -/// - The application must ensure the memory pointed to by srcptr is -/// accessible by the device on which the command list was created. -/// - The implementation must not access the memory pointed to by srcptr as -/// it is free to be modified by either the Host or device up until -/// execution. -/// - The application must ensure the image and events are accessible by the -/// device on which the command list was created. -/// - The application must ensure the image format descriptor for the -/// destination image is a single-planar format. -/// - The application must ensure that the rowPitch is set to 0 if image is -/// a 1D image. Otherwise the rowPitch must be greater than or equal to -/// the element size in bytes x width. -/// - If rowPitch is set to 0, the appropriate row pitch is calculated based -/// on the size of each element in bytes multiplied by width -/// - The application must ensure that the slicePitch is set to 0 if image -/// is a 1D or 2D image. Otherwise this value must be greater than or -/// equal to rowPitch x height. -/// - If slicePitch is set to 0, the appropriate slice pitch is calculated -/// based on the rowPitch x height. -/// - The application must ensure the command list, image and events were -/// created, and the memory was allocated, on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @remarks -/// _Analogues_ -/// - clEnqueueWriteImage -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hDstImage` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == srcptr` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the memory pointed to by srcptr is +// / accessible by the device on which the command list was created. +// / - The implementation must not access the memory pointed to by srcptr as +// / it is free to be modified by either the Host or device up until +// / execution. +// / - The application must ensure the image and events are accessible by the +// / device on which the command list was created. +// / - The application must ensure the image format descriptor for the +// / destination image is a single-planar format. +// / - The application must ensure that the rowPitch is set to 0 if image is +// / a 1D image. Otherwise the rowPitch must be greater than or equal to +// / the element size in bytes x width. +// / - If rowPitch is set to 0, the appropriate row pitch is calculated based +// / on the size of each element in bytes multiplied by width +// / - The application must ensure that the slicePitch is set to 0 if image +// / is a 1D or 2D image. Otherwise this value must be greater than or +// / equal to rowPitch x height. +// / - If slicePitch is set to 0, the appropriate slice pitch is calculated +// / based on the rowPitch x height. +// / - The application must ensure the command list, image and events were +// / created, and the memory was allocated, on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @remarks +// / _Analogues_ +// / - clEnqueueWriteImage +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hDstImage` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == srcptr` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendImageCopyFromMemoryExt( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list - hDstImage ZeImageHandle, // hDstImage [in] handle of destination image to copy to - srcptr unsafe.Pointer, // srcptr [in] pointer to source memory to copy from - pDstRegion *ZeImageRegion, // pDstRegion [in][optional] destination region descriptor - srcRowPitch uint32, // srcRowPitch [in] size in bytes of the 1D slice of the 2D region of a 2D or 3D image or each image of a 1D or 2D image array being read - srcSlicePitch uint32, // srcSlicePitch [in] size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being read - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of command list + hDstImage ZeImageHandle, // hDstImage [in] handle of destination image to copy to + srcptr unsafe.Pointer, // srcptr [in] pointer to source memory to copy from + pDstRegion *ZeImageRegion, // pDstRegion [in][optional] destination region descriptor + srcRowPitch uint32, // srcRowPitch [in] size in bytes of the 1D slice of the 2D region of a 2D or 3D image or each image of a 1D or 2D image array being read + srcSlicePitch uint32, // srcSlicePitch [in] size in bytes of the 2D slice of the 3D region of a 3D image or each image of a 1D or 2D image array being read + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendImageCopyFromMemoryExt", uintptr(hCommandList), uintptr(hDstImage), uintptr(unsafe.Pointer(srcptr)), uintptr(unsafe.Pointer(pDstRegion)), uintptr(srcRowPitch), uintptr(srcSlicePitch), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } - diff --git a/core_imageFormatSupport.go b/core_imageFormatSupport.go index 3fd9cce..e719ece 100644 --- a/core_imageFormatSupport.go +++ b/core_imageFormatSupport.go @@ -22,27 +22,27 @@ const ZE_IMAGE_FORMAT_SUPPORT_EXT_NAME = "ZE_extension_image_format_support" // ZeImageFormatSupportExtVersion (ze_image_format_support_ext_version_t) Image Format Support Extension Version(s) type ZeImageFormatSupportExtVersion uintptr + const ( - ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_1_0 ZeImageFormatSupportExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_1_0 version 1.0 - ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_CURRENT ZeImageFormatSupportExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_CURRENT latest known version - ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_FORCE_UINT32 ZeImageFormatSupportExtVersion = 0x7fffffff // ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_* ENUMs + ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_1_0 ZeImageFormatSupportExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_1_0 version 1.0 + ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_CURRENT ZeImageFormatSupportExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_CURRENT latest known version + ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_FORCE_UINT32 ZeImageFormatSupportExtVersion = 0x7fffffff // ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_FORMAT_SUPPORT_EXT_VERSION_* ENUMs ) // ZeImageFormatSupportExtProperties (ze_image_format_support_ext_properties_t) Image format support query properties -/// -/// @details -/// - This structure may be passed to ::zeImageGetProperties via the pNext -/// member of ::ze_image_properties_t. -/// - The implementation shall populate the supported field based on the -/// ::ze_image_desc_t and ::ze_device_handle_t passed to -/// ::zeImageGetProperties. -/// - This provides a mechanism to query format support without requiring -/// image creation. +// / +// / @details +// / - This structure may be passed to ::zeImageGetProperties via the pNext +// / member of ::ze_image_properties_t. +// / - The implementation shall populate the supported field based on the +// / ::ze_image_desc_t and ::ze_device_handle_t passed to +// / ::zeImageGetProperties. +// / - This provides a mechanism to query format support without requiring +// / image creation. type ZeImageFormatSupportExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Supported ZeBool // Supported [out] boolean flag indicating whether the image format is supported on the queried device + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Supported ZeBool // Supported [out] boolean flag indicating whether the image format is supported on the queried device } - diff --git a/core_imageQueryAllocProperties.go b/core_imageQueryAllocProperties.go index 173c359..f84b194 100644 --- a/core_imageQueryAllocProperties.go +++ b/core_imageQueryAllocProperties.go @@ -24,51 +24,51 @@ const ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_NAME = "ZE_extension_image_query_alloc // ZeImageQueryAllocPropertiesExtVersion (ze_image_query_alloc_properties_ext_version_t) Image Query Allocation Properties Extension Version(s) type ZeImageQueryAllocPropertiesExtVersion uintptr + const ( - ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_1_0 ZeImageQueryAllocPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_1_0 version 1.0 - ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_CURRENT ZeImageQueryAllocPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_CURRENT latest known version - ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZeImageQueryAllocPropertiesExtVersion = 0x7fffffff // ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_* ENUMs + ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_1_0 ZeImageQueryAllocPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_1_0 version 1.0 + ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_CURRENT ZeImageQueryAllocPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_CURRENT latest known version + ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZeImageQueryAllocPropertiesExtVersion = 0x7fffffff // ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_QUERY_ALLOC_PROPERTIES_EXT_VERSION_* ENUMs ) // ZeImageAllocationExtProperties (ze_image_allocation_ext_properties_t) Image allocation properties queried using -/// ::zeImageGetAllocPropertiesExt +// / ::zeImageGetAllocPropertiesExt type ZeImageAllocationExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Id uint64 // Id [out] identifier for this allocation + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Id uint64 // Id [out] identifier for this allocation } // ZeImageGetAllocPropertiesExt Retrieves attributes of an image allocation -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hImage` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pImageAllocProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hImage` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pImageAllocProperties` func ZeImageGetAllocPropertiesExt( - hContext ZeContextHandle, // hContext [in] handle of the context object - hImage ZeImageHandle, // hImage [in] handle of image object to query - pImageAllocProperties *ZeImageAllocationExtProperties, // pImageAllocProperties [in,out] query result for image allocation properties + hContext ZeContextHandle, // hContext [in] handle of the context object + hImage ZeImageHandle, // hImage [in] handle of image object to query + pImageAllocProperties *ZeImageAllocationExtProperties, // pImageAllocProperties [in,out] query result for image allocation properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zeImageGetAllocPropertiesExt", uintptr(hContext), uintptr(hImage), uintptr(unsafe.Pointer(pImageAllocProperties))) } - diff --git a/core_imagememoryproperties.go b/core_imagememoryproperties.go index 2fff985..b00c0c6 100644 --- a/core_imagememoryproperties.go +++ b/core_imagememoryproperties.go @@ -24,57 +24,57 @@ const ZE_IMAGE_MEMORY_PROPERTIES_EXP_NAME = "ZE_experimental_image_memory_proper // ZeImageMemoryPropertiesExpVersion (ze_image_memory_properties_exp_version_t) Image Memory Properties Extension Version(s) type ZeImageMemoryPropertiesExpVersion uintptr + const ( - ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_1_0 ZeImageMemoryPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_1_0 version 1.0 - ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_CURRENT ZeImageMemoryPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_CURRENT latest known version - ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_FORCE_UINT32 ZeImageMemoryPropertiesExpVersion = 0x7fffffff // ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_* ENUMs + ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_1_0 ZeImageMemoryPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_1_0 version 1.0 + ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_CURRENT ZeImageMemoryPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_CURRENT latest known version + ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_FORCE_UINT32 ZeImageMemoryPropertiesExpVersion = 0x7fffffff // ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_MEMORY_PROPERTIES_EXP_VERSION_* ENUMs ) // ZeImageMemoryPropertiesExp (ze_image_memory_properties_exp_t) Image memory properties type ZeImageMemoryPropertiesExp struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Size uint64 // Size [out] size of image allocation in bytes. - Rowpitch uint64 // Rowpitch [out] size of image row in bytes. - Slicepitch uint64 // Slicepitch [out] size of image slice in bytes. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Size uint64 // Size [out] size of image allocation in bytes. + Rowpitch uint64 // Rowpitch [out] size of image row in bytes. + Slicepitch uint64 // Slicepitch [out] size of image slice in bytes. } // ZeImageGetMemoryPropertiesExp Query image memory properties. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_IMAGE_MEMORY_PROPERTIES_EXP_NAME -/// extension. -/// -/// @remarks -/// _Analogues_ -/// - None -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hImage` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pMemoryProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / - The implementation must support ::ZE_IMAGE_MEMORY_PROPERTIES_EXP_NAME +// / extension. +// / +// / @remarks +// / _Analogues_ +// / - None +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hImage` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pMemoryProperties` func ZeImageGetMemoryPropertiesExp( - hImage ZeImageHandle, // hImage [in] handle of image object - pMemoryProperties *ZeImageMemoryPropertiesExp, // pMemoryProperties [in,out] query result for image memory properties. + hImage ZeImageHandle, // hImage [in] handle of image object + pMemoryProperties *ZeImageMemoryPropertiesExp, // pMemoryProperties [in,out] query result for image memory properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeImageGetMemoryPropertiesExp", uintptr(hImage), uintptr(unsafe.Pointer(pMemoryProperties))) } - diff --git a/core_imageview.go b/core_imageview.go index 1c1b7c0..0f8882d 100644 --- a/core_imageview.go +++ b/core_imageview.go @@ -24,64 +24,65 @@ const ZE_IMAGE_VIEW_EXT_NAME = "ZE_extension_image_view" // ZeImageViewExtVersion (ze_image_view_ext_version_t) Image View Extension Version(s) type ZeImageViewExtVersion uintptr + const ( - ZE_IMAGE_VIEW_EXT_VERSION_1_0 ZeImageViewExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_EXT_VERSION_1_0 version 1.0 - ZE_IMAGE_VIEW_EXT_VERSION_CURRENT ZeImageViewExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_EXT_VERSION_CURRENT latest known version - ZE_IMAGE_VIEW_EXT_VERSION_FORCE_UINT32 ZeImageViewExtVersion = 0x7fffffff // ZE_IMAGE_VIEW_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_VIEW_EXT_VERSION_* ENUMs + ZE_IMAGE_VIEW_EXT_VERSION_1_0 ZeImageViewExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_VIEW_EXT_VERSION_1_0 version 1.0 + ZE_IMAGE_VIEW_EXT_VERSION_CURRENT ZeImageViewExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_VIEW_EXT_VERSION_CURRENT latest known version + ZE_IMAGE_VIEW_EXT_VERSION_FORCE_UINT32 ZeImageViewExtVersion = 0x7fffffff // ZE_IMAGE_VIEW_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_VIEW_EXT_VERSION_* ENUMs ) // ZeImageViewCreateExt Create image view on the context. -/// -/// @details -/// - The application must only use the image view for the device, or its -/// sub-devices, which was provided during creation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_IMAGE_VIEW_EXT_NAME extension. -/// - Image views are treated as images from the API. -/// - Image views provide a mechanism to redescribe how an image is -/// interpreted (e.g. different format). -/// - Image views become disabled when their corresponding image resource is -/// destroyed. -/// - Use ::zeImageDestroy to destroy image view objects. -/// -/// @remarks -/// _Analogues_ -/// - None -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// + `nullptr == hImage` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phImageView` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3 < desc->flags` -/// + `::ZE_IMAGE_TYPE_BUFFER < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT +// / +// / @details +// / - The application must only use the image view for the device, or its +// / sub-devices, which was provided during creation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / - The implementation must support ::ZE_IMAGE_VIEW_EXT_NAME extension. +// / - Image views are treated as images from the API. +// / - Image views provide a mechanism to redescribe how an image is +// / interpreted (e.g. different format). +// / - Image views become disabled when their corresponding image resource is +// / destroyed. +// / - Use ::zeImageDestroy to destroy image view objects. +// / +// / @remarks +// / _Analogues_ +// / - None +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / + `nullptr == hImage` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phImageView` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x3 < desc->flags` +// / + `::ZE_IMAGE_TYPE_BUFFER < desc->type` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT func ZeImageViewCreateExt( - hContext ZeContextHandle, // hContext [in] handle of the context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - desc *ZeImageDesc, // desc [in] pointer to image descriptor - hImage ZeImageHandle, // hImage [in] handle of image object to create view from - phImageView *ZeImageHandle, // phImageView [out] pointer to handle of image object created for view + hContext ZeContextHandle, // hContext [in] handle of the context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + desc *ZeImageDesc, // desc [in] pointer to image descriptor + hImage ZeImageHandle, // hImage [in] handle of image object to create view from + phImageView *ZeImageHandle, // phImageView [out] pointer to handle of image object created for view ) (ZeResult, error) { return zecall.Call[ZeResult]("zeImageViewCreateExt", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(hImage), uintptr(unsafe.Pointer(phImageView))) } @@ -91,67 +92,67 @@ const ZE_IMAGE_VIEW_EXP_NAME = "ZE_experimental_image_view" // ZeImageViewExpVersion (ze_image_view_exp_version_t) Image View Extension Version(s) type ZeImageViewExpVersion uintptr + const ( - ZE_IMAGE_VIEW_EXP_VERSION_1_0 ZeImageViewExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_EXP_VERSION_1_0 version 1.0 - ZE_IMAGE_VIEW_EXP_VERSION_CURRENT ZeImageViewExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_EXP_VERSION_CURRENT latest known version - ZE_IMAGE_VIEW_EXP_VERSION_FORCE_UINT32 ZeImageViewExpVersion = 0x7fffffff // ZE_IMAGE_VIEW_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_VIEW_EXP_VERSION_* ENUMs + ZE_IMAGE_VIEW_EXP_VERSION_1_0 ZeImageViewExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_VIEW_EXP_VERSION_1_0 version 1.0 + ZE_IMAGE_VIEW_EXP_VERSION_CURRENT ZeImageViewExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_VIEW_EXP_VERSION_CURRENT latest known version + ZE_IMAGE_VIEW_EXP_VERSION_FORCE_UINT32 ZeImageViewExpVersion = 0x7fffffff // ZE_IMAGE_VIEW_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_VIEW_EXP_VERSION_* ENUMs ) // ZeImageViewCreateExp Create image view on the context. -/// -/// @details -/// - The application must only use the image view for the device, or its -/// sub-devices, which was provided during creation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// - The implementation must support ::ZE_IMAGE_VIEW_EXP_NAME extension. -/// - Image views are treated as images from the API. -/// - Image views provide a mechanism to redescribe how an image is -/// interpreted (e.g. different format). -/// - Image views become disabled when their corresponding image resource is -/// destroyed. -/// - Use ::zeImageDestroy to destroy image view objects. -/// - Note: This function is deprecated and replaced by -/// ::zeImageViewCreateExt. -/// -/// @remarks -/// _Analogues_ -/// - None -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// + `nullptr == hImage` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phImageView` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3 < desc->flags` -/// + `::ZE_IMAGE_TYPE_BUFFER < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT +// / +// / @details +// / - The application must only use the image view for the device, or its +// / sub-devices, which was provided during creation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / - The implementation must support ::ZE_IMAGE_VIEW_EXP_NAME extension. +// / - Image views are treated as images from the API. +// / - Image views provide a mechanism to redescribe how an image is +// / interpreted (e.g. different format). +// / - Image views become disabled when their corresponding image resource is +// / destroyed. +// / - Use ::zeImageDestroy to destroy image view objects. +// / - Note: This function is deprecated and replaced by +// / ::zeImageViewCreateExt. +// / +// / @remarks +// / _Analogues_ +// / - None +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / + `nullptr == hImage` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phImageView` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x3 < desc->flags` +// / + `::ZE_IMAGE_TYPE_BUFFER < desc->type` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT func ZeImageViewCreateExp( - hContext ZeContextHandle, // hContext [in] handle of the context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - desc *ZeImageDesc, // desc [in] pointer to image descriptor - hImage ZeImageHandle, // hImage [in] handle of image object to create view from - phImageView *ZeImageHandle, // phImageView [out] pointer to handle of image object created for view + hContext ZeContextHandle, // hContext [in] handle of the context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + desc *ZeImageDesc, // desc [in] pointer to image descriptor + hImage ZeImageHandle, // hImage [in] handle of image object to create view from + phImageView *ZeImageHandle, // phImageView [out] pointer to handle of image object created for view ) (ZeResult, error) { return zecall.Call[ZeResult]("zeImageViewCreateExp", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(hImage), uintptr(unsafe.Pointer(phImageView))) } - diff --git a/core_imageviewplanar.go b/core_imageviewplanar.go index d125d95..de8b9da 100644 --- a/core_imageviewplanar.go +++ b/core_imageviewplanar.go @@ -22,18 +22,19 @@ const ZE_IMAGE_VIEW_PLANAR_EXT_NAME = "ZE_extension_image_view_planar" // ZeImageViewPlanarExtVersion (ze_image_view_planar_ext_version_t) Image View Planar Extension Version(s) type ZeImageViewPlanarExtVersion uintptr + const ( - ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_1_0 ZeImageViewPlanarExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_1_0 version 1.0 - ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_CURRENT ZeImageViewPlanarExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_CURRENT latest known version - ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_FORCE_UINT32 ZeImageViewPlanarExtVersion = 0x7fffffff // ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_* ENUMs + ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_1_0 ZeImageViewPlanarExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_1_0 version 1.0 + ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_CURRENT ZeImageViewPlanarExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_CURRENT latest known version + ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_FORCE_UINT32 ZeImageViewPlanarExtVersion = 0x7fffffff // ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_VIEW_PLANAR_EXT_VERSION_* ENUMs ) // ZeImageViewPlanarExtDesc (ze_image_view_planar_ext_desc_t) Image view planar descriptor type ZeImageViewPlanarExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Planeindex uint32 // Planeindex [in] the 0-based plane index (e.g. NV12 is 0 = Y plane, 1 UV plane) + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Planeindex uint32 // Planeindex [in] the 0-based plane index (e.g. NV12 is 0 = Y plane, 1 UV plane) } @@ -42,18 +43,18 @@ const ZE_IMAGE_VIEW_PLANAR_EXP_NAME = "ZE_experimental_image_view_planar" // ZeImageViewPlanarExpVersion (ze_image_view_planar_exp_version_t) Image View Planar Extension Version(s) type ZeImageViewPlanarExpVersion uintptr + const ( - ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_1_0 ZeImageViewPlanarExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_1_0 version 1.0 - ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_CURRENT ZeImageViewPlanarExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_CURRENT latest known version - ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_FORCE_UINT32 ZeImageViewPlanarExpVersion = 0x7fffffff // ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_* ENUMs + ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_1_0 ZeImageViewPlanarExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_1_0 version 1.0 + ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_CURRENT ZeImageViewPlanarExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_CURRENT latest known version + ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_FORCE_UINT32 ZeImageViewPlanarExpVersion = 0x7fffffff // ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_IMAGE_VIEW_PLANAR_EXP_VERSION_* ENUMs ) // ZeImageViewPlanarExpDesc (ze_image_view_planar_exp_desc_t) Image view planar descriptor type ZeImageViewPlanarExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Planeindex uint32 // Planeindex [DEPRECATED] no longer supported, use ::ze_image_view_planar_ext_desc_t instead + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Planeindex uint32 // Planeindex [DEPRECATED] no longer supported, use ::ze_image_view_planar_ext_desc_t instead } - diff --git a/core_immediateCommandListAppend.go b/core_immediateCommandListAppend.go index dd6fe3d..fdd7118 100644 --- a/core_immediateCommandListAppend.go +++ b/core_immediateCommandListAppend.go @@ -24,50 +24,50 @@ const ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_NAME = "ZE_experimental_immediate_com // ZeImmediateCommandListAppendExpVersion (ze_immediate_command_list_append_exp_version_t) Immediate Command List Append Extension Version(s) type ZeImmediateCommandListAppendExpVersion uintptr + const ( - ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_1_0 ZeImmediateCommandListAppendExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_1_0 version 1.0 - ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_CURRENT ZeImmediateCommandListAppendExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_CURRENT latest known version - ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_FORCE_UINT32 ZeImmediateCommandListAppendExpVersion = 0x7fffffff // ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_* ENUMs + ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_1_0 ZeImmediateCommandListAppendExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_1_0 version 1.0 + ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_CURRENT ZeImmediateCommandListAppendExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_CURRENT latest known version + ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_FORCE_UINT32 ZeImmediateCommandListAppendExpVersion = 0x7fffffff // ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_IMMEDIATE_COMMAND_LIST_APPEND_EXP_VERSION_* ENUMs ) // ZeCommandListImmediateAppendCommandListsExp Appends command lists to dispatch from an immediate command list. -/// -/// @details -/// - The application must call this function only with command lists -/// created with ::zeCommandListCreateImmediate. -/// - The command lists passed to this function in the `phCommandLists` -/// argument must be regular command lists (i.e. not immediate command -/// lists). -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandListImmediate` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phCommandLists` +// / +// / @details +// / - The application must call this function only with command lists +// / created with ::zeCommandListCreateImmediate. +// / - The command lists passed to this function in the `phCommandLists` +// / argument must be regular command lists (i.e. not immediate command +// / lists). +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandListImmediate` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phCommandLists` func ZeCommandListImmediateAppendCommandListsExp( - hCommandListImmediate ZeCommandListHandle, // hCommandListImmediate [in] handle of the immediate command list - numCommandLists uint32, // numCommandLists [in] number of command lists - phCommandLists *ZeCommandListHandle, // phCommandLists [in][range(0, numCommandLists)] handles of command lists - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - if not null, this event is signaled after the completion of all appended command lists - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before executing appended command lists; must be 0 if nullptr == phWaitEvents - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing appended command lists. - if not null, all wait events must be satisfied prior to the start of any appended command list(s) + hCommandListImmediate ZeCommandListHandle, // hCommandListImmediate [in] handle of the immediate command list + numCommandLists uint32, // numCommandLists [in] number of command lists + phCommandLists *ZeCommandListHandle, // phCommandLists [in][range(0, numCommandLists)] handles of command lists + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - if not null, this event is signaled after the completion of all appended command lists + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before executing appended command lists; must be 0 if nullptr == phWaitEvents + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before executing appended command lists. - if not null, all wait events must be satisfied prior to the start of any appended command list(s) ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListImmediateAppendCommandListsExp", uintptr(hCommandListImmediate), uintptr(numCommandLists), uintptr(unsafe.Pointer(phCommandLists)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } - diff --git a/core_ipcMemHandleType.go b/core_ipcMemHandleType.go index f68d516..01b2d53 100644 --- a/core_ipcMemHandleType.go +++ b/core_ipcMemHandleType.go @@ -24,74 +24,75 @@ const ZE_IPC_MEM_HANDLE_TYPE_EXT_NAME = "ZE_extension_ipc_mem_handle_type" // ZeIpcMemHandleTypeExtVersion (ze_ipc_mem_handle_type_ext_version_t) IPC Memory Handle Type Extension Version(s) type ZeIpcMemHandleTypeExtVersion uintptr + const ( - ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_1_0 ZeIpcMemHandleTypeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_1_0 version 1.0 - ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_CURRENT ZeIpcMemHandleTypeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_CURRENT latest known version - ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_FORCE_UINT32 ZeIpcMemHandleTypeExtVersion = 0x7fffffff // ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_* ENUMs + ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_1_0 ZeIpcMemHandleTypeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_1_0 version 1.0 + ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_CURRENT ZeIpcMemHandleTypeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_CURRENT latest known version + ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_FORCE_UINT32 ZeIpcMemHandleTypeExtVersion = 0x7fffffff // ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_IPC_MEM_HANDLE_TYPE_EXT_VERSION_* ENUMs ) // ZeIpcMemHandleTypeFlags (ze_ipc_mem_handle_type_flags_t) Supported IPC memory handle type flags type ZeIpcMemHandleTypeFlags uint32 + const ( - ZE_IPC_MEM_HANDLE_TYPE_FLAG_DEFAULT ZeIpcMemHandleTypeFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_IPC_MEM_HANDLE_TYPE_FLAG_DEFAULT Local IPC memory handle type for use within the same machine. - ZE_IPC_MEM_HANDLE_TYPE_FLAG_FABRIC_ACCESSIBLE ZeIpcMemHandleTypeFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_IPC_MEM_HANDLE_TYPE_FLAG_FABRIC_ACCESSIBLE Fabric accessible IPC memory handle type for use across machines via a + ZE_IPC_MEM_HANDLE_TYPE_FLAG_DEFAULT ZeIpcMemHandleTypeFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_IPC_MEM_HANDLE_TYPE_FLAG_DEFAULT Local IPC memory handle type for use within the same machine. + ZE_IPC_MEM_HANDLE_TYPE_FLAG_FABRIC_ACCESSIBLE ZeIpcMemHandleTypeFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_IPC_MEM_HANDLE_TYPE_FLAG_FABRIC_ACCESSIBLE Fabric accessible IPC memory handle type for use across machines via a ///< supported fabric. - ZE_IPC_MEM_HANDLE_TYPE_FLAG_FORCE_UINT32 ZeIpcMemHandleTypeFlags = 0x7fffffff // ZE_IPC_MEM_HANDLE_TYPE_FLAG_FORCE_UINT32 Value marking end of ZE_IPC_MEM_HANDLE_TYPE_FLAG_* ENUMs + ZE_IPC_MEM_HANDLE_TYPE_FLAG_FORCE_UINT32 ZeIpcMemHandleTypeFlags = 0x7fffffff // ZE_IPC_MEM_HANDLE_TYPE_FLAG_FORCE_UINT32 Value marking end of ZE_IPC_MEM_HANDLE_TYPE_FLAG_* ENUMs ) // ZeIpcMemHandleTypeExtDesc (ze_ipc_mem_handle_type_ext_desc_t) ['IPC Memory Handle Type Extension Descriptor', 'Used in -/// ::zeMemGetIpcHandleWithProperties, ::zeMemAllocDevice, and -/// ::zeMemAllocHost, ::zePhysicalMemCreate to specify the IPC memory -/// handle type to create for this allocation.'] +// / ::zeMemGetIpcHandleWithProperties, ::zeMemAllocDevice, and +// / ::zeMemAllocHost, ::zePhysicalMemCreate to specify the IPC memory +// / handle type to create for this allocation.'] type ZeIpcMemHandleTypeExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Typeflags ZeIpcMemHandleTypeFlags // Typeflags [in] valid combination of ::ze_ipc_mem_handle_type_flag_t + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Typeflags ZeIpcMemHandleTypeFlags // Typeflags [in] valid combination of ::ze_ipc_mem_handle_type_flag_t } // ZeMemGetIpcHandleWithProperties Creates an IPC memory handle for the specified allocation with -/// properties for the requested handle. -/// -/// @details -/// - Takes a pointer to a device or host memory allocation and creates an -/// IPC memory handle for exporting it for use in another process. -/// - The pointer must be the base pointer of a device or host memory -/// allocation; i.e. the value returned from ::zeMemAllocDevice or from -/// ::zeMemAllocHost, respectively or allocated from -/// ::zePhysicalMemCreate. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// + `nullptr == pIpcHandle` +// / properties for the requested handle. +// / +// / @details +// / - Takes a pointer to a device or host memory allocation and creates an +// / IPC memory handle for exporting it for use in another process. +// / - The pointer must be the base pointer of a device or host memory +// / allocation; i.e. the value returned from ::zeMemAllocDevice or from +// / ::zeMemAllocHost, respectively or allocated from +// / ::zePhysicalMemCreate. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / + `nullptr == pIpcHandle` func ZeMemGetIpcHandleWithProperties( - hContext ZeContextHandle, // hContext [in] handle of the context object - ptr unsafe.Pointer, // ptr [in] pointer to the device memory allocation - pNext unsafe.Pointer, // pNext [in][optional] Pointer to extension-specific structure. - pIpcHandle *ZeIpcMemHandle, // pIpcHandle [out] Returned IPC memory handle + hContext ZeContextHandle, // hContext [in] handle of the context object + ptr unsafe.Pointer, // ptr [in] pointer to the device memory allocation + pNext unsafe.Pointer, // pNext [in][optional] Pointer to extension-specific structure. + pIpcHandle *ZeIpcMemHandle, // pIpcHandle [out] Returned IPC memory handle ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemGetIpcHandleWithProperties", uintptr(hContext), uintptr(unsafe.Pointer(ptr)), uintptr(unsafe.Pointer(pNext)), uintptr(unsafe.Pointer(pIpcHandle))) } - diff --git a/core_kernelAllocationProperties.go b/core_kernelAllocationProperties.go index bd2f6df..dcb5005 100644 --- a/core_kernelAllocationProperties.go +++ b/core_kernelAllocationProperties.go @@ -24,55 +24,55 @@ const ZE_GET_KERNEL_ALLOCATION_PROPERTIES_EXP_NAME = "ZE_experimental_kernel_all // ZeKernelGetAllocationPropertiesExpVersion (ze_kernel_get_allocation_properties_exp_version_t) Get Kernel Allocation Properties Extension Version(s) type ZeKernelGetAllocationPropertiesExpVersion uintptr + const ( - ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_1_0 ZeKernelGetAllocationPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_1_0 version 1.0 - ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_CURRENT ZeKernelGetAllocationPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_CURRENT latest known version - ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_FORCE_UINT32 ZeKernelGetAllocationPropertiesExpVersion = 0x7fffffff // ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_* ENUMs + ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_1_0 ZeKernelGetAllocationPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_1_0 version 1.0 + ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_CURRENT ZeKernelGetAllocationPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_CURRENT latest known version + ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_FORCE_UINT32 ZeKernelGetAllocationPropertiesExpVersion = 0x7fffffff // ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_KERNEL_GET_ALLOCATION_PROPERTIES_EXP_VERSION_* ENUMs ) // ZeKernelAllocationExpProperties (ze_kernel_allocation_exp_properties_t) Kernel allocation properties type ZeKernelAllocationExpProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Base uint64 // Base [out] base address of the allocation - Size uintptr // Size [out] size of allocation - Type ZeMemoryType // Type [out] type of allocation - Argindex uint32 // Argindex [out] kernel argument index for current allocation, -1 for driver internal (not kernel argument) allocations + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Base uint64 // Base [out] base address of the allocation + Size uintptr // Size [out] size of allocation + Type ZeMemoryType // Type [out] type of allocation + Argindex uint32 // Argindex [out] kernel argument index for current allocation, -1 for driver internal (not kernel argument) allocations } // ZeKernelGetAllocationPropertiesExp Retrieves kernel allocation properties. -/// -/// @details -/// - A valid kernel handle must be created with ::zeKernelCreate. -/// - Returns array of kernel allocation properties for kernel handle. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - A valid kernel handle must be created with ::zeKernelCreate. +// / - Returns array of kernel allocation properties for kernel handle. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeKernelGetAllocationPropertiesExp( - hKernel ZeKernelHandle, // hKernel [in] Kernel handle. - pCount *uint32, // pCount [in,out] pointer to the number of kernel allocation properties. if count is zero, then the driver shall update the value with the total number of kernel allocation properties available. if count is greater than the number of kernel allocation properties available, then the driver shall update the value with the correct number of kernel allocation properties. - pAllocationProperties *ZeKernelAllocationExpProperties, // pAllocationProperties [in,out][optional][range(0, *pCount)] array of kernel allocation properties. if count is less than the number of kernel allocation properties available, then driver shall only retrieve that number of kernel allocation properties. + hKernel ZeKernelHandle, // hKernel [in] Kernel handle. + pCount *uint32, // pCount [in,out] pointer to the number of kernel allocation properties. if count is zero, then the driver shall update the value with the total number of kernel allocation properties available. if count is greater than the number of kernel allocation properties available, then the driver shall update the value with the correct number of kernel allocation properties. + pAllocationProperties *ZeKernelAllocationExpProperties, // pAllocationProperties [in,out][optional][range(0, *pCount)] array of kernel allocation properties. if count is less than the number of kernel allocation properties available, then driver shall only retrieve that number of kernel allocation properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelGetAllocationPropertiesExp", uintptr(hKernel), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pAllocationProperties))) } - diff --git a/core_kernelBinary.go b/core_kernelBinary.go index 0574e72..6732865 100644 --- a/core_kernelBinary.go +++ b/core_kernelBinary.go @@ -24,46 +24,46 @@ const ZE_GET_KERNEL_BINARY_EXP_NAME = "ZE_extension_kernel_binary_exp" // ZeKernelGetBinaryExpVersion (ze_kernel_get_binary_exp_version_t) Get Kernel Binary Extension Version(s) type ZeKernelGetBinaryExpVersion uintptr + const ( - ZE_KERNEL_GET_BINARY_EXP_VERSION_1_0 ZeKernelGetBinaryExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_KERNEL_GET_BINARY_EXP_VERSION_1_0 version 1.0 - ZE_KERNEL_GET_BINARY_EXP_VERSION_CURRENT ZeKernelGetBinaryExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_KERNEL_GET_BINARY_EXP_VERSION_CURRENT latest known version - ZE_KERNEL_GET_BINARY_EXP_VERSION_FORCE_UINT32 ZeKernelGetBinaryExpVersion = 0x7fffffff // ZE_KERNEL_GET_BINARY_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_KERNEL_GET_BINARY_EXP_VERSION_* ENUMs + ZE_KERNEL_GET_BINARY_EXP_VERSION_1_0 ZeKernelGetBinaryExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_KERNEL_GET_BINARY_EXP_VERSION_1_0 version 1.0 + ZE_KERNEL_GET_BINARY_EXP_VERSION_CURRENT ZeKernelGetBinaryExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_KERNEL_GET_BINARY_EXP_VERSION_CURRENT latest known version + ZE_KERNEL_GET_BINARY_EXP_VERSION_FORCE_UINT32 ZeKernelGetBinaryExpVersion = 0x7fffffff // ZE_KERNEL_GET_BINARY_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_KERNEL_GET_BINARY_EXP_VERSION_* ENUMs ) // ZeKernelGetBinaryExp Retrieves kernel binary program data (ISA GEN format). -/// -/// @details -/// - A valid kernel handle must be created with ::zeKernelCreate. -/// - Returns Intel Graphics Assembly (GEN ISA) format binary program data -/// for kernel handle. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pSize` -/// + `nullptr == pKernelBinary` +// / +// / @details +// / - A valid kernel handle must be created with ::zeKernelCreate. +// / - Returns Intel Graphics Assembly (GEN ISA) format binary program data +// / for kernel handle. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pSize` +// / + `nullptr == pKernelBinary` func ZeKernelGetBinaryExp( - hKernel ZeKernelHandle, // hKernel [in] Kernel handle. - pSize *uintptr, // pSize [in,out] pointer to variable with size of GEN ISA binary. - pKernelBinary *uint8, // pKernelBinary [in,out] pointer to storage area for GEN ISA binary function. + hKernel ZeKernelHandle, // hKernel [in] Kernel handle. + pSize *uintptr, // pSize [in,out] pointer to variable with size of GEN ISA binary. + pKernelBinary *uint8, // pKernelBinary [in,out] pointer to storage area for GEN ISA binary function. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelGetBinaryExp", uintptr(hKernel), uintptr(unsafe.Pointer(pSize)), uintptr(unsafe.Pointer(pKernelBinary))) } - diff --git a/core_kernelMaxGroupSizeProperties.go b/core_kernelMaxGroupSizeProperties.go index 79d08c6..c64bdfd 100644 --- a/core_kernelMaxGroupSizeProperties.go +++ b/core_kernelMaxGroupSizeProperties.go @@ -22,26 +22,26 @@ const ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_NAME = "ZE_extension_kernel_max_gr // ZeKernelMaxGroupSizePropertiesExtVersion (ze_kernel_max_group_size_properties_ext_version_t) Kernel Max Group Size Properties Extension Version(s) type ZeKernelMaxGroupSizePropertiesExtVersion uintptr + const ( - ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_1_0 ZeKernelMaxGroupSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_1_0 version 1.0 - ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_CURRENT ZeKernelMaxGroupSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_CURRENT latest known version - ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZeKernelMaxGroupSizePropertiesExtVersion = 0x7fffffff // ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_* ENUMs + ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_1_0 ZeKernelMaxGroupSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_1_0 version 1.0 + ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_CURRENT ZeKernelMaxGroupSizePropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_CURRENT latest known version + ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZeKernelMaxGroupSizePropertiesExtVersion = 0x7fffffff // ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_KERNEL_MAX_GROUP_SIZE_PROPERTIES_EXT_VERSION_* ENUMs ) // ZeKernelMaxGroupSizePropertiesExt (ze_kernel_max_group_size_properties_ext_t) Additional kernel max group size properties -/// -/// @details -/// - This structure may be passed to ::zeKernelGetProperties, via the -/// `pNext` member of ::ze_kernel_properties_t, to query additional kernel -/// max group size properties. +// / +// / @details +// / - This structure may be passed to ::zeKernelGetProperties, via the +// / `pNext` member of ::ze_kernel_properties_t, to query additional kernel +// / max group size properties. type ZeKernelMaxGroupSizePropertiesExt struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Maxgroupsize uint32 // Maxgroupsize [out] maximum group size that can be used to execute the kernel. This value may be less than or equal to the `maxTotalGroupSize` member of ::ze_device_compute_properties_t. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Maxgroupsize uint32 // Maxgroupsize [out] maximum group size that can be used to execute the kernel. This value may be less than or equal to the `maxTotalGroupSize` member of ::ze_device_compute_properties_t. } // ZeKernelMaxGroupSizeExtProperties (ze_kernel_max_group_size_ext_properties_t) compiler-independent type type ZeKernelMaxGroupSizeExtProperties ZeKernelMaxGroupSizePropertiesExt - diff --git a/core_kernelSchedulingHints.go b/core_kernelSchedulingHints.go index 40dfc92..6ba3920 100644 --- a/core_kernelSchedulingHints.go +++ b/core_kernelSchedulingHints.go @@ -24,85 +24,86 @@ const ZE_KERNEL_SCHEDULING_HINTS_EXP_NAME = "ZE_experimental_scheduling_hints" // ZeSchedulingHintsExpVersion (ze_scheduling_hints_exp_version_t) Kernel Scheduling Hints Extension Version(s) type ZeSchedulingHintsExpVersion uintptr + const ( - ZE_SCHEDULING_HINTS_EXP_VERSION_1_0 ZeSchedulingHintsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SCHEDULING_HINTS_EXP_VERSION_1_0 version 1.0 - ZE_SCHEDULING_HINTS_EXP_VERSION_CURRENT ZeSchedulingHintsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SCHEDULING_HINTS_EXP_VERSION_CURRENT latest known version - ZE_SCHEDULING_HINTS_EXP_VERSION_FORCE_UINT32 ZeSchedulingHintsExpVersion = 0x7fffffff // ZE_SCHEDULING_HINTS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_SCHEDULING_HINTS_EXP_VERSION_* ENUMs + ZE_SCHEDULING_HINTS_EXP_VERSION_1_0 ZeSchedulingHintsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_SCHEDULING_HINTS_EXP_VERSION_1_0 version 1.0 + ZE_SCHEDULING_HINTS_EXP_VERSION_CURRENT ZeSchedulingHintsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_SCHEDULING_HINTS_EXP_VERSION_CURRENT latest known version + ZE_SCHEDULING_HINTS_EXP_VERSION_FORCE_UINT32 ZeSchedulingHintsExpVersion = 0x7fffffff // ZE_SCHEDULING_HINTS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_SCHEDULING_HINTS_EXP_VERSION_* ENUMs ) // ZeSchedulingHintExpFlags (ze_scheduling_hint_exp_flags_t) Supported kernel scheduling hint flags type ZeSchedulingHintExpFlags uint32 + const ( - ZE_SCHEDULING_HINT_EXP_FLAG_OLDEST_FIRST ZeSchedulingHintExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_SCHEDULING_HINT_EXP_FLAG_OLDEST_FIRST Hint that the kernel prefers oldest-first scheduling - ZE_SCHEDULING_HINT_EXP_FLAG_ROUND_ROBIN ZeSchedulingHintExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_SCHEDULING_HINT_EXP_FLAG_ROUND_ROBIN Hint that the kernel prefers round-robin scheduling - ZE_SCHEDULING_HINT_EXP_FLAG_STALL_BASED_ROUND_ROBIN ZeSchedulingHintExpFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_SCHEDULING_HINT_EXP_FLAG_STALL_BASED_ROUND_ROBIN Hint that the kernel prefers stall-based round-robin scheduling - ZE_SCHEDULING_HINT_EXP_FLAG_FORCE_UINT32 ZeSchedulingHintExpFlags = 0x7fffffff // ZE_SCHEDULING_HINT_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_SCHEDULING_HINT_EXP_FLAG_* ENUMs + ZE_SCHEDULING_HINT_EXP_FLAG_OLDEST_FIRST ZeSchedulingHintExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_SCHEDULING_HINT_EXP_FLAG_OLDEST_FIRST Hint that the kernel prefers oldest-first scheduling + ZE_SCHEDULING_HINT_EXP_FLAG_ROUND_ROBIN ZeSchedulingHintExpFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_SCHEDULING_HINT_EXP_FLAG_ROUND_ROBIN Hint that the kernel prefers round-robin scheduling + ZE_SCHEDULING_HINT_EXP_FLAG_STALL_BASED_ROUND_ROBIN ZeSchedulingHintExpFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_SCHEDULING_HINT_EXP_FLAG_STALL_BASED_ROUND_ROBIN Hint that the kernel prefers stall-based round-robin scheduling + ZE_SCHEDULING_HINT_EXP_FLAG_FORCE_UINT32 ZeSchedulingHintExpFlags = 0x7fffffff // ZE_SCHEDULING_HINT_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_SCHEDULING_HINT_EXP_FLAG_* ENUMs ) // ZeSchedulingHintExpProperties (ze_scheduling_hint_exp_properties_t) Device kernel scheduling hint properties queried using -/// ::zeDeviceGetModuleProperties -/// -/// @details -/// - This structure may be returned from ::zeDeviceGetModuleProperties, via -/// the `pNext` member of ::ze_device_module_properties_t. +// / ::zeDeviceGetModuleProperties +// / +// / @details +// / - This structure may be returned from ::zeDeviceGetModuleProperties, via +// / the `pNext` member of ::ze_device_module_properties_t. type ZeSchedulingHintExpProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Schedulinghintflags ZeSchedulingHintExpFlags // Schedulinghintflags [out] Supported kernel scheduling hints. May be 0 (none) or a valid combination of ::ze_scheduling_hint_exp_flag_t. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Schedulinghintflags ZeSchedulingHintExpFlags // Schedulinghintflags [out] Supported kernel scheduling hints. May be 0 (none) or a valid combination of ::ze_scheduling_hint_exp_flag_t. } // ZeSchedulingHintExpDesc (ze_scheduling_hint_exp_desc_t) Kernel scheduling hint descriptor -/// -/// @details -/// - This structure may be passed to ::zeKernelSchedulingHintExp. +// / +// / @details +// / - This structure may be passed to ::zeKernelSchedulingHintExp. type ZeSchedulingHintExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeSchedulingHintExpFlags // Flags [in] flags specifying kernel scheduling hints. must be 0 (default) or a valid combination of ::ze_scheduling_hint_exp_flag_t. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeSchedulingHintExpFlags // Flags [in] flags specifying kernel scheduling hints. must be 0 (default) or a valid combination of ::ze_scheduling_hint_exp_flag_t. } // ZeKernelSchedulingHintExp Provide kernel scheduling hints that may improve performance -/// -/// @details -/// - The scheduling hints may improve performance only and are not required -/// for correctness. -/// - If a specified scheduling hint is unsupported it will be silently -/// ignored. -/// - If two conflicting scheduling hints are specified there is no defined behavior; -/// the hints may be ignored or one hint may be chosen arbitrarily. -/// - The application must not call this function from simultaneous threads -/// with the same kernel handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pHint` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x7 < pHint->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - The scheduling hints may improve performance only and are not required +// / for correctness. +// / - If a specified scheduling hint is unsupported it will be silently +// / ignored. +// / - If two conflicting scheduling hints are specified there is no defined behavior; +// / the hints may be ignored or one hint may be chosen arbitrarily. +// / - The application must not call this function from simultaneous threads +// / with the same kernel handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pHint` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x7 < pHint->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeKernelSchedulingHintExp( - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - pHint *ZeSchedulingHintExpDesc, // pHint [in] pointer to kernel scheduling hint descriptor + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + pHint *ZeSchedulingHintExpDesc, // pHint [in] pointer to kernel scheduling hint descriptor ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelSchedulingHintExp", uintptr(hKernel), uintptr(unsafe.Pointer(pHint))) } - diff --git a/core_linkageInspection.go b/core_linkageInspection.go index 7cb7ddd..88c07d4 100644 --- a/core_linkageInspection.go +++ b/core_linkageInspection.go @@ -24,71 +24,72 @@ const ZE_LINKAGE_INSPECTION_EXT_NAME = "ZE_extension_linkage_inspection" // ZeLinkageInspectionExtVersion (ze_linkage_inspection_ext_version_t) Linkage Inspection Extension Version(s) type ZeLinkageInspectionExtVersion uintptr + const ( - ZE_LINKAGE_INSPECTION_EXT_VERSION_1_0 ZeLinkageInspectionExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_LINKAGE_INSPECTION_EXT_VERSION_1_0 version 1.0 - ZE_LINKAGE_INSPECTION_EXT_VERSION_CURRENT ZeLinkageInspectionExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_LINKAGE_INSPECTION_EXT_VERSION_CURRENT latest known version - ZE_LINKAGE_INSPECTION_EXT_VERSION_FORCE_UINT32 ZeLinkageInspectionExtVersion = 0x7fffffff // ZE_LINKAGE_INSPECTION_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_LINKAGE_INSPECTION_EXT_VERSION_* ENUMs + ZE_LINKAGE_INSPECTION_EXT_VERSION_1_0 ZeLinkageInspectionExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_LINKAGE_INSPECTION_EXT_VERSION_1_0 version 1.0 + ZE_LINKAGE_INSPECTION_EXT_VERSION_CURRENT ZeLinkageInspectionExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_LINKAGE_INSPECTION_EXT_VERSION_CURRENT latest known version + ZE_LINKAGE_INSPECTION_EXT_VERSION_FORCE_UINT32 ZeLinkageInspectionExtVersion = 0x7fffffff // ZE_LINKAGE_INSPECTION_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_LINKAGE_INSPECTION_EXT_VERSION_* ENUMs ) // ZeLinkageInspectionExtFlags (ze_linkage_inspection_ext_flags_t) Supported module linkage inspection flags type ZeLinkageInspectionExtFlags uint32 + const ( - ZE_LINKAGE_INSPECTION_EXT_FLAG_IMPORTS ZeLinkageInspectionExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_LINKAGE_INSPECTION_EXT_FLAG_IMPORTS List all imports of modules - ZE_LINKAGE_INSPECTION_EXT_FLAG_UNRESOLVABLE_IMPORTS ZeLinkageInspectionExtFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_LINKAGE_INSPECTION_EXT_FLAG_UNRESOLVABLE_IMPORTS List all imports of modules that do not have a corresponding export - ZE_LINKAGE_INSPECTION_EXT_FLAG_EXPORTS ZeLinkageInspectionExtFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_LINKAGE_INSPECTION_EXT_FLAG_EXPORTS List all exports of modules - ZE_LINKAGE_INSPECTION_EXT_FLAG_FORCE_UINT32 ZeLinkageInspectionExtFlags = 0x7fffffff // ZE_LINKAGE_INSPECTION_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_LINKAGE_INSPECTION_EXT_FLAG_* ENUMs + ZE_LINKAGE_INSPECTION_EXT_FLAG_IMPORTS ZeLinkageInspectionExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_LINKAGE_INSPECTION_EXT_FLAG_IMPORTS List all imports of modules + ZE_LINKAGE_INSPECTION_EXT_FLAG_UNRESOLVABLE_IMPORTS ZeLinkageInspectionExtFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_LINKAGE_INSPECTION_EXT_FLAG_UNRESOLVABLE_IMPORTS List all imports of modules that do not have a corresponding export + ZE_LINKAGE_INSPECTION_EXT_FLAG_EXPORTS ZeLinkageInspectionExtFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_LINKAGE_INSPECTION_EXT_FLAG_EXPORTS List all exports of modules + ZE_LINKAGE_INSPECTION_EXT_FLAG_FORCE_UINT32 ZeLinkageInspectionExtFlags = 0x7fffffff // ZE_LINKAGE_INSPECTION_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_LINKAGE_INSPECTION_EXT_FLAG_* ENUMs ) // ZeLinkageInspectionExtDesc (ze_linkage_inspection_ext_desc_t) Module linkage inspection descriptor -/// -/// @details -/// - This structure may be passed to ::zeModuleInspectLinkageExt. +// / +// / @details +// / - This structure may be passed to ::zeModuleInspectLinkageExt. type ZeLinkageInspectionExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeLinkageInspectionExtFlags // Flags [in] flags specifying module linkage inspection. must be 0 (default) or a valid combination of ::ze_linkage_inspection_ext_flag_t. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeLinkageInspectionExtFlags // Flags [in] flags specifying module linkage inspection. must be 0 (default) or a valid combination of ::ze_linkage_inspection_ext_flag_t. } // ZeModuleInspectLinkageExt List Imports & Exports -/// -/// @details -/// - List all the import & unresolveable import dependencies & exports of a -/// set of modules -/// -/// @remarks -/// _Analogues_ -/// - None -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pInspectDesc` -/// + `nullptr == phModules` -/// + `nullptr == phLog` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x7 < pInspectDesc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - List all the import & unresolveable import dependencies & exports of a +// / set of modules +// / +// / @remarks +// / _Analogues_ +// / - None +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pInspectDesc` +// / + `nullptr == phModules` +// / + `nullptr == phLog` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x7 < pInspectDesc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeModuleInspectLinkageExt( - pInspectDesc *ZeLinkageInspectionExtDesc, // pInspectDesc [in] pointer to linkage inspection descriptor structure. - numModules uint32, // numModules [in] number of modules to be inspected pointed to by phModules. - phModules *ZeModuleHandle, // phModules [in][range(0, numModules)] pointer to an array of modules to be inspected for import dependencies. - phLog *ZeModuleBuildLogHandle, // phLog [out] pointer to handle of linkage inspection log. Log object will contain separate lists of imports, un-resolvable imports, and exports. + pInspectDesc *ZeLinkageInspectionExtDesc, // pInspectDesc [in] pointer to linkage inspection descriptor structure. + numModules uint32, // numModules [in] number of modules to be inspected pointed to by phModules. + phModules *ZeModuleHandle, // phModules [in][range(0, numModules)] pointer to an array of modules to be inspected for import dependencies. + phLog *ZeModuleBuildLogHandle, // phLog [out] pointer to handle of linkage inspection log. Log object will contain separate lists of imports, un-resolvable imports, and exports. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeModuleInspectLinkageExt", uintptr(unsafe.Pointer(pInspectDesc)), uintptr(numModules), uintptr(unsafe.Pointer(phModules)), uintptr(unsafe.Pointer(phLog))) } - diff --git a/core_linkonceodr.go b/core_linkonceodr.go index 8f57e4a..b2d4e61 100644 --- a/core_linkonceodr.go +++ b/core_linkonceodr.go @@ -18,10 +18,10 @@ const ZE_LINKONCE_ODR_EXT_NAME = "ZE_extension_linkonce_odr" // ZeLinkonceOdrExtVersion (ze_linkonce_odr_ext_version_t) Linkonce ODR Extension Version(s) type ZeLinkonceOdrExtVersion uintptr + const ( - ZE_LINKONCE_ODR_EXT_VERSION_1_0 ZeLinkonceOdrExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_LINKONCE_ODR_EXT_VERSION_1_0 version 1.0 - ZE_LINKONCE_ODR_EXT_VERSION_CURRENT ZeLinkonceOdrExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_LINKONCE_ODR_EXT_VERSION_CURRENT latest known version - ZE_LINKONCE_ODR_EXT_VERSION_FORCE_UINT32 ZeLinkonceOdrExtVersion = 0x7fffffff // ZE_LINKONCE_ODR_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_LINKONCE_ODR_EXT_VERSION_* ENUMs + ZE_LINKONCE_ODR_EXT_VERSION_1_0 ZeLinkonceOdrExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_LINKONCE_ODR_EXT_VERSION_1_0 version 1.0 + ZE_LINKONCE_ODR_EXT_VERSION_CURRENT ZeLinkonceOdrExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_LINKONCE_ODR_EXT_VERSION_CURRENT latest known version + ZE_LINKONCE_ODR_EXT_VERSION_FORCE_UINT32 ZeLinkonceOdrExtVersion = 0x7fffffff // ZE_LINKONCE_ODR_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_LINKONCE_ODR_EXT_VERSION_* ENUMs ) - diff --git a/core_memory.go b/core_memory.go index a206617..5a2f6d9 100644 --- a/core_memory.go +++ b/core_memory.go @@ -21,798 +21,802 @@ import ( // ZeDeviceMemAllocFlags (ze_device_mem_alloc_flags_t) Supported memory allocation flags type ZeDeviceMemAllocFlags uint32 + const ( - ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_CACHED ZeDeviceMemAllocFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_CACHED device should cache allocation - ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_UNCACHED ZeDeviceMemAllocFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_UNCACHED device should not cache allocation (UC) - ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT ZeDeviceMemAllocFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT optimize shared allocation for first access on the device - ZE_DEVICE_MEM_ALLOC_FLAG_FORCE_UINT32 ZeDeviceMemAllocFlags = 0x7fffffff // ZE_DEVICE_MEM_ALLOC_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_MEM_ALLOC_FLAG_* ENUMs + ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_CACHED ZeDeviceMemAllocFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_CACHED device should cache allocation + ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_UNCACHED ZeDeviceMemAllocFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_UNCACHED device should not cache allocation (UC) + ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT ZeDeviceMemAllocFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT optimize shared allocation for first access on the device + ZE_DEVICE_MEM_ALLOC_FLAG_FORCE_UINT32 ZeDeviceMemAllocFlags = 0x7fffffff // ZE_DEVICE_MEM_ALLOC_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_MEM_ALLOC_FLAG_* ENUMs ) // ZeDeviceMemAllocDesc (ze_device_mem_alloc_desc_t) Device memory allocation descriptor type ZeDeviceMemAllocDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeDeviceMemAllocFlags // Flags [in] flags specifying additional allocation controls. must be 0 (default) or a valid combination of ::ze_device_mem_alloc_flag_t; default behavior may use implicit driver-based heuristics. - Ordinal uint32 // Ordinal [in] ordinal of the device's local memory to allocate from. must be less than the count returned from ::zeDeviceGetMemoryProperties. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeDeviceMemAllocFlags // Flags [in] flags specifying additional allocation controls. must be 0 (default) or a valid combination of ::ze_device_mem_alloc_flag_t; default behavior may use implicit driver-based heuristics. + Ordinal uint32 // Ordinal [in] ordinal of the device's local memory to allocate from. must be less than the count returned from ::zeDeviceGetMemoryProperties. } // ZeHostMemAllocFlags (ze_host_mem_alloc_flags_t) Supported host memory allocation flags type ZeHostMemAllocFlags uint32 + const ( - ZE_HOST_MEM_ALLOC_FLAG_BIAS_CACHED ZeHostMemAllocFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_HOST_MEM_ALLOC_FLAG_BIAS_CACHED host should cache allocation - ZE_HOST_MEM_ALLOC_FLAG_BIAS_UNCACHED ZeHostMemAllocFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_HOST_MEM_ALLOC_FLAG_BIAS_UNCACHED host should not cache allocation (UC) - ZE_HOST_MEM_ALLOC_FLAG_BIAS_WRITE_COMBINED ZeHostMemAllocFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_HOST_MEM_ALLOC_FLAG_BIAS_WRITE_COMBINED host memory should be allocated write-combined (WC) - ZE_HOST_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT ZeHostMemAllocFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_HOST_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT optimize shared allocation for first access on the host - ZE_HOST_MEM_ALLOC_FLAG_FORCE_UINT32 ZeHostMemAllocFlags = 0x7fffffff // ZE_HOST_MEM_ALLOC_FLAG_FORCE_UINT32 Value marking end of ZE_HOST_MEM_ALLOC_FLAG_* ENUMs + ZE_HOST_MEM_ALLOC_FLAG_BIAS_CACHED ZeHostMemAllocFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_HOST_MEM_ALLOC_FLAG_BIAS_CACHED host should cache allocation + ZE_HOST_MEM_ALLOC_FLAG_BIAS_UNCACHED ZeHostMemAllocFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_HOST_MEM_ALLOC_FLAG_BIAS_UNCACHED host should not cache allocation (UC) + ZE_HOST_MEM_ALLOC_FLAG_BIAS_WRITE_COMBINED ZeHostMemAllocFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_HOST_MEM_ALLOC_FLAG_BIAS_WRITE_COMBINED host memory should be allocated write-combined (WC) + ZE_HOST_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT ZeHostMemAllocFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_HOST_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT optimize shared allocation for first access on the host + ZE_HOST_MEM_ALLOC_FLAG_FORCE_UINT32 ZeHostMemAllocFlags = 0x7fffffff // ZE_HOST_MEM_ALLOC_FLAG_FORCE_UINT32 Value marking end of ZE_HOST_MEM_ALLOC_FLAG_* ENUMs ) // ZeHostMemAllocDesc (ze_host_mem_alloc_desc_t) Host memory allocation descriptor type ZeHostMemAllocDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeHostMemAllocFlags // Flags [in] flags specifying additional allocation controls. must be 0 (default) or a valid combination of ::ze_host_mem_alloc_flag_t; default behavior may use implicit driver-based heuristics. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeHostMemAllocFlags // Flags [in] flags specifying additional allocation controls. must be 0 (default) or a valid combination of ::ze_host_mem_alloc_flag_t; default behavior may use implicit driver-based heuristics. } // ZeMemAllocShared Allocates shared memory on the context. -/// -/// @details -/// - Shared allocations share ownership between the host and one or more -/// devices. -/// - Shared allocations may optionally be associated with a device by -/// passing a handle to the device. -/// - Devices supporting only single-device shared access capabilities may -/// access shared memory associated with the device. -/// For these devices, ownership of the allocation is shared between the -/// host and the associated device only. -/// - Passing nullptr as the device handle does not associate the shared -/// allocation with any device. -/// For allocations with no associated device, ownership of the allocation -/// is shared between the host and all devices supporting cross-device -/// shared access capabilities. -/// - The application must only use the memory allocation for the context -/// and device, or its sub-devices, which was provided during allocation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == device_desc` -/// + `nullptr == host_desc` -/// + `nullptr == pptr` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x7 < device_desc->flags` -/// + `0xf < host_desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE -/// + `0 == size` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT -/// + Must be zero or a power-of-two -/// + `0 != (alignment & (alignment - 1))` +// / +// / @details +// / - Shared allocations share ownership between the host and one or more +// / devices. +// / - Shared allocations may optionally be associated with a device by +// / passing a handle to the device. +// / - Devices supporting only single-device shared access capabilities may +// / access shared memory associated with the device. +// / For these devices, ownership of the allocation is shared between the +// / host and the associated device only. +// / - Passing nullptr as the device handle does not associate the shared +// / allocation with any device. +// / For allocations with no associated device, ownership of the allocation +// / is shared between the host and all devices supporting cross-device +// / shared access capabilities. +// / - The application must only use the memory allocation for the context +// / and device, or its sub-devices, which was provided during allocation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == device_desc` +// / + `nullptr == host_desc` +// / + `nullptr == pptr` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x7 < device_desc->flags` +// / + `0xf < host_desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE +// / + `0 == size` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT +// / + Must be zero or a power-of-two +// / + `0 != (alignment & (alignment - 1))` func ZeMemAllocShared( - hContext ZeContextHandle, // hContext [in] handle of the context object - device_desc *ZeDeviceMemAllocDesc, // device_desc [in] pointer to device memory allocation descriptor - host_desc *ZeHostMemAllocDesc, // host_desc [in] pointer to host memory allocation descriptor - size uintptr, // size [in] size in bytes to allocate; must be less than or equal to the `maxMemAllocSize` member of ::ze_device_properties_t - alignment uintptr, // alignment [in] minimum alignment in bytes for the allocation; must be a power of two - hDevice ZeDeviceHandle, // hDevice [in][optional] device handle to associate with - pptr *unsafe.Pointer, // pptr [out] pointer to shared allocation + hContext ZeContextHandle, // hContext [in] handle of the context object + device_desc *ZeDeviceMemAllocDesc, // device_desc [in] pointer to device memory allocation descriptor + host_desc *ZeHostMemAllocDesc, // host_desc [in] pointer to host memory allocation descriptor + size uintptr, // size [in] size in bytes to allocate; must be less than or equal to the `maxMemAllocSize` member of ::ze_device_properties_t + alignment uintptr, // alignment [in] minimum alignment in bytes for the allocation; must be a power of two + hDevice ZeDeviceHandle, // hDevice [in][optional] device handle to associate with + pptr *unsafe.Pointer, // pptr [out] pointer to shared allocation ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemAllocShared", uintptr(hContext), uintptr(unsafe.Pointer(device_desc)), uintptr(unsafe.Pointer(host_desc)), uintptr(size), uintptr(alignment), uintptr(hDevice), uintptr(unsafe.Pointer(pptr))) } // ZeMemAllocDevice Allocates device memory on the context. -/// -/// @details -/// - Device allocations are owned by a specific device. -/// - In general, a device allocation may only be accessed by the device -/// that owns it. -/// - The application must only use the memory allocation for the context -/// and device, or its sub-devices, which was provided during allocation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == device_desc` -/// + `nullptr == pptr` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x7 < device_desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE -/// + `0 == size` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT -/// + Must be zero or a power-of-two -/// + `0 != (alignment & (alignment - 1))` +// / +// / @details +// / - Device allocations are owned by a specific device. +// / - In general, a device allocation may only be accessed by the device +// / that owns it. +// / - The application must only use the memory allocation for the context +// / and device, or its sub-devices, which was provided during allocation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == device_desc` +// / + `nullptr == pptr` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x7 < device_desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE +// / + `0 == size` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT +// / + Must be zero or a power-of-two +// / + `0 != (alignment & (alignment - 1))` func ZeMemAllocDevice( - hContext ZeContextHandle, // hContext [in] handle of the context object - device_desc *ZeDeviceMemAllocDesc, // device_desc [in] pointer to device memory allocation descriptor - size uintptr, // size [in] size in bytes to allocate; must be less than or equal to the `maxMemAllocSize` member of ::ze_device_properties_t - alignment uintptr, // alignment [in] minimum alignment in bytes for the allocation; must be a power of two - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - pptr *unsafe.Pointer, // pptr [out] pointer to device allocation + hContext ZeContextHandle, // hContext [in] handle of the context object + device_desc *ZeDeviceMemAllocDesc, // device_desc [in] pointer to device memory allocation descriptor + size uintptr, // size [in] size in bytes to allocate; must be less than or equal to the `maxMemAllocSize` member of ::ze_device_properties_t + alignment uintptr, // alignment [in] minimum alignment in bytes for the allocation; must be a power of two + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + pptr *unsafe.Pointer, // pptr [out] pointer to device allocation ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemAllocDevice", uintptr(hContext), uintptr(unsafe.Pointer(device_desc)), uintptr(size), uintptr(alignment), uintptr(hDevice), uintptr(unsafe.Pointer(pptr))) } // ZeMemAllocHost Allocates host memory on the context. -/// -/// @details -/// - Host allocations are owned by the host process. -/// - Host allocations are accessible by the host and all devices within the -/// driver's context. -/// - Host allocations are frequently used as staging areas to transfer data -/// to or from devices. -/// - The application must only use the memory allocation for the context -/// which was provided during allocation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == host_desc` -/// + `nullptr == pptr` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0xf < host_desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE -/// + `0 == size` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT -/// + Must be zero or a power-of-two -/// + `0 != (alignment & (alignment - 1))` +// / +// / @details +// / - Host allocations are owned by the host process. +// / - Host allocations are accessible by the host and all devices within the +// / driver's context. +// / - Host allocations are frequently used as staging areas to transfer data +// / to or from devices. +// / - The application must only use the memory allocation for the context +// / which was provided during allocation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == host_desc` +// / + `nullptr == pptr` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0xf < host_desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE +// / + `0 == size` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT +// / + Must be zero or a power-of-two +// / + `0 != (alignment & (alignment - 1))` func ZeMemAllocHost( - hContext ZeContextHandle, // hContext [in] handle of the context object - host_desc *ZeHostMemAllocDesc, // host_desc [in] pointer to host memory allocation descriptor - size uintptr, // size [in] size in bytes to allocate; must be less than or equal to the `maxMemAllocSize` member of ::ze_device_properties_t - alignment uintptr, // alignment [in] minimum alignment in bytes for the allocation; must be a power of two - pptr *unsafe.Pointer, // pptr [out] pointer to host allocation + hContext ZeContextHandle, // hContext [in] handle of the context object + host_desc *ZeHostMemAllocDesc, // host_desc [in] pointer to host memory allocation descriptor + size uintptr, // size [in] size in bytes to allocate; must be less than or equal to the `maxMemAllocSize` member of ::ze_device_properties_t + alignment uintptr, // alignment [in] minimum alignment in bytes for the allocation; must be a power of two + pptr *unsafe.Pointer, // pptr [out] pointer to host allocation ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemAllocHost", uintptr(hContext), uintptr(unsafe.Pointer(host_desc)), uintptr(size), uintptr(alignment), uintptr(unsafe.Pointer(pptr))) } // ZeMemFree Frees allocated host memory, device memory, or shared memory on the -/// context. -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the memory before it is freed -/// - The implementation will use the default and immediate policy to -/// schedule all Host and Device allocations associated with this memory -/// to be freed, without any safety checking. Actual freeing of memory is -/// specific to user mode driver and kernel mode driver implementation and -/// may be done asynchronously. -/// - The application must **not** call this function from simultaneous -/// threads with the same pointer. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` +// / context. +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the memory before it is freed +// / - The implementation will use the default and immediate policy to +// / schedule all Host and Device allocations associated with this memory +// / to be freed, without any safety checking. Actual freeing of memory is +// / specific to user mode driver and kernel mode driver implementation and +// / may be done asynchronously. +// / - The application must **not** call this function from simultaneous +// / threads with the same pointer. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` func ZeMemFree( - hContext ZeContextHandle, // hContext [in] handle of the context object - ptr unsafe.Pointer, // ptr [in][release] pointer to memory to free + hContext ZeContextHandle, // hContext [in] handle of the context object + ptr unsafe.Pointer, // ptr [in][release] pointer to memory to free ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemFree", uintptr(hContext), uintptr(unsafe.Pointer(ptr))) } // ZeMemoryType (ze_memory_type_t) Memory allocation type type ZeMemoryType uintptr + const ( - ZE_MEMORY_TYPE_UNKNOWN ZeMemoryType = 0 // ZE_MEMORY_TYPE_UNKNOWN the memory pointed to is of unknown type - ZE_MEMORY_TYPE_HOST ZeMemoryType = 1 // ZE_MEMORY_TYPE_HOST the memory pointed to is a host allocation - ZE_MEMORY_TYPE_DEVICE ZeMemoryType = 2 // ZE_MEMORY_TYPE_DEVICE the memory pointed to is a device allocation - ZE_MEMORY_TYPE_SHARED ZeMemoryType = 3 // ZE_MEMORY_TYPE_SHARED the memory pointed to is a shared ownership allocation - ZE_MEMORY_TYPE_HOST_IMPORTED ZeMemoryType = 4 // ZE_MEMORY_TYPE_HOST_IMPORTED the memory pointed to is a host allocation created from external + ZE_MEMORY_TYPE_UNKNOWN ZeMemoryType = 0 // ZE_MEMORY_TYPE_UNKNOWN the memory pointed to is of unknown type + ZE_MEMORY_TYPE_HOST ZeMemoryType = 1 // ZE_MEMORY_TYPE_HOST the memory pointed to is a host allocation + ZE_MEMORY_TYPE_DEVICE ZeMemoryType = 2 // ZE_MEMORY_TYPE_DEVICE the memory pointed to is a device allocation + ZE_MEMORY_TYPE_SHARED ZeMemoryType = 3 // ZE_MEMORY_TYPE_SHARED the memory pointed to is a shared ownership allocation + ZE_MEMORY_TYPE_HOST_IMPORTED ZeMemoryType = 4 // ZE_MEMORY_TYPE_HOST_IMPORTED the memory pointed to is a host allocation created from external ///< system memory - ZE_MEMORY_TYPE_FORCE_UINT32 ZeMemoryType = 0x7fffffff // ZE_MEMORY_TYPE_FORCE_UINT32 Value marking end of ZE_MEMORY_TYPE_* ENUMs + ZE_MEMORY_TYPE_FORCE_UINT32 ZeMemoryType = 0x7fffffff // ZE_MEMORY_TYPE_FORCE_UINT32 Value marking end of ZE_MEMORY_TYPE_* ENUMs ) // ZeMemoryAllocationProperties (ze_memory_allocation_properties_t) Memory allocation properties queried using ::zeMemGetAllocProperties type ZeMemoryAllocationProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZeMemoryType // Type [out] type of allocated memory - Id uint64 // Id [out] identifier for this allocation - Pagesize uint64 // Pagesize [out] page size used for allocation + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZeMemoryType // Type [out] type of allocated memory + Id uint64 // Id [out] identifier for this allocation + Pagesize uint64 // Pagesize [out] page size used for allocation } // ZeMemGetAllocProperties Retrieves attributes of a memory allocation -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The application may query attributes of a memory allocation unrelated -/// to the context. -/// When this occurs, the returned allocation type will be -/// ::ZE_MEMORY_TYPE_UNKNOWN, and the returned identifier and associated -/// device is unspecified. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// + `nullptr == pMemAllocProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The application may query attributes of a memory allocation unrelated +// / to the context. +// / When this occurs, the returned allocation type will be +// / ::ZE_MEMORY_TYPE_UNKNOWN, and the returned identifier and associated +// / device is unspecified. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / + `nullptr == pMemAllocProperties` func ZeMemGetAllocProperties( - hContext ZeContextHandle, // hContext [in] handle of the context object - ptr unsafe.Pointer, // ptr [in] memory pointer to query - pMemAllocProperties *ZeMemoryAllocationProperties, // pMemAllocProperties [in,out] query result for memory allocation properties - phDevice *ZeDeviceHandle, // phDevice [out][optional] device associated with this allocation + hContext ZeContextHandle, // hContext [in] handle of the context object + ptr unsafe.Pointer, // ptr [in] memory pointer to query + pMemAllocProperties *ZeMemoryAllocationProperties, // pMemAllocProperties [in,out] query result for memory allocation properties + phDevice *ZeDeviceHandle, // phDevice [out][optional] device associated with this allocation ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemGetAllocProperties", uintptr(hContext), uintptr(unsafe.Pointer(ptr)), uintptr(unsafe.Pointer(pMemAllocProperties)), uintptr(unsafe.Pointer(phDevice))) } // ZeMemGetAddressRange Retrieves the base address and/or size of an allocation -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// - ::ZE_RESULT_ERROR_ADDRESS_NOT_FOUND +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / - ::ZE_RESULT_ERROR_ADDRESS_NOT_FOUND func ZeMemGetAddressRange( - hContext ZeContextHandle, // hContext [in] handle of the context object - ptr unsafe.Pointer, // ptr [in] memory pointer to query - pBase *unsafe.Pointer, // pBase [in,out][optional] base address of the allocation - pSize *uintptr, // pSize [in,out][optional] size of the allocation + hContext ZeContextHandle, // hContext [in] handle of the context object + ptr unsafe.Pointer, // ptr [in] memory pointer to query + pBase *unsafe.Pointer, // pBase [in,out][optional] base address of the allocation + pSize *uintptr, // pSize [in,out][optional] size of the allocation ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemGetAddressRange", uintptr(hContext), uintptr(unsafe.Pointer(ptr)), uintptr(unsafe.Pointer(pBase)), uintptr(unsafe.Pointer(pSize))) } // ZeMemGetIpcHandle Creates an IPC memory handle for the specified allocation -/// -/// @details -/// - Takes a pointer to a device memory allocation and creates an IPC -/// memory handle for exporting it for use in another process. -/// - The pointer must be base pointer of a device or host memory -/// allocation; i.e. the value returned from ::zeMemAllocDevice or from -/// ::zeMemAllocHost, respectively. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// + `nullptr == pIpcHandle` +// / +// / @details +// / - Takes a pointer to a device memory allocation and creates an IPC +// / memory handle for exporting it for use in another process. +// / - The pointer must be base pointer of a device or host memory +// / allocation; i.e. the value returned from ::zeMemAllocDevice or from +// / ::zeMemAllocHost, respectively. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / + `nullptr == pIpcHandle` func ZeMemGetIpcHandle( - hContext ZeContextHandle, // hContext [in] handle of the context object - ptr unsafe.Pointer, // ptr [in] pointer to the device memory allocation - pIpcHandle *ZeIpcMemHandle, // pIpcHandle [out] Returned IPC memory handle + hContext ZeContextHandle, // hContext [in] handle of the context object + ptr unsafe.Pointer, // ptr [in] pointer to the device memory allocation + pIpcHandle *ZeIpcMemHandle, // pIpcHandle [out] Returned IPC memory handle ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemGetIpcHandle", uintptr(hContext), uintptr(unsafe.Pointer(ptr)), uintptr(unsafe.Pointer(pIpcHandle))) } // ZeMemGetIpcHandleFromFileDescriptorExp Creates an IPC memory handle out of a file descriptor -/// -/// @details -/// - Handle passed must be a valid file descriptor obtained with -/// ::ze_external_memory_export_fd_t via ::zeMemGetAllocProperties or -/// ::zePhysicalMemGetProperties. -/// - Returned IPC handle may contain metadata in addition to the file -/// descriptor. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pIpcHandle` +// / +// / @details +// / - Handle passed must be a valid file descriptor obtained with +// / ::ze_external_memory_export_fd_t via ::zeMemGetAllocProperties or +// / ::zePhysicalMemGetProperties. +// / - Returned IPC handle may contain metadata in addition to the file +// / descriptor. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pIpcHandle` func ZeMemGetIpcHandleFromFileDescriptorExp( - hContext ZeContextHandle, // hContext [in] handle of the context object - handle uint64, // handle [in] file descriptor - pIpcHandle *ZeIpcMemHandle, // pIpcHandle [out] Returned IPC memory handle + hContext ZeContextHandle, // hContext [in] handle of the context object + handle uint64, // handle [in] file descriptor + pIpcHandle *ZeIpcMemHandle, // pIpcHandle [out] Returned IPC memory handle ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemGetIpcHandleFromFileDescriptorExp", uintptr(hContext), uintptr(handle), uintptr(unsafe.Pointer(pIpcHandle))) } // ZeMemGetFileDescriptorFromIpcHandleExp Gets the file descriptor contained in an IPC memory handle -/// -/// @details -/// - IPC memory handle must be a valid handle obtained with -/// ::zeMemGetIpcHandle. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pHandle` +// / +// / @details +// / - IPC memory handle must be a valid handle obtained with +// / ::zeMemGetIpcHandle. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pHandle` func ZeMemGetFileDescriptorFromIpcHandleExp( - hContext ZeContextHandle, // hContext [in] handle of the context object - ipcHandle *ZeIpcMemHandle, // ipcHandle [in] IPC memory handle (gozel hack: converted to a hidden pointer from a struct value) - pHandle *uint64, // pHandle [out] Returned file descriptor + hContext ZeContextHandle, // hContext [in] handle of the context object + ipcHandle *ZeIpcMemHandle, // ipcHandle [in] IPC memory handle (gozel hack: converted to a hidden pointer from a struct value) + pHandle *uint64, // pHandle [out] Returned file descriptor ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemGetFileDescriptorFromIpcHandleExp", uintptr(hContext), uintptr(unsafe.Pointer(ipcHandle)), uintptr(unsafe.Pointer(pHandle))) } // ZeMemPutIpcHandle Returns an IPC memory handle to the driver -/// -/// @details -/// - This call may be used for IPC handles previously obtained with either -/// ::zeMemGetIpcHandle or with ::ze_external_memory_export_fd_t via -/// ::zeMemGetAllocProperties or ::zePhysicalMemGetProperties. -/// - Upon call, driver may release any underlying resources associated with -/// the IPC handle. -/// For instance, it may close the file descriptor contained in the IPC -/// handle, if such type of handle is being used by the driver. -/// - This call does not free the original allocation for which the IPC -/// handle was created. -/// - This function may **not** be called from simultaneous threads with the -/// same IPC handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` +// / +// / @details +// / - This call may be used for IPC handles previously obtained with either +// / ::zeMemGetIpcHandle or with ::ze_external_memory_export_fd_t via +// / ::zeMemGetAllocProperties or ::zePhysicalMemGetProperties. +// / - Upon call, driver may release any underlying resources associated with +// / the IPC handle. +// / For instance, it may close the file descriptor contained in the IPC +// / handle, if such type of handle is being used by the driver. +// / - This call does not free the original allocation for which the IPC +// / handle was created. +// / - This function may **not** be called from simultaneous threads with the +// / same IPC handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` func ZeMemPutIpcHandle( - hContext ZeContextHandle, // hContext [in] handle of the context object - handle *ZeIpcMemHandle, // handle [in] IPC memory handle (gozel hack: converted to a hidden pointer from a struct value) + hContext ZeContextHandle, // hContext [in] handle of the context object + handle *ZeIpcMemHandle, // handle [in] IPC memory handle (gozel hack: converted to a hidden pointer from a struct value) ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemPutIpcHandle", uintptr(hContext), uintptr(unsafe.Pointer(handle))) } // ZeIpcMemoryFlags (ze_ipc_memory_flags_t) Supported IPC memory flags type ZeIpcMemoryFlags uint32 + const ( - ZE_IPC_MEMORY_FLAG_BIAS_CACHED ZeIpcMemoryFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_IPC_MEMORY_FLAG_BIAS_CACHED device should cache allocation - ZE_IPC_MEMORY_FLAG_BIAS_UNCACHED ZeIpcMemoryFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_IPC_MEMORY_FLAG_BIAS_UNCACHED device should not cache allocation (UC) - ZE_IPC_MEMORY_FLAG_FORCE_UINT32 ZeIpcMemoryFlags = 0x7fffffff // ZE_IPC_MEMORY_FLAG_FORCE_UINT32 Value marking end of ZE_IPC_MEMORY_FLAG_* ENUMs + ZE_IPC_MEMORY_FLAG_BIAS_CACHED ZeIpcMemoryFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_IPC_MEMORY_FLAG_BIAS_CACHED device should cache allocation + ZE_IPC_MEMORY_FLAG_BIAS_UNCACHED ZeIpcMemoryFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_IPC_MEMORY_FLAG_BIAS_UNCACHED device should not cache allocation (UC) + ZE_IPC_MEMORY_FLAG_FORCE_UINT32 ZeIpcMemoryFlags = 0x7fffffff // ZE_IPC_MEMORY_FLAG_FORCE_UINT32 Value marking end of ZE_IPC_MEMORY_FLAG_* ENUMs ) // ZeMemOpenIpcHandle Opens an IPC memory handle to retrieve a device pointer on the -/// context. -/// -/// @details -/// - Takes an IPC memory handle from a remote process and associates it -/// with a device pointer usable in this process. -/// - The device pointer in this process should not be freed with -/// ::zeMemFree, but rather with ::zeMemCloseIpcHandle. -/// - Multiple calls to this function with the same IPC handle will return -/// unique pointers. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3 < flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pptr` +// / context. +// / +// / @details +// / - Takes an IPC memory handle from a remote process and associates it +// / with a device pointer usable in this process. +// / - The device pointer in this process should not be freed with +// / ::zeMemFree, but rather with ::zeMemCloseIpcHandle. +// / - Multiple calls to this function with the same IPC handle will return +// / unique pointers. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x3 < flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pptr` func ZeMemOpenIpcHandle( - hContext ZeContextHandle, // hContext [in] handle of the context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device to associate with the IPC memory handle - handle *ZeIpcMemHandle, // handle [in] IPC memory handle (gozel hack: converted to a hidden pointer from a struct value) - flags ZeIpcMemoryFlags, // flags [in] flags controlling the operation. must be 0 (default) or a valid combination of ::ze_ipc_memory_flag_t. - pptr *unsafe.Pointer, // pptr [out] pointer to device allocation in this process + hContext ZeContextHandle, // hContext [in] handle of the context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device to associate with the IPC memory handle + handle *ZeIpcMemHandle, // handle [in] IPC memory handle (gozel hack: converted to a hidden pointer from a struct value) + flags ZeIpcMemoryFlags, // flags [in] flags controlling the operation. must be 0 (default) or a valid combination of ::ze_ipc_memory_flag_t. + pptr *unsafe.Pointer, // pptr [out] pointer to device allocation in this process ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemOpenIpcHandle", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(handle)), uintptr(flags), uintptr(unsafe.Pointer(pptr))) } // ZeMemCloseIpcHandle Closes an IPC memory handle -/// -/// @details -/// - Closes an IPC memory handle by unmapping memory that was opened in -/// this process using ::zeMemOpenIpcHandle. -/// - The application must **not** call this function from simultaneous -/// threads with the same pointer. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` +// / +// / @details +// / - Closes an IPC memory handle by unmapping memory that was opened in +// / this process using ::zeMemOpenIpcHandle. +// / - The application must **not** call this function from simultaneous +// / threads with the same pointer. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` func ZeMemCloseIpcHandle( - hContext ZeContextHandle, // hContext [in] handle of the context object - ptr unsafe.Pointer, // ptr [in][release] pointer to device allocation in this process + hContext ZeContextHandle, // hContext [in] handle of the context object + ptr unsafe.Pointer, // ptr [in][release] pointer to device allocation in this process ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemCloseIpcHandle", uintptr(hContext), uintptr(unsafe.Pointer(ptr))) } // ZeExternalMemoryExportDesc (ze_external_memory_export_desc_t) Additional allocation descriptor for exporting external memory -/// -/// @details -/// - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, -/// or ::zePhysicalMemCreate, via the `pNext` member of -/// ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or -/// ::ze_physical_mem_desc_t, respectively, to indicate an exportable -/// memory allocation. -/// - This structure may be passed to ::zeImageCreate, via the `pNext` -/// member of ::ze_image_desc_t, to indicate an exportable image. +// / +// / @details +// / - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, +// / or ::zePhysicalMemCreate, via the `pNext` member of +// / ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or +// / ::ze_physical_mem_desc_t, respectively, to indicate an exportable +// / memory allocation. +// / - This structure may be passed to ::zeImageCreate, via the `pNext` +// / member of ::ze_image_desc_t, to indicate an exportable image. type ZeExternalMemoryExportDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeExternalMemoryTypeFlags // Flags [in] flags specifying memory export types for this allocation. must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeExternalMemoryTypeFlags // Flags [in] flags specifying memory export types for this allocation. must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t } // ZeExternalMemoryImportFd (ze_external_memory_import_fd_t) Additional allocation descriptor for importing external memory as a -/// file descriptor -/// -/// @details -/// - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, -/// or ::zePhysicalMemCreate, via the `pNext` member of -/// ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or -/// ::ze_physical_mem_desc_t, respectively, to import memory from a file -/// descriptor. -/// - This structure may be passed to ::zeImageCreate, via the `pNext` -/// member of ::ze_image_desc_t, to import memory from a file descriptor. +// / file descriptor +// / +// / @details +// / - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, +// / or ::zePhysicalMemCreate, via the `pNext` member of +// / ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or +// / ::ze_physical_mem_desc_t, respectively, to import memory from a file +// / descriptor. +// / - This structure may be passed to ::zeImageCreate, via the `pNext` +// / member of ::ze_image_desc_t, to import memory from a file descriptor. type ZeExternalMemoryImportFd struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeExternalMemoryTypeFlags // Flags [in] flags specifying the memory import type for the file descriptor. must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t - Fd int32 // Fd [in] the file descriptor handle to import + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeExternalMemoryTypeFlags // Flags [in] flags specifying the memory import type for the file descriptor. must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t + Fd int32 // Fd [in] the file descriptor handle to import } // ZeExternalMemoryExportFd (ze_external_memory_export_fd_t) Exports an allocation as a file descriptor -/// -/// @details -/// - This structure may be passed to ::zeMemGetAllocProperties, via the -/// `pNext` member of ::ze_memory_allocation_properties_t, to export a -/// memory allocation as a file descriptor. -/// - This structure may be passed to ::zeImageGetAllocPropertiesExt, via -/// the `pNext` member of ::ze_image_allocation_ext_properties_t, to -/// export an image as a file descriptor. -/// - This structure may be passed to ::zePhysicalMemGetProperties, via the -/// `pNext` member of ::ze_physical_mem_properties_t, to export physical -/// memory as a file descriptor. -/// - The requested memory export type must have been specified when the -/// allocation was made. +// / +// / @details +// / - This structure may be passed to ::zeMemGetAllocProperties, via the +// / `pNext` member of ::ze_memory_allocation_properties_t, to export a +// / memory allocation as a file descriptor. +// / - This structure may be passed to ::zeImageGetAllocPropertiesExt, via +// / the `pNext` member of ::ze_image_allocation_ext_properties_t, to +// / export an image as a file descriptor. +// / - This structure may be passed to ::zePhysicalMemGetProperties, via the +// / `pNext` member of ::ze_physical_mem_properties_t, to export physical +// / memory as a file descriptor. +// / - The requested memory export type must have been specified when the +// / allocation was made. type ZeExternalMemoryExportFd struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeExternalMemoryTypeFlags // Flags [in] flags specifying the memory export type for the file descriptor. must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t - Fd int32 // Fd [out] the exported file descriptor handle representing the allocation. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeExternalMemoryTypeFlags // Flags [in] flags specifying the memory export type for the file descriptor. must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t + Fd int32 // Fd [out] the exported file descriptor handle representing the allocation. } // ZeExternalMemoryImportWin32Handle (ze_external_memory_import_win32_handle_t) Additional allocation descriptor for importing external memory as a -/// Win32 handle -/// -/// @details -/// - When `handle` is `nullptr`, `name` must not be `nullptr`. -/// - When `name` is `nullptr`, `handle` must not be `nullptr`. -/// - When `flags` is ::ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32_KMT, -/// `name` must be `nullptr`. -/// - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, -/// or ::zePhysicalMemCreate, via the `pNext` member of -/// ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or -/// ::ze_physical_mem_desc_t, respectively, to import memory from a Win32 -/// handle. -/// - This structure may be passed to ::zeImageCreate, via the `pNext` -/// member of ::ze_image_desc_t, to import memory from a Win32 handle. +// / Win32 handle +// / +// / @details +// / - When `handle` is `nullptr`, `name` must not be `nullptr`. +// / - When `name` is `nullptr`, `handle` must not be `nullptr`. +// / - When `flags` is ::ZE_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_WIN32_KMT, +// / `name` must be `nullptr`. +// / - This structure may be passed to ::zeMemAllocDevice, ::zeMemAllocHost, +// / or ::zePhysicalMemCreate, via the `pNext` member of +// / ::ze_device_mem_alloc_desc_t or ::ze_host_mem_alloc_desc_t, or +// / ::ze_physical_mem_desc_t, respectively, to import memory from a Win32 +// / handle. +// / - This structure may be passed to ::zeImageCreate, via the `pNext` +// / member of ::ze_image_desc_t, to import memory from a Win32 handle. type ZeExternalMemoryImportWin32Handle struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeExternalMemoryTypeFlags // Flags [in] flags specifying the memory import type for the Win32 handle. must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t - Handle unsafe.Pointer // Handle [in][optional] the Win32 handle to import - Name unsafe.Pointer // Name [in][optional] name of a memory object to import + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeExternalMemoryTypeFlags // Flags [in] flags specifying the memory import type for the Win32 handle. must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t + Handle unsafe.Pointer // Handle [in][optional] the Win32 handle to import + Name unsafe.Pointer // Name [in][optional] name of a memory object to import } // ZeExternalMemoryExportWin32Handle (ze_external_memory_export_win32_handle_t) Exports an allocation as a Win32 handle -/// -/// @details -/// - This structure may be passed to ::zeMemGetAllocProperties, via the -/// `pNext` member of ::ze_memory_allocation_properties_t, to export a -/// memory allocation as a Win32 handle. -/// - This structure may be passed to ::zeImageGetAllocPropertiesExt, via -/// the `pNext` member of ::ze_image_allocation_ext_properties_t, to -/// export an image as a Win32 handle. -/// - This structure may be passed to ::zePhysicalMemGetProperties, via the -/// `pNext` member of ::ze_physical_mem_properties_t, to export physical -/// memory as a Win32 handle. -/// - The requested memory export type must have been specified when the -/// allocation was made. +// / +// / @details +// / - This structure may be passed to ::zeMemGetAllocProperties, via the +// / `pNext` member of ::ze_memory_allocation_properties_t, to export a +// / memory allocation as a Win32 handle. +// / - This structure may be passed to ::zeImageGetAllocPropertiesExt, via +// / the `pNext` member of ::ze_image_allocation_ext_properties_t, to +// / export an image as a Win32 handle. +// / - This structure may be passed to ::zePhysicalMemGetProperties, via the +// / `pNext` member of ::ze_physical_mem_properties_t, to export physical +// / memory as a Win32 handle. +// / - The requested memory export type must have been specified when the +// / allocation was made. type ZeExternalMemoryExportWin32Handle struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeExternalMemoryTypeFlags // Flags [in] flags specifying the memory export type for the Win32 handle. must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t - Handle unsafe.Pointer // Handle [out] the exported Win32 handle representing the allocation. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeExternalMemoryTypeFlags // Flags [in] flags specifying the memory export type for the Win32 handle. must be 0 (default) or a valid combination of ::ze_external_memory_type_flags_t + Handle unsafe.Pointer // Handle [out] the exported Win32 handle representing the allocation. } // ZeMemoryAtomicAttrExpFlags (ze_memory_atomic_attr_exp_flags_t) atomic access attribute flags type ZeMemoryAtomicAttrExpFlags uint32 + const ( - ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_ATOMICS Atomics on the pointer are not allowed - ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_HOST_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_HOST_ATOMICS Host atomics on the pointer are not allowed - ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_HOST_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_HOST_ATOMICS Host atomics on the pointer are allowed. Requires + ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_ATOMICS Atomics on the pointer are not allowed + ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_HOST_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_HOST_ATOMICS Host atomics on the pointer are not allowed + ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_HOST_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_HOST_ATOMICS Host atomics on the pointer are allowed. Requires ///< ::ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC returned by ///< ::zeDeviceGetMemoryAccessProperties. - ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_DEVICE_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_DEVICE_ATOMICS Device atomics on the pointer are not allowed - ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_DEVICE_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(4) */(( 1 << 4 )) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_DEVICE_ATOMICS Device atomics on the pointer are allowed. Requires + ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_DEVICE_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_DEVICE_ATOMICS Device atomics on the pointer are not allowed + ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_DEVICE_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(4) */ (1 << 4) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_DEVICE_ATOMICS Device atomics on the pointer are allowed. Requires ///< ::ZE_MEMORY_ACCESS_CAP_FLAG_ATOMIC returned by ///< ::zeDeviceGetMemoryAccessProperties. - ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_SYSTEM_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(5) */(( 1 << 5 )) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_SYSTEM_ATOMICS Concurrent atomics on the pointer from both host and device are not + ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_SYSTEM_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(5) */ (1 << 5) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_NO_SYSTEM_ATOMICS Concurrent atomics on the pointer from both host and device are not ///< allowed - ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_SYSTEM_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(6) */(( 1 << 6 )) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_SYSTEM_ATOMICS Concurrent atomics on the pointer from both host and device are + ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_SYSTEM_ATOMICS ZeMemoryAtomicAttrExpFlags = /* ZE_BIT(6) */ (1 << 6) // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_SYSTEM_ATOMICS Concurrent atomics on the pointer from both host and device are ///< allowed. Requires ::ZE_MEMORY_ACCESS_CAP_FLAG_CONCURRENT_ATOMIC ///< returned by ::zeDeviceGetMemoryAccessProperties. - ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_FORCE_UINT32 ZeMemoryAtomicAttrExpFlags = 0x7fffffff // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_* ENUMs + ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_FORCE_UINT32 ZeMemoryAtomicAttrExpFlags = 0x7fffffff // ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_MEMORY_ATOMIC_ATTR_EXP_FLAG_* ENUMs ) // ZeMemSetAtomicAccessAttributeExp Sets atomic access attributes for a shared allocation -/// -/// @details -/// - If the shared-allocation is owned by multiple devices (i.e. nullptr -/// was passed to ::zeMemAllocShared when creating it), then hDevice may be -/// passed to set the attributes in that specific device. If nullptr is -/// passed in hDevice, then the atomic attributes are set in all devices -/// associated with the allocation. -/// - If the atomic access attribute select is not supported by the driver, -/// ::ZE_RESULT_ERROR_INVALID_ARGUMENT is returned. -/// - The atomic access attribute may be only supported at a device-specific -/// granularity, such as at a page boundary. In this case, the memory range -/// may be expanded such that the start and end of the range satisfy granularity -/// requirements. -/// - When calling this function multiple times with different flags, only the -/// attributes from last call are honored. -/// - The application must not call this function for shared-allocations currently -/// being used by the device. -/// - The application must **not** call this function from simultaneous threads -/// with the same pointer. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x7f < attr` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - If the shared-allocation is owned by multiple devices (i.e. nullptr +// / was passed to ::zeMemAllocShared when creating it), then hDevice may be +// / passed to set the attributes in that specific device. If nullptr is +// / passed in hDevice, then the atomic attributes are set in all devices +// / associated with the allocation. +// / - If the atomic access attribute select is not supported by the driver, +// / ::ZE_RESULT_ERROR_INVALID_ARGUMENT is returned. +// / - The atomic access attribute may be only supported at a device-specific +// / granularity, such as at a page boundary. In this case, the memory range +// / may be expanded such that the start and end of the range satisfy granularity +// / requirements. +// / - When calling this function multiple times with different flags, only the +// / attributes from last call are honored. +// / - The application must not call this function for shared-allocations currently +// / being used by the device. +// / - The application must **not** call this function from simultaneous threads +// / with the same pointer. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x7f < attr` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeMemSetAtomicAccessAttributeExp( - hContext ZeContextHandle, // hContext [in] handle of context - hDevice ZeDeviceHandle, // hDevice [in] device associated with the memory advice - ptr unsafe.Pointer, // ptr [in] Pointer to the start of the memory range - size uintptr, // size [in] Size in bytes of the memory range - attr ZeMemoryAtomicAttrExpFlags, // attr [in] Atomic access attributes to set for the specified range. Must be 0 (default) or a valid combination of ::ze_memory_atomic_attr_exp_flag_t. + hContext ZeContextHandle, // hContext [in] handle of context + hDevice ZeDeviceHandle, // hDevice [in] device associated with the memory advice + ptr unsafe.Pointer, // ptr [in] Pointer to the start of the memory range + size uintptr, // size [in] Size in bytes of the memory range + attr ZeMemoryAtomicAttrExpFlags, // attr [in] Atomic access attributes to set for the specified range. Must be 0 (default) or a valid combination of ::ze_memory_atomic_attr_exp_flag_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemSetAtomicAccessAttributeExp", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(ptr)), uintptr(size), uintptr(attr)) } // ZeMemGetAtomicAccessAttributeExp Retrieves the atomic access attributes previously set for a shared -/// allocation -/// -/// @details -/// - The application may call this function from simultaneous threads -/// with the same pointer. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// + `nullptr == pAttr` +// / allocation +// / +// / @details +// / - The application may call this function from simultaneous threads +// / with the same pointer. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / + `nullptr == pAttr` func ZeMemGetAtomicAccessAttributeExp( - hContext ZeContextHandle, // hContext [in] handle of context - hDevice ZeDeviceHandle, // hDevice [in] device associated with the memory advice - ptr unsafe.Pointer, // ptr [in] Pointer to the start of the memory range - size uintptr, // size [in] Size in bytes of the memory range - pAttr *ZeMemoryAtomicAttrExpFlags, // pAttr [out] Atomic access attributes for the specified range + hContext ZeContextHandle, // hContext [in] handle of context + hDevice ZeDeviceHandle, // hDevice [in] device associated with the memory advice + ptr unsafe.Pointer, // ptr [in] Pointer to the start of the memory range + size uintptr, // size [in] Size in bytes of the memory range + pAttr *ZeMemoryAtomicAttrExpFlags, // pAttr [out] Atomic access attributes for the specified range ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemGetAtomicAccessAttributeExp", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(ptr)), uintptr(size), uintptr(unsafe.Pointer(pAttr))) } - diff --git a/core_memoryCompressionHints.go b/core_memoryCompressionHints.go index fe8c41c..708e13b 100644 --- a/core_memoryCompressionHints.go +++ b/core_memoryCompressionHints.go @@ -22,36 +22,37 @@ const ZE_MEMORY_COMPRESSION_HINTS_EXT_NAME = "ZE_extension_memory_compression_hi // ZeMemoryCompressionHintsExtVersion (ze_memory_compression_hints_ext_version_t) Memory Compression Hints Extension Version(s) type ZeMemoryCompressionHintsExtVersion uintptr + const ( - ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_1_0 ZeMemoryCompressionHintsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_1_0 version 1.0 - ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_CURRENT ZeMemoryCompressionHintsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_CURRENT latest known version - ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_FORCE_UINT32 ZeMemoryCompressionHintsExtVersion = 0x7fffffff // ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_* ENUMs + ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_1_0 ZeMemoryCompressionHintsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_1_0 version 1.0 + ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_CURRENT ZeMemoryCompressionHintsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_CURRENT latest known version + ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_FORCE_UINT32 ZeMemoryCompressionHintsExtVersion = 0x7fffffff // ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_MEMORY_COMPRESSION_HINTS_EXT_VERSION_* ENUMs ) // ZeMemoryCompressionHintsExtFlags (ze_memory_compression_hints_ext_flags_t) Supported memory compression hints flags type ZeMemoryCompressionHintsExtFlags uint32 + const ( - ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_COMPRESSED ZeMemoryCompressionHintsExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_COMPRESSED Hint Driver implementation to make allocation compressible - ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_UNCOMPRESSED ZeMemoryCompressionHintsExtFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_UNCOMPRESSED Hint Driver implementation to make allocation not compressible - ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_FORCE_UINT32 ZeMemoryCompressionHintsExtFlags = 0x7fffffff // ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_* ENUMs + ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_COMPRESSED ZeMemoryCompressionHintsExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_COMPRESSED Hint Driver implementation to make allocation compressible + ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_UNCOMPRESSED ZeMemoryCompressionHintsExtFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_UNCOMPRESSED Hint Driver implementation to make allocation not compressible + ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_FORCE_UINT32 ZeMemoryCompressionHintsExtFlags = 0x7fffffff // ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_MEMORY_COMPRESSION_HINTS_EXT_FLAG_* ENUMs ) // ZeMemoryCompressionHintsExtDesc (ze_memory_compression_hints_ext_desc_t) Compression hints memory allocation descriptor -/// -/// @details -/// - This structure may be passed to ::zeMemAllocShared or -/// ::zeMemAllocDevice, via the `pNext` member of -/// ::ze_device_mem_alloc_desc_t. -/// - This structure may be passed to ::zeMemAllocHost, via the `pNext` -/// member of ::ze_host_mem_alloc_desc_t. -/// - This structure may be passed to ::zeImageCreate, via the `pNext` -/// member of ::ze_image_desc_t. +// / +// / @details +// / - This structure may be passed to ::zeMemAllocShared or +// / ::zeMemAllocDevice, via the `pNext` member of +// / ::ze_device_mem_alloc_desc_t. +// / - This structure may be passed to ::zeMemAllocHost, via the `pNext` +// / member of ::ze_host_mem_alloc_desc_t. +// / - This structure may be passed to ::zeImageCreate, via the `pNext` +// / member of ::ze_image_desc_t. type ZeMemoryCompressionHintsExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeMemoryCompressionHintsExtFlags // Flags [in] flags specifying if allocation should be compressible or not. Must be set to one of the ::ze_memory_compression_hints_ext_flag_t; + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeMemoryCompressionHintsExtFlags // Flags [in] flags specifying if allocation should be compressible or not. Must be set to one of the ::ze_memory_compression_hints_ext_flag_t; } - diff --git a/core_memoryFreePolicies.go b/core_memoryFreePolicies.go index 7428eba..9c39911 100644 --- a/core_memoryFreePolicies.go +++ b/core_memoryFreePolicies.go @@ -24,93 +24,94 @@ const ZE_MEMORY_FREE_POLICIES_EXT_NAME = "ZE_extension_memory_free_policies" // ZeMemoryFreePoliciesExtVersion (ze_memory_free_policies_ext_version_t) Memory Free Policies Extension Version(s) type ZeMemoryFreePoliciesExtVersion uintptr + const ( - ZE_MEMORY_FREE_POLICIES_EXT_VERSION_1_0 ZeMemoryFreePoliciesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_MEMORY_FREE_POLICIES_EXT_VERSION_1_0 version 1.0 - ZE_MEMORY_FREE_POLICIES_EXT_VERSION_CURRENT ZeMemoryFreePoliciesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_MEMORY_FREE_POLICIES_EXT_VERSION_CURRENT latest known version - ZE_MEMORY_FREE_POLICIES_EXT_VERSION_FORCE_UINT32 ZeMemoryFreePoliciesExtVersion = 0x7fffffff // ZE_MEMORY_FREE_POLICIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_MEMORY_FREE_POLICIES_EXT_VERSION_* ENUMs + ZE_MEMORY_FREE_POLICIES_EXT_VERSION_1_0 ZeMemoryFreePoliciesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_MEMORY_FREE_POLICIES_EXT_VERSION_1_0 version 1.0 + ZE_MEMORY_FREE_POLICIES_EXT_VERSION_CURRENT ZeMemoryFreePoliciesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_MEMORY_FREE_POLICIES_EXT_VERSION_CURRENT latest known version + ZE_MEMORY_FREE_POLICIES_EXT_VERSION_FORCE_UINT32 ZeMemoryFreePoliciesExtVersion = 0x7fffffff // ZE_MEMORY_FREE_POLICIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_MEMORY_FREE_POLICIES_EXT_VERSION_* ENUMs ) // ZeDriverMemoryFreePolicyExtFlags (ze_driver_memory_free_policy_ext_flags_t) Supported memory free policy capability flags type ZeDriverMemoryFreePolicyExtFlags uint32 + const ( - ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_BLOCKING_FREE ZeDriverMemoryFreePolicyExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_BLOCKING_FREE Blocks until all commands using the memory are complete before + ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_BLOCKING_FREE ZeDriverMemoryFreePolicyExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_BLOCKING_FREE Blocks until all commands using the memory are complete before ///< scheduling memory to be freed. Does not guarantee memory is freed upon ///< return, only that it is safe and is scheduled to be freed. Actual ///< freeing of memory is specific to user mode driver and kernel mode ///< driver implementation and may be done asynchronously. - ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_DEFER_FREE ZeDriverMemoryFreePolicyExtFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_DEFER_FREE Immediately schedules the memory to be freed and returns without + ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_DEFER_FREE ZeDriverMemoryFreePolicyExtFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_DEFER_FREE Immediately schedules the memory to be freed and returns without ///< blocking. Memory may be freed after all commands using the memory are ///< complete. Actual freeing of memory is specific to user mode driver and ///< kernel mode driver implementation and may be done asynchronously. - ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_FORCE_UINT32 ZeDriverMemoryFreePolicyExtFlags = 0x7fffffff // ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_* ENUMs + ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_FORCE_UINT32 ZeDriverMemoryFreePolicyExtFlags = 0x7fffffff // ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_* ENUMs ) // ZeDriverMemoryFreeExtProperties (ze_driver_memory_free_ext_properties_t) Driver memory free properties queried using ::zeDriverGetProperties -/// -/// @details -/// - All drivers must support an immediate free policy, which is the -/// default free policy. -/// - This structure may be returned from ::zeDriverGetProperties, via the -/// `pNext` member of ::ze_driver_properties_t. +// / +// / @details +// / - All drivers must support an immediate free policy, which is the +// / default free policy. +// / - This structure may be returned from ::zeDriverGetProperties, via the +// / `pNext` member of ::ze_driver_properties_t. type ZeDriverMemoryFreeExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Freepolicies ZeDriverMemoryFreePolicyExtFlags // Freepolicies [out] Supported memory free policies. must be 0 or a combination of ::ze_driver_memory_free_policy_ext_flag_t. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Freepolicies ZeDriverMemoryFreePolicyExtFlags // Freepolicies [out] Supported memory free policies. must be 0 or a combination of ::ze_driver_memory_free_policy_ext_flag_t. } // ZeMemoryFreeExtDesc (ze_memory_free_ext_desc_t) Memory free descriptor with free policy type ZeMemoryFreeExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Freepolicy ZeDriverMemoryFreePolicyExtFlags // Freepolicy [in] flags specifying the memory free policy. must be 0 (default) or a supported ::ze_driver_memory_free_policy_ext_flag_t; default behavior is to free immediately. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Freepolicy ZeDriverMemoryFreePolicyExtFlags // Freepolicy [in] flags specifying the memory free policy. must be 0 (default) or a supported ::ze_driver_memory_free_policy_ext_flag_t; default behavior is to free immediately. } // ZeMemFreeExt Frees allocated host memory, device memory, or shared memory on the -/// context using the specified free policy. -/// -/// @details -/// - Similar to zeMemFree, with added parameter to choose the free policy. -/// - Does not gaurantee memory is freed upon return. See free policy -/// descriptions for details. -/// - The application must **not** call this function from simultaneous -/// threads with the same pointer. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pMemFreeDesc` -/// + `nullptr == ptr` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3 < pMemFreeDesc->freePolicy` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / context using the specified free policy. +// / +// / @details +// / - Similar to zeMemFree, with added parameter to choose the free policy. +// / - Does not gaurantee memory is freed upon return. See free policy +// / descriptions for details. +// / - The application must **not** call this function from simultaneous +// / threads with the same pointer. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pMemFreeDesc` +// / + `nullptr == ptr` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x3 < pMemFreeDesc->freePolicy` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeMemFreeExt( - hContext ZeContextHandle, // hContext [in] handle of the context object - pMemFreeDesc *ZeMemoryFreeExtDesc, // pMemFreeDesc [in] pointer to memory free descriptor - ptr unsafe.Pointer, // ptr [in][release] pointer to memory to free + hContext ZeContextHandle, // hContext [in] handle of the context object + pMemFreeDesc *ZeMemoryFreeExtDesc, // pMemFreeDesc [in] pointer to memory free descriptor + ptr unsafe.Pointer, // ptr [in][release] pointer to memory to free ) (ZeResult, error) { return zecall.Call[ZeResult]("zeMemFreeExt", uintptr(hContext), uintptr(unsafe.Pointer(pMemFreeDesc)), uintptr(unsafe.Pointer(ptr))) } - diff --git a/core_memoryProperties.go b/core_memoryProperties.go index 34d1246..d8d47af 100644 --- a/core_memoryProperties.go +++ b/core_memoryProperties.go @@ -22,59 +22,60 @@ const ZE_DEVICE_MEMORY_PROPERTIES_EXT_NAME = "ZE_extension_device_memory_propert // ZeDeviceMemoryPropertiesExtVersion (ze_device_memory_properties_ext_version_t) Device Memory Properties Extension Version(s) type ZeDeviceMemoryPropertiesExtVersion uintptr + const ( - ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_1_0 ZeDeviceMemoryPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_1_0 version 1.0 - ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_CURRENT ZeDeviceMemoryPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_CURRENT latest known version - ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZeDeviceMemoryPropertiesExtVersion = 0x7fffffff // ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_* ENUMs + ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_1_0 ZeDeviceMemoryPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_1_0 version 1.0 + ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_CURRENT ZeDeviceMemoryPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_CURRENT latest known version + ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZeDeviceMemoryPropertiesExtVersion = 0x7fffffff // ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_DEVICE_MEMORY_PROPERTIES_EXT_VERSION_* ENUMs ) // ZeDeviceMemoryExtType (ze_device_memory_ext_type_t) Memory module types type ZeDeviceMemoryExtType uintptr + const ( - ZE_DEVICE_MEMORY_EXT_TYPE_HBM ZeDeviceMemoryExtType = 0 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM HBM memory - ZE_DEVICE_MEMORY_EXT_TYPE_HBM2 ZeDeviceMemoryExtType = 1 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM2 HBM2 memory - ZE_DEVICE_MEMORY_EXT_TYPE_DDR ZeDeviceMemoryExtType = 2 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR DDR memory - ZE_DEVICE_MEMORY_EXT_TYPE_DDR2 ZeDeviceMemoryExtType = 3 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR2 DDR2 memory - ZE_DEVICE_MEMORY_EXT_TYPE_DDR3 ZeDeviceMemoryExtType = 4 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR3 DDR3 memory - ZE_DEVICE_MEMORY_EXT_TYPE_DDR4 ZeDeviceMemoryExtType = 5 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR4 DDR4 memory - ZE_DEVICE_MEMORY_EXT_TYPE_DDR5 ZeDeviceMemoryExtType = 6 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR5 DDR5 memory - ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR ZeDeviceMemoryExtType = 7 // ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR LPDDR memory - ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR3 ZeDeviceMemoryExtType = 8 // ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR3 LPDDR3 memory - ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR4 ZeDeviceMemoryExtType = 9 // ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR4 LPDDR4 memory - ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR5 ZeDeviceMemoryExtType = 10 // ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR5 LPDDR5 memory - ZE_DEVICE_MEMORY_EXT_TYPE_SRAM ZeDeviceMemoryExtType = 11 // ZE_DEVICE_MEMORY_EXT_TYPE_SRAM SRAM memory - ZE_DEVICE_MEMORY_EXT_TYPE_L1 ZeDeviceMemoryExtType = 12 // ZE_DEVICE_MEMORY_EXT_TYPE_L1 L1 cache - ZE_DEVICE_MEMORY_EXT_TYPE_L3 ZeDeviceMemoryExtType = 13 // ZE_DEVICE_MEMORY_EXT_TYPE_L3 L3 cache - ZE_DEVICE_MEMORY_EXT_TYPE_GRF ZeDeviceMemoryExtType = 14 // ZE_DEVICE_MEMORY_EXT_TYPE_GRF Execution unit register file - ZE_DEVICE_MEMORY_EXT_TYPE_SLM ZeDeviceMemoryExtType = 15 // ZE_DEVICE_MEMORY_EXT_TYPE_SLM Execution unit shared local memory - ZE_DEVICE_MEMORY_EXT_TYPE_GDDR4 ZeDeviceMemoryExtType = 16 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR4 GDDR4 memory - ZE_DEVICE_MEMORY_EXT_TYPE_GDDR5 ZeDeviceMemoryExtType = 17 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR5 GDDR5 memory - ZE_DEVICE_MEMORY_EXT_TYPE_GDDR5X ZeDeviceMemoryExtType = 18 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR5X GDDR5X memory - ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6 ZeDeviceMemoryExtType = 19 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6 GDDR6 memory - ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6X ZeDeviceMemoryExtType = 20 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6X GDDR6X memory - ZE_DEVICE_MEMORY_EXT_TYPE_GDDR7 ZeDeviceMemoryExtType = 21 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR7 GDDR7 memory - ZE_DEVICE_MEMORY_EXT_TYPE_HBM2E ZeDeviceMemoryExtType = 22 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM2E HBM2E memory - ZE_DEVICE_MEMORY_EXT_TYPE_HBM3 ZeDeviceMemoryExtType = 23 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM3 HBM3 memory - ZE_DEVICE_MEMORY_EXT_TYPE_HBM3E ZeDeviceMemoryExtType = 24 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM3E HBM3E memory - ZE_DEVICE_MEMORY_EXT_TYPE_HBM4 ZeDeviceMemoryExtType = 25 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM4 HBM4 memory - ZE_DEVICE_MEMORY_EXT_TYPE_FORCE_UINT32 ZeDeviceMemoryExtType = 0x7fffffff // ZE_DEVICE_MEMORY_EXT_TYPE_FORCE_UINT32 Value marking end of ZE_DEVICE_MEMORY_EXT_TYPE_* ENUMs + ZE_DEVICE_MEMORY_EXT_TYPE_HBM ZeDeviceMemoryExtType = 0 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM HBM memory + ZE_DEVICE_MEMORY_EXT_TYPE_HBM2 ZeDeviceMemoryExtType = 1 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM2 HBM2 memory + ZE_DEVICE_MEMORY_EXT_TYPE_DDR ZeDeviceMemoryExtType = 2 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR DDR memory + ZE_DEVICE_MEMORY_EXT_TYPE_DDR2 ZeDeviceMemoryExtType = 3 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR2 DDR2 memory + ZE_DEVICE_MEMORY_EXT_TYPE_DDR3 ZeDeviceMemoryExtType = 4 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR3 DDR3 memory + ZE_DEVICE_MEMORY_EXT_TYPE_DDR4 ZeDeviceMemoryExtType = 5 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR4 DDR4 memory + ZE_DEVICE_MEMORY_EXT_TYPE_DDR5 ZeDeviceMemoryExtType = 6 // ZE_DEVICE_MEMORY_EXT_TYPE_DDR5 DDR5 memory + ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR ZeDeviceMemoryExtType = 7 // ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR LPDDR memory + ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR3 ZeDeviceMemoryExtType = 8 // ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR3 LPDDR3 memory + ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR4 ZeDeviceMemoryExtType = 9 // ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR4 LPDDR4 memory + ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR5 ZeDeviceMemoryExtType = 10 // ZE_DEVICE_MEMORY_EXT_TYPE_LPDDR5 LPDDR5 memory + ZE_DEVICE_MEMORY_EXT_TYPE_SRAM ZeDeviceMemoryExtType = 11 // ZE_DEVICE_MEMORY_EXT_TYPE_SRAM SRAM memory + ZE_DEVICE_MEMORY_EXT_TYPE_L1 ZeDeviceMemoryExtType = 12 // ZE_DEVICE_MEMORY_EXT_TYPE_L1 L1 cache + ZE_DEVICE_MEMORY_EXT_TYPE_L3 ZeDeviceMemoryExtType = 13 // ZE_DEVICE_MEMORY_EXT_TYPE_L3 L3 cache + ZE_DEVICE_MEMORY_EXT_TYPE_GRF ZeDeviceMemoryExtType = 14 // ZE_DEVICE_MEMORY_EXT_TYPE_GRF Execution unit register file + ZE_DEVICE_MEMORY_EXT_TYPE_SLM ZeDeviceMemoryExtType = 15 // ZE_DEVICE_MEMORY_EXT_TYPE_SLM Execution unit shared local memory + ZE_DEVICE_MEMORY_EXT_TYPE_GDDR4 ZeDeviceMemoryExtType = 16 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR4 GDDR4 memory + ZE_DEVICE_MEMORY_EXT_TYPE_GDDR5 ZeDeviceMemoryExtType = 17 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR5 GDDR5 memory + ZE_DEVICE_MEMORY_EXT_TYPE_GDDR5X ZeDeviceMemoryExtType = 18 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR5X GDDR5X memory + ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6 ZeDeviceMemoryExtType = 19 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6 GDDR6 memory + ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6X ZeDeviceMemoryExtType = 20 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR6X GDDR6X memory + ZE_DEVICE_MEMORY_EXT_TYPE_GDDR7 ZeDeviceMemoryExtType = 21 // ZE_DEVICE_MEMORY_EXT_TYPE_GDDR7 GDDR7 memory + ZE_DEVICE_MEMORY_EXT_TYPE_HBM2E ZeDeviceMemoryExtType = 22 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM2E HBM2E memory + ZE_DEVICE_MEMORY_EXT_TYPE_HBM3 ZeDeviceMemoryExtType = 23 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM3 HBM3 memory + ZE_DEVICE_MEMORY_EXT_TYPE_HBM3E ZeDeviceMemoryExtType = 24 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM3E HBM3E memory + ZE_DEVICE_MEMORY_EXT_TYPE_HBM4 ZeDeviceMemoryExtType = 25 // ZE_DEVICE_MEMORY_EXT_TYPE_HBM4 HBM4 memory + ZE_DEVICE_MEMORY_EXT_TYPE_FORCE_UINT32 ZeDeviceMemoryExtType = 0x7fffffff // ZE_DEVICE_MEMORY_EXT_TYPE_FORCE_UINT32 Value marking end of ZE_DEVICE_MEMORY_EXT_TYPE_* ENUMs ) // ZeDeviceMemoryExtProperties (ze_device_memory_ext_properties_t) Memory properties -/// -/// @details -/// - This structure may be returned from ::zeDeviceGetMemoryProperties via -/// the `pNext` member of ::ze_device_memory_properties_t +// / +// / @details +// / - This structure may be returned from ::zeDeviceGetMemoryProperties via +// / the `pNext` member of ::ze_device_memory_properties_t type ZeDeviceMemoryExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZeDeviceMemoryExtType // Type [out] The memory type - Physicalsize uint64 // Physicalsize [out] Physical memory size in bytes. A value of 0 indicates that this property is not known. However, a call to ::zesMemoryGetState() will correctly return the total size of usable memory. - Readbandwidth uint32 // Readbandwidth [out] Design bandwidth for reads - Writebandwidth uint32 // Writebandwidth [out] Design bandwidth for writes - Bandwidthunit ZeBandwidthUnit // Bandwidthunit [out] bandwidth unit + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZeDeviceMemoryExtType // Type [out] The memory type + Physicalsize uint64 // Physicalsize [out] Physical memory size in bytes. A value of 0 indicates that this property is not known. However, a call to ::zesMemoryGetState() will correctly return the total size of usable memory. + Readbandwidth uint32 // Readbandwidth [out] Design bandwidth for reads + Writebandwidth uint32 // Writebandwidth [out] Design bandwidth for writes + Bandwidthunit ZeBandwidthUnit // Bandwidthunit [out] bandwidth unit } - diff --git a/core_module.go b/core_module.go index 6292ca8..cb5360b 100644 --- a/core_module.go +++ b/core_module.go @@ -21,853 +21,858 @@ import ( // ZeModuleFormat (ze_module_format_t) Supported module creation input formats type ZeModuleFormat uintptr + const ( - ZE_MODULE_FORMAT_IL_SPIRV ZeModuleFormat = 0 // ZE_MODULE_FORMAT_IL_SPIRV Format is SPIRV IL format - ZE_MODULE_FORMAT_NATIVE ZeModuleFormat = 1 // ZE_MODULE_FORMAT_NATIVE Format is device native format - ZE_MODULE_FORMAT_FORCE_UINT32 ZeModuleFormat = 0x7fffffff // ZE_MODULE_FORMAT_FORCE_UINT32 Value marking end of ZE_MODULE_FORMAT_* ENUMs + ZE_MODULE_FORMAT_IL_SPIRV ZeModuleFormat = 0 // ZE_MODULE_FORMAT_IL_SPIRV Format is SPIRV IL format + ZE_MODULE_FORMAT_NATIVE ZeModuleFormat = 1 // ZE_MODULE_FORMAT_NATIVE Format is device native format + ZE_MODULE_FORMAT_FORCE_UINT32 ZeModuleFormat = 0x7fffffff // ZE_MODULE_FORMAT_FORCE_UINT32 Value marking end of ZE_MODULE_FORMAT_* ENUMs ) // ZeModuleConstants (ze_module_constants_t) Specialization constants - User defined constants type ZeModuleConstants struct { - Numconstants uint32 // Numconstants [in] Number of specialization constants. - Pconstantids *uint32 // Pconstantids [in][range(0, numConstants)] Array of IDs that is sized to numConstants. - Pconstantvalues *unsafe.Pointer // Pconstantvalues [in][range(0, numConstants)] Array of pointers to values that is sized to numConstants. + Numconstants uint32 // Numconstants [in] Number of specialization constants. + Pconstantids *uint32 // Pconstantids [in][range(0, numConstants)] Array of IDs that is sized to numConstants. + Pconstantvalues *unsafe.Pointer // Pconstantvalues [in][range(0, numConstants)] Array of pointers to values that is sized to numConstants. } // ZeModuleDesc (ze_module_desc_t) Module descriptor type ZeModuleDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Format ZeModuleFormat // Format [in] Module format passed in with pInputModule - Inputsize uintptr // Inputsize [in] size of input IL or ISA from pInputModule. - Pinputmodule *uint8 // Pinputmodule [in] pointer to IL or ISA - Pbuildflags *byte // Pbuildflags [in][optional] string containing one or more (comma-separated) compiler flags. If unsupported, flag is ignored with a warning. - "-ze-opt-disable" - Disable optimizations - "-ze-opt-level" - Specifies optimization level for compiler. Levels are implementation specific. - 0 is no optimizations (equivalent to -ze-opt-disable) - 1 is optimize minimally (may be the same as 2) - 2 is optimize more (default) - "-ze-opt-greater-than-4GB-buffer-required" - Use 64-bit offset calculations for buffers. - "-ze-opt-large-register-file" - Increase number of registers available to threads. - "-ze-opt-has-buffer-offset-arg" - Extend stateless to stateful optimization to more cases with the use of additional offset (e.g. 64-bit pointer to binding table with 32-bit offset). - "-g" - Include debugging information. - Pconstants *ZeModuleConstants // Pconstants [in][optional] pointer to specialization constants. Valid only for SPIR-V input. This must be set to nullptr if no specialization constants are provided. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Format ZeModuleFormat // Format [in] Module format passed in with pInputModule + Inputsize uintptr // Inputsize [in] size of input IL or ISA from pInputModule. + Pinputmodule *uint8 // Pinputmodule [in] pointer to IL or ISA + Pbuildflags *byte // Pbuildflags [in][optional] string containing one or more (comma-separated) compiler flags. If unsupported, flag is ignored with a warning. - "-ze-opt-disable" - Disable optimizations - "-ze-opt-level" - Specifies optimization level for compiler. Levels are implementation specific. - 0 is no optimizations (equivalent to -ze-opt-disable) - 1 is optimize minimally (may be the same as 2) - 2 is optimize more (default) - "-ze-opt-greater-than-4GB-buffer-required" - Use 64-bit offset calculations for buffers. - "-ze-opt-large-register-file" - Increase number of registers available to threads. - "-ze-opt-has-buffer-offset-arg" - Extend stateless to stateful optimization to more cases with the use of additional offset (e.g. 64-bit pointer to binding table with 32-bit offset). - "-g" - Include debugging information. + Pconstants *ZeModuleConstants // Pconstants [in][optional] pointer to specialization constants. Valid only for SPIR-V input. This must be set to nullptr if no specialization constants are provided. } // ZeCommandListAppendLaunchKernelParamCooperativeDesc (ze_command_list_append_launch_kernel_param_cooperative_desc_t) Append launch kernel with parameters cooperative descriptor type ZeCommandListAppendLaunchKernelParamCooperativeDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Iscooperative ZeBool // Iscooperative [in] When true, kernel is treated as cooperative. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Iscooperative ZeBool // Iscooperative [in] When true, kernel is treated as cooperative. } // ZeModuleCreate Creates a module on the context. -/// -/// @details -/// - Compiles the module for execution on the device. -/// - The application must only use the module for the device, or its -/// sub-devices, which was provided during creation. -/// - The module can be copied to other devices and contexts within the same -/// driver instance by using ::zeModuleGetNativeBinary. -/// - A build log can optionally be returned to the caller. The caller is -/// responsible for destroying build log using ::zeModuleBuildLogDestroy. -/// - The module descriptor constants are only supported for SPIR-V -/// specialization constants. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == desc->pInputModule` -/// + `nullptr == phModule` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_MODULE_FORMAT_NATIVE < desc->format` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NATIVE_BINARY -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `0 == desc->inputSize` -/// - ::ZE_RESULT_ERROR_MODULE_BUILD_FAILURE +// / +// / @details +// / - Compiles the module for execution on the device. +// / - The application must only use the module for the device, or its +// / sub-devices, which was provided during creation. +// / - The module can be copied to other devices and contexts within the same +// / driver instance by using ::zeModuleGetNativeBinary. +// / - A build log can optionally be returned to the caller. The caller is +// / responsible for destroying build log using ::zeModuleBuildLogDestroy. +// / - The module descriptor constants are only supported for SPIR-V +// / specialization constants. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == desc->pInputModule` +// / + `nullptr == phModule` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_MODULE_FORMAT_NATIVE < desc->format` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NATIVE_BINARY +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `0 == desc->inputSize` +// / - ::ZE_RESULT_ERROR_MODULE_BUILD_FAILURE func ZeModuleCreate( - hContext ZeContextHandle, // hContext [in] handle of the context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - desc *ZeModuleDesc, // desc [in] pointer to module descriptor - phModule *ZeModuleHandle, // phModule [out] pointer to handle of module object created - phBuildLog *ZeModuleBuildLogHandle, // phBuildLog [out][optional] pointer to handle of module's build log. + hContext ZeContextHandle, // hContext [in] handle of the context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + desc *ZeModuleDesc, // desc [in] pointer to module descriptor + phModule *ZeModuleHandle, // phModule [out] pointer to handle of module object created + phBuildLog *ZeModuleBuildLogHandle, // phBuildLog [out][optional] pointer to handle of module's build log. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeModuleCreate", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phModule)), uintptr(unsafe.Pointer(phBuildLog))) } // ZeModuleDestroy Destroys module -/// -/// @details -/// - The application must destroy all kernel handles created from the -/// module before destroying the module itself. -/// - The application must ensure the device is not currently referencing -/// the module before it is deleted. -/// - The implementation of this function may immediately free all Host and -/// Device allocations associated with this module. -/// - The application must **not** call this function from simultaneous -/// threads with the same module handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hModule` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must destroy all kernel handles created from the +// / module before destroying the module itself. +// / - The application must ensure the device is not currently referencing +// / the module before it is deleted. +// / - The implementation of this function may immediately free all Host and +// / Device allocations associated with this module. +// / - The application must **not** call this function from simultaneous +// / threads with the same module handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hModule` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeModuleDestroy( - hModule ZeModuleHandle, // hModule [in][release] handle of the module + hModule ZeModuleHandle, // hModule [in][release] handle of the module ) (ZeResult, error) { return zecall.Call[ZeResult]("zeModuleDestroy", uintptr(hModule)) } // ZeModuleDynamicLink Dynamically link modules together that share import/export linkage -/// dependencies. -/// -/// @details -/// - Modules support SPIR-V import and export linkage types for functions -/// and global variables. See the SPIR-V specification for linkage -/// details. -/// - Modules can have both import and export linkage. -/// - Modules that do not have any imports or exports do not need to be -/// linked. -/// - All module import requirements must be satisfied via linking before -/// kernel objects can be created from them. -/// - Modules cannot be partially linked. Unsatisfiable import dependencies -/// in the set of modules passed to ::zeModuleDynamicLink will result in -/// ::ZE_RESULT_ERROR_MODULE_LINK_FAILURE being returned. -/// - Modules will only be linked once. A module can be used in multiple -/// link calls if it has exports but its imports will not be re-linked. -/// - Ambiguous dependencies, where multiple modules satisfy the same import -/// dependencies for a module, are not allowed. -/// - The application must ensure the modules being linked were created on -/// the same context. -/// - The application may call this function from simultaneous threads as -/// long as the import modules being linked are not the same. -/// - ModuleGetNativeBinary can be called on any module regardless of -/// whether it is linked or not. -/// - A link log can optionally be returned to the caller. The caller is -/// responsible for destroying the link log using -/// ::zeModuleBuildLogDestroy. -/// - The link log may contain a list of the unresolved import dependencies -/// if present. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phModules` -/// - ::ZE_RESULT_ERROR_MODULE_LINK_FAILURE +// / dependencies. +// / +// / @details +// / - Modules support SPIR-V import and export linkage types for functions +// / and global variables. See the SPIR-V specification for linkage +// / details. +// / - Modules can have both import and export linkage. +// / - Modules that do not have any imports or exports do not need to be +// / linked. +// / - All module import requirements must be satisfied via linking before +// / kernel objects can be created from them. +// / - Modules cannot be partially linked. Unsatisfiable import dependencies +// / in the set of modules passed to ::zeModuleDynamicLink will result in +// / ::ZE_RESULT_ERROR_MODULE_LINK_FAILURE being returned. +// / - Modules will only be linked once. A module can be used in multiple +// / link calls if it has exports but its imports will not be re-linked. +// / - Ambiguous dependencies, where multiple modules satisfy the same import +// / dependencies for a module, are not allowed. +// / - The application must ensure the modules being linked were created on +// / the same context. +// / - The application may call this function from simultaneous threads as +// / long as the import modules being linked are not the same. +// / - ModuleGetNativeBinary can be called on any module regardless of +// / whether it is linked or not. +// / - A link log can optionally be returned to the caller. The caller is +// / responsible for destroying the link log using +// / ::zeModuleBuildLogDestroy. +// / - The link log may contain a list of the unresolved import dependencies +// / if present. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phModules` +// / - ::ZE_RESULT_ERROR_MODULE_LINK_FAILURE func ZeModuleDynamicLink( - numModules uint32, // numModules [in] number of modules to be linked pointed to by phModules. - phModules *ZeModuleHandle, // phModules [in][range(0, numModules)] pointer to an array of modules to dynamically link together. - phLinkLog *ZeModuleBuildLogHandle, // phLinkLog [out][optional] pointer to handle of dynamic link log. + numModules uint32, // numModules [in] number of modules to be linked pointed to by phModules. + phModules *ZeModuleHandle, // phModules [in][range(0, numModules)] pointer to an array of modules to dynamically link together. + phLinkLog *ZeModuleBuildLogHandle, // phLinkLog [out][optional] pointer to handle of dynamic link log. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeModuleDynamicLink", uintptr(numModules), uintptr(unsafe.Pointer(phModules)), uintptr(unsafe.Pointer(phLinkLog))) } // ZeModuleBuildLogDestroy Destroys module build log object -/// -/// @details -/// - The implementation of this function may immediately free all Host -/// allocations associated with this object. -/// - The application must **not** call this function from simultaneous -/// threads with the same build log handle. -/// - The implementation of this function should be lock-free. -/// - This function can be called before or after ::zeModuleDestroy for the -/// associated module. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hModuleBuildLog` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The implementation of this function may immediately free all Host +// / allocations associated with this object. +// / - The application must **not** call this function from simultaneous +// / threads with the same build log handle. +// / - The implementation of this function should be lock-free. +// / - This function can be called before or after ::zeModuleDestroy for the +// / associated module. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hModuleBuildLog` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeModuleBuildLogDestroy( - hModuleBuildLog ZeModuleBuildLogHandle, // hModuleBuildLog [in][release] handle of the module build log object. + hModuleBuildLog ZeModuleBuildLogHandle, // hModuleBuildLog [in][release] handle of the module build log object. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeModuleBuildLogDestroy", uintptr(hModuleBuildLog)) } // ZeModuleBuildLogGetString Retrieves text string for build log. -/// -/// @details -/// - The caller can pass nullptr for pBuildLog when querying only for size. -/// - The caller must provide memory for build log. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hModuleBuildLog` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pSize` +// / +// / @details +// / - The caller can pass nullptr for pBuildLog when querying only for size. +// / - The caller must provide memory for build log. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hModuleBuildLog` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pSize` func ZeModuleBuildLogGetString( - hModuleBuildLog ZeModuleBuildLogHandle, // hModuleBuildLog [in] handle of the module build log object. - pSize *uintptr, // pSize [in,out] size of build log string. - pBuildLog *byte, // pBuildLog [in,out][optional] pointer to null-terminated string of the log. + hModuleBuildLog ZeModuleBuildLogHandle, // hModuleBuildLog [in] handle of the module build log object. + pSize *uintptr, // pSize [in,out] size of build log string. + pBuildLog *byte, // pBuildLog [in,out][optional] pointer to null-terminated string of the log. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeModuleBuildLogGetString", uintptr(hModuleBuildLog), uintptr(unsafe.Pointer(pSize)), uintptr(unsafe.Pointer(pBuildLog))) } // ZeModuleGetNativeBinary Retrieve native binary from Module. -/// -/// @details -/// - The native binary output can be cached to disk and new modules can be -/// later constructed from the cached copy. -/// - The native binary will retain debugging information that is associated -/// with a module. -/// - The caller can pass nullptr for pModuleNativeBinary when querying only -/// for size. -/// - The implementation will copy the native binary into a buffer supplied -/// by the caller. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hModule` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pSize` +// / +// / @details +// / - The native binary output can be cached to disk and new modules can be +// / later constructed from the cached copy. +// / - The native binary will retain debugging information that is associated +// / with a module. +// / - The caller can pass nullptr for pModuleNativeBinary when querying only +// / for size. +// / - The implementation will copy the native binary into a buffer supplied +// / by the caller. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hModule` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pSize` func ZeModuleGetNativeBinary( - hModule ZeModuleHandle, // hModule [in] handle of the module - pSize *uintptr, // pSize [in,out] size of native binary in bytes. - pModuleNativeBinary *uint8, // pModuleNativeBinary [in,out][optional] byte pointer to native binary + hModule ZeModuleHandle, // hModule [in] handle of the module + pSize *uintptr, // pSize [in,out] size of native binary in bytes. + pModuleNativeBinary *uint8, // pModuleNativeBinary [in,out][optional] byte pointer to native binary ) (ZeResult, error) { return zecall.Call[ZeResult]("zeModuleGetNativeBinary", uintptr(hModule), uintptr(unsafe.Pointer(pSize)), uintptr(unsafe.Pointer(pModuleNativeBinary))) } // ZeModuleGetGlobalPointer Retrieve global variable pointer from Module. -/// -/// @details -/// - The application may query global pointer from any module that either -/// exports or imports it. -/// - The application must dynamically link a module that imports a global -/// before the global pointer can be queried from it. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hModule` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pGlobalName` -/// - ::ZE_RESULT_ERROR_INVALID_GLOBAL_NAME +// / +// / @details +// / - The application may query global pointer from any module that either +// / exports or imports it. +// / - The application must dynamically link a module that imports a global +// / before the global pointer can be queried from it. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hModule` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pGlobalName` +// / - ::ZE_RESULT_ERROR_INVALID_GLOBAL_NAME func ZeModuleGetGlobalPointer( - hModule ZeModuleHandle, // hModule [in] handle of the module - pGlobalName *byte, // pGlobalName [in] name of global variable in module - pSize *uintptr, // pSize [in,out][optional] size of global variable - pptr *unsafe.Pointer, // pptr [in,out][optional] device visible pointer + hModule ZeModuleHandle, // hModule [in] handle of the module + pGlobalName *byte, // pGlobalName [in] name of global variable in module + pSize *uintptr, // pSize [in,out][optional] size of global variable + pptr *unsafe.Pointer, // pptr [in,out][optional] device visible pointer ) (ZeResult, error) { return zecall.Call[ZeResult]("zeModuleGetGlobalPointer", uintptr(hModule), uintptr(unsafe.Pointer(pGlobalName)), uintptr(unsafe.Pointer(pSize)), uintptr(unsafe.Pointer(pptr))) } // ZeModuleGetKernelNames Retrieve all kernel names in the module. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hModule` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hModule` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZeModuleGetKernelNames( - hModule ZeModuleHandle, // hModule [in] handle of the module - pCount *uint32, // pCount [in,out] pointer to the number of names. if count is zero, then the driver shall update the value with the total number of names available. if count is greater than the number of names available, then the driver shall update the value with the correct number of names available. - pNames **byte, // pNames [in,out][optional][range(0, *pCount)] array of names of functions. if count is less than the number of names available, then driver shall only retrieve that number of names. + hModule ZeModuleHandle, // hModule [in] handle of the module + pCount *uint32, // pCount [in,out] pointer to the number of names. if count is zero, then the driver shall update the value with the total number of names available. if count is greater than the number of names available, then the driver shall update the value with the correct number of names available. + pNames **byte, // pNames [in,out][optional][range(0, *pCount)] array of names of functions. if count is less than the number of names available, then driver shall only retrieve that number of names. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeModuleGetKernelNames", uintptr(hModule), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pNames))) } // ZeModulePropertyFlags (ze_module_property_flags_t) Supported module property flags type ZeModulePropertyFlags uint32 + const ( - ZE_MODULE_PROPERTY_FLAG_IMPORTS ZeModulePropertyFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_MODULE_PROPERTY_FLAG_IMPORTS Module has imports (i.e. imported global variables and/or kernels). + ZE_MODULE_PROPERTY_FLAG_IMPORTS ZeModulePropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_MODULE_PROPERTY_FLAG_IMPORTS Module has imports (i.e. imported global variables and/or kernels). ///< See ::zeModuleDynamicLink. - ZE_MODULE_PROPERTY_FLAG_FORCE_UINT32 ZeModulePropertyFlags = 0x7fffffff // ZE_MODULE_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_MODULE_PROPERTY_FLAG_* ENUMs + ZE_MODULE_PROPERTY_FLAG_FORCE_UINT32 ZeModulePropertyFlags = 0x7fffffff // ZE_MODULE_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZE_MODULE_PROPERTY_FLAG_* ENUMs ) // ZeModuleProperties (ze_module_properties_t) Module properties type ZeModuleProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeModulePropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_module_property_flag_t + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeModulePropertyFlags // Flags [out] 0 (none) or a valid combination of ::ze_module_property_flag_t } // ZeModuleGetProperties Retrieve module properties. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hModule` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pModuleProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hModule` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pModuleProperties` func ZeModuleGetProperties( - hModule ZeModuleHandle, // hModule [in] handle of the module - pModuleProperties *ZeModuleProperties, // pModuleProperties [in,out] query result for module properties. + hModule ZeModuleHandle, // hModule [in] handle of the module + pModuleProperties *ZeModuleProperties, // pModuleProperties [in,out] query result for module properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeModuleGetProperties", uintptr(hModule), uintptr(unsafe.Pointer(pModuleProperties))) } // ZeKernelFlags (ze_kernel_flags_t) Supported kernel creation flags type ZeKernelFlags uint32 + const ( - ZE_KERNEL_FLAG_FORCE_RESIDENCY ZeKernelFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_KERNEL_FLAG_FORCE_RESIDENCY force all device allocations to be resident during execution - ZE_KERNEL_FLAG_EXPLICIT_RESIDENCY ZeKernelFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_KERNEL_FLAG_EXPLICIT_RESIDENCY application is responsible for all residency of device allocations. + ZE_KERNEL_FLAG_FORCE_RESIDENCY ZeKernelFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_KERNEL_FLAG_FORCE_RESIDENCY force all device allocations to be resident during execution + ZE_KERNEL_FLAG_EXPLICIT_RESIDENCY ZeKernelFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_KERNEL_FLAG_EXPLICIT_RESIDENCY application is responsible for all residency of device allocations. ///< driver may disable implicit residency management. - ZE_KERNEL_FLAG_FORCE_UINT32 ZeKernelFlags = 0x7fffffff // ZE_KERNEL_FLAG_FORCE_UINT32 Value marking end of ZE_KERNEL_FLAG_* ENUMs + ZE_KERNEL_FLAG_FORCE_UINT32 ZeKernelFlags = 0x7fffffff // ZE_KERNEL_FLAG_FORCE_UINT32 Value marking end of ZE_KERNEL_FLAG_* ENUMs ) // ZeKernelDesc (ze_kernel_desc_t) Kernel descriptor type ZeKernelDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeKernelFlags // Flags [in] creation flags. must be 0 (default) or a valid combination of ::ze_kernel_flag_t; default behavior may use driver-based residency. - Pkernelname *byte // Pkernelname [in] null-terminated name of kernel in module + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeKernelFlags // Flags [in] creation flags. must be 0 (default) or a valid combination of ::ze_kernel_flag_t; default behavior may use driver-based residency. + Pkernelname *byte // Pkernelname [in] null-terminated name of kernel in module } // ZeKernelCreate Create a kernel from the module. -/// -/// @details -/// - Modules that have unresolved imports need to be dynamically linked -/// before a kernel can be created from them. (See ::zeModuleDynamicLink) -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hModule` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == desc->pKernelName` -/// + `nullptr == phKernel` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3 < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_KERNEL_NAME -/// - ::ZE_RESULT_ERROR_INVALID_MODULE_UNLINKED +// / +// / @details +// / - Modules that have unresolved imports need to be dynamically linked +// / before a kernel can be created from them. (See ::zeModuleDynamicLink) +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hModule` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == desc->pKernelName` +// / + `nullptr == phKernel` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x3 < desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_KERNEL_NAME +// / - ::ZE_RESULT_ERROR_INVALID_MODULE_UNLINKED func ZeKernelCreate( - hModule ZeModuleHandle, // hModule [in] handle of the module - desc *ZeKernelDesc, // desc [in] pointer to kernel descriptor - phKernel *ZeKernelHandle, // phKernel [out] handle of the Function object + hModule ZeModuleHandle, // hModule [in] handle of the module + desc *ZeKernelDesc, // desc [in] pointer to kernel descriptor + phKernel *ZeKernelHandle, // phKernel [out] handle of the Function object ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelCreate", uintptr(hModule), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phKernel))) } // ZeKernelDestroy Destroys a kernel object -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the kernel before it is deleted. -/// - The implementation of this function may immediately free all Host and -/// Device allocations associated with this kernel. -/// - The application must **not** call this function from simultaneous -/// threads with the same kernel handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the kernel before it is deleted. +// / - The implementation of this function may immediately free all Host and +// / Device allocations associated with this kernel. +// / - The application must **not** call this function from simultaneous +// / threads with the same kernel handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeKernelDestroy( - hKernel ZeKernelHandle, // hKernel [in][release] handle of the kernel object + hKernel ZeKernelHandle, // hKernel [in][release] handle of the kernel object ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelDestroy", uintptr(hKernel)) } // ZeModuleGetFunctionPointer Retrieve a function pointer from a module by name -/// -/// @details -/// - The function pointer is unique for the device on which the module was -/// created. -/// - The function pointer is no longer valid if module is destroyed. -/// - The function name should only refer to callable functions within the -/// module. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hModule` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pFunctionName` -/// + `nullptr == pfnFunction` -/// - ::ZE_RESULT_ERROR_INVALID_FUNCTION_NAME +// / +// / @details +// / - The function pointer is unique for the device on which the module was +// / created. +// / - The function pointer is no longer valid if module is destroyed. +// / - The function name should only refer to callable functions within the +// / module. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hModule` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pFunctionName` +// / + `nullptr == pfnFunction` +// / - ::ZE_RESULT_ERROR_INVALID_FUNCTION_NAME func ZeModuleGetFunctionPointer( - hModule ZeModuleHandle, // hModule [in] handle of the module - pFunctionName *byte, // pFunctionName [in] Name of function to retrieve function pointer for. - pfnFunction *unsafe.Pointer, // pfnFunction [out] pointer to function. + hModule ZeModuleHandle, // hModule [in] handle of the module + pFunctionName *byte, // pFunctionName [in] Name of function to retrieve function pointer for. + pfnFunction *unsafe.Pointer, // pfnFunction [out] pointer to function. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeModuleGetFunctionPointer", uintptr(hModule), uintptr(unsafe.Pointer(pFunctionName)), uintptr(unsafe.Pointer(pfnFunction))) } // ZeKernelSetGroupSize Set group size for a kernel. -/// -/// @details -/// - The group size will be used when a ::zeCommandListAppendLaunchKernel -/// variant is called. -/// - The application must **not** call this function from simultaneous -/// threads with the same kernel handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION +// / +// / @details +// / - The group size will be used when a ::zeCommandListAppendLaunchKernel +// / variant is called. +// / - The application must **not** call this function from simultaneous +// / threads with the same kernel handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION func ZeKernelSetGroupSize( - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - groupSizeX uint32, // groupSizeX [in] group size for X dimension to use for this kernel - groupSizeY uint32, // groupSizeY [in] group size for Y dimension to use for this kernel - groupSizeZ uint32, // groupSizeZ [in] group size for Z dimension to use for this kernel + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + groupSizeX uint32, // groupSizeX [in] group size for X dimension to use for this kernel + groupSizeY uint32, // groupSizeY [in] group size for Y dimension to use for this kernel + groupSizeZ uint32, // groupSizeZ [in] group size for Z dimension to use for this kernel ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelSetGroupSize", uintptr(hKernel), uintptr(groupSizeX), uintptr(groupSizeY), uintptr(groupSizeZ)) } // ZeKernelSuggestGroupSize Query a suggested group size for a kernel given a global size for each -/// dimension. -/// -/// @details -/// - This function ignores the group size that is set using -/// ::zeKernelSetGroupSize. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == groupSizeX` -/// + `nullptr == groupSizeY` -/// + `nullptr == groupSizeZ` -/// - ::ZE_RESULT_ERROR_INVALID_GLOBAL_WIDTH_DIMENSION +// / dimension. +// / +// / @details +// / - This function ignores the group size that is set using +// / ::zeKernelSetGroupSize. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == groupSizeX` +// / + `nullptr == groupSizeY` +// / + `nullptr == groupSizeZ` +// / - ::ZE_RESULT_ERROR_INVALID_GLOBAL_WIDTH_DIMENSION func ZeKernelSuggestGroupSize( - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - globalSizeX uint32, // globalSizeX [in] global width for X dimension - globalSizeY uint32, // globalSizeY [in] global width for Y dimension - globalSizeZ uint32, // globalSizeZ [in] global width for Z dimension - groupSizeX *uint32, // groupSizeX [out] recommended size of group for X dimension - groupSizeY *uint32, // groupSizeY [out] recommended size of group for Y dimension - groupSizeZ *uint32, // groupSizeZ [out] recommended size of group for Z dimension + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + globalSizeX uint32, // globalSizeX [in] global width for X dimension + globalSizeY uint32, // globalSizeY [in] global width for Y dimension + globalSizeZ uint32, // globalSizeZ [in] global width for Z dimension + groupSizeX *uint32, // groupSizeX [out] recommended size of group for X dimension + groupSizeY *uint32, // groupSizeY [out] recommended size of group for Y dimension + groupSizeZ *uint32, // groupSizeZ [out] recommended size of group for Z dimension ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelSuggestGroupSize", uintptr(hKernel), uintptr(globalSizeX), uintptr(globalSizeY), uintptr(globalSizeZ), uintptr(unsafe.Pointer(groupSizeX)), uintptr(unsafe.Pointer(groupSizeY)), uintptr(unsafe.Pointer(groupSizeZ))) } // ZeKernelSuggestMaxCooperativeGroupCount Query a suggested max group count for a cooperative kernel. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - Applications are recommended to use ::zeKernelSuggestGroupSize and -/// ::zeKernelSetGroupSize first before calling this function and -/// launching cooperative kernels. Otherwise, implementation may return -/// ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == totalGroupCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - Applications are recommended to use ::zeKernelSuggestGroupSize and +// / ::zeKernelSetGroupSize first before calling this function and +// / launching cooperative kernels. Otherwise, implementation may return +// / ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == totalGroupCount` func ZeKernelSuggestMaxCooperativeGroupCount( - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - totalGroupCount *uint32, // totalGroupCount [out] recommended total group count. + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + totalGroupCount *uint32, // totalGroupCount [out] recommended total group count. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelSuggestMaxCooperativeGroupCount", uintptr(hKernel), uintptr(unsafe.Pointer(totalGroupCount))) } // ZeKernelSetArgumentValue Set kernel argument for a kernel. -/// -/// @details -/// - The argument values will be used when a -/// ::zeCommandListAppendLaunchKernel variant is called. -/// - The application must **not** call this function from simultaneous -/// threads with the same kernel handle. -/// - The implementation of this function should be lock-free. -/// - If argument is SLM (size), then SLM size in bytes for this resource is -/// provided as argument size and argument value is null -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX -/// - ::ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT +// / +// / @details +// / - The argument values will be used when a +// / ::zeCommandListAppendLaunchKernel variant is called. +// / - The application must **not** call this function from simultaneous +// / threads with the same kernel handle. +// / - The implementation of this function should be lock-free. +// / - If argument is SLM (size), then SLM size in bytes for this resource is +// / provided as argument size and argument value is null +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX +// / - ::ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT func ZeKernelSetArgumentValue( - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - argIndex uint32, // argIndex [in] argument index in range [0, num args - 1] - argSize uintptr, // argSize [in] size of argument type - pArgValue unsafe.Pointer, // pArgValue [in][optional] argument value represented as matching arg type. If null then argument value is considered null. + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + argIndex uint32, // argIndex [in] argument index in range [0, num args - 1] + argSize uintptr, // argSize [in] size of argument type + pArgValue unsafe.Pointer, // pArgValue [in][optional] argument value represented as matching arg type. If null then argument value is considered null. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelSetArgumentValue", uintptr(hKernel), uintptr(argIndex), uintptr(argSize), uintptr(unsafe.Pointer(pArgValue))) } // ZeKernelIndirectAccessFlags (ze_kernel_indirect_access_flags_t) Kernel indirect access flags type ZeKernelIndirectAccessFlags uint32 + const ( - ZE_KERNEL_INDIRECT_ACCESS_FLAG_HOST ZeKernelIndirectAccessFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_KERNEL_INDIRECT_ACCESS_FLAG_HOST Indicates that the kernel accesses host allocations indirectly. - ZE_KERNEL_INDIRECT_ACCESS_FLAG_DEVICE ZeKernelIndirectAccessFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_KERNEL_INDIRECT_ACCESS_FLAG_DEVICE Indicates that the kernel accesses device allocations indirectly. - ZE_KERNEL_INDIRECT_ACCESS_FLAG_SHARED ZeKernelIndirectAccessFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_KERNEL_INDIRECT_ACCESS_FLAG_SHARED Indicates that the kernel accesses shared allocations indirectly. - ZE_KERNEL_INDIRECT_ACCESS_FLAG_FORCE_UINT32 ZeKernelIndirectAccessFlags = 0x7fffffff // ZE_KERNEL_INDIRECT_ACCESS_FLAG_FORCE_UINT32 Value marking end of ZE_KERNEL_INDIRECT_ACCESS_FLAG_* ENUMs + ZE_KERNEL_INDIRECT_ACCESS_FLAG_HOST ZeKernelIndirectAccessFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_KERNEL_INDIRECT_ACCESS_FLAG_HOST Indicates that the kernel accesses host allocations indirectly. + ZE_KERNEL_INDIRECT_ACCESS_FLAG_DEVICE ZeKernelIndirectAccessFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_KERNEL_INDIRECT_ACCESS_FLAG_DEVICE Indicates that the kernel accesses device allocations indirectly. + ZE_KERNEL_INDIRECT_ACCESS_FLAG_SHARED ZeKernelIndirectAccessFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_KERNEL_INDIRECT_ACCESS_FLAG_SHARED Indicates that the kernel accesses shared allocations indirectly. + ZE_KERNEL_INDIRECT_ACCESS_FLAG_FORCE_UINT32 ZeKernelIndirectAccessFlags = 0x7fffffff // ZE_KERNEL_INDIRECT_ACCESS_FLAG_FORCE_UINT32 Value marking end of ZE_KERNEL_INDIRECT_ACCESS_FLAG_* ENUMs ) // ZeKernelSetIndirectAccess Sets kernel indirect access flags. -/// -/// @details -/// - The application should specify which allocations will be indirectly -/// accessed by the kernel to allow driver to optimize which allocations -/// are made resident -/// - This function may **not** be called from simultaneous threads with the -/// same Kernel handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x7 < flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - The application should specify which allocations will be indirectly +// / accessed by the kernel to allow driver to optimize which allocations +// / are made resident +// / - This function may **not** be called from simultaneous threads with the +// / same Kernel handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x7 < flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeKernelSetIndirectAccess( - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - flags ZeKernelIndirectAccessFlags, // flags [in] kernel indirect access flags + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + flags ZeKernelIndirectAccessFlags, // flags [in] kernel indirect access flags ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelSetIndirectAccess", uintptr(hKernel), uintptr(flags)) } // ZeKernelGetIndirectAccess Retrieve kernel indirect access flags. -/// -/// @details -/// - This function may be called from simultaneous threads with the same -/// Kernel handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pFlags` +// / +// / @details +// / - This function may be called from simultaneous threads with the same +// / Kernel handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pFlags` func ZeKernelGetIndirectAccess( - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - pFlags *ZeKernelIndirectAccessFlags, // pFlags [out] query result for kernel indirect access flags. + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + pFlags *ZeKernelIndirectAccessFlags, // pFlags [out] query result for kernel indirect access flags. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelGetIndirectAccess", uintptr(hKernel), uintptr(unsafe.Pointer(pFlags))) } // ZeKernelGetSourceAttributes Retrieve all declared kernel attributes (i.e. can be specified with -/// __attribute__ in runtime language). -/// -/// @details -/// - This function may be called from simultaneous threads with the same -/// Kernel handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pSize` +// / __attribute__ in runtime language). +// / +// / @details +// / - This function may be called from simultaneous threads with the same +// / Kernel handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pSize` func ZeKernelGetSourceAttributes( - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - pSize *uint32, // pSize [in,out] pointer to size of string in bytes, including null-terminating character. - pString **byte, // pString [in,out][optional] pointer to application-managed character array (string data). If NULL, the string length of the kernel source attributes, including a null-terminating character, is returned in pSize. Otherwise, pString must point to valid application memory that is greater than or equal to *pSize bytes in length, and on return the pointed-to string will contain a space-separated list of kernel source attributes. Note: This API was originally intended to ship with a char *pString, however this typo was introduced. Thus the API has to stay this way for backwards compatible reasons. It can be corrected in v2.0. Suggestion is to create your own char *pString and then pass to this API with &pString. + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + pSize *uint32, // pSize [in,out] pointer to size of string in bytes, including null-terminating character. + pString **byte, // pString [in,out][optional] pointer to application-managed character array (string data). If NULL, the string length of the kernel source attributes, including a null-terminating character, is returned in pSize. Otherwise, pString must point to valid application memory that is greater than or equal to *pSize bytes in length, and on return the pointed-to string will contain a space-separated list of kernel source attributes. Note: This API was originally intended to ship with a char *pString, however this typo was introduced. Thus the API has to stay this way for backwards compatible reasons. It can be corrected in v2.0. Suggestion is to create your own char *pString and then pass to this API with &pString. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelGetSourceAttributes", uintptr(hKernel), uintptr(unsafe.Pointer(pSize)), uintptr(unsafe.Pointer(pString))) } // ZeCacheConfigFlags (ze_cache_config_flags_t) Supported Cache Config flags type ZeCacheConfigFlags uint32 + const ( - ZE_CACHE_CONFIG_FLAG_LARGE_SLM ZeCacheConfigFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_CACHE_CONFIG_FLAG_LARGE_SLM Large SLM size - ZE_CACHE_CONFIG_FLAG_LARGE_DATA ZeCacheConfigFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_CACHE_CONFIG_FLAG_LARGE_DATA Large General Data size - ZE_CACHE_CONFIG_FLAG_FORCE_UINT32 ZeCacheConfigFlags = 0x7fffffff // ZE_CACHE_CONFIG_FLAG_FORCE_UINT32 Value marking end of ZE_CACHE_CONFIG_FLAG_* ENUMs + ZE_CACHE_CONFIG_FLAG_LARGE_SLM ZeCacheConfigFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_CACHE_CONFIG_FLAG_LARGE_SLM Large SLM size + ZE_CACHE_CONFIG_FLAG_LARGE_DATA ZeCacheConfigFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_CACHE_CONFIG_FLAG_LARGE_DATA Large General Data size + ZE_CACHE_CONFIG_FLAG_FORCE_UINT32 ZeCacheConfigFlags = 0x7fffffff // ZE_CACHE_CONFIG_FLAG_FORCE_UINT32 Value marking end of ZE_CACHE_CONFIG_FLAG_* ENUMs ) // ZeKernelSetCacheConfig Sets the preferred cache configuration. -/// -/// @details -/// - The cache configuration will be used when a -/// ::zeCommandListAppendLaunchKernel variant is called. -/// - The application must **not** call this function from simultaneous -/// threads with the same kernel handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3 < flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / +// / @details +// / - The cache configuration will be used when a +// / ::zeCommandListAppendLaunchKernel variant is called. +// / - The application must **not** call this function from simultaneous +// / threads with the same kernel handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x3 < flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE func ZeKernelSetCacheConfig( - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - flags ZeCacheConfigFlags, // flags [in] cache configuration. must be 0 (default configuration) or a valid combination of ::ze_cache_config_flag_t. + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + flags ZeCacheConfigFlags, // flags [in] cache configuration. must be 0 (default configuration) or a valid combination of ::ze_cache_config_flag_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelSetCacheConfig", uintptr(hKernel), uintptr(flags)) } @@ -880,437 +885,436 @@ const ZE_MAX_MODULE_UUID_SIZE = 16 // ZeKernelUuid (ze_kernel_uuid_t) Kernel universal unique id (UUID) type ZeKernelUuid struct { - Kid [ZE_MAX_KERNEL_UUID_SIZE]uint8 // Kid [out] opaque data representing a kernel UUID - Mid [ZE_MAX_MODULE_UUID_SIZE]uint8 // Mid [out] opaque data representing the kernel's module UUID + Kid [ZE_MAX_KERNEL_UUID_SIZE]uint8 // Kid [out] opaque data representing a kernel UUID + Mid [ZE_MAX_MODULE_UUID_SIZE]uint8 // Mid [out] opaque data representing the kernel's module UUID } // ZeKernelProperties (ze_kernel_properties_t) Kernel properties type ZeKernelProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Numkernelargs uint32 // Numkernelargs [out] number of kernel arguments. - Requiredgroupsizex uint32 // Requiredgroupsizex [out] required group size in the X dimension, or zero if there is no required group size - Requiredgroupsizey uint32 // Requiredgroupsizey [out] required group size in the Y dimension, or zero if there is no required group size - Requiredgroupsizez uint32 // Requiredgroupsizez [out] required group size in the Z dimension, or zero if there is no required group size - Requirednumsubgroups uint32 // Requirednumsubgroups [out] required number of subgroups per thread group, or zero if there is no required number of subgroups - Requiredsubgroupsize uint32 // Requiredsubgroupsize [out] required subgroup size, or zero if there is no required subgroup size - Maxsubgroupsize uint32 // Maxsubgroupsize [out] maximum subgroup size - Maxnumsubgroups uint32 // Maxnumsubgroups [out] maximum number of subgroups per thread group - Localmemsize uint32 // Localmemsize [out] local memory size used by each thread group - Privatememsize uint32 // Privatememsize [out] private memory size allocated by compiler used by each thread - Spillmemsize uint32 // Spillmemsize [out] spill memory size allocated by compiler - Uuid ZeKernelUuid // Uuid [out] universal unique identifier. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Numkernelargs uint32 // Numkernelargs [out] number of kernel arguments. + Requiredgroupsizex uint32 // Requiredgroupsizex [out] required group size in the X dimension, or zero if there is no required group size + Requiredgroupsizey uint32 // Requiredgroupsizey [out] required group size in the Y dimension, or zero if there is no required group size + Requiredgroupsizez uint32 // Requiredgroupsizez [out] required group size in the Z dimension, or zero if there is no required group size + Requirednumsubgroups uint32 // Requirednumsubgroups [out] required number of subgroups per thread group, or zero if there is no required number of subgroups + Requiredsubgroupsize uint32 // Requiredsubgroupsize [out] required subgroup size, or zero if there is no required subgroup size + Maxsubgroupsize uint32 // Maxsubgroupsize [out] maximum subgroup size + Maxnumsubgroups uint32 // Maxnumsubgroups [out] maximum number of subgroups per thread group + Localmemsize uint32 // Localmemsize [out] local memory size used by each thread group + Privatememsize uint32 // Privatememsize [out] private memory size allocated by compiler used by each thread + Spillmemsize uint32 // Spillmemsize [out] spill memory size allocated by compiler + Uuid ZeKernelUuid // Uuid [out] universal unique identifier. } // ZeKernelPreferredGroupSizeProperties (ze_kernel_preferred_group_size_properties_t) Additional kernel preferred group size properties -/// -/// @details -/// - This structure may be passed to ::zeKernelGetProperties, via the -/// `pNext` member of ::ze_kernel_properties_t, to query additional kernel -/// preferred group size properties. +// / +// / @details +// / - This structure may be passed to ::zeKernelGetProperties, via the +// / `pNext` member of ::ze_kernel_properties_t, to query additional kernel +// / preferred group size properties. type ZeKernelPreferredGroupSizeProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Preferredmultiple uint32 // Preferredmultiple [out] preferred group size multiple + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Preferredmultiple uint32 // Preferredmultiple [out] preferred group size multiple } // ZeKernelGetProperties Retrieve kernel properties. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pKernelProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pKernelProperties` func ZeKernelGetProperties( - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - pKernelProperties *ZeKernelProperties, // pKernelProperties [in,out] query result for kernel properties. + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + pKernelProperties *ZeKernelProperties, // pKernelProperties [in,out] query result for kernel properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelGetProperties", uintptr(hKernel), uintptr(unsafe.Pointer(pKernelProperties))) } // ZeKernelGetName Retrieve kernel name from Kernel. -/// -/// @details -/// - The caller can pass nullptr for pName when querying only for size. -/// - The implementation will copy the kernel name into a buffer supplied by -/// the caller. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pSize` +// / +// / @details +// / - The caller can pass nullptr for pName when querying only for size. +// / - The implementation will copy the kernel name into a buffer supplied by +// / the caller. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pSize` func ZeKernelGetName( - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - pSize *uintptr, // pSize [in,out] size of kernel name string, including null terminator, in bytes. - pName *byte, // pName [in,out][optional] char pointer to kernel name. + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + pSize *uintptr, // pSize [in,out] size of kernel name string, including null terminator, in bytes. + pName *byte, // pName [in,out][optional] char pointer to kernel name. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeKernelGetName", uintptr(hKernel), uintptr(unsafe.Pointer(pSize)), uintptr(unsafe.Pointer(pName))) } // ZeGroupCount (ze_group_count_t) Kernel dispatch group count. type ZeGroupCount struct { - Groupcountx uint32 // Groupcountx [in] number of thread groups in X dimension - Groupcounty uint32 // Groupcounty [in] number of thread groups in Y dimension - Groupcountz uint32 // Groupcountz [in] number of thread groups in Z dimension + Groupcountx uint32 // Groupcountx [in] number of thread groups in X dimension + Groupcounty uint32 // Groupcounty [in] number of thread groups in Y dimension + Groupcountz uint32 // Groupcountz [in] number of thread groups in Z dimension } // ZeCommandListAppendLaunchKernel Launch kernel over one or more work groups. -/// -/// @details -/// - The application must ensure the kernel and events are accessible by -/// the device on which the command list was created. -/// - This may **only** be called for a command list created with command -/// queue group ordinal that supports compute. -/// - The application must ensure the command list, kernel and events were -/// created on the same context. -/// - This function may **not** be called from simultaneous threads with the -/// same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pLaunchFuncArgs` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the kernel and events are accessible by +// / the device on which the command list was created. +// / - This may **only** be called for a command list created with command +// / queue group ordinal that supports compute. +// / - The application must ensure the command list, kernel and events were +// / created on the same context. +// / - This function may **not** be called from simultaneous threads with the +// / same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pLaunchFuncArgs` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendLaunchKernel( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - pLaunchFuncArgs *ZeGroupCount, // pLaunchFuncArgs [in] thread group launch arguments - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + pLaunchFuncArgs *ZeGroupCount, // pLaunchFuncArgs [in] thread group launch arguments + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendLaunchKernel", uintptr(hCommandList), uintptr(hKernel), uintptr(unsafe.Pointer(pLaunchFuncArgs)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListAppendLaunchKernelWithParameters Launch kernel over one or more work groups and allow to pass -/// additional parameters. -/// -/// @details -/// - The application must ensure the kernel and events are accessible by -/// the device on which the command list was created. -/// - This may **only** be called for a command list created with command -/// queue group ordinal that supports compute. -/// - The application must ensure the command list, kernel and events were -/// created on the same context. -/// - This function may **not** be called from simultaneous threads with the -/// same command list handle. -/// - The implementation of this function should be lock-free. -/// - This function allows to pass additional parameters in the form of -/// `${x}_base_desc_t` -/// - This function can replace ::zeCommandListAppendLaunchCooperativeKernel -/// with additional parameter -/// `${x}_command_list_append_launch_kernel_param_cooperative_desc_t` -/// - This function supports both immediate and regular command lists. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pGroupCounts` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + when passed additional parameters are invalid or incompatible with the device or command list +// / additional parameters. +// / +// / @details +// / - The application must ensure the kernel and events are accessible by +// / the device on which the command list was created. +// / - This may **only** be called for a command list created with command +// / queue group ordinal that supports compute. +// / - The application must ensure the command list, kernel and events were +// / created on the same context. +// / - This function may **not** be called from simultaneous threads with the +// / same command list handle. +// / - The implementation of this function should be lock-free. +// / - This function allows to pass additional parameters in the form of +// / `${x}_base_desc_t` +// / - This function can replace ::zeCommandListAppendLaunchCooperativeKernel +// / with additional parameter +// / `${x}_command_list_append_launch_kernel_param_cooperative_desc_t` +// / - This function supports both immediate and regular command lists. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pGroupCounts` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + when passed additional parameters are invalid or incompatible with the device or command list func ZeCommandListAppendLaunchKernelWithParameters( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - pGroupCounts *ZeGroupCount, // pGroupCounts [in] thread group launch arguments - pNext unsafe.Pointer, // pNext [in][optional] additional parameters passed to the function - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + pGroupCounts *ZeGroupCount, // pGroupCounts [in] thread group launch arguments + pNext unsafe.Pointer, // pNext [in][optional] additional parameters passed to the function + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendLaunchKernelWithParameters", uintptr(hCommandList), uintptr(hKernel), uintptr(unsafe.Pointer(pGroupCounts)), uintptr(unsafe.Pointer(pNext)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeGroupSize (ze_group_size_t) Kernel dispatch group sizes. type ZeGroupSize struct { - Groupsizex uint32 // Groupsizex [in] size of thread group in X dimension - Groupsizey uint32 // Groupsizey [in] size of thread group in Y dimension - Groupsizez uint32 // Groupsizez [in] size of thread group in Z dimension + Groupsizex uint32 // Groupsizex [in] size of thread group in X dimension + Groupsizey uint32 // Groupsizey [in] size of thread group in Y dimension + Groupsizez uint32 // Groupsizez [in] size of thread group in Z dimension } // ZeCommandListAppendLaunchKernelWithArguments Launch kernel over one or more work groups with specifying work group -/// size and all kernel arguments and allow to pass additional extensions. -/// -/// @details -/// - The application must ensure the kernel and events are accessible by -/// the device on which the command list was created. -/// - This may **only** be called for a command list created with command -/// queue group ordinal that supports compute. -/// - The application must ensure the command list, kernel and events were -/// created on the same context. -/// - This function may **not** be called from simultaneous threads with the -/// same command list handle. -/// - The implementation of this function should be lock-free. -/// - This function supports both immediate and regular command lists. -/// - This function changes kernel state as if separate -/// ${x}KernelSetGroupSize and ${x}KernelSetArgumentValue functions were -/// called. -/// - This function allows to pass additional extensions in the form of -/// `${x}_base_desc_t` -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + when passed additional extensions are invalid or incompatible with the device or command list -/// - ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION - "as per ${x}KernelSetGroupSize" -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT - "as per ${x}KernelSetArgumentValue" +// / size and all kernel arguments and allow to pass additional extensions. +// / +// / @details +// / - The application must ensure the kernel and events are accessible by +// / the device on which the command list was created. +// / - This may **only** be called for a command list created with command +// / queue group ordinal that supports compute. +// / - The application must ensure the command list, kernel and events were +// / created on the same context. +// / - This function may **not** be called from simultaneous threads with the +// / same command list handle. +// / - The implementation of this function should be lock-free. +// / - This function supports both immediate and regular command lists. +// / - This function changes kernel state as if separate +// / ${x}KernelSetGroupSize and ${x}KernelSetArgumentValue functions were +// / called. +// / - This function allows to pass additional extensions in the form of +// / `${x}_base_desc_t` +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + when passed additional extensions are invalid or incompatible with the device or command list +// / - ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION - "as per ${x}KernelSetGroupSize" +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT - "as per ${x}KernelSetArgumentValue" func ZeCommandListAppendLaunchKernelWithArguments( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - groupCounts *ZeGroupCount, // groupCounts [in] thread group counts (gozel hack: converted to a hidden pointer from a struct value) - groupSizes *ZeGroupSize, // groupSizes [in] thread group sizes (gozel hack: converted to a hidden pointer from a struct value) - pArguments *unsafe.Pointer, // pArguments [in]pointer to an array of pointers - pNext unsafe.Pointer, // pNext [in][optional] additional extensions passed to the function - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + groupCounts *ZeGroupCount, // groupCounts [in] thread group counts (gozel hack: converted to a hidden pointer from a struct value) + groupSizes *ZeGroupSize, // groupSizes [in] thread group sizes (gozel hack: converted to a hidden pointer from a struct value) + pArguments *unsafe.Pointer, // pArguments [in]pointer to an array of pointers + pNext unsafe.Pointer, // pNext [in][optional] additional extensions passed to the function + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendLaunchKernelWithArguments", uintptr(hCommandList), uintptr(hKernel), uintptr(unsafe.Pointer(groupCounts)), uintptr(unsafe.Pointer(groupSizes)), uintptr(unsafe.Pointer(pArguments)), uintptr(unsafe.Pointer(pNext)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListAppendLaunchCooperativeKernel Launch kernel cooperatively over one or more work groups. -/// -/// @details -/// - The application must ensure the kernel and events are accessible by -/// the device on which the command list was created. -/// - This may **only** be called for a command list created with command -/// queue group ordinal that supports compute. -/// - This may only be used for a command list that are submitted to command -/// queue with cooperative flag set. -/// - The application must ensure the command list, kernel and events were -/// created on the same context. -/// - This function may **not** be called from simultaneous threads with the -/// same command list handle. -/// - The implementation of this function should be lock-free. -/// - Use ::zeKernelSuggestMaxCooperativeGroupCount to recommend max group -/// count for device for cooperative functions that device supports. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pLaunchFuncArgs` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the kernel and events are accessible by +// / the device on which the command list was created. +// / - This may **only** be called for a command list created with command +// / queue group ordinal that supports compute. +// / - This may only be used for a command list that are submitted to command +// / queue with cooperative flag set. +// / - The application must ensure the command list, kernel and events were +// / created on the same context. +// / - This function may **not** be called from simultaneous threads with the +// / same command list handle. +// / - The implementation of this function should be lock-free. +// / - Use ::zeKernelSuggestMaxCooperativeGroupCount to recommend max group +// / count for device for cooperative functions that device supports. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pLaunchFuncArgs` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendLaunchCooperativeKernel( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - pLaunchFuncArgs *ZeGroupCount, // pLaunchFuncArgs [in] thread group launch arguments - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + pLaunchFuncArgs *ZeGroupCount, // pLaunchFuncArgs [in] thread group launch arguments + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendLaunchCooperativeKernel", uintptr(hCommandList), uintptr(hKernel), uintptr(unsafe.Pointer(pLaunchFuncArgs)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListAppendLaunchKernelIndirect Launch kernel over one or more work groups using indirect arguments. -/// -/// @details -/// - The application must ensure the kernel and events are accessible by -/// the device on which the command list was created. -/// - The application must ensure the launch arguments are visible to the -/// device on which the command list was created. -/// - The implementation must not access the contents of the launch -/// arguments as they are free to be modified by either the Host or device -/// up until execution. -/// - This may **only** be called for a command list created with command -/// queue group ordinal that supports compute. -/// - The application must ensure the command list, kernel and events were -/// created, and the memory was allocated, on the same context. -/// - This function may **not** be called from simultaneous threads with the -/// same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pLaunchArgumentsBuffer` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the kernel and events are accessible by +// / the device on which the command list was created. +// / - The application must ensure the launch arguments are visible to the +// / device on which the command list was created. +// / - The implementation must not access the contents of the launch +// / arguments as they are free to be modified by either the Host or device +// / up until execution. +// / - This may **only** be called for a command list created with command +// / queue group ordinal that supports compute. +// / - The application must ensure the command list, kernel and events were +// / created, and the memory was allocated, on the same context. +// / - This function may **not** be called from simultaneous threads with the +// / same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pLaunchArgumentsBuffer` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendLaunchKernelIndirect( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object - pLaunchArgumentsBuffer *ZeGroupCount, // pLaunchArgumentsBuffer [in] pointer to device buffer that will contain thread group launch arguments - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + hKernel ZeKernelHandle, // hKernel [in] handle of the kernel object + pLaunchArgumentsBuffer *ZeGroupCount, // pLaunchArgumentsBuffer [in] pointer to device buffer that will contain thread group launch arguments + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendLaunchKernelIndirect", uintptr(hCommandList), uintptr(hKernel), uintptr(unsafe.Pointer(pLaunchArgumentsBuffer)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListAppendLaunchMultipleKernelsIndirect Launch multiple kernels over one or more work groups using an array of -/// indirect arguments. -/// -/// @details -/// - The application must ensure the kernel and events are accessible by -/// the device on which the command list was created. -/// - The application must ensure the array of launch arguments and count -/// buffer are visible to the device on which the command list was -/// created. -/// - The implementation must not access the contents of the array of launch -/// arguments or count buffer as they are free to be modified by either -/// the Host or device up until execution. -/// - This may **only** be called for a command list created with command -/// queue group ordinal that supports compute. -/// - The application must enusre the command list, kernel and events were -/// created, and the memory was allocated, on the same context. -/// - This function may **not** be called from simultaneous threads with the -/// same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phKernels` -/// + `nullptr == pCountBuffer` -/// + `nullptr == pLaunchArgumentsBuffer` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / indirect arguments. +// / +// / @details +// / - The application must ensure the kernel and events are accessible by +// / the device on which the command list was created. +// / - The application must ensure the array of launch arguments and count +// / buffer are visible to the device on which the command list was +// / created. +// / - The implementation must not access the contents of the array of launch +// / arguments or count buffer as they are free to be modified by either +// / the Host or device up until execution. +// / - This may **only** be called for a command list created with command +// / queue group ordinal that supports compute. +// / - The application must enusre the command list, kernel and events were +// / created, and the memory was allocated, on the same context. +// / - This function may **not** be called from simultaneous threads with the +// / same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phKernels` +// / + `nullptr == pCountBuffer` +// / + `nullptr == pLaunchArgumentsBuffer` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZeCommandListAppendLaunchMultipleKernelsIndirect( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - numKernels uint32, // numKernels [in] maximum number of kernels to launch - phKernels *ZeKernelHandle, // phKernels [in][range(0, numKernels)] handles of the kernel objects - pCountBuffer *uint32, // pCountBuffer [in] pointer to device memory location that will contain the actual number of kernels to launch; value must be less than or equal to numKernels - pLaunchArgumentsBuffer *ZeGroupCount, // pLaunchArgumentsBuffer [in][range(0, numKernels)] pointer to device buffer that will contain a contiguous array of thread group launch arguments - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + numKernels uint32, // numKernels [in] maximum number of kernels to launch + phKernels *ZeKernelHandle, // phKernels [in][range(0, numKernels)] handles of the kernel objects + pCountBuffer *uint32, // pCountBuffer [in] pointer to device memory location that will contain the actual number of kernels to launch; value must be less than or equal to numKernels + pLaunchArgumentsBuffer *ZeGroupCount, // pLaunchArgumentsBuffer [in][range(0, numKernels)] pointer to device buffer that will contain a contiguous array of thread group launch arguments + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in][optional] number of events to wait on before launching; must be 0 if `nullptr == phWaitEvents` + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListAppendLaunchMultipleKernelsIndirect", uintptr(hCommandList), uintptr(numKernels), uintptr(unsafe.Pointer(phKernels)), uintptr(unsafe.Pointer(pCountBuffer)), uintptr(unsafe.Pointer(pLaunchArgumentsBuffer)), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } - diff --git a/core_mutableCommandList.go b/core_mutableCommandList.go index b11577b..2811789 100644 --- a/core_mutableCommandList.go +++ b/core_mutableCommandList.go @@ -24,372 +24,374 @@ const ZE_MUTABLE_COMMAND_LIST_EXP_NAME = "ZE_experimental_mutable_command_list" // ZeMutableCommandListExpVersion (ze_mutable_command_list_exp_version_t) Mutable Command List Extension Version(s) type ZeMutableCommandListExpVersion uintptr + const ( - ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0 ZeMutableCommandListExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0 version 1.0 - ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_1 ZeMutableCommandListExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */((( 1 << 16 )|( 1 & 0x0000ffff))) // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_1 version 1.1 - ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_CURRENT ZeMutableCommandListExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */((( 1 << 16 )|( 1 & 0x0000ffff))) // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_CURRENT latest known version - ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_FORCE_UINT32 ZeMutableCommandListExpVersion = 0x7fffffff // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_* ENUMs + ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0 ZeMutableCommandListExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_0 version 1.0 + ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_1 ZeMutableCommandListExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */ ((1 << 16) | (1 & 0x0000ffff)) // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_1_1 version 1.1 + ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_CURRENT ZeMutableCommandListExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */ ((1 << 16) | (1 & 0x0000ffff)) // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_CURRENT latest known version + ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_FORCE_UINT32 ZeMutableCommandListExpVersion = 0x7fffffff // ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_VERSION_* ENUMs ) // ZeMutableCommandExpFlags (ze_mutable_command_exp_flags_t) Mutable command flags type ZeMutableCommandExpFlags uint32 + const ( - ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS ZeMutableCommandExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS kernel arguments - ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_COUNT ZeMutableCommandExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_COUNT kernel group count - ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_SIZE ZeMutableCommandExpFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_SIZE kernel group size - ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET ZeMutableCommandExpFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET kernel global offset - ZE_MUTABLE_COMMAND_EXP_FLAG_SIGNAL_EVENT ZeMutableCommandExpFlags = /* ZE_BIT(4) */(( 1 << 4 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_SIGNAL_EVENT command signal event - ZE_MUTABLE_COMMAND_EXP_FLAG_WAIT_EVENTS ZeMutableCommandExpFlags = /* ZE_BIT(5) */(( 1 << 5 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_WAIT_EVENTS command wait events - ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION ZeMutableCommandExpFlags = /* ZE_BIT(6) */(( 1 << 6 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION command kernel - ZE_MUTABLE_COMMAND_EXP_FLAG_GRAPH_ARGUMENTS ZeMutableCommandExpFlags = /* ZE_BIT(7) */(( 1 << 7 )) // ZE_MUTABLE_COMMAND_EXP_FLAG_GRAPH_ARGUMENTS graph arguments - ZE_MUTABLE_COMMAND_EXP_FLAG_FORCE_UINT32 ZeMutableCommandExpFlags = 0x7fffffff // ZE_MUTABLE_COMMAND_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_MUTABLE_COMMAND_EXP_FLAG_* ENUMs + ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS ZeMutableCommandExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS kernel arguments + ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_COUNT ZeMutableCommandExpFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_COUNT kernel group count + ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_SIZE ZeMutableCommandExpFlags = /* ZE_BIT(2) */ (1 << 2) // ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_SIZE kernel group size + ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET ZeMutableCommandExpFlags = /* ZE_BIT(3) */ (1 << 3) // ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET kernel global offset + ZE_MUTABLE_COMMAND_EXP_FLAG_SIGNAL_EVENT ZeMutableCommandExpFlags = /* ZE_BIT(4) */ (1 << 4) // ZE_MUTABLE_COMMAND_EXP_FLAG_SIGNAL_EVENT command signal event + ZE_MUTABLE_COMMAND_EXP_FLAG_WAIT_EVENTS ZeMutableCommandExpFlags = /* ZE_BIT(5) */ (1 << 5) // ZE_MUTABLE_COMMAND_EXP_FLAG_WAIT_EVENTS command wait events + ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION ZeMutableCommandExpFlags = /* ZE_BIT(6) */ (1 << 6) // ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION command kernel + ZE_MUTABLE_COMMAND_EXP_FLAG_GRAPH_ARGUMENTS ZeMutableCommandExpFlags = /* ZE_BIT(7) */ (1 << 7) // ZE_MUTABLE_COMMAND_EXP_FLAG_GRAPH_ARGUMENTS graph arguments + ZE_MUTABLE_COMMAND_EXP_FLAG_FORCE_UINT32 ZeMutableCommandExpFlags = 0x7fffffff // ZE_MUTABLE_COMMAND_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_MUTABLE_COMMAND_EXP_FLAG_* ENUMs ) // ZeMutableCommandIdExpDesc (ze_mutable_command_id_exp_desc_t) Mutable command identifier descriptor type ZeMutableCommandIdExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeMutableCommandExpFlags // Flags [in] mutable command flags. - must be 0 (default, equivalent to setting all flags bar kernel instruction), or a valid combination of ::ze_mutable_command_exp_flag_t - in order to include kernel instruction mutation, ::ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION must be explictly included + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeMutableCommandExpFlags // Flags [in] mutable command flags. - must be 0 (default, equivalent to setting all flags bar kernel instruction), or a valid combination of ::ze_mutable_command_exp_flag_t - in order to include kernel instruction mutation, ::ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION must be explictly included } // ZeMutableCommandListExpFlags (ze_mutable_command_list_exp_flags_t) Mutable command list flags type ZeMutableCommandListExpFlags uint32 + const ( - ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_RESERVED ZeMutableCommandListExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_RESERVED reserved - ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_FORCE_UINT32 ZeMutableCommandListExpFlags = 0x7fffffff // ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_* ENUMs + ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_RESERVED ZeMutableCommandListExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_RESERVED reserved + ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_FORCE_UINT32 ZeMutableCommandListExpFlags = 0x7fffffff // ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_MUTABLE_COMMAND_LIST_EXP_FLAG_* ENUMs ) // ZeMutableCommandListExpProperties (ze_mutable_command_list_exp_properties_t) Mutable command list properties type ZeMutableCommandListExpProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Mutablecommandlistflags ZeMutableCommandListExpFlags // Mutablecommandlistflags [out] mutable command list flags - Mutablecommandflags ZeMutableCommandExpFlags // Mutablecommandflags [out] mutable command flags + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Mutablecommandlistflags ZeMutableCommandListExpFlags // Mutablecommandlistflags [out] mutable command list flags + Mutablecommandflags ZeMutableCommandExpFlags // Mutablecommandflags [out] mutable command flags } // ZeMutableCommandListExpDesc (ze_mutable_command_list_exp_desc_t) Mutable command list descriptor type ZeMutableCommandListExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeMutableCommandListExpFlags // Flags [in] mutable command list flags. - must be 0 (default) or a valid combination of ::ze_mutable_command_list_exp_flag_t + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeMutableCommandListExpFlags // Flags [in] mutable command list flags. - must be 0 (default) or a valid combination of ::ze_mutable_command_list_exp_flag_t } // ZeMutableCommandsExpDesc (ze_mutable_commands_exp_desc_t) Mutable commands descriptor type ZeMutableCommandsExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags uint32 // Flags [in] must be 0, this field is reserved for future use + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags uint32 // Flags [in] must be 0, this field is reserved for future use } // ZeMutableKernelArgumentExpDesc (ze_mutable_kernel_argument_exp_desc_t) Mutable kernel argument descriptor type ZeMutableKernelArgumentExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Commandid uint64 // Commandid [in] command identifier - Argindex uint32 // Argindex [in] kernel argument index - Argsize uintptr // Argsize [in] kernel argument size - Pargvalue unsafe.Pointer // Pargvalue [in] pointer to kernel argument value + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Commandid uint64 // Commandid [in] command identifier + Argindex uint32 // Argindex [in] kernel argument index + Argsize uintptr // Argsize [in] kernel argument size + Pargvalue unsafe.Pointer // Pargvalue [in] pointer to kernel argument value } // ZeMutableGroupCountExpDesc (ze_mutable_group_count_exp_desc_t) Mutable kernel group count descriptor type ZeMutableGroupCountExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Commandid uint64 // Commandid [in] command identifier - Pgroupcount *ZeGroupCount // Pgroupcount [in] pointer to group count + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Commandid uint64 // Commandid [in] command identifier + Pgroupcount *ZeGroupCount // Pgroupcount [in] pointer to group count } // ZeMutableGroupSizeExpDesc (ze_mutable_group_size_exp_desc_t) Mutable kernel group size descriptor type ZeMutableGroupSizeExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Commandid uint64 // Commandid [in] command identifier - Groupsizex uint32 // Groupsizex [in] group size for X dimension to use for the kernel - Groupsizey uint32 // Groupsizey [in] group size for Y dimension to use for the kernel - Groupsizez uint32 // Groupsizez [in] group size for Z dimension to use for the kernel + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Commandid uint64 // Commandid [in] command identifier + Groupsizex uint32 // Groupsizex [in] group size for X dimension to use for the kernel + Groupsizey uint32 // Groupsizey [in] group size for Y dimension to use for the kernel + Groupsizez uint32 // Groupsizez [in] group size for Z dimension to use for the kernel } // ZeMutableGlobalOffsetExpDesc (ze_mutable_global_offset_exp_desc_t) Mutable kernel global offset descriptor type ZeMutableGlobalOffsetExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Commandid uint64 // Commandid [in] command identifier - Offsetx uint32 // Offsetx [in] global offset for X dimension to use for this kernel - Offsety uint32 // Offsety [in] global offset for Y dimension to use for this kernel - Offsetz uint32 // Offsetz [in] global offset for Z dimension to use for this kernel + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Commandid uint64 // Commandid [in] command identifier + Offsetx uint32 // Offsetx [in] global offset for X dimension to use for this kernel + Offsety uint32 // Offsety [in] global offset for Y dimension to use for this kernel + Offsetz uint32 // Offsetz [in] global offset for Z dimension to use for this kernel } // ZeMutableGraphArgumentExpDesc (ze_mutable_graph_argument_exp_desc_t) Mutable graph argument descriptor type ZeMutableGraphArgumentExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Commandid uint64 // Commandid [in] command identifier - Argindex uint32 // Argindex [in] graph argument index - Pargvalue unsafe.Pointer // Pargvalue [in] pointer to graph argument value + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Commandid uint64 // Commandid [in] command identifier + Argindex uint32 // Argindex [in] graph argument index + Pargvalue unsafe.Pointer // Pargvalue [in] pointer to graph argument value } // ZeCommandListGetNextCommandIdExp Returns a unique command identifier for the next command to be -/// appended to a command list. -/// -/// @details -/// - This function may only be called for a mutable command list. -/// - This function may not be called on a closed command list. -/// - This function may be called from simultaneous threads with the same -/// command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == pCommandId` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0xff < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / appended to a command list. +// / +// / @details +// / - This function may only be called for a mutable command list. +// / - This function may not be called on a closed command list. +// / - This function may be called from simultaneous threads with the same +// / command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == pCommandId` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0xff < desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeCommandListGetNextCommandIdExp( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - desc *ZeMutableCommandIdExpDesc, // desc [in] pointer to mutable command identifier descriptor - pCommandId *uint64, // pCommandId [out] pointer to mutable command identifier to be written + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + desc *ZeMutableCommandIdExpDesc, // desc [in] pointer to mutable command identifier descriptor + pCommandId *uint64, // pCommandId [out] pointer to mutable command identifier to be written ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListGetNextCommandIdExp", uintptr(hCommandList), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(pCommandId))) } // ZeCommandListGetNextCommandIdWithKernelsExp Returns a unique command identifier for the next command to be -/// appended to a command list. Provides possible kernel handles for -/// kernel mutation when ::ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION -/// flag is present. -/// -/// @details -/// - This function may only be called for a mutable command list. -/// - This function may not be called on a closed command list. -/// - This function may be called from simultaneous threads with the same -/// command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == pCommandId` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0xff < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / appended to a command list. Provides possible kernel handles for +// / kernel mutation when ::ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_INSTRUCTION +// / flag is present. +// / +// / @details +// / - This function may only be called for a mutable command list. +// / - This function may not be called on a closed command list. +// / - This function may be called from simultaneous threads with the same +// / command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == pCommandId` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0xff < desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeCommandListGetNextCommandIdWithKernelsExp( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - desc *ZeMutableCommandIdExpDesc, // desc [in][out] pointer to mutable command identifier descriptor - numKernels uint32, // numKernels [in][optional] number of entries on phKernels list - phKernels *ZeKernelHandle, // phKernels [in][optional][range(0, numKernels)] list of kernels that user can switch between using ::zeCommandListUpdateMutableCommandKernelsExp call - pCommandId *uint64, // pCommandId [out] pointer to mutable command identifier to be written + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + desc *ZeMutableCommandIdExpDesc, // desc [in][out] pointer to mutable command identifier descriptor + numKernels uint32, // numKernels [in][optional] number of entries on phKernels list + phKernels *ZeKernelHandle, // phKernels [in][optional][range(0, numKernels)] list of kernels that user can switch between using ::zeCommandListUpdateMutableCommandKernelsExp call + pCommandId *uint64, // pCommandId [out] pointer to mutable command identifier to be written ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListGetNextCommandIdWithKernelsExp", uintptr(hCommandList), uintptr(unsafe.Pointer(desc)), uintptr(numKernels), uintptr(unsafe.Pointer(phKernels)), uintptr(unsafe.Pointer(pCommandId))) } // ZeCommandListUpdateMutableCommandsExp Updates mutable commands. -/// -/// @details -/// - This function may only be called for a mutable command list. -/// - The application must synchronize mutable command list execution before -/// calling this function. -/// - The application must close a mutable command list after completing all -/// updates. -/// - This function must not be called from simultaneous threads with the -/// same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + Invalid kernel argument or not matching update descriptor provided +// / +// / @details +// / - This function may only be called for a mutable command list. +// / - The application must synchronize mutable command list execution before +// / calling this function. +// / - The application must close a mutable command list after completing all +// / updates. +// / - This function must not be called from simultaneous threads with the +// / same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + Invalid kernel argument or not matching update descriptor provided func ZeCommandListUpdateMutableCommandsExp( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - desc *ZeMutableCommandsExpDesc, // desc [in] pointer to mutable commands descriptor; multiple descriptors may be chained via `pNext` member + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + desc *ZeMutableCommandsExpDesc, // desc [in] pointer to mutable commands descriptor; multiple descriptors may be chained via `pNext` member ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListUpdateMutableCommandsExp", uintptr(hCommandList), uintptr(unsafe.Pointer(desc))) } // ZeCommandListUpdateMutableCommandSignalEventExp Updates the signal event for a mutable command in a mutable command -/// list. -/// -/// @details -/// - This function may only be called for a mutable command list. -/// - The type, scope and flags of the signal event must match those of the -/// source command. -/// - The application must synchronize mutable command list execution before -/// calling this function. -/// - The application must close a mutable command list after completing all -/// updates. -/// - This function must not be called from simultaneous threads with the -/// same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` +// / list. +// / +// / @details +// / - This function may only be called for a mutable command list. +// / - The type, scope and flags of the signal event must match those of the +// / source command. +// / - The application must synchronize mutable command list execution before +// / calling this function. +// / - The application must close a mutable command list after completing all +// / updates. +// / - This function must not be called from simultaneous threads with the +// / same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` func ZeCommandListUpdateMutableCommandSignalEventExp( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - commandId uint64, // commandId [in] command identifier - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + commandId uint64, // commandId [in] command identifier + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListUpdateMutableCommandSignalEventExp", uintptr(hCommandList), uintptr(commandId), uintptr(hSignalEvent)) } // ZeCommandListUpdateMutableCommandWaitEventsExp Updates the wait events for a mutable command in a mutable command -/// list. -/// -/// @details -/// - This function may only be called for a mutable command list. -/// - The number of wait events must match that of the source command. -/// - The type, scope and flags of the wait events must match those of the -/// source command. -/// - Passing `nullptr` as the wait events will update the command to not -/// wait on any events prior to dispatch. -/// - Passing `nullptr` as an event on event wait list will remove event -/// dependency from this wait list slot. -/// - The application must synchronize mutable command list execution before -/// calling this function. -/// - The application must close a mutable command list after completing all -/// updates. -/// - This function must not be called from simultaneous threads with the -/// same command list handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + The `numWaitEvents` parameter does not match that of the original command. +// / list. +// / +// / @details +// / - This function may only be called for a mutable command list. +// / - The number of wait events must match that of the source command. +// / - The type, scope and flags of the wait events must match those of the +// / source command. +// / - Passing `nullptr` as the wait events will update the command to not +// / wait on any events prior to dispatch. +// / - Passing `nullptr` as an event on event wait list will remove event +// / dependency from this wait list slot. +// / - The application must synchronize mutable command list execution before +// / calling this function. +// / - The application must close a mutable command list after completing all +// / updates. +// / - This function must not be called from simultaneous threads with the +// / same command list handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + The `numWaitEvents` parameter does not match that of the original command. func ZeCommandListUpdateMutableCommandWaitEventsExp( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - commandId uint64, // commandId [in] command identifier - numWaitEvents uint32, // numWaitEvents [in][optional] the number of wait events - phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + commandId uint64, // commandId [in] command identifier + numWaitEvents uint32, // numWaitEvents [in][optional] the number of wait events + phWaitEvents *ZeEventHandle, // phWaitEvents [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListUpdateMutableCommandWaitEventsExp", uintptr(hCommandList), uintptr(commandId), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZeCommandListUpdateMutableCommandKernelsExp Updates the kernel for a mutable command in a mutable command list. -/// -/// @details -/// - This function may only be called for a mutable command list. -/// - The kernel handle must be from the provided list for given command id. -/// - The application must synchronize mutable command list execution before -/// calling this function. -/// - The application must close a mutable command list after completing all -/// updates. -/// - This function must not be called from simultaneous threads with the -/// same command list handle. -/// - This function must be called before updating kernel arguments and -/// dispatch parameters, when kernel is mutated. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCommandId` -/// + `nullptr == phKernels` -/// - ::ZE_RESULT_ERROR_INVALID_KERNEL_HANDLE -/// + Invalid kernel handle provided for the mutation kernel instruction operation. +// / +// / @details +// / - This function may only be called for a mutable command list. +// / - The kernel handle must be from the provided list for given command id. +// / - The application must synchronize mutable command list execution before +// / calling this function. +// / - The application must close a mutable command list after completing all +// / updates. +// / - This function must not be called from simultaneous threads with the +// / same command list handle. +// / - This function must be called before updating kernel arguments and +// / dispatch parameters, when kernel is mutated. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCommandId` +// / + `nullptr == phKernels` +// / - ::ZE_RESULT_ERROR_INVALID_KERNEL_HANDLE +// / + Invalid kernel handle provided for the mutation kernel instruction operation. func ZeCommandListUpdateMutableCommandKernelsExp( - hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list - numKernels uint32, // numKernels [in] the number of kernels to update - pCommandId *uint64, // pCommandId [in][range(0, numKernels)] command identifier - phKernels *ZeKernelHandle, // phKernels [in][range(0, numKernels)] handle of the kernel for a command identifier to switch to + hCommandList ZeCommandListHandle, // hCommandList [in] handle of the command list + numKernels uint32, // numKernels [in] the number of kernels to update + pCommandId *uint64, // pCommandId [in][range(0, numKernels)] command identifier + phKernels *ZeKernelHandle, // phKernels [in][range(0, numKernels)] handle of the kernel for a command identifier to switch to ) (ZeResult, error) { return zecall.Call[ZeResult]("zeCommandListUpdateMutableCommandKernelsExp", uintptr(hCommandList), uintptr(numKernels), uintptr(unsafe.Pointer(pCommandId)), uintptr(unsafe.Pointer(phKernels))) } - diff --git a/core_powersavinghint.go b/core_powersavinghint.go index eb06b44..3cb7cf7 100644 --- a/core_powersavinghint.go +++ b/core_powersavinghint.go @@ -22,33 +22,34 @@ const ZE_CONTEXT_POWER_SAVING_HINT_EXP_NAME = "ZE_experimental_power_saving_hint // ZePowerSavingHintExpVersion (ze_power_saving_hint_exp_version_t) Power Saving Hint Extension Version(s) type ZePowerSavingHintExpVersion uintptr + const ( - ZE_POWER_SAVING_HINT_EXP_VERSION_1_0 ZePowerSavingHintExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_POWER_SAVING_HINT_EXP_VERSION_1_0 version 1.0 - ZE_POWER_SAVING_HINT_EXP_VERSION_CURRENT ZePowerSavingHintExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_POWER_SAVING_HINT_EXP_VERSION_CURRENT latest known version - ZE_POWER_SAVING_HINT_EXP_VERSION_FORCE_UINT32 ZePowerSavingHintExpVersion = 0x7fffffff // ZE_POWER_SAVING_HINT_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_POWER_SAVING_HINT_EXP_VERSION_* ENUMs + ZE_POWER_SAVING_HINT_EXP_VERSION_1_0 ZePowerSavingHintExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_POWER_SAVING_HINT_EXP_VERSION_1_0 version 1.0 + ZE_POWER_SAVING_HINT_EXP_VERSION_CURRENT ZePowerSavingHintExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_POWER_SAVING_HINT_EXP_VERSION_CURRENT latest known version + ZE_POWER_SAVING_HINT_EXP_VERSION_FORCE_UINT32 ZePowerSavingHintExpVersion = 0x7fffffff // ZE_POWER_SAVING_HINT_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_POWER_SAVING_HINT_EXP_VERSION_* ENUMs ) // ZePowerSavingHintType (ze_power_saving_hint_type_t) Supported device types type ZePowerSavingHintType uintptr + const ( - ZE_POWER_SAVING_HINT_TYPE_MIN ZePowerSavingHintType = 0 // ZE_POWER_SAVING_HINT_TYPE_MIN Minumum power savings. The device will make no attempt to save power + ZE_POWER_SAVING_HINT_TYPE_MIN ZePowerSavingHintType = 0 // ZE_POWER_SAVING_HINT_TYPE_MIN Minumum power savings. The device will make no attempt to save power ///< while executing work submitted to this context. - ZE_POWER_SAVING_HINT_TYPE_MAX ZePowerSavingHintType = 100 // ZE_POWER_SAVING_HINT_TYPE_MAX Maximum power savings. The device will do everything to bring power to + ZE_POWER_SAVING_HINT_TYPE_MAX ZePowerSavingHintType = 100 // ZE_POWER_SAVING_HINT_TYPE_MAX Maximum power savings. The device will do everything to bring power to ///< a minimum while executing work submitted to this context. - ZE_POWER_SAVING_HINT_TYPE_FORCE_UINT32 ZePowerSavingHintType = 0x7fffffff // ZE_POWER_SAVING_HINT_TYPE_FORCE_UINT32 Value marking end of ZE_POWER_SAVING_HINT_TYPE_* ENUMs + ZE_POWER_SAVING_HINT_TYPE_FORCE_UINT32 ZePowerSavingHintType = 0x7fffffff // ZE_POWER_SAVING_HINT_TYPE_FORCE_UINT32 Value marking end of ZE_POWER_SAVING_HINT_TYPE_* ENUMs ) // ZeContextPowerSavingHintExpDesc (ze_context_power_saving_hint_exp_desc_t) Extended context descriptor containing power saving hint. type ZeContextPowerSavingHintExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Hint uint32 // Hint [in] power saving hint (default value = 0). This is value from [0,100] and can use pre-defined settings from ::ze_power_saving_hint_type_t. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Hint uint32 // Hint [in] power saving hint (default value = 0). This is value from [0,100] and can use pre-defined settings from ::ze_power_saving_hint_type_t. } - diff --git a/core_program.go b/core_program.go index d478e97..19a48f7 100644 --- a/core_program.go +++ b/core_program.go @@ -22,33 +22,33 @@ const ZE_MODULE_PROGRAM_EXP_NAME = "ZE_experimental_module_program" // ZeModuleProgramExpVersion (ze_module_program_exp_version_t) Module Program Extension Version(s) type ZeModuleProgramExpVersion uintptr + const ( - ZE_MODULE_PROGRAM_EXP_VERSION_1_0 ZeModuleProgramExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_MODULE_PROGRAM_EXP_VERSION_1_0 version 1.0 - ZE_MODULE_PROGRAM_EXP_VERSION_CURRENT ZeModuleProgramExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_MODULE_PROGRAM_EXP_VERSION_CURRENT latest known version - ZE_MODULE_PROGRAM_EXP_VERSION_FORCE_UINT32 ZeModuleProgramExpVersion = 0x7fffffff // ZE_MODULE_PROGRAM_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_MODULE_PROGRAM_EXP_VERSION_* ENUMs + ZE_MODULE_PROGRAM_EXP_VERSION_1_0 ZeModuleProgramExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_MODULE_PROGRAM_EXP_VERSION_1_0 version 1.0 + ZE_MODULE_PROGRAM_EXP_VERSION_CURRENT ZeModuleProgramExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_MODULE_PROGRAM_EXP_VERSION_CURRENT latest known version + ZE_MODULE_PROGRAM_EXP_VERSION_FORCE_UINT32 ZeModuleProgramExpVersion = 0x7fffffff // ZE_MODULE_PROGRAM_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_MODULE_PROGRAM_EXP_VERSION_* ENUMs ) // ZeModuleProgramExpDesc (ze_module_program_exp_desc_t) Module extended descriptor to support multiple input modules. -/// -/// @details -/// - Implementation must support ::ZE_MODULE_PROGRAM_EXP_NAME extension -/// - Modules support import and export linkage for functions and global -/// variables. -/// - pInputModules, pBuildFlags, and pConstants from ::ze_module_desc_t is -/// ignored. -/// - Format in ::ze_module_desc_t needs to be set to -/// ::ZE_MODULE_FORMAT_IL_SPIRV or ::ZE_MODULE_FORMAT_NATIVE. -/// - All modules in the list must be of the same format and match the -/// format specified in ::ze_module_desc_t. +// / +// / @details +// / - Implementation must support ::ZE_MODULE_PROGRAM_EXP_NAME extension +// / - Modules support import and export linkage for functions and global +// / variables. +// / - pInputModules, pBuildFlags, and pConstants from ::ze_module_desc_t is +// / ignored. +// / - Format in ::ze_module_desc_t needs to be set to +// / ::ZE_MODULE_FORMAT_IL_SPIRV or ::ZE_MODULE_FORMAT_NATIVE. +// / - All modules in the list must be of the same format and match the +// / format specified in ::ze_module_desc_t. type ZeModuleProgramExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Count uint32 // Count [in] Count of input modules - Inputsizes *uintptr // Inputsizes [in][range(0, count)] sizes of each input module in pInputModules. - Pinputmodules **uint8 // Pinputmodules [in][range(0, count)] pointer to an array of binary modules in format specified as part of ::ze_module_desc_t. - Pbuildflags **byte // Pbuildflags [in][optional][range(0, count)] array of strings containing build flags. See pBuildFlags in ::ze_module_desc_t. - Pconstants **ZeModuleConstants // Pconstants [in][optional][range(0, count)] pointer to array of specialization constant strings. Valid only for SPIR-V input. This must be set to nullptr if no specialization constants are provided. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Count uint32 // Count [in] Count of input modules + Inputsizes *uintptr // Inputsizes [in][range(0, count)] sizes of each input module in pInputModules. + Pinputmodules **uint8 // Pinputmodules [in][range(0, count)] pointer to an array of binary modules in format specified as part of ::ze_module_desc_t. + Pbuildflags **byte // Pbuildflags [in][optional][range(0, count)] array of strings containing build flags. See pBuildFlags in ::ze_module_desc_t. + Pconstants **ZeModuleConstants // Pconstants [in][optional][range(0, count)] pointer to array of specialization constant strings. Valid only for SPIR-V input. This must be set to nullptr if no specialization constants are provided. } - diff --git a/core_raytracing.go b/core_raytracing.go index 18d98f3..088915d 100644 --- a/core_raytracing.go +++ b/core_raytracing.go @@ -22,53 +22,55 @@ const ZE_RAYTRACING_EXT_NAME = "ZE_extension_raytracing" // ZeRaytracingExtVersion (ze_raytracing_ext_version_t) Raytracing Extension Version(s) type ZeRaytracingExtVersion uintptr + const ( - ZE_RAYTRACING_EXT_VERSION_1_0 ZeRaytracingExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_RAYTRACING_EXT_VERSION_1_0 version 1.0 - ZE_RAYTRACING_EXT_VERSION_CURRENT ZeRaytracingExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_RAYTRACING_EXT_VERSION_CURRENT latest known version - ZE_RAYTRACING_EXT_VERSION_FORCE_UINT32 ZeRaytracingExtVersion = 0x7fffffff // ZE_RAYTRACING_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_RAYTRACING_EXT_VERSION_* ENUMs + ZE_RAYTRACING_EXT_VERSION_1_0 ZeRaytracingExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_RAYTRACING_EXT_VERSION_1_0 version 1.0 + ZE_RAYTRACING_EXT_VERSION_CURRENT ZeRaytracingExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_RAYTRACING_EXT_VERSION_CURRENT latest known version + ZE_RAYTRACING_EXT_VERSION_FORCE_UINT32 ZeRaytracingExtVersion = 0x7fffffff // ZE_RAYTRACING_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_RAYTRACING_EXT_VERSION_* ENUMs ) // ZeDeviceRaytracingExtFlags (ze_device_raytracing_ext_flags_t) Supported raytracing capability flags type ZeDeviceRaytracingExtFlags uint32 + const ( - ZE_DEVICE_RAYTRACING_EXT_FLAG_RAYQUERY ZeDeviceRaytracingExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_DEVICE_RAYTRACING_EXT_FLAG_RAYQUERY Supports rayquery - ZE_DEVICE_RAYTRACING_EXT_FLAG_FORCE_UINT32 ZeDeviceRaytracingExtFlags = 0x7fffffff // ZE_DEVICE_RAYTRACING_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_RAYTRACING_EXT_FLAG_* ENUMs + ZE_DEVICE_RAYTRACING_EXT_FLAG_RAYQUERY ZeDeviceRaytracingExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_DEVICE_RAYTRACING_EXT_FLAG_RAYQUERY Supports rayquery + ZE_DEVICE_RAYTRACING_EXT_FLAG_FORCE_UINT32 ZeDeviceRaytracingExtFlags = 0x7fffffff // ZE_DEVICE_RAYTRACING_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_DEVICE_RAYTRACING_EXT_FLAG_* ENUMs ) // ZeDeviceRaytracingExtProperties (ze_device_raytracing_ext_properties_t) Raytracing properties queried using ::zeDeviceGetModuleProperties -/// -/// @details -/// - This structure may be returned from ::zeDeviceGetModuleProperties, via -/// the `pNext` member of ::ze_device_module_properties_t. +// / +// / @details +// / - This structure may be returned from ::zeDeviceGetModuleProperties, via +// / the `pNext` member of ::ze_device_module_properties_t. type ZeDeviceRaytracingExtProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeDeviceRaytracingExtFlags // Flags [out] 0 or a valid combination of ::ze_device_raytracing_ext_flags_t - Maxbvhlevels uint32 // Maxbvhlevels [out] Maximum number of BVH levels supported + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeDeviceRaytracingExtFlags // Flags [out] 0 or a valid combination of ::ze_device_raytracing_ext_flags_t + Maxbvhlevels uint32 // Maxbvhlevels [out] Maximum number of BVH levels supported } // ZeRaytracingMemAllocExtFlags (ze_raytracing_mem_alloc_ext_flags_t) Supported raytracing memory allocation flags type ZeRaytracingMemAllocExtFlags uint32 + const ( - ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_TBD ZeRaytracingMemAllocExtFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_TBD reserved for future use - ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_FORCE_UINT32 ZeRaytracingMemAllocExtFlags = 0x7fffffff // ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_* ENUMs + ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_TBD ZeRaytracingMemAllocExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_TBD reserved for future use + ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_FORCE_UINT32 ZeRaytracingMemAllocExtFlags = 0x7fffffff // ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_RAYTRACING_MEM_ALLOC_EXT_FLAG_* ENUMs ) // ZeRaytracingMemAllocExtDesc (ze_raytracing_mem_alloc_ext_desc_t) Raytracing memory allocation descriptor -/// -/// @details -/// - This structure must be passed to ::zeMemAllocShared or -/// ::zeMemAllocDevice, via the `pNext` member of -/// ::ze_device_mem_alloc_desc_t, for any memory allocation that is to be -/// accessed by raytracing fixed-function of the device. +// / +// / @details +// / - This structure must be passed to ::zeMemAllocShared or +// / ::zeMemAllocDevice, via the `pNext` member of +// / ::ze_device_mem_alloc_desc_t, for any memory allocation that is to be +// / accessed by raytracing fixed-function of the device. type ZeRaytracingMemAllocExtDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeRaytracingMemAllocExtFlags // Flags [in] flags specifying additional allocation controls. must be 0 (default) or a valid combination of ::ze_raytracing_mem_alloc_ext_flag_t; default behavior may use implicit driver-based heuristics. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeRaytracingMemAllocExtFlags // Flags [in] flags specifying additional allocation controls. must be 0 (default) or a valid combination of ::ze_raytracing_mem_alloc_ext_flag_t; default behavior may use implicit driver-based heuristics. } - diff --git a/core_relaxedAllocLimits.go b/core_relaxedAllocLimits.go index e29d02f..9d82834 100644 --- a/core_relaxedAllocLimits.go +++ b/core_relaxedAllocLimits.go @@ -22,36 +22,37 @@ const ZE_RELAXED_ALLOCATION_LIMITS_EXP_NAME = "ZE_experimental_relaxed_allocatio // ZeRelaxedAllocationLimitsExpVersion (ze_relaxed_allocation_limits_exp_version_t) Relaxed Allocation Limits Extension Version(s) type ZeRelaxedAllocationLimitsExpVersion uintptr + const ( - ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_1_0 ZeRelaxedAllocationLimitsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_1_0 version 1.0 - ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_CURRENT ZeRelaxedAllocationLimitsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_CURRENT latest known version - ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_FORCE_UINT32 ZeRelaxedAllocationLimitsExpVersion = 0x7fffffff // ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_* ENUMs + ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_1_0 ZeRelaxedAllocationLimitsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_1_0 version 1.0 + ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_CURRENT ZeRelaxedAllocationLimitsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_CURRENT latest known version + ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_FORCE_UINT32 ZeRelaxedAllocationLimitsExpVersion = 0x7fffffff // ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_RELAXED_ALLOCATION_LIMITS_EXP_VERSION_* ENUMs ) // ZeRelaxedAllocationLimitsExpFlags (ze_relaxed_allocation_limits_exp_flags_t) Supported relaxed memory allocation flags type ZeRelaxedAllocationLimitsExpFlags uint32 + const ( - ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_MAX_SIZE ZeRelaxedAllocationLimitsExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_MAX_SIZE Allocation size may exceed the `maxMemAllocSize` member of + ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_MAX_SIZE ZeRelaxedAllocationLimitsExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_MAX_SIZE Allocation size may exceed the `maxMemAllocSize` member of ///< ::ZeDeviceProperties. - ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_FORCE_UINT32 ZeRelaxedAllocationLimitsExpFlags = 0x7fffffff // ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_* ENUMs + ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_FORCE_UINT32 ZeRelaxedAllocationLimitsExpFlags = 0x7fffffff // ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_FORCE_UINT32 Value marking end of ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_* ENUMs ) // ZeRelaxedAllocationLimitsExpDesc (ze_relaxed_allocation_limits_exp_desc_t) Relaxed limits memory allocation descriptor -/// -/// @details -/// - This structure may be passed to ::zeMemAllocShared or -/// ::zeMemAllocDevice, via the `pNext` member of -/// ::ze_device_mem_alloc_desc_t. -/// - This structure may also be passed to ::zeMemAllocHost, via the `pNext` -/// member of ::ze_host_mem_alloc_desc_t. +// / +// / @details +// / - This structure may be passed to ::zeMemAllocShared or +// / ::zeMemAllocDevice, via the `pNext` member of +// / ::ze_device_mem_alloc_desc_t. +// / - This structure may also be passed to ::zeMemAllocHost, via the `pNext` +// / member of ::ze_host_mem_alloc_desc_t. type ZeRelaxedAllocationLimitsExpDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZeRelaxedAllocationLimitsExpFlags // Flags [in] flags specifying allocation limits to relax. must be 0 (default) or a valid combination of ::ze_relaxed_allocation_limits_exp_flag_t; + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZeRelaxedAllocationLimitsExpFlags // Flags [in] flags specifying allocation limits to relax. must be 0 (default) or a valid combination of ::ze_relaxed_allocation_limits_exp_flag_t; } - diff --git a/core_residency.go b/core_residency.go index dba21b0..2ed3e80 100644 --- a/core_residency.go +++ b/core_residency.go @@ -20,147 +20,146 @@ import ( ) // ZeContextMakeMemoryResident Makes memory resident for the device. -/// -/// @details -/// - The application must ensure the memory is resident before being -/// referenced by the device -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + ptr is not recognized by the implementation +// / +// / @details +// / - The application must ensure the memory is resident before being +// / referenced by the device +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + ptr is not recognized by the implementation func ZeContextMakeMemoryResident( - hContext ZeContextHandle, // hContext [in] handle of context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - ptr unsafe.Pointer, // ptr [in] pointer to memory to make resident - size uintptr, // size [in] size in bytes to make resident + hContext ZeContextHandle, // hContext [in] handle of context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + ptr unsafe.Pointer, // ptr [in] pointer to memory to make resident + size uintptr, // size [in] size in bytes to make resident ) (ZeResult, error) { return zecall.Call[ZeResult]("zeContextMakeMemoryResident", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(ptr)), uintptr(size)) } // ZeContextEvictMemory Allows memory to be evicted from the device. -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the memory before it is evicted -/// - The application may free the memory without evicting; the memory is -/// implicitly evicted when freed. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the memory before it is evicted +// / - The application may free the memory without evicting; the memory is +// / implicitly evicted when freed. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` func ZeContextEvictMemory( - hContext ZeContextHandle, // hContext [in] handle of context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - ptr unsafe.Pointer, // ptr [in] pointer to memory to evict - size uintptr, // size [in] size in bytes to evict + hContext ZeContextHandle, // hContext [in] handle of context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + ptr unsafe.Pointer, // ptr [in] pointer to memory to evict + size uintptr, // size [in] size in bytes to evict ) (ZeResult, error) { return zecall.Call[ZeResult]("zeContextEvictMemory", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(ptr)), uintptr(size)) } // ZeContextMakeImageResident Makes image resident for the device. -/// -/// @details -/// - The application must ensure the image is resident before being -/// referenced by the device -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// + `nullptr == hImage` +// / +// / @details +// / - The application must ensure the image is resident before being +// / referenced by the device +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / + `nullptr == hImage` func ZeContextMakeImageResident( - hContext ZeContextHandle, // hContext [in] handle of context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - hImage ZeImageHandle, // hImage [in] handle of image to make resident + hContext ZeContextHandle, // hContext [in] handle of context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + hImage ZeImageHandle, // hImage [in] handle of image to make resident ) (ZeResult, error) { return zecall.Call[ZeResult]("zeContextMakeImageResident", uintptr(hContext), uintptr(hDevice), uintptr(hImage)) } // ZeContextEvictImage Allows image to be evicted from the device. -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the image before it is evicted -/// - The application may destroy the image without evicting; the image is -/// implicitly evicted when destroyed. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// + `nullptr == hImage` +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the image before it is evicted +// / - The application may destroy the image without evicting; the image is +// / implicitly evicted when destroyed. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / + `nullptr == hImage` func ZeContextEvictImage( - hContext ZeContextHandle, // hContext [in] handle of context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - hImage ZeImageHandle, // hImage [in] handle of image to make evict + hContext ZeContextHandle, // hContext [in] handle of context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + hImage ZeImageHandle, // hImage [in] handle of image to make evict ) (ZeResult, error) { return zecall.Call[ZeResult]("zeContextEvictImage", uintptr(hContext), uintptr(hDevice), uintptr(hImage)) } - diff --git a/core_sampler.go b/core_sampler.go index a1fccfc..8332f4d 100644 --- a/core_sampler.go +++ b/core_sampler.go @@ -21,111 +21,112 @@ import ( // ZeSamplerAddressMode (ze_sampler_address_mode_t) Sampler addressing modes type ZeSamplerAddressMode uintptr + const ( - ZE_SAMPLER_ADDRESS_MODE_NONE ZeSamplerAddressMode = 0 // ZE_SAMPLER_ADDRESS_MODE_NONE No coordinate modifications for out-of-bounds image access. - ZE_SAMPLER_ADDRESS_MODE_REPEAT ZeSamplerAddressMode = 1 // ZE_SAMPLER_ADDRESS_MODE_REPEAT Out-of-bounds coordinates are wrapped back around. - ZE_SAMPLER_ADDRESS_MODE_CLAMP ZeSamplerAddressMode = 2 // ZE_SAMPLER_ADDRESS_MODE_CLAMP Out-of-bounds coordinates are clamped to edge. - ZE_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER ZeSamplerAddressMode = 3 // ZE_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER Out-of-bounds coordinates are clamped to border color which is (0.0f, + ZE_SAMPLER_ADDRESS_MODE_NONE ZeSamplerAddressMode = 0 // ZE_SAMPLER_ADDRESS_MODE_NONE No coordinate modifications for out-of-bounds image access. + ZE_SAMPLER_ADDRESS_MODE_REPEAT ZeSamplerAddressMode = 1 // ZE_SAMPLER_ADDRESS_MODE_REPEAT Out-of-bounds coordinates are wrapped back around. + ZE_SAMPLER_ADDRESS_MODE_CLAMP ZeSamplerAddressMode = 2 // ZE_SAMPLER_ADDRESS_MODE_CLAMP Out-of-bounds coordinates are clamped to edge. + ZE_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER ZeSamplerAddressMode = 3 // ZE_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER Out-of-bounds coordinates are clamped to border color which is (0.0f, ///< 0.0f, 0.0f, 0.0f) if image format swizzle contains alpha, otherwise ///< (0.0f, 0.0f, 0.0f, 1.0f). - ZE_SAMPLER_ADDRESS_MODE_MIRROR ZeSamplerAddressMode = 4 // ZE_SAMPLER_ADDRESS_MODE_MIRROR Out-of-bounds coordinates are mirrored starting from edge. - ZE_SAMPLER_ADDRESS_MODE_FORCE_UINT32 ZeSamplerAddressMode = 0x7fffffff // ZE_SAMPLER_ADDRESS_MODE_FORCE_UINT32 Value marking end of ZE_SAMPLER_ADDRESS_MODE_* ENUMs + ZE_SAMPLER_ADDRESS_MODE_MIRROR ZeSamplerAddressMode = 4 // ZE_SAMPLER_ADDRESS_MODE_MIRROR Out-of-bounds coordinates are mirrored starting from edge. + ZE_SAMPLER_ADDRESS_MODE_FORCE_UINT32 ZeSamplerAddressMode = 0x7fffffff // ZE_SAMPLER_ADDRESS_MODE_FORCE_UINT32 Value marking end of ZE_SAMPLER_ADDRESS_MODE_* ENUMs ) // ZeSamplerFilterMode (ze_sampler_filter_mode_t) Sampler filtering modes type ZeSamplerFilterMode uintptr + const ( - ZE_SAMPLER_FILTER_MODE_NEAREST ZeSamplerFilterMode = 0 // ZE_SAMPLER_FILTER_MODE_NEAREST No coordinate modifications for out of bounds image access. - ZE_SAMPLER_FILTER_MODE_LINEAR ZeSamplerFilterMode = 1 // ZE_SAMPLER_FILTER_MODE_LINEAR Out-of-bounds coordinates are wrapped back around. - ZE_SAMPLER_FILTER_MODE_FORCE_UINT32 ZeSamplerFilterMode = 0x7fffffff // ZE_SAMPLER_FILTER_MODE_FORCE_UINT32 Value marking end of ZE_SAMPLER_FILTER_MODE_* ENUMs + ZE_SAMPLER_FILTER_MODE_NEAREST ZeSamplerFilterMode = 0 // ZE_SAMPLER_FILTER_MODE_NEAREST No coordinate modifications for out of bounds image access. + ZE_SAMPLER_FILTER_MODE_LINEAR ZeSamplerFilterMode = 1 // ZE_SAMPLER_FILTER_MODE_LINEAR Out-of-bounds coordinates are wrapped back around. + ZE_SAMPLER_FILTER_MODE_FORCE_UINT32 ZeSamplerFilterMode = 0x7fffffff // ZE_SAMPLER_FILTER_MODE_FORCE_UINT32 Value marking end of ZE_SAMPLER_FILTER_MODE_* ENUMs ) // ZeSamplerDesc (ze_sampler_desc_t) Sampler descriptor type ZeSamplerDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Addressmode ZeSamplerAddressMode // Addressmode [in] Sampler addressing mode to determine how out-of-bounds coordinates are handled. - Filtermode ZeSamplerFilterMode // Filtermode [in] Sampler filter mode to determine how samples are filtered. - Isnormalized ZeBool // Isnormalized [in] Are coordinates normalized [0, 1] or not. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Addressmode ZeSamplerAddressMode // Addressmode [in] Sampler addressing mode to determine how out-of-bounds coordinates are handled. + Filtermode ZeSamplerFilterMode // Filtermode [in] Sampler filter mode to determine how samples are filtered. + Isnormalized ZeBool // Isnormalized [in] Are coordinates normalized [0, 1] or not. } // ZeSamplerCreate Creates sampler on the context. -/// -/// @details -/// - The application must only use the sampler for the device, or its -/// sub-devices, which was provided during creation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phSampler` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_SAMPLER_ADDRESS_MODE_MIRROR < desc->addressMode` -/// + `::ZE_SAMPLER_FILTER_MODE_LINEAR < desc->filterMode` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - The application must only use the sampler for the device, or its +// / sub-devices, which was provided during creation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phSampler` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_SAMPLER_ADDRESS_MODE_MIRROR < desc->addressMode` +// / + `::ZE_SAMPLER_FILTER_MODE_LINEAR < desc->filterMode` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZeSamplerCreate( - hContext ZeContextHandle, // hContext [in] handle of the context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device - desc *ZeSamplerDesc, // desc [in] pointer to sampler descriptor - phSampler *ZeSamplerHandle, // phSampler [out] handle of the sampler + hContext ZeContextHandle, // hContext [in] handle of the context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device + desc *ZeSamplerDesc, // desc [in] pointer to sampler descriptor + phSampler *ZeSamplerHandle, // phSampler [out] handle of the sampler ) (ZeResult, error) { return zecall.Call[ZeResult]("zeSamplerCreate", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phSampler))) } // ZeSamplerDestroy Destroys sampler object -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the sampler before it is deleted. -/// - The implementation of this function may immediately free all Host and -/// Device allocations associated with this sampler. -/// - The application must **not** call this function from simultaneous -/// threads with the same sampler handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hSampler` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the sampler before it is deleted. +// / - The implementation of this function may immediately free all Host and +// / Device allocations associated with this sampler. +// / - The application must **not** call this function from simultaneous +// / threads with the same sampler handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hSampler` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZeSamplerDestroy( - hSampler ZeSamplerHandle, // hSampler [in][release] handle of the sampler + hSampler ZeSamplerHandle, // hSampler [in][release] handle of the sampler ) (ZeResult, error) { return zecall.Call[ZeResult]("zeSamplerDestroy", uintptr(hSampler)) } - diff --git a/core_subAllocationsProperties.go b/core_subAllocationsProperties.go index 3bd577c..7e626db 100644 --- a/core_subAllocationsProperties.go +++ b/core_subAllocationsProperties.go @@ -22,30 +22,30 @@ const ZE_SUB_ALLOCATIONS_EXP_NAME = "ZE_experimental_sub_allocations" // ZeSubAllocationsExpVersion (ze_sub_allocations_exp_version_t) Sub-Allocations Properties Extension Version(s) type ZeSubAllocationsExpVersion uintptr + const ( - ZE_SUB_ALLOCATIONS_EXP_VERSION_1_0 ZeSubAllocationsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SUB_ALLOCATIONS_EXP_VERSION_1_0 version 1.0 - ZE_SUB_ALLOCATIONS_EXP_VERSION_CURRENT ZeSubAllocationsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SUB_ALLOCATIONS_EXP_VERSION_CURRENT latest known version - ZE_SUB_ALLOCATIONS_EXP_VERSION_FORCE_UINT32 ZeSubAllocationsExpVersion = 0x7fffffff // ZE_SUB_ALLOCATIONS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_SUB_ALLOCATIONS_EXP_VERSION_* ENUMs + ZE_SUB_ALLOCATIONS_EXP_VERSION_1_0 ZeSubAllocationsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_SUB_ALLOCATIONS_EXP_VERSION_1_0 version 1.0 + ZE_SUB_ALLOCATIONS_EXP_VERSION_CURRENT ZeSubAllocationsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_SUB_ALLOCATIONS_EXP_VERSION_CURRENT latest known version + ZE_SUB_ALLOCATIONS_EXP_VERSION_FORCE_UINT32 ZeSubAllocationsExpVersion = 0x7fffffff // ZE_SUB_ALLOCATIONS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_SUB_ALLOCATIONS_EXP_VERSION_* ENUMs ) // ZeSubAllocation (ze_sub_allocation_t) Properties returned for a sub-allocation type ZeSubAllocation struct { - Base unsafe.Pointer // Base [in,out][optional] base address of the sub-allocation - Size uintptr // Size [in,out][optional] size of the allocation + Base unsafe.Pointer // Base [in,out][optional] base address of the sub-allocation + Size uintptr // Size [in,out][optional] size of the allocation } // ZeMemorySubAllocationsExpProperties (ze_memory_sub_allocations_exp_properties_t) Sub-Allocations Properties -/// -/// @details -/// - This structure may be passed to ::zeMemGetAllocProperties, via the -/// `pNext` member of ::ze_memory_allocation_properties_t. +// / +// / @details +// / - This structure may be passed to ::zeMemGetAllocProperties, via the +// / `pNext` member of ::ze_memory_allocation_properties_t. type ZeMemorySubAllocationsExpProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Pcount *uint32 // Pcount [in,out] pointer to the number of sub-allocations. if count is zero, then the driver shall update the value with the total number of sub-allocations on which the allocation has been divided. if count is greater than the number of sub-allocations, then the driver shall update the value with the correct number of sub-allocations. - Psuballocations *ZeSubAllocation // Psuballocations [in,out][optional][range(0, *pCount)] array of properties for sub-allocations. if count is less than the number of sub-allocations available, then driver shall only retrieve properties for that number of sub-allocations. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Pcount *uint32 // Pcount [in,out] pointer to the number of sub-allocations. if count is zero, then the driver shall update the value with the total number of sub-allocations on which the allocation has been divided. if count is greater than the number of sub-allocations, then the driver shall update the value with the correct number of sub-allocations. + Psuballocations *ZeSubAllocation // Psuballocations [in,out][optional][range(0, *pCount)] array of properties for sub-allocations. if count is less than the number of sub-allocations available, then driver shall only retrieve properties for that number of sub-allocations. } - diff --git a/core_subgroups.go b/core_subgroups.go index 0c95e91..e59e533 100644 --- a/core_subgroups.go +++ b/core_subgroups.go @@ -18,10 +18,10 @@ const ZE_SUBGROUPS_EXT_NAME = "ZE_extension_subgroups" // ZeSubgroupExtVersion (ze_subgroup_ext_version_t) Subgroups Extension Version(s) type ZeSubgroupExtVersion uintptr + const ( - ZE_SUBGROUP_EXT_VERSION_1_0 ZeSubgroupExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SUBGROUP_EXT_VERSION_1_0 version 1.0 - ZE_SUBGROUP_EXT_VERSION_CURRENT ZeSubgroupExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_SUBGROUP_EXT_VERSION_CURRENT latest known version - ZE_SUBGROUP_EXT_VERSION_FORCE_UINT32 ZeSubgroupExtVersion = 0x7fffffff // ZE_SUBGROUP_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_SUBGROUP_EXT_VERSION_* ENUMs + ZE_SUBGROUP_EXT_VERSION_1_0 ZeSubgroupExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_SUBGROUP_EXT_VERSION_1_0 version 1.0 + ZE_SUBGROUP_EXT_VERSION_CURRENT ZeSubgroupExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_SUBGROUP_EXT_VERSION_CURRENT latest known version + ZE_SUBGROUP_EXT_VERSION_FORCE_UINT32 ZeSubgroupExtVersion = 0x7fffffff // ZE_SUBGROUP_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_SUBGROUP_EXT_VERSION_* ENUMs ) - diff --git a/core_virtual.go b/core_virtual.go index 9e383c1..aafbbe1 100644 --- a/core_virtual.go +++ b/core_virtual.go @@ -21,449 +21,450 @@ import ( // ZeMemoryAccessAttribute (ze_memory_access_attribute_t) Virtual memory page access attributes type ZeMemoryAccessAttribute uintptr + const ( - ZE_MEMORY_ACCESS_ATTRIBUTE_NONE ZeMemoryAccessAttribute = 0 // ZE_MEMORY_ACCESS_ATTRIBUTE_NONE Indicates the memory page is inaccessible. - ZE_MEMORY_ACCESS_ATTRIBUTE_READWRITE ZeMemoryAccessAttribute = 1 // ZE_MEMORY_ACCESS_ATTRIBUTE_READWRITE Indicates the memory page supports read write access. - ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY ZeMemoryAccessAttribute = 2 // ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY Indicates the memory page supports read-only access. - ZE_MEMORY_ACCESS_ATTRIBUTE_FORCE_UINT32 ZeMemoryAccessAttribute = 0x7fffffff // ZE_MEMORY_ACCESS_ATTRIBUTE_FORCE_UINT32 Value marking end of ZE_MEMORY_ACCESS_ATTRIBUTE_* ENUMs + ZE_MEMORY_ACCESS_ATTRIBUTE_NONE ZeMemoryAccessAttribute = 0 // ZE_MEMORY_ACCESS_ATTRIBUTE_NONE Indicates the memory page is inaccessible. + ZE_MEMORY_ACCESS_ATTRIBUTE_READWRITE ZeMemoryAccessAttribute = 1 // ZE_MEMORY_ACCESS_ATTRIBUTE_READWRITE Indicates the memory page supports read write access. + ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY ZeMemoryAccessAttribute = 2 // ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY Indicates the memory page supports read-only access. + ZE_MEMORY_ACCESS_ATTRIBUTE_FORCE_UINT32 ZeMemoryAccessAttribute = 0x7fffffff // ZE_MEMORY_ACCESS_ATTRIBUTE_FORCE_UINT32 Value marking end of ZE_MEMORY_ACCESS_ATTRIBUTE_* ENUMs ) // ZeVirtualMemReserve Reserves pages in virtual address space. -/// -/// @details -/// - The application must only use the memory allocation on the context for -/// which it was created. -/// - The starting address and size must be page aligned. See -/// ::zeVirtualMemQueryPageSize. -/// - If pStart is not null then implementation will attempt to reserve -/// starting from that address. If not available then will find another -/// suitable starting address. -/// - The application may call this function from simultaneous threads. -/// - The access attributes will default to none to indicate reservation is -/// inaccessible. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pptr` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE -/// + `0 == size` +// / +// / @details +// / - The application must only use the memory allocation on the context for +// / which it was created. +// / - The starting address and size must be page aligned. See +// / ::zeVirtualMemQueryPageSize. +// / - If pStart is not null then implementation will attempt to reserve +// / starting from that address. If not available then will find another +// / suitable starting address. +// / - The application may call this function from simultaneous threads. +// / - The access attributes will default to none to indicate reservation is +// / inaccessible. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pptr` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE +// / + `0 == size` func ZeVirtualMemReserve( - hContext ZeContextHandle, // hContext [in] handle of the context object - pStart unsafe.Pointer, // pStart [in][optional] pointer to start of region to reserve. If nullptr then implementation will choose a start address. - size uintptr, // size [in] size in bytes to reserve; must be page aligned. - pptr *unsafe.Pointer, // pptr [out] pointer to virtual reservation. + hContext ZeContextHandle, // hContext [in] handle of the context object + pStart unsafe.Pointer, // pStart [in][optional] pointer to start of region to reserve. If nullptr then implementation will choose a start address. + size uintptr, // size [in] size in bytes to reserve; must be page aligned. + pptr *unsafe.Pointer, // pptr [out] pointer to virtual reservation. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeVirtualMemReserve", uintptr(hContext), uintptr(unsafe.Pointer(pStart)), uintptr(size), uintptr(unsafe.Pointer(pptr))) } // ZeVirtualMemFree Free pages in a reserved virtual address range. -/// -/// @details -/// - Any existing virtual mappings for the range will be unmapped. -/// - Physical allocations objects that were mapped to this range will not -/// be destroyed. These need to be destroyed explicitly. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE -/// + `0 == size` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT +// / +// / @details +// / - Any existing virtual mappings for the range will be unmapped. +// / - Physical allocations objects that were mapped to this range will not +// / be destroyed. These need to be destroyed explicitly. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE +// / + `0 == size` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT func ZeVirtualMemFree( - hContext ZeContextHandle, // hContext [in] handle of the context object - ptr unsafe.Pointer, // ptr [in] pointer to start of region to free. - size uintptr, // size [in] size in bytes to free; must be page aligned. + hContext ZeContextHandle, // hContext [in] handle of the context object + ptr unsafe.Pointer, // ptr [in] pointer to start of region to free. + size uintptr, // size [in] size in bytes to free; must be page aligned. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeVirtualMemFree", uintptr(hContext), uintptr(unsafe.Pointer(ptr)), uintptr(size)) } // ZeVirtualMemQueryPageSize Queries page size to use for aligning virtual memory reservations and -/// physical memory allocations. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pagesize` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE -/// + `0 == size` +// / physical memory allocations. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pagesize` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE +// / + `0 == size` func ZeVirtualMemQueryPageSize( - hContext ZeContextHandle, // hContext [in] handle of the context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device object - size uintptr, // size [in] unaligned allocation size in bytes - pagesize *uintptr, // pagesize [out] pointer to page size to use for start address and size alignments. + hContext ZeContextHandle, // hContext [in] handle of the context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device object + size uintptr, // size [in] unaligned allocation size in bytes + pagesize *uintptr, // pagesize [out] pointer to page size to use for start address and size alignments. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeVirtualMemQueryPageSize", uintptr(hContext), uintptr(hDevice), uintptr(size), uintptr(unsafe.Pointer(pagesize))) } // ZePhysicalMemFlags (ze_physical_mem_flags_t) Supported physical memory creation flags type ZePhysicalMemFlags uint32 + const ( - ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_DEVICE ZePhysicalMemFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_DEVICE [default] allocate physical device memory. - ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_HOST ZePhysicalMemFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_HOST Allocate physical host memory instead. - ZE_PHYSICAL_MEM_FLAG_FORCE_UINT32 ZePhysicalMemFlags = 0x7fffffff // ZE_PHYSICAL_MEM_FLAG_FORCE_UINT32 Value marking end of ZE_PHYSICAL_MEM_FLAG_* ENUMs + ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_DEVICE ZePhysicalMemFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_DEVICE [default] allocate physical device memory. + ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_HOST ZePhysicalMemFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_PHYSICAL_MEM_FLAG_ALLOCATE_ON_HOST Allocate physical host memory instead. + ZE_PHYSICAL_MEM_FLAG_FORCE_UINT32 ZePhysicalMemFlags = 0x7fffffff // ZE_PHYSICAL_MEM_FLAG_FORCE_UINT32 Value marking end of ZE_PHYSICAL_MEM_FLAG_* ENUMs ) // ZePhysicalMemDesc (ze_physical_mem_desc_t) Physical memory descriptor type ZePhysicalMemDesc struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZePhysicalMemFlags // Flags [in] creation flags. must be 0 (default) or a valid combination of ::ze_physical_mem_flag_t; default is to create physical device memory. - Size uintptr // Size [in] size in bytes to reserve; must be page aligned. + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZePhysicalMemFlags // Flags [in] creation flags. must be 0 (default) or a valid combination of ::ze_physical_mem_flag_t; default is to create physical device memory. + Size uintptr // Size [in] size in bytes to reserve; must be page aligned. } // ZePhysicalMemProperties (ze_physical_mem_properties_t) Physical memory properties queried using ::zePhysicalMemGetProperties type ZePhysicalMemProperties struct { - Stype ZeStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Id uint64 // Id [out] unique identifier for the physical memory object - Size uint64 // Size [out] size of the physical memory object in bytes + Stype ZeStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Id uint64 // Id [out] unique identifier for the physical memory object + Size uint64 // Size [out] size of the physical memory object in bytes } // ZePhysicalMemGetProperties Retrieves memory properties of the physical memory object. -/// -/// @details -/// - The application must only use the physical memory object on the -/// context for which it was created. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hPhysicalMem` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pMemProperties` +// / +// / @details +// / - The application must only use the physical memory object on the +// / context for which it was created. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hPhysicalMem` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pMemProperties` func ZePhysicalMemGetProperties( - hContext ZeContextHandle, // hContext [in] handle of the context object - hPhysicalMem ZePhysicalMemHandle, // hPhysicalMem [in] handle of the physical memory object - pMemProperties *ZePhysicalMemProperties, // pMemProperties [in,out] pointer to physical memory properties structure. + hContext ZeContextHandle, // hContext [in] handle of the context object + hPhysicalMem ZePhysicalMemHandle, // hPhysicalMem [in] handle of the physical memory object + pMemProperties *ZePhysicalMemProperties, // pMemProperties [in,out] pointer to physical memory properties structure. ) (ZeResult, error) { return zecall.Call[ZeResult]("zePhysicalMemGetProperties", uintptr(hContext), uintptr(hPhysicalMem), uintptr(unsafe.Pointer(pMemProperties))) } // ZePhysicalMemCreate Creates a physical memory object for the context. -/// -/// @details -/// - The application must only use the physical memory object on the -/// context for which it was created. -/// - The size must be page aligned. For host memory, the operating system -/// page size should be used. For device memory, see -/// ::zeVirtualMemQueryPageSize. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phPhysicalMemory` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x3 < desc->flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE -/// + `0 == desc->size` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT +// / +// / @details +// / - The application must only use the physical memory object on the +// / context for which it was created. +// / - The size must be page aligned. For host memory, the operating system +// / page size should be used. For device memory, see +// / ::zeVirtualMemQueryPageSize. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phPhysicalMemory` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x3 < desc->flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE +// / + `0 == desc->size` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT func ZePhysicalMemCreate( - hContext ZeContextHandle, // hContext [in] handle of the context object - hDevice ZeDeviceHandle, // hDevice [in] handle of the device object, can be `nullptr` if creating physical host memory. - desc *ZePhysicalMemDesc, // desc [in] pointer to physical memory descriptor. - phPhysicalMemory *ZePhysicalMemHandle, // phPhysicalMemory [out] pointer to handle of physical memory object created + hContext ZeContextHandle, // hContext [in] handle of the context object + hDevice ZeDeviceHandle, // hDevice [in] handle of the device object, can be `nullptr` if creating physical host memory. + desc *ZePhysicalMemDesc, // desc [in] pointer to physical memory descriptor. + phPhysicalMemory *ZePhysicalMemHandle, // phPhysicalMemory [out] pointer to handle of physical memory object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zePhysicalMemCreate", uintptr(hContext), uintptr(hDevice), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phPhysicalMemory))) } // ZePhysicalMemDestroy Destroys a physical memory object. -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the physical memory object before it is deleted -/// - The application must **not** call this function from simultaneous -/// threads with the same physical memory handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hPhysicalMemory` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the physical memory object before it is deleted +// / - The application must **not** call this function from simultaneous +// / threads with the same physical memory handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hPhysicalMemory` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZePhysicalMemDestroy( - hContext ZeContextHandle, // hContext [in] handle of the context object - hPhysicalMemory ZePhysicalMemHandle, // hPhysicalMemory [in][release] handle of physical memory object to destroy + hContext ZeContextHandle, // hContext [in] handle of the context object + hPhysicalMemory ZePhysicalMemHandle, // hPhysicalMemory [in][release] handle of physical memory object to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zePhysicalMemDestroy", uintptr(hContext), uintptr(hPhysicalMemory)) } // ZeVirtualMemMap Maps pages in virtual address space to pages from physical memory -/// object. -/// -/// @details -/// - The virtual address range must have been reserved using -/// ::zeVirtualMemReserve. -/// - The application must only use the mapped memory allocation on the -/// context for which it was created. -/// - The virtual start address and size must be page aligned. See -/// ::zeVirtualMemQueryPageSize. -/// - The application should use, for the starting address and size, the -/// same size alignment used for the physical allocation. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hPhysicalMemory` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY < access` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE -/// + `0 == size` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT +// / object. +// / +// / @details +// / - The virtual address range must have been reserved using +// / ::zeVirtualMemReserve. +// / - The application must only use the mapped memory allocation on the +// / context for which it was created. +// / - The virtual start address and size must be page aligned. See +// / ::zeVirtualMemQueryPageSize. +// / - The application should use, for the starting address and size, the +// / same size alignment used for the physical allocation. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hPhysicalMemory` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY < access` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE +// / + `0 == size` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT func ZeVirtualMemMap( - hContext ZeContextHandle, // hContext [in] handle of the context object - ptr unsafe.Pointer, // ptr [in] pointer to start of virtual address range to map. - size uintptr, // size [in] size in bytes of virtual address range to map; must be page aligned. - hPhysicalMemory ZePhysicalMemHandle, // hPhysicalMemory [in] handle to physical memory object. - offset uintptr, // offset [in] offset into physical memory allocation object; must be page aligned. - access ZeMemoryAccessAttribute, // access [in] specifies page access attributes to apply to the virtual address range. + hContext ZeContextHandle, // hContext [in] handle of the context object + ptr unsafe.Pointer, // ptr [in] pointer to start of virtual address range to map. + size uintptr, // size [in] size in bytes of virtual address range to map; must be page aligned. + hPhysicalMemory ZePhysicalMemHandle, // hPhysicalMemory [in] handle to physical memory object. + offset uintptr, // offset [in] offset into physical memory allocation object; must be page aligned. + access ZeMemoryAccessAttribute, // access [in] specifies page access attributes to apply to the virtual address range. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeVirtualMemMap", uintptr(hContext), uintptr(unsafe.Pointer(ptr)), uintptr(size), uintptr(hPhysicalMemory), uintptr(offset), uintptr(access)) } // ZeVirtualMemUnmap Unmaps pages in virtual address space from pages from a physical -/// memory object. -/// -/// @details -/// - The page access attributes for virtual address range will revert back -/// to none. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT -/// + Address must be page aligned -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE -/// + `0 == size` -/// + Size must be page aligned +// / memory object. +// / +// / @details +// / - The page access attributes for virtual address range will revert back +// / to none. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT +// / + Address must be page aligned +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE +// / + `0 == size` +// / + Size must be page aligned func ZeVirtualMemUnmap( - hContext ZeContextHandle, // hContext [in] handle of the context object - ptr unsafe.Pointer, // ptr [in] pointer to start of region to unmap. - size uintptr, // size [in] size in bytes to unmap; must be page aligned. + hContext ZeContextHandle, // hContext [in] handle of the context object + ptr unsafe.Pointer, // ptr [in] pointer to start of region to unmap. + size uintptr, // size [in] size in bytes to unmap; must be page aligned. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeVirtualMemUnmap", uintptr(hContext), uintptr(unsafe.Pointer(ptr)), uintptr(size)) } // ZeVirtualMemSetAccessAttribute Set memory access attributes for a virtual address range. -/// -/// @details -/// - This function may be called from simultaneous threads with the same -/// function handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY < access` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT -/// + Address must be page aligned -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE -/// + `0 == size` -/// + Size must be page aligned +// / +// / @details +// / - This function may be called from simultaneous threads with the same +// / function handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZE_MEMORY_ACCESS_ATTRIBUTE_READONLY < access` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT +// / + Address must be page aligned +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE +// / + `0 == size` +// / + Size must be page aligned func ZeVirtualMemSetAccessAttribute( - hContext ZeContextHandle, // hContext [in] handle of the context object - ptr unsafe.Pointer, // ptr [in] pointer to start of reserved virtual address region. - size uintptr, // size [in] size in bytes; must be page aligned. - access ZeMemoryAccessAttribute, // access [in] specifies page access attributes to apply to the virtual address range. + hContext ZeContextHandle, // hContext [in] handle of the context object + ptr unsafe.Pointer, // ptr [in] pointer to start of reserved virtual address region. + size uintptr, // size [in] size in bytes; must be page aligned. + access ZeMemoryAccessAttribute, // access [in] specifies page access attributes to apply to the virtual address range. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeVirtualMemSetAccessAttribute", uintptr(hContext), uintptr(unsafe.Pointer(ptr)), uintptr(size), uintptr(access)) } // ZeVirtualMemGetAccessAttribute Get memory access attribute for a virtual address range. -/// -/// @details -/// - If size and outSize are equal then the pages in the specified virtual -/// address range have the same access attributes. -/// - This function may be called from simultaneous threads with the same -/// function handle. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ptr` -/// + `nullptr == access` -/// + `nullptr == outSize` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT -/// + Address must be page aligned -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE -/// + `0 == size` -/// + Size must be page aligned +// / +// / @details +// / - If size and outSize are equal then the pages in the specified virtual +// / address range have the same access attributes. +// / - This function may be called from simultaneous threads with the same +// / function handle. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ptr` +// / + `nullptr == access` +// / + `nullptr == outSize` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT +// / + Address must be page aligned +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE +// / + `0 == size` +// / + Size must be page aligned func ZeVirtualMemGetAccessAttribute( - hContext ZeContextHandle, // hContext [in] handle of the context object - ptr unsafe.Pointer, // ptr [in] pointer to start of virtual address region for query. - size uintptr, // size [in] size in bytes; must be page aligned. - access *ZeMemoryAccessAttribute, // access [out] query result for page access attribute. - outSize *uintptr, // outSize [out] query result for size of virtual address range, starting at ptr, that shares same access attribute. + hContext ZeContextHandle, // hContext [in] handle of the context object + ptr unsafe.Pointer, // ptr [in] pointer to start of virtual address region for query. + size uintptr, // size [in] size in bytes; must be page aligned. + access *ZeMemoryAccessAttribute, // access [out] query result for page access attribute. + outSize *uintptr, // outSize [out] query result for size of virtual address range, starting at ptr, that shares same access attribute. ) (ZeResult, error) { return zecall.Call[ZeResult]("zeVirtualMemGetAccessAttribute", uintptr(hContext), uintptr(unsafe.Pointer(ptr)), uintptr(size), uintptr(unsafe.Pointer(access)), uintptr(unsafe.Pointer(outSize))) } - diff --git a/examples/vadd/main.ll b/examples/vadd/main.ll index 3dcc254..9ffc1b6 100644 --- a/examples/vadd/main.ll +++ b/examples/vadd/main.ll @@ -6,16 +6,16 @@ target triple = "spirv64-unknown-unknown" @__spirv_BuiltInGlobalInvocationId = external local_unnamed_addr addrspace(1) constant <3 x i64>, align 32 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite, inaccessiblemem: write) -define spir_kernel void @vector_add(ptr addrspace(1) noundef captures(none) %0, ptr addrspace(1) noundef readonly captures(none) %1) local_unnamed_addr #0 !sycl_fixed_targets !9 { - %3 = load i64, ptr addrspace(1) @__spirv_BuiltInGlobalInvocationId, align 32, !noalias !10 +define spir_kernel void @vector_add(ptr addrspace(1) noundef captures(none) %0, ptr addrspace(1) noundef readonly captures(none) %1) local_unnamed_addr #0 !sycl_fixed_targets !7 { + %3 = load i64, ptr addrspace(1) @__spirv_BuiltInGlobalInvocationId, align 32, !noalias !8 %4 = icmp ult i64 %3, 2147483648 tail call void @llvm.assume(i1 %4) %5 = getelementptr inbounds nuw float, ptr addrspace(1) %1, i64 %3 - %6 = load float, ptr addrspace(1) %5, align 4 + %6 = load float, ptr addrspace(1) %5, align 4, !tbaa !15 %7 = getelementptr inbounds nuw float, ptr addrspace(1) %0, i64 %3 - %8 = load float, ptr addrspace(1) %7, align 4 + %8 = load float, ptr addrspace(1) %7, align 4, !tbaa !15 %9 = fadd float %8, %6 - store float %9, ptr addrspace(1) %7, align 4 + store float %9, ptr addrspace(1) %7, align 4, !tbaa !15 ret void } @@ -25,27 +25,28 @@ declare void @llvm.assume(i1 noundef) #1 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite, inaccessiblemem: write) "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "sycl-entry-point" "sycl-module-id"="main.cpp" "sycl-optlevel"="2" } attributes #1 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } -!llvm.linker.options = !{!0, !1} -!llvm.module.flags = !{!2, !3, !4} -!opencl.spir.version = !{!5} -!spirv.Source = !{!6} -!llvm.ident = !{!7} -!sycl-esimd-split-status = !{!8} +!llvm.module.flags = !{!0, !1, !2} +!opencl.spir.version = !{!3} +!spirv.Source = !{!4} +!llvm.ident = !{!5} +!sycl-esimd-split-status = !{!6} -!0 = !{!"-llibcpmt"} -!1 = !{!"/alternatename:_Avx2WmemEnabled=_Avx2WmemEnabledWeakValue"} -!2 = !{i32 1, !"wchar_size", i32 2} -!3 = !{i32 1, !"sycl-device", i32 1} -!4 = !{i32 7, !"frame-pointer", i32 2} -!5 = !{i32 1, i32 2} -!6 = !{i32 4, i32 100000} -!7 = !{!"clang version 21.0.0git (https://github.com/intel/llvm d5f649b706f63b5c74e1929bc95db8de91085560)"} -!8 = !{i8 0} -!9 = !{} -!10 = !{!11, !13, !15} -!11 = distinct !{!11, !12, !"_ZN7__spirv29InitSizesSTGlobalInvocationIdILi1EN4sycl3_V12idILi1EEEE8initSizeEv: argument 0"} -!12 = distinct !{!12, !"_ZN7__spirv29InitSizesSTGlobalInvocationIdILi1EN4sycl3_V12idILi1EEEE8initSizeEv"} -!13 = distinct !{!13, !14, !"_ZN7__spirv22initGlobalInvocationIdILi1EN4sycl3_V12idILi1EEEEET0_v: argument 0"} -!14 = distinct !{!14, !"_ZN7__spirv22initGlobalInvocationIdILi1EN4sycl3_V12idILi1EEEEET0_v"} -!15 = distinct !{!15, !16, !"_ZNK4sycl3_V17nd_itemILi1EE13get_global_idEv: argument 0"} -!16 = distinct !{!16, !"_ZNK4sycl3_V17nd_itemILi1EE13get_global_idEv"} +!0 = !{i32 1, !"wchar_size", i32 4} +!1 = !{i32 1, !"sycl-device", i32 1} +!2 = !{i32 7, !"frame-pointer", i32 2} +!3 = !{i32 1, i32 2} +!4 = !{i32 4, i32 100000} +!5 = !{!"clang version 21.0.0git (https://github.com/intel/llvm d5f649b706f63b5c74e1929bc95db8de91085560)"} +!6 = !{i8 0} +!7 = !{} +!8 = !{!9, !11, !13} +!9 = distinct !{!9, !10, !"_ZN7__spirv29InitSizesSTGlobalInvocationIdILi1EN4sycl3_V12idILi1EEEE8initSizeEv: argument 0"} +!10 = distinct !{!10, !"_ZN7__spirv29InitSizesSTGlobalInvocationIdILi1EN4sycl3_V12idILi1EEEE8initSizeEv"} +!11 = distinct !{!11, !12, !"_ZN7__spirv22initGlobalInvocationIdILi1EN4sycl3_V12idILi1EEEEET0_v: argument 0"} +!12 = distinct !{!12, !"_ZN7__spirv22initGlobalInvocationIdILi1EN4sycl3_V12idILi1EEEEET0_v"} +!13 = distinct !{!13, !14, !"_ZNK4sycl3_V17nd_itemILi1EE13get_global_idEv: argument 0"} +!14 = distinct !{!14, !"_ZNK4sycl3_V17nd_itemILi1EE13get_global_idEv"} +!15 = !{!16, !16, i64 0} +!16 = !{!"float", !17, i64 0} +!17 = !{!"omnipotent char", !18, i64 0} +!18 = !{!"Simple C++ TBAA"} diff --git a/rntm_common.go b/rntm_common.go index c2f0a05..96dbfea 100644 --- a/rntm_common.go +++ b/rntm_common.go @@ -21,121 +21,119 @@ import ( // ZeDefaultGPUImmediateCommandQueueDesc Immediate Command List default descriptor for GPU devices var ZeDefaultGPUImmediateCommandQueueDesc = ZeCommandQueueDesc{ - ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC, ///< stype - nil, ///< pNext - 0, ///< ordinal - 0, ///< index - ZE_COMMAND_QUEUE_FLAG_IN_ORDER | ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT, ///< flags - ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS, ///< mode - ZE_COMMAND_QUEUE_PRIORITY_NORMAL, ///< priority + ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC, ///< stype + nil, ///< pNext + 0, ///< ordinal + 0, ///< index + ZE_COMMAND_QUEUE_FLAG_IN_ORDER | ZE_COMMAND_QUEUE_FLAG_COPY_OFFLOAD_HINT, ///< flags + ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS, ///< mode + ZE_COMMAND_QUEUE_PRIORITY_NORMAL, ///< priority } // ZeDefaultGPUDeviceMemAllocDesc Device Unified Shared Memory Allocation default descriptor for GPU -/// devices +// / devices var ZeDefaultGPUDeviceMemAllocDesc = ZeDeviceMemAllocDesc{ - ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC, ///< stype - nil, ///< pNext - ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_CACHED, ///< flags - 0, ///< ordinal + ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC, ///< stype + nil, ///< pNext + ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_CACHED, ///< flags + 0, ///< ordinal } // ZeDefaultGPUHostMemAllocDesc Host Unified Shared Memory Allocation default descriptor for GPU -/// devices +// / devices var ZeDefaultGPUHostMemAllocDesc = ZeHostMemAllocDesc{ - ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC, ///< stype - nil, ///< pNext + ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC, ///< stype + nil, ///< pNext ZE_HOST_MEM_ALLOC_FLAG_BIAS_CACHED | ZE_HOST_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT, ///< flags } // ZerGetLastErrorDescription Retrieves a string describing the last error code returned by the -/// default driver in the current thread. -/// -/// @details -/// - String returned is thread local. -/// - String is only updated on calls returning an error, i.e., not on calls -/// returning ::ZE_RESULT_SUCCESS. -/// - String may be empty if driver considers error code is already explicit -/// enough to describe cause. -/// - Memory pointed to by ppString is owned by the default driver. -/// - String returned is null-terminated. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == ppString` +// / default driver in the current thread. +// / +// / @details +// / - String returned is thread local. +// / - String is only updated on calls returning an error, i.e., not on calls +// / returning ::ZE_RESULT_SUCCESS. +// / - String may be empty if driver considers error code is already explicit +// / enough to describe cause. +// / - Memory pointed to by ppString is owned by the default driver. +// / - String returned is null-terminated. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == ppString` func ZerGetLastErrorDescription( - ppString **byte, // ppString [in,out] pointer to a null-terminated array of characters describing cause of error. + ppString **byte, // ppString [in,out] pointer to a null-terminated array of characters describing cause of error. ) (ZeResult, error) { return zecall.Call[ZeResult]("zerGetLastErrorDescription", uintptr(unsafe.Pointer(ppString))) } // ZerTranslateDeviceHandleToIdentifier Translates device handle to integer identifier. -/// -/// @details -/// - The implementation of this function should be lock-free. -/// - This function does not return error code, to get info about failure -/// user may use ::zerGetLastErrorDescription function. -/// - In case of failure, this function returns UINT32_MAX. -/// -/// @returns -/// - integer identifier for the device -/// - UINT32_MAX +// / +// / @details +// / - The implementation of this function should be lock-free. +// / - This function does not return error code, to get info about failure +// / user may use ::zerGetLastErrorDescription function. +// / - In case of failure, this function returns UINT32_MAX. +// / +// / @returns +// / - integer identifier for the device +// / - UINT32_MAX func ZerTranslateDeviceHandleToIdentifier( - hDevice ZeDeviceHandle, // hDevice [in] handle of the device + hDevice ZeDeviceHandle, // hDevice [in] handle of the device ) (uint32, error) { return zecall.Call[uint32]("zerTranslateDeviceHandleToIdentifier", uintptr(hDevice)) } // ZerTranslateIdentifierToDeviceHandle Translates to integer identifier to a device handle. -/// -/// @details -/// - The driver must be initialized before calling this function. -/// - The implementation of this function should be lock-free. -/// - This function does not return error code, to get info about failure -/// user may use ::zerGetLastErrorDescription function. -/// - In case of failure, this function returns null. -/// - Details on the error can be retrieved using -/// ::zerGetLastErrorDescription function. -/// -/// @returns -/// - handle of the device with the given identifier -/// - nullptr +// / +// / @details +// / - The driver must be initialized before calling this function. +// / - The implementation of this function should be lock-free. +// / - This function does not return error code, to get info about failure +// / user may use ::zerGetLastErrorDescription function. +// / - In case of failure, this function returns null. +// / - Details on the error can be retrieved using +// / ::zerGetLastErrorDescription function. +// / +// / @returns +// / - handle of the device with the given identifier +// / - nullptr func ZerTranslateIdentifierToDeviceHandle( - identifier uint32, // identifier [in] integer identifier of the device + identifier uint32, // identifier [in] integer identifier of the device ) (ZeDeviceHandle, error) { return zecall.Call[ZeDeviceHandle]("zerTranslateIdentifierToDeviceHandle", uintptr(identifier)) } // ZerGetDefaultContext Retrieves handle to default context from the default driver. -/// -/// @details -/// - The driver must be initialized before calling this function. -/// - The implementation of this function should be lock-free. -/// - This returned context contains all the devices available in the -/// default driver. -/// - This function does not return error code, to get info about failure -/// user may use ::zerGetLastErrorDescription function. -/// - In case of failure, this function returns null. -/// - Details on the error can be retrieved using -/// ::zerGetLastErrorDescription function. -/// -/// @returns -/// - handle of the default context -/// - nullptr -func ZerGetDefaultContext( -) (ZeContextHandle, error) { +// / +// / @details +// / - The driver must be initialized before calling this function. +// / - The implementation of this function should be lock-free. +// / - This returned context contains all the devices available in the +// / default driver. +// / - This function does not return error code, to get info about failure +// / user may use ::zerGetLastErrorDescription function. +// / - In case of failure, this function returns null. +// / - Details on the error can be retrieved using +// / ::zerGetLastErrorDescription function. +// / +// / @returns +// / - handle of the default context +// / - nullptr +func ZerGetDefaultContext() (ZeContextHandle, error) { return zecall.Call[ZeContextHandle]("zerGetDefaultContext") } - diff --git a/sysm_Overclock.go b/sysm_Overclock.go index f579562..944ef06 100644 --- a/sysm_Overclock.go +++ b/sysm_Overclock.go @@ -21,697 +21,704 @@ import ( // ZesOverclockDomain (zes_overclock_domain_t) Overclock domains. type ZesOverclockDomain uintptr + const ( - ZES_OVERCLOCK_DOMAIN_CARD ZesOverclockDomain = 1 // ZES_OVERCLOCK_DOMAIN_CARD Overclocking card level properties such as temperature limits. - ZES_OVERCLOCK_DOMAIN_PACKAGE ZesOverclockDomain = 2 // ZES_OVERCLOCK_DOMAIN_PACKAGE Overclocking package level properties such as power limits. - ZES_OVERCLOCK_DOMAIN_GPU_ALL ZesOverclockDomain = 4 // ZES_OVERCLOCK_DOMAIN_GPU_ALL Overclocking a GPU that has all accelerator assets on the same PLL/VR. - ZES_OVERCLOCK_DOMAIN_GPU_RENDER_COMPUTE ZesOverclockDomain = 8 // ZES_OVERCLOCK_DOMAIN_GPU_RENDER_COMPUTE Overclocking a GPU with render and compute assets on the same PLL/VR. - ZES_OVERCLOCK_DOMAIN_GPU_RENDER ZesOverclockDomain = 16 // ZES_OVERCLOCK_DOMAIN_GPU_RENDER Overclocking a GPU with render assets on its own PLL/VR. - ZES_OVERCLOCK_DOMAIN_GPU_COMPUTE ZesOverclockDomain = 32 // ZES_OVERCLOCK_DOMAIN_GPU_COMPUTE Overclocking a GPU with compute assets on its own PLL/VR. - ZES_OVERCLOCK_DOMAIN_GPU_MEDIA ZesOverclockDomain = 64 // ZES_OVERCLOCK_DOMAIN_GPU_MEDIA Overclocking a GPU with media assets on its own PLL/VR. - ZES_OVERCLOCK_DOMAIN_VRAM ZesOverclockDomain = 128 // ZES_OVERCLOCK_DOMAIN_VRAM Overclocking device local memory. - ZES_OVERCLOCK_DOMAIN_ADM ZesOverclockDomain = 256 // ZES_OVERCLOCK_DOMAIN_ADM Overclocking LLC/L4 cache. - ZES_OVERCLOCK_DOMAIN_FORCE_UINT32 ZesOverclockDomain = 0x7fffffff // ZES_OVERCLOCK_DOMAIN_FORCE_UINT32 Value marking end of ZES_OVERCLOCK_DOMAIN_* ENUMs + ZES_OVERCLOCK_DOMAIN_CARD ZesOverclockDomain = 1 // ZES_OVERCLOCK_DOMAIN_CARD Overclocking card level properties such as temperature limits. + ZES_OVERCLOCK_DOMAIN_PACKAGE ZesOverclockDomain = 2 // ZES_OVERCLOCK_DOMAIN_PACKAGE Overclocking package level properties such as power limits. + ZES_OVERCLOCK_DOMAIN_GPU_ALL ZesOverclockDomain = 4 // ZES_OVERCLOCK_DOMAIN_GPU_ALL Overclocking a GPU that has all accelerator assets on the same PLL/VR. + ZES_OVERCLOCK_DOMAIN_GPU_RENDER_COMPUTE ZesOverclockDomain = 8 // ZES_OVERCLOCK_DOMAIN_GPU_RENDER_COMPUTE Overclocking a GPU with render and compute assets on the same PLL/VR. + ZES_OVERCLOCK_DOMAIN_GPU_RENDER ZesOverclockDomain = 16 // ZES_OVERCLOCK_DOMAIN_GPU_RENDER Overclocking a GPU with render assets on its own PLL/VR. + ZES_OVERCLOCK_DOMAIN_GPU_COMPUTE ZesOverclockDomain = 32 // ZES_OVERCLOCK_DOMAIN_GPU_COMPUTE Overclocking a GPU with compute assets on its own PLL/VR. + ZES_OVERCLOCK_DOMAIN_GPU_MEDIA ZesOverclockDomain = 64 // ZES_OVERCLOCK_DOMAIN_GPU_MEDIA Overclocking a GPU with media assets on its own PLL/VR. + ZES_OVERCLOCK_DOMAIN_VRAM ZesOverclockDomain = 128 // ZES_OVERCLOCK_DOMAIN_VRAM Overclocking device local memory. + ZES_OVERCLOCK_DOMAIN_ADM ZesOverclockDomain = 256 // ZES_OVERCLOCK_DOMAIN_ADM Overclocking LLC/L4 cache. + ZES_OVERCLOCK_DOMAIN_FORCE_UINT32 ZesOverclockDomain = 0x7fffffff // ZES_OVERCLOCK_DOMAIN_FORCE_UINT32 Value marking end of ZES_OVERCLOCK_DOMAIN_* ENUMs ) // ZesOverclockControl (zes_overclock_control_t) Overclock controls. type ZesOverclockControl uintptr + const ( - ZES_OVERCLOCK_CONTROL_VF ZesOverclockControl = 1 // ZES_OVERCLOCK_CONTROL_VF This control permits setting a custom V-F curve. - ZES_OVERCLOCK_CONTROL_FREQ_OFFSET ZesOverclockControl = 2 // ZES_OVERCLOCK_CONTROL_FREQ_OFFSET The V-F curve of the overclock domain can be shifted up or down using + ZES_OVERCLOCK_CONTROL_VF ZesOverclockControl = 1 // ZES_OVERCLOCK_CONTROL_VF This control permits setting a custom V-F curve. + ZES_OVERCLOCK_CONTROL_FREQ_OFFSET ZesOverclockControl = 2 // ZES_OVERCLOCK_CONTROL_FREQ_OFFSET The V-F curve of the overclock domain can be shifted up or down using ///< this control. - ZES_OVERCLOCK_CONTROL_VMAX_OFFSET ZesOverclockControl = 4 // ZES_OVERCLOCK_CONTROL_VMAX_OFFSET This control is used to increase the permitted voltage above the + ZES_OVERCLOCK_CONTROL_VMAX_OFFSET ZesOverclockControl = 4 // ZES_OVERCLOCK_CONTROL_VMAX_OFFSET This control is used to increase the permitted voltage above the ///< shipped voltage maximum. - ZES_OVERCLOCK_CONTROL_FREQ ZesOverclockControl = 8 // ZES_OVERCLOCK_CONTROL_FREQ This control permits direct changes to the operating frequency. - ZES_OVERCLOCK_CONTROL_VOLT_LIMIT ZesOverclockControl = 16 // ZES_OVERCLOCK_CONTROL_VOLT_LIMIT This control prevents frequencies that would push the voltage above + ZES_OVERCLOCK_CONTROL_FREQ ZesOverclockControl = 8 // ZES_OVERCLOCK_CONTROL_FREQ This control permits direct changes to the operating frequency. + ZES_OVERCLOCK_CONTROL_VOLT_LIMIT ZesOverclockControl = 16 // ZES_OVERCLOCK_CONTROL_VOLT_LIMIT This control prevents frequencies that would push the voltage above ///< this value, typically used by V-F scanners. - ZES_OVERCLOCK_CONTROL_POWER_SUSTAINED_LIMIT ZesOverclockControl = 32 // ZES_OVERCLOCK_CONTROL_POWER_SUSTAINED_LIMIT This control changes the sustained power limit (PL1). - ZES_OVERCLOCK_CONTROL_POWER_BURST_LIMIT ZesOverclockControl = 64 // ZES_OVERCLOCK_CONTROL_POWER_BURST_LIMIT This control changes the burst power limit (PL2). - ZES_OVERCLOCK_CONTROL_POWER_PEAK_LIMIT ZesOverclockControl = 128 // ZES_OVERCLOCK_CONTROL_POWER_PEAK_LIMIT his control changes the peak power limit (PL4). - ZES_OVERCLOCK_CONTROL_ICCMAX_LIMIT ZesOverclockControl = 256 // ZES_OVERCLOCK_CONTROL_ICCMAX_LIMIT This control changes the value of IccMax.. - ZES_OVERCLOCK_CONTROL_TEMP_LIMIT ZesOverclockControl = 512 // ZES_OVERCLOCK_CONTROL_TEMP_LIMIT This control changes the value of TjMax. - ZES_OVERCLOCK_CONTROL_ITD_DISABLE ZesOverclockControl = 1024 // ZES_OVERCLOCK_CONTROL_ITD_DISABLE This control permits disabling the adaptive voltage feature ITD - ZES_OVERCLOCK_CONTROL_ACM_DISABLE ZesOverclockControl = 2048 // ZES_OVERCLOCK_CONTROL_ACM_DISABLE This control permits disabling the adaptive voltage feature ACM. - ZES_OVERCLOCK_CONTROL_FORCE_UINT32 ZesOverclockControl = 0x7fffffff // ZES_OVERCLOCK_CONTROL_FORCE_UINT32 Value marking end of ZES_OVERCLOCK_CONTROL_* ENUMs + ZES_OVERCLOCK_CONTROL_POWER_SUSTAINED_LIMIT ZesOverclockControl = 32 // ZES_OVERCLOCK_CONTROL_POWER_SUSTAINED_LIMIT This control changes the sustained power limit (PL1). + ZES_OVERCLOCK_CONTROL_POWER_BURST_LIMIT ZesOverclockControl = 64 // ZES_OVERCLOCK_CONTROL_POWER_BURST_LIMIT This control changes the burst power limit (PL2). + ZES_OVERCLOCK_CONTROL_POWER_PEAK_LIMIT ZesOverclockControl = 128 // ZES_OVERCLOCK_CONTROL_POWER_PEAK_LIMIT his control changes the peak power limit (PL4). + ZES_OVERCLOCK_CONTROL_ICCMAX_LIMIT ZesOverclockControl = 256 // ZES_OVERCLOCK_CONTROL_ICCMAX_LIMIT This control changes the value of IccMax.. + ZES_OVERCLOCK_CONTROL_TEMP_LIMIT ZesOverclockControl = 512 // ZES_OVERCLOCK_CONTROL_TEMP_LIMIT This control changes the value of TjMax. + ZES_OVERCLOCK_CONTROL_ITD_DISABLE ZesOverclockControl = 1024 // ZES_OVERCLOCK_CONTROL_ITD_DISABLE This control permits disabling the adaptive voltage feature ITD + ZES_OVERCLOCK_CONTROL_ACM_DISABLE ZesOverclockControl = 2048 // ZES_OVERCLOCK_CONTROL_ACM_DISABLE This control permits disabling the adaptive voltage feature ACM. + ZES_OVERCLOCK_CONTROL_FORCE_UINT32 ZesOverclockControl = 0x7fffffff // ZES_OVERCLOCK_CONTROL_FORCE_UINT32 Value marking end of ZES_OVERCLOCK_CONTROL_* ENUMs ) // ZesOverclockMode (zes_overclock_mode_t) Overclock modes. type ZesOverclockMode uintptr + const ( - ZES_OVERCLOCK_MODE_MODE_OFF ZesOverclockMode = 0 // ZES_OVERCLOCK_MODE_MODE_OFF Overclock mode is off - ZES_OVERCLOCK_MODE_MODE_STOCK ZesOverclockMode = 2 // ZES_OVERCLOCK_MODE_MODE_STOCK Stock (manufacturing settings) are being used. - ZES_OVERCLOCK_MODE_MODE_ON ZesOverclockMode = 3 // ZES_OVERCLOCK_MODE_MODE_ON Overclock mode is on. - ZES_OVERCLOCK_MODE_MODE_UNAVAILABLE ZesOverclockMode = 4 // ZES_OVERCLOCK_MODE_MODE_UNAVAILABLE Overclocking is unavailable at this time since the system is running + ZES_OVERCLOCK_MODE_MODE_OFF ZesOverclockMode = 0 // ZES_OVERCLOCK_MODE_MODE_OFF Overclock mode is off + ZES_OVERCLOCK_MODE_MODE_STOCK ZesOverclockMode = 2 // ZES_OVERCLOCK_MODE_MODE_STOCK Stock (manufacturing settings) are being used. + ZES_OVERCLOCK_MODE_MODE_ON ZesOverclockMode = 3 // ZES_OVERCLOCK_MODE_MODE_ON Overclock mode is on. + ZES_OVERCLOCK_MODE_MODE_UNAVAILABLE ZesOverclockMode = 4 // ZES_OVERCLOCK_MODE_MODE_UNAVAILABLE Overclocking is unavailable at this time since the system is running ///< on battery. - ZES_OVERCLOCK_MODE_MODE_DISABLED ZesOverclockMode = 5 // ZES_OVERCLOCK_MODE_MODE_DISABLED Overclock mode is disabled. - ZES_OVERCLOCK_MODE_FORCE_UINT32 ZesOverclockMode = 0x7fffffff // ZES_OVERCLOCK_MODE_FORCE_UINT32 Value marking end of ZES_OVERCLOCK_MODE_* ENUMs + ZES_OVERCLOCK_MODE_MODE_DISABLED ZesOverclockMode = 5 // ZES_OVERCLOCK_MODE_MODE_DISABLED Overclock mode is disabled. + ZES_OVERCLOCK_MODE_FORCE_UINT32 ZesOverclockMode = 0x7fffffff // ZES_OVERCLOCK_MODE_FORCE_UINT32 Value marking end of ZES_OVERCLOCK_MODE_* ENUMs ) // ZesControlState (zes_control_state_t) Overclock control states. type ZesControlState uintptr + const ( - ZES_CONTROL_STATE_STATE_UNSET ZesControlState = 0 // ZES_CONTROL_STATE_STATE_UNSET No overclock control has not been changed by the driver since the last + ZES_CONTROL_STATE_STATE_UNSET ZesControlState = 0 // ZES_CONTROL_STATE_STATE_UNSET No overclock control has not been changed by the driver since the last ///< boot/reset. - ZES_CONTROL_STATE_STATE_ACTIVE ZesControlState = 2 // ZES_CONTROL_STATE_STATE_ACTIVE The overclock control has been set and it is active. - ZES_CONTROL_STATE_STATE_DISABLED ZesControlState = 3 // ZES_CONTROL_STATE_STATE_DISABLED The overclock control value has been disabled due to the current power + ZES_CONTROL_STATE_STATE_ACTIVE ZesControlState = 2 // ZES_CONTROL_STATE_STATE_ACTIVE The overclock control has been set and it is active. + ZES_CONTROL_STATE_STATE_DISABLED ZesControlState = 3 // ZES_CONTROL_STATE_STATE_DISABLED The overclock control value has been disabled due to the current power ///< configuration (typically when running on DC). - ZES_CONTROL_STATE_FORCE_UINT32 ZesControlState = 0x7fffffff // ZES_CONTROL_STATE_FORCE_UINT32 Value marking end of ZES_CONTROL_STATE_* ENUMs + ZES_CONTROL_STATE_FORCE_UINT32 ZesControlState = 0x7fffffff // ZES_CONTROL_STATE_FORCE_UINT32 Value marking end of ZES_CONTROL_STATE_* ENUMs ) // ZesPendingAction (zes_pending_action_t) Overclock pending actions. type ZesPendingAction uintptr + const ( - ZES_PENDING_ACTION_PENDING_NONE ZesPendingAction = 0 // ZES_PENDING_ACTION_PENDING_NONE There no pending actions. . - ZES_PENDING_ACTION_PENDING_IMMINENT ZesPendingAction = 1 // ZES_PENDING_ACTION_PENDING_IMMINENT The requested change is in progress and should complete soon. - ZES_PENDING_ACTION_PENDING_COLD_RESET ZesPendingAction = 2 // ZES_PENDING_ACTION_PENDING_COLD_RESET The requested change requires a device cold reset (hotplug, system + ZES_PENDING_ACTION_PENDING_NONE ZesPendingAction = 0 // ZES_PENDING_ACTION_PENDING_NONE There no pending actions. . + ZES_PENDING_ACTION_PENDING_IMMINENT ZesPendingAction = 1 // ZES_PENDING_ACTION_PENDING_IMMINENT The requested change is in progress and should complete soon. + ZES_PENDING_ACTION_PENDING_COLD_RESET ZesPendingAction = 2 // ZES_PENDING_ACTION_PENDING_COLD_RESET The requested change requires a device cold reset (hotplug, system ///< boot). - ZES_PENDING_ACTION_PENDING_WARM_RESET ZesPendingAction = 3 // ZES_PENDING_ACTION_PENDING_WARM_RESET The requested change requires a device warm reset (PCIe FLR). - ZES_PENDING_ACTION_FORCE_UINT32 ZesPendingAction = 0x7fffffff // ZES_PENDING_ACTION_FORCE_UINT32 Value marking end of ZES_PENDING_ACTION_* ENUMs + ZES_PENDING_ACTION_PENDING_WARM_RESET ZesPendingAction = 3 // ZES_PENDING_ACTION_PENDING_WARM_RESET The requested change requires a device warm reset (PCIe FLR). + ZES_PENDING_ACTION_FORCE_UINT32 ZesPendingAction = 0x7fffffff // ZES_PENDING_ACTION_FORCE_UINT32 Value marking end of ZES_PENDING_ACTION_* ENUMs ) // ZesVfProgramType (zes_vf_program_type_t) Overclock V-F curve programing. type ZesVfProgramType uintptr + const ( - ZES_VF_PROGRAM_TYPE_VF_ARBITRARY ZesVfProgramType = 0 // ZES_VF_PROGRAM_TYPE_VF_ARBITRARY Can program an arbitrary number of V-F points up to the maximum number + ZES_VF_PROGRAM_TYPE_VF_ARBITRARY ZesVfProgramType = 0 // ZES_VF_PROGRAM_TYPE_VF_ARBITRARY Can program an arbitrary number of V-F points up to the maximum number ///< and each point can have arbitrary voltage and frequency values within ///< the min/max/step limits - ZES_VF_PROGRAM_TYPE_VF_FREQ_FIXED ZesVfProgramType = 1 // ZES_VF_PROGRAM_TYPE_VF_FREQ_FIXED Can only program the voltage for the V-F points that it reads back - + ZES_VF_PROGRAM_TYPE_VF_FREQ_FIXED ZesVfProgramType = 1 // ZES_VF_PROGRAM_TYPE_VF_FREQ_FIXED Can only program the voltage for the V-F points that it reads back - ///< the frequency of those points cannot be changed - ZES_VF_PROGRAM_TYPE_VF_VOLT_FIXED ZesVfProgramType = 2 // ZES_VF_PROGRAM_TYPE_VF_VOLT_FIXED Can only program the frequency for the V-F points that is reads back - + ZES_VF_PROGRAM_TYPE_VF_VOLT_FIXED ZesVfProgramType = 2 // ZES_VF_PROGRAM_TYPE_VF_VOLT_FIXED Can only program the frequency for the V-F points that is reads back - ///< the voltage of each point cannot be changed. - ZES_VF_PROGRAM_TYPE_FORCE_UINT32 ZesVfProgramType = 0x7fffffff // ZES_VF_PROGRAM_TYPE_FORCE_UINT32 Value marking end of ZES_VF_PROGRAM_TYPE_* ENUMs + ZES_VF_PROGRAM_TYPE_FORCE_UINT32 ZesVfProgramType = 0x7fffffff // ZES_VF_PROGRAM_TYPE_FORCE_UINT32 Value marking end of ZES_VF_PROGRAM_TYPE_* ENUMs ) // ZesVfType (zes_vf_type_t) VF type type ZesVfType uintptr + const ( - ZES_VF_TYPE_VOLT ZesVfType = 0 // ZES_VF_TYPE_VOLT VF Voltage point - ZES_VF_TYPE_FREQ ZesVfType = 1 // ZES_VF_TYPE_FREQ VF Frequency point - ZES_VF_TYPE_FORCE_UINT32 ZesVfType = 0x7fffffff // ZES_VF_TYPE_FORCE_UINT32 Value marking end of ZES_VF_TYPE_* ENUMs + ZES_VF_TYPE_VOLT ZesVfType = 0 // ZES_VF_TYPE_VOLT VF Voltage point + ZES_VF_TYPE_FREQ ZesVfType = 1 // ZES_VF_TYPE_FREQ VF Frequency point + ZES_VF_TYPE_FORCE_UINT32 ZesVfType = 0x7fffffff // ZES_VF_TYPE_FORCE_UINT32 Value marking end of ZES_VF_TYPE_* ENUMs ) // ZesVfArrayType (zes_vf_array_type_t) VF type type ZesVfArrayType uintptr + const ( - ZES_VF_ARRAY_TYPE_USER_VF_ARRAY ZesVfArrayType = 0 // ZES_VF_ARRAY_TYPE_USER_VF_ARRAY User V-F array - ZES_VF_ARRAY_TYPE_DEFAULT_VF_ARRAY ZesVfArrayType = 1 // ZES_VF_ARRAY_TYPE_DEFAULT_VF_ARRAY Default V-F array - ZES_VF_ARRAY_TYPE_LIVE_VF_ARRAY ZesVfArrayType = 2 // ZES_VF_ARRAY_TYPE_LIVE_VF_ARRAY Live V-F array - ZES_VF_ARRAY_TYPE_FORCE_UINT32 ZesVfArrayType = 0x7fffffff // ZES_VF_ARRAY_TYPE_FORCE_UINT32 Value marking end of ZES_VF_ARRAY_TYPE_* ENUMs + ZES_VF_ARRAY_TYPE_USER_VF_ARRAY ZesVfArrayType = 0 // ZES_VF_ARRAY_TYPE_USER_VF_ARRAY User V-F array + ZES_VF_ARRAY_TYPE_DEFAULT_VF_ARRAY ZesVfArrayType = 1 // ZES_VF_ARRAY_TYPE_DEFAULT_VF_ARRAY Default V-F array + ZES_VF_ARRAY_TYPE_LIVE_VF_ARRAY ZesVfArrayType = 2 // ZES_VF_ARRAY_TYPE_LIVE_VF_ARRAY Live V-F array + ZES_VF_ARRAY_TYPE_FORCE_UINT32 ZesVfArrayType = 0x7fffffff // ZES_VF_ARRAY_TYPE_FORCE_UINT32 Value marking end of ZES_VF_ARRAY_TYPE_* ENUMs ) // ZesOverclockProperties (zes_overclock_properties_t) Overclock properties -/// -/// @details -/// - Information on the overclock domain type and all the contols that are -/// part of the domain. +// / +// / @details +// / - Information on the overclock domain type and all the contols that are +// / part of the domain. type ZesOverclockProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Domaintype ZesOverclockDomain // Domaintype [out] The hardware block that this overclock domain controls (GPU, VRAM, ...) - Availablecontrols uint32 // Availablecontrols [out] Returns the overclock controls that are supported (a bit for each of enum ::zes_overclock_control_t). If no bits are set, the domain doesn't support overclocking. - Vfprogramtype ZesVfProgramType // Vfprogramtype [out] Type of V-F curve programming that is permitted:. - Numberofvfpoints uint32 // Numberofvfpoints [out] Number of VF points that can be programmed - max_num_points + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Domaintype ZesOverclockDomain // Domaintype [out] The hardware block that this overclock domain controls (GPU, VRAM, ...) + Availablecontrols uint32 // Availablecontrols [out] Returns the overclock controls that are supported (a bit for each of enum ::zes_overclock_control_t). If no bits are set, the domain doesn't support overclocking. + Vfprogramtype ZesVfProgramType // Vfprogramtype [out] Type of V-F curve programming that is permitted:. + Numberofvfpoints uint32 // Numberofvfpoints [out] Number of VF points that can be programmed - max_num_points } // ZesControlProperty (zes_control_property_t) Overclock Control properties -/// -/// @details -/// - Provides all the control capabilities supported by the device for the -/// overclock domain. +// / +// / @details +// / - Provides all the control capabilities supported by the device for the +// / overclock domain. type ZesControlProperty struct { - Minvalue float64 // Minvalue [out] This provides information about the limits of the control value so that the driver can calculate the set of valid values. - Maxvalue float64 // Maxvalue [out] This provides information about the limits of the control value so that the driver can calculate the set of valid values. - Stepvalue float64 // Stepvalue [out] This provides information about the limits of the control value so that the driver can calculate the set of valid values. - Refvalue float64 // Refvalue [out] The reference value provides the anchor point, UIs can combine this with the user offset request to show the anticipated improvement. - Defaultvalue float64 // Defaultvalue [out] The shipped out-of-box position of this control. Driver can request this value at any time to return to the out-of-box behavior. + Minvalue float64 // Minvalue [out] This provides information about the limits of the control value so that the driver can calculate the set of valid values. + Maxvalue float64 // Maxvalue [out] This provides information about the limits of the control value so that the driver can calculate the set of valid values. + Stepvalue float64 // Stepvalue [out] This provides information about the limits of the control value so that the driver can calculate the set of valid values. + Refvalue float64 // Refvalue [out] The reference value provides the anchor point, UIs can combine this with the user offset request to show the anticipated improvement. + Defaultvalue float64 // Defaultvalue [out] The shipped out-of-box position of this control. Driver can request this value at any time to return to the out-of-box behavior. } // ZesVfProperty (zes_vf_property_t) Overclock VF properties -/// -/// @details -/// - Provides all the VF capabilities supported by the device for the -/// overclock domain. +// / +// / @details +// / - Provides all the VF capabilities supported by the device for the +// / overclock domain. type ZesVfProperty struct { - Minfreq float64 // Minfreq [out] Read the minimum frequency that can be be programmed in the custom V-F point.. - Maxfreq float64 // Maxfreq [out] Read the maximum frequency that can be be programmed in the custom V-F point.. - Stepfreq float64 // Stepfreq [out] Read the frequency step that can be be programmed in the custom V-F point.. - Minvolt float64 // Minvolt [out] Read the minimum voltage that can be be programmed in the custom V-F point.. - Maxvolt float64 // Maxvolt [out] Read the maximum voltage that can be be programmed in the custom V-F point.. - Stepvolt float64 // Stepvolt [out] Read the voltage step that can be be programmed in the custom V-F point. + Minfreq float64 // Minfreq [out] Read the minimum frequency that can be be programmed in the custom V-F point.. + Maxfreq float64 // Maxfreq [out] Read the maximum frequency that can be be programmed in the custom V-F point.. + Stepfreq float64 // Stepfreq [out] Read the frequency step that can be be programmed in the custom V-F point.. + Minvolt float64 // Minvolt [out] Read the minimum voltage that can be be programmed in the custom V-F point.. + Maxvolt float64 // Maxvolt [out] Read the maximum voltage that can be be programmed in the custom V-F point.. + Stepvolt float64 // Stepvolt [out] Read the voltage step that can be be programmed in the custom V-F point. } // ZesDeviceSetOverclockWaiver Set the overclock waiver.The overclock waiver setting is persistent -/// until the next pcode boot -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + This product does not support overclocking +// / until the next pcode boot +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + This product does not support overclocking func ZesDeviceSetOverclockWaiver( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceSetOverclockWaiver", uintptr(hDevice)) } // ZesDeviceGetOverclockDomains Get the list of supported overclock domains for this device -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pOverclockDomains` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this control domain +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pOverclockDomains` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this control domain func ZesDeviceGetOverclockDomains( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pOverclockDomains *uint32, // pOverclockDomains [in,out] Returns the overclock domains that are supported (a bit for each of enum ::zes_overclock_domain_t). If no bits are set, the device doesn't support overclocking. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pOverclockDomains *uint32, // pOverclockDomains [in,out] Returns the overclock domains that are supported (a bit for each of enum ::zes_overclock_domain_t). If no bits are set, the device doesn't support overclocking. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceGetOverclockDomains", uintptr(hDevice), uintptr(unsafe.Pointer(pOverclockDomains))) } // ZesDeviceGetOverclockControls Get the list of supported overclock controls available for one of the -/// supported overclock domains on the device -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZES_OVERCLOCK_DOMAIN_ADM < domainType` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pAvailableControls` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this control domain +// / supported overclock domains on the device +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZES_OVERCLOCK_DOMAIN_ADM < domainType` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pAvailableControls` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this control domain func ZesDeviceGetOverclockControls( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - domainType ZesOverclockDomain, // domainType [in] Domain type. - pAvailableControls *uint32, // pAvailableControls [in,out] Returns the overclock controls that are supported for the specified overclock domain (a bit for each of enum ::zes_overclock_control_t). + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + domainType ZesOverclockDomain, // domainType [in] Domain type. + pAvailableControls *uint32, // pAvailableControls [in,out] Returns the overclock controls that are supported for the specified overclock domain (a bit for each of enum ::zes_overclock_control_t). ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceGetOverclockControls", uintptr(hDevice), uintptr(domainType), uintptr(unsafe.Pointer(pAvailableControls))) } // ZesDeviceResetOverclockSettings Reset all overclock settings to default values (shipped = 1 or -/// manufacturing =0) -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this control domain +// / manufacturing =0) +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this control domain func ZesDeviceResetOverclockSettings( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - onShippedState ZeBool, // onShippedState [in] True will reset to shipped state; false will reset to manufacturing state + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + onShippedState ZeBool, // onShippedState [in] True will reset to shipped state; false will reset to manufacturing state ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceResetOverclockSettings", uintptr(hDevice), uintptr(onShippedState)) } // ZesDeviceReadOverclockState Determine the state of overclocking -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pOverclockMode` -/// + `nullptr == pWaiverSetting` -/// + `nullptr == pOverclockState` -/// + `nullptr == pPendingAction` -/// + `nullptr == pPendingReset` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this control domain +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pOverclockMode` +// / + `nullptr == pWaiverSetting` +// / + `nullptr == pOverclockState` +// / + `nullptr == pPendingAction` +// / + `nullptr == pPendingReset` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this control domain func ZesDeviceReadOverclockState( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pOverclockMode *ZesOverclockMode, // pOverclockMode [out] One of overclock mode. - pWaiverSetting *ZeBool, // pWaiverSetting [out] Waiver setting: 0 = Waiver not set, 1 = waiver has been set. - pOverclockState *ZeBool, // pOverclockState [out] Current settings 0 =manufacturing state, 1= shipped state).. - pPendingAction *ZesPendingAction, // pPendingAction [out] This enum is returned when the driver attempts to set an overclock control or reset overclock settings. - pPendingReset *ZeBool, // pPendingReset [out] Pending reset 0 =manufacturing state, 1= shipped state).. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pOverclockMode *ZesOverclockMode, // pOverclockMode [out] One of overclock mode. + pWaiverSetting *ZeBool, // pWaiverSetting [out] Waiver setting: 0 = Waiver not set, 1 = waiver has been set. + pOverclockState *ZeBool, // pOverclockState [out] Current settings 0 =manufacturing state, 1= shipped state).. + pPendingAction *ZesPendingAction, // pPendingAction [out] This enum is returned when the driver attempts to set an overclock control or reset overclock settings. + pPendingReset *ZeBool, // pPendingReset [out] Pending reset 0 =manufacturing state, 1= shipped state).. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceReadOverclockState", uintptr(hDevice), uintptr(unsafe.Pointer(pOverclockMode)), uintptr(unsafe.Pointer(pWaiverSetting)), uintptr(unsafe.Pointer(pOverclockState)), uintptr(unsafe.Pointer(pPendingAction)), uintptr(unsafe.Pointer(pPendingReset))) } // ZesDeviceEnumOverclockDomains Get handle of overclock domains -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumOverclockDomains( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phDomainHandle *ZesOverclockHandle, // phDomainHandle [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phDomainHandle *ZesOverclockHandle, // phDomainHandle [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumOverclockDomains", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phDomainHandle))) } // ZesOverclockGetDomainProperties Get overclock domain control properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDomainHandle` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pDomainProperties` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this control domain +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDomainHandle` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pDomainProperties` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this control domain func ZesOverclockGetDomainProperties( - hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. - pDomainProperties *ZesOverclockProperties, // pDomainProperties [in,out] The overclock properties for the specified domain. + hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. + pDomainProperties *ZesOverclockProperties, // pDomainProperties [in,out] The overclock properties for the specified domain. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesOverclockGetDomainProperties", uintptr(hDomainHandle), uintptr(unsafe.Pointer(pDomainProperties))) } // ZesOverclockGetDomainVFProperties Read overclock VF min,max and step values -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDomainHandle` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pVFProperties` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this control domain +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDomainHandle` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pVFProperties` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this control domain func ZesOverclockGetDomainVFProperties( - hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. - pVFProperties *ZesVfProperty, // pVFProperties [in,out] The VF min,max,step for a specified domain. + hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. + pVFProperties *ZesVfProperty, // pVFProperties [in,out] The VF min,max,step for a specified domain. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesOverclockGetDomainVFProperties", uintptr(hDomainHandle), uintptr(unsafe.Pointer(pVFProperties))) } // ZesOverclockGetDomainControlProperties Read overclock control values - min/max/step/default/ref -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDomainHandle` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pControlProperties` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this control domain +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDomainHandle` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pControlProperties` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this control domain func ZesOverclockGetDomainControlProperties( - hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. - DomainControl ZesOverclockControl, // DomainControl [in] Handle for the component. - pControlProperties *ZesControlProperty, // pControlProperties [in,out] overclock control values. + hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. + DomainControl ZesOverclockControl, // DomainControl [in] Handle for the component. + pControlProperties *ZesControlProperty, // pControlProperties [in,out] overclock control values. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesOverclockGetDomainControlProperties", uintptr(hDomainHandle), uintptr(DomainControl), uintptr(unsafe.Pointer(pControlProperties))) } // ZesOverclockGetControlCurrentValue Read the current value for a given overclock control -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDomainHandle` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pValue` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this control domain +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDomainHandle` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pValue` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this control domain func ZesOverclockGetControlCurrentValue( - hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component. - DomainControl ZesOverclockControl, // DomainControl [in] Overclock Control. - pValue *float64, // pValue [in,out] Getting overclock control value for the specified control. + hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component. + DomainControl ZesOverclockControl, // DomainControl [in] Overclock Control. + pValue *float64, // pValue [in,out] Getting overclock control value for the specified control. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesOverclockGetControlCurrentValue", uintptr(hDomainHandle), uintptr(DomainControl), uintptr(unsafe.Pointer(pValue))) } // ZesOverclockGetControlPendingValue Read the the reset pending value for a given overclock control -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDomainHandle` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pValue` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this control domain +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDomainHandle` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pValue` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this control domain func ZesOverclockGetControlPendingValue( - hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. - DomainControl ZesOverclockControl, // DomainControl [in] Overclock Control. - pValue *float64, // pValue [out] Returns the pending value for a given control. The units and format of the value depend on the control type. + hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. + DomainControl ZesOverclockControl, // DomainControl [in] Overclock Control. + pValue *float64, // pValue [out] Returns the pending value for a given control. The units and format of the value depend on the control type. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesOverclockGetControlPendingValue", uintptr(hDomainHandle), uintptr(DomainControl), uintptr(unsafe.Pointer(pValue))) } // ZesOverclockSetControlUserValue Set the value for a given overclock control -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDomainHandle` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pPendingAction` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this control domain +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDomainHandle` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pPendingAction` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this control domain func ZesOverclockSetControlUserValue( - hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. - DomainControl ZesOverclockControl, // DomainControl [in] Domain Control. - pValue float64, // pValue [in] The new value of the control. The units and format of the value depend on the control type. - pPendingAction *ZesPendingAction, // pPendingAction [out] Pending overclock setting. + hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. + DomainControl ZesOverclockControl, // DomainControl [in] Domain Control. + pValue float64, // pValue [in] The new value of the control. The units and format of the value depend on the control type. + pPendingAction *ZesPendingAction, // pPendingAction [out] Pending overclock setting. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesOverclockSetControlUserValue", uintptr(hDomainHandle), uintptr(DomainControl), uintptr(pValue), uintptr(unsafe.Pointer(pPendingAction))) } // ZesOverclockGetControlState Determine the state of an overclock control -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDomainHandle` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pControlState` -/// + `nullptr == pPendingAction` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this control domain +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDomainHandle` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pControlState` +// / + `nullptr == pPendingAction` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this control domain func ZesOverclockGetControlState( - hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. - DomainControl ZesOverclockControl, // DomainControl [in] Domain Control. - pControlState *ZesControlState, // pControlState [out] Current overclock control state. - pPendingAction *ZesPendingAction, // pPendingAction [out] Pending overclock setting. + hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. + DomainControl ZesOverclockControl, // DomainControl [in] Domain Control. + pControlState *ZesControlState, // pControlState [out] Current overclock control state. + pPendingAction *ZesPendingAction, // pPendingAction [out] Pending overclock setting. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesOverclockGetControlState", uintptr(hDomainHandle), uintptr(DomainControl), uintptr(unsafe.Pointer(pControlState)), uintptr(unsafe.Pointer(pPendingAction))) } // ZesOverclockGetVFPointValues Read the frequency or voltage of a V-F point from the default or -/// custom V-F curve. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDomainHandle` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZES_VF_TYPE_FREQ < VFType` -/// + `::ZES_VF_ARRAY_TYPE_LIVE_VF_ARRAY < VFArrayType` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == PointValue` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this control domain +// / custom V-F curve. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDomainHandle` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZES_VF_TYPE_FREQ < VFType` +// / + `::ZES_VF_ARRAY_TYPE_LIVE_VF_ARRAY < VFArrayType` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == PointValue` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this control domain func ZesOverclockGetVFPointValues( - hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. - VFType ZesVfType, // VFType [in] Voltage or Freqency point to read. - VFArrayType ZesVfArrayType, // VFArrayType [in] User,Default or Live VF array to read from - PointIndex uint32, // PointIndex [in] Point index - number between (0, max_num_points - 1). - PointValue *uint32, // PointValue [out] Returns the frequency in 1kHz units or voltage in millivolt units from the custom V-F curve at the specified zero-based index + hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. + VFType ZesVfType, // VFType [in] Voltage or Freqency point to read. + VFArrayType ZesVfArrayType, // VFArrayType [in] User,Default or Live VF array to read from + PointIndex uint32, // PointIndex [in] Point index - number between (0, max_num_points - 1). + PointValue *uint32, // PointValue [out] Returns the frequency in 1kHz units or voltage in millivolt units from the custom V-F curve at the specified zero-based index ) (ZeResult, error) { return zecall.Call[ZeResult]("zesOverclockGetVFPointValues", uintptr(hDomainHandle), uintptr(VFType), uintptr(VFArrayType), uintptr(PointIndex), uintptr(unsafe.Pointer(PointValue))) } // ZesOverclockSetVFPointValues Write the frequency or voltage of a V-F point to custom V-F curve. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDomainHandle` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZES_VF_TYPE_FREQ < VFType` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this control domain +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDomainHandle` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZES_VF_TYPE_FREQ < VFType` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this control domain func ZesOverclockSetVFPointValues( - hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. - VFType ZesVfType, // VFType [in] Voltage or Freqency point to read. - PointIndex uint32, // PointIndex [in] Point index - number between (0, max_num_points - 1). - PointValue uint32, // PointValue [in] Writes frequency in 1kHz units or voltage in millivolt units to custom V-F curve at the specified zero-based index + hDomainHandle ZesOverclockHandle, // hDomainHandle [in] Handle for the component domain. + VFType ZesVfType, // VFType [in] Voltage or Freqency point to read. + PointIndex uint32, // PointIndex [in] Point index - number between (0, max_num_points - 1). + PointValue uint32, // PointValue [in] Writes frequency in 1kHz units or voltage in millivolt units to custom V-F curve at the specified zero-based index ) (ZeResult, error) { return zecall.Call[ZeResult]("zesOverclockSetVFPointValues", uintptr(hDomainHandle), uintptr(VFType), uintptr(PointIndex), uintptr(PointValue)) } - diff --git a/sysm_common.go b/sysm_common.go index 920756b..fc36471 100644 --- a/sysm_common.go +++ b/sysm_common.go @@ -76,103 +76,103 @@ type ZesVfHandle uintptr // ZesStructureType (zes_structure_type_t) Defines structure types type ZesStructureType uintptr + const ( - ZES_STRUCTURE_TYPE_DEVICE_PROPERTIES ZesStructureType = 0x1 // ZES_STRUCTURE_TYPE_DEVICE_PROPERTIES ::zes_device_properties_t - ZES_STRUCTURE_TYPE_PCI_PROPERTIES ZesStructureType = 0x2 // ZES_STRUCTURE_TYPE_PCI_PROPERTIES ::zes_pci_properties_t - ZES_STRUCTURE_TYPE_PCI_BAR_PROPERTIES ZesStructureType = 0x3 // ZES_STRUCTURE_TYPE_PCI_BAR_PROPERTIES ::zes_pci_bar_properties_t - ZES_STRUCTURE_TYPE_DIAG_PROPERTIES ZesStructureType = 0x4 // ZES_STRUCTURE_TYPE_DIAG_PROPERTIES ::zes_diag_properties_t - ZES_STRUCTURE_TYPE_ENGINE_PROPERTIES ZesStructureType = 0x5 // ZES_STRUCTURE_TYPE_ENGINE_PROPERTIES ::zes_engine_properties_t - ZES_STRUCTURE_TYPE_FABRIC_PORT_PROPERTIES ZesStructureType = 0x6 // ZES_STRUCTURE_TYPE_FABRIC_PORT_PROPERTIES ::zes_fabric_port_properties_t - ZES_STRUCTURE_TYPE_FAN_PROPERTIES ZesStructureType = 0x7 // ZES_STRUCTURE_TYPE_FAN_PROPERTIES ::zes_fan_properties_t - ZES_STRUCTURE_TYPE_FIRMWARE_PROPERTIES ZesStructureType = 0x8 // ZES_STRUCTURE_TYPE_FIRMWARE_PROPERTIES ::zes_firmware_properties_t - ZES_STRUCTURE_TYPE_FREQ_PROPERTIES ZesStructureType = 0x9 // ZES_STRUCTURE_TYPE_FREQ_PROPERTIES ::zes_freq_properties_t - ZES_STRUCTURE_TYPE_LED_PROPERTIES ZesStructureType = 0xa // ZES_STRUCTURE_TYPE_LED_PROPERTIES ::zes_led_properties_t - ZES_STRUCTURE_TYPE_MEM_PROPERTIES ZesStructureType = 0xb // ZES_STRUCTURE_TYPE_MEM_PROPERTIES ::zes_mem_properties_t - ZES_STRUCTURE_TYPE_PERF_PROPERTIES ZesStructureType = 0xc // ZES_STRUCTURE_TYPE_PERF_PROPERTIES ::zes_perf_properties_t - ZES_STRUCTURE_TYPE_POWER_PROPERTIES ZesStructureType = 0xd // ZES_STRUCTURE_TYPE_POWER_PROPERTIES ::zes_power_properties_t - ZES_STRUCTURE_TYPE_PSU_PROPERTIES ZesStructureType = 0xe // ZES_STRUCTURE_TYPE_PSU_PROPERTIES ::zes_psu_properties_t - ZES_STRUCTURE_TYPE_RAS_PROPERTIES ZesStructureType = 0xf // ZES_STRUCTURE_TYPE_RAS_PROPERTIES ::zes_ras_properties_t - ZES_STRUCTURE_TYPE_SCHED_PROPERTIES ZesStructureType = 0x10 // ZES_STRUCTURE_TYPE_SCHED_PROPERTIES ::zes_sched_properties_t - ZES_STRUCTURE_TYPE_SCHED_TIMEOUT_PROPERTIES ZesStructureType = 0x11 // ZES_STRUCTURE_TYPE_SCHED_TIMEOUT_PROPERTIES ::zes_sched_timeout_properties_t - ZES_STRUCTURE_TYPE_SCHED_TIMESLICE_PROPERTIES ZesStructureType = 0x12 // ZES_STRUCTURE_TYPE_SCHED_TIMESLICE_PROPERTIES ::zes_sched_timeslice_properties_t - ZES_STRUCTURE_TYPE_STANDBY_PROPERTIES ZesStructureType = 0x13 // ZES_STRUCTURE_TYPE_STANDBY_PROPERTIES ::zes_standby_properties_t - ZES_STRUCTURE_TYPE_TEMP_PROPERTIES ZesStructureType = 0x14 // ZES_STRUCTURE_TYPE_TEMP_PROPERTIES ::zes_temp_properties_t - ZES_STRUCTURE_TYPE_DEVICE_STATE ZesStructureType = 0x15 // ZES_STRUCTURE_TYPE_DEVICE_STATE ::zes_device_state_t - ZES_STRUCTURE_TYPE_PROCESS_STATE ZesStructureType = 0x16 // ZES_STRUCTURE_TYPE_PROCESS_STATE ::zes_process_state_t - ZES_STRUCTURE_TYPE_PCI_STATE ZesStructureType = 0x17 // ZES_STRUCTURE_TYPE_PCI_STATE ::zes_pci_state_t - ZES_STRUCTURE_TYPE_FABRIC_PORT_CONFIG ZesStructureType = 0x18 // ZES_STRUCTURE_TYPE_FABRIC_PORT_CONFIG ::zes_fabric_port_config_t - ZES_STRUCTURE_TYPE_FABRIC_PORT_STATE ZesStructureType = 0x19 // ZES_STRUCTURE_TYPE_FABRIC_PORT_STATE ::zes_fabric_port_state_t - ZES_STRUCTURE_TYPE_FAN_CONFIG ZesStructureType = 0x1a // ZES_STRUCTURE_TYPE_FAN_CONFIG ::zes_fan_config_t - ZES_STRUCTURE_TYPE_FREQ_STATE ZesStructureType = 0x1b // ZES_STRUCTURE_TYPE_FREQ_STATE ::zes_freq_state_t - ZES_STRUCTURE_TYPE_OC_CAPABILITIES ZesStructureType = 0x1c // ZES_STRUCTURE_TYPE_OC_CAPABILITIES ::zes_oc_capabilities_t - ZES_STRUCTURE_TYPE_LED_STATE ZesStructureType = 0x1d // ZES_STRUCTURE_TYPE_LED_STATE ::zes_led_state_t - ZES_STRUCTURE_TYPE_MEM_STATE ZesStructureType = 0x1e // ZES_STRUCTURE_TYPE_MEM_STATE ::zes_mem_state_t - ZES_STRUCTURE_TYPE_PSU_STATE ZesStructureType = 0x1f // ZES_STRUCTURE_TYPE_PSU_STATE ::zes_psu_state_t - ZES_STRUCTURE_TYPE_BASE_STATE ZesStructureType = 0x20 // ZES_STRUCTURE_TYPE_BASE_STATE ::zes_base_state_t - ZES_STRUCTURE_TYPE_RAS_CONFIG ZesStructureType = 0x21 // ZES_STRUCTURE_TYPE_RAS_CONFIG ::zes_ras_config_t - ZES_STRUCTURE_TYPE_RAS_STATE ZesStructureType = 0x22 // ZES_STRUCTURE_TYPE_RAS_STATE ::zes_ras_state_t - ZES_STRUCTURE_TYPE_TEMP_CONFIG ZesStructureType = 0x23 // ZES_STRUCTURE_TYPE_TEMP_CONFIG ::zes_temp_config_t - ZES_STRUCTURE_TYPE_PCI_BAR_PROPERTIES_1_2 ZesStructureType = 0x24 // ZES_STRUCTURE_TYPE_PCI_BAR_PROPERTIES_1_2 ::zes_pci_bar_properties_1_2_t - ZES_STRUCTURE_TYPE_DEVICE_ECC_DESC ZesStructureType = 0x25 // ZES_STRUCTURE_TYPE_DEVICE_ECC_DESC ::zes_device_ecc_desc_t - ZES_STRUCTURE_TYPE_DEVICE_ECC_PROPERTIES ZesStructureType = 0x26 // ZES_STRUCTURE_TYPE_DEVICE_ECC_PROPERTIES ::zes_device_ecc_properties_t - ZES_STRUCTURE_TYPE_POWER_LIMIT_EXT_DESC ZesStructureType = 0x27 // ZES_STRUCTURE_TYPE_POWER_LIMIT_EXT_DESC ::zes_power_limit_ext_desc_t - ZES_STRUCTURE_TYPE_POWER_EXT_PROPERTIES ZesStructureType = 0x28 // ZES_STRUCTURE_TYPE_POWER_EXT_PROPERTIES ::zes_power_ext_properties_t - ZES_STRUCTURE_TYPE_OVERCLOCK_PROPERTIES ZesStructureType = 0x29 // ZES_STRUCTURE_TYPE_OVERCLOCK_PROPERTIES ::zes_overclock_properties_t - ZES_STRUCTURE_TYPE_FABRIC_PORT_ERROR_COUNTERS ZesStructureType = 0x2a // ZES_STRUCTURE_TYPE_FABRIC_PORT_ERROR_COUNTERS ::zes_fabric_port_error_counters_t - ZES_STRUCTURE_TYPE_ENGINE_EXT_PROPERTIES ZesStructureType = 0x2b // ZES_STRUCTURE_TYPE_ENGINE_EXT_PROPERTIES ::zes_engine_ext_properties_t - ZES_STRUCTURE_TYPE_RESET_PROPERTIES ZesStructureType = 0x2c // ZES_STRUCTURE_TYPE_RESET_PROPERTIES ::zes_reset_properties_t - ZES_STRUCTURE_TYPE_DEVICE_EXT_PROPERTIES ZesStructureType = 0x2d // ZES_STRUCTURE_TYPE_DEVICE_EXT_PROPERTIES ::zes_device_ext_properties_t - ZES_STRUCTURE_TYPE_DEVICE_UUID ZesStructureType = 0x2e // ZES_STRUCTURE_TYPE_DEVICE_UUID ::zes_uuid_t - ZES_STRUCTURE_TYPE_POWER_DOMAIN_EXP_PROPERTIES ZesStructureType = 0x00020001 // ZES_STRUCTURE_TYPE_POWER_DOMAIN_EXP_PROPERTIES ::zes_power_domain_exp_properties_t - ZES_STRUCTURE_TYPE_MEM_BANDWIDTH_COUNTER_BITS_EXP_PROPERTIES ZesStructureType = 0x00020002 // ZES_STRUCTURE_TYPE_MEM_BANDWIDTH_COUNTER_BITS_EXP_PROPERTIES ::zes_mem_bandwidth_counter_bits_exp_properties_t - ZES_STRUCTURE_TYPE_MEMORY_PAGE_OFFLINE_STATE_EXP ZesStructureType = 0x00020003 // ZES_STRUCTURE_TYPE_MEMORY_PAGE_OFFLINE_STATE_EXP ::zes_mem_page_offline_state_exp_t - ZES_STRUCTURE_TYPE_SUBDEVICE_EXP_PROPERTIES ZesStructureType = 0x00020004 // ZES_STRUCTURE_TYPE_SUBDEVICE_EXP_PROPERTIES ::zes_subdevice_exp_properties_t - ZES_STRUCTURE_TYPE_VF_EXP_PROPERTIES ZesStructureType = 0x00020005 // ZES_STRUCTURE_TYPE_VF_EXP_PROPERTIES ::zes_vf_exp_properties_t - ZES_STRUCTURE_TYPE_VF_UTIL_MEM_EXP ZesStructureType = 0x00020006 // ZES_STRUCTURE_TYPE_VF_UTIL_MEM_EXP ::zes_vf_util_mem_exp_t - ZES_STRUCTURE_TYPE_VF_UTIL_ENGINE_EXP ZesStructureType = 0x00020007 // ZES_STRUCTURE_TYPE_VF_UTIL_ENGINE_EXP ::zes_vf_util_engine_exp_t - ZES_STRUCTURE_TYPE_VF_EXP_CAPABILITIES ZesStructureType = 0x00020008 // ZES_STRUCTURE_TYPE_VF_EXP_CAPABILITIES ::zes_vf_exp_capabilities_t - ZES_STRUCTURE_TYPE_VF_UTIL_MEM_EXP2 ZesStructureType = 0x00020009 // ZES_STRUCTURE_TYPE_VF_UTIL_MEM_EXP2 ::zes_vf_util_mem_exp2_t - ZES_STRUCTURE_TYPE_VF_UTIL_ENGINE_EXP2 ZesStructureType = 0x00020010 // ZES_STRUCTURE_TYPE_VF_UTIL_ENGINE_EXP2 ::zes_vf_util_engine_exp2_t - ZES_STRUCTURE_TYPE_VF_EXP2_CAPABILITIES ZesStructureType = 0x00020011 // ZES_STRUCTURE_TYPE_VF_EXP2_CAPABILITIES ::zes_vf_exp2_capabilities_t - ZES_STRUCTURE_TYPE_DEVICE_ECC_DEFAULT_PROPERTIES_EXT ZesStructureType = 0x00020012 // ZES_STRUCTURE_TYPE_DEVICE_ECC_DEFAULT_PROPERTIES_EXT ::zes_device_ecc_default_properties_ext_t - ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_STATE ZesStructureType = 0x00020013 // ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_STATE ::zes_pci_link_speed_downgrade_ext_state_t - ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_PROPERTIES ZesStructureType = 0x00020014 // ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_PROPERTIES ::zes_pci_link_speed_downgrade_ext_properties_t - ZES_STRUCTURE_TYPE_FORCE_UINT32 ZesStructureType = 0x7fffffff // ZES_STRUCTURE_TYPE_FORCE_UINT32 Value marking end of ZES_STRUCTURE_TYPE_* ENUMs + ZES_STRUCTURE_TYPE_DEVICE_PROPERTIES ZesStructureType = 0x1 // ZES_STRUCTURE_TYPE_DEVICE_PROPERTIES ::zes_device_properties_t + ZES_STRUCTURE_TYPE_PCI_PROPERTIES ZesStructureType = 0x2 // ZES_STRUCTURE_TYPE_PCI_PROPERTIES ::zes_pci_properties_t + ZES_STRUCTURE_TYPE_PCI_BAR_PROPERTIES ZesStructureType = 0x3 // ZES_STRUCTURE_TYPE_PCI_BAR_PROPERTIES ::zes_pci_bar_properties_t + ZES_STRUCTURE_TYPE_DIAG_PROPERTIES ZesStructureType = 0x4 // ZES_STRUCTURE_TYPE_DIAG_PROPERTIES ::zes_diag_properties_t + ZES_STRUCTURE_TYPE_ENGINE_PROPERTIES ZesStructureType = 0x5 // ZES_STRUCTURE_TYPE_ENGINE_PROPERTIES ::zes_engine_properties_t + ZES_STRUCTURE_TYPE_FABRIC_PORT_PROPERTIES ZesStructureType = 0x6 // ZES_STRUCTURE_TYPE_FABRIC_PORT_PROPERTIES ::zes_fabric_port_properties_t + ZES_STRUCTURE_TYPE_FAN_PROPERTIES ZesStructureType = 0x7 // ZES_STRUCTURE_TYPE_FAN_PROPERTIES ::zes_fan_properties_t + ZES_STRUCTURE_TYPE_FIRMWARE_PROPERTIES ZesStructureType = 0x8 // ZES_STRUCTURE_TYPE_FIRMWARE_PROPERTIES ::zes_firmware_properties_t + ZES_STRUCTURE_TYPE_FREQ_PROPERTIES ZesStructureType = 0x9 // ZES_STRUCTURE_TYPE_FREQ_PROPERTIES ::zes_freq_properties_t + ZES_STRUCTURE_TYPE_LED_PROPERTIES ZesStructureType = 0xa // ZES_STRUCTURE_TYPE_LED_PROPERTIES ::zes_led_properties_t + ZES_STRUCTURE_TYPE_MEM_PROPERTIES ZesStructureType = 0xb // ZES_STRUCTURE_TYPE_MEM_PROPERTIES ::zes_mem_properties_t + ZES_STRUCTURE_TYPE_PERF_PROPERTIES ZesStructureType = 0xc // ZES_STRUCTURE_TYPE_PERF_PROPERTIES ::zes_perf_properties_t + ZES_STRUCTURE_TYPE_POWER_PROPERTIES ZesStructureType = 0xd // ZES_STRUCTURE_TYPE_POWER_PROPERTIES ::zes_power_properties_t + ZES_STRUCTURE_TYPE_PSU_PROPERTIES ZesStructureType = 0xe // ZES_STRUCTURE_TYPE_PSU_PROPERTIES ::zes_psu_properties_t + ZES_STRUCTURE_TYPE_RAS_PROPERTIES ZesStructureType = 0xf // ZES_STRUCTURE_TYPE_RAS_PROPERTIES ::zes_ras_properties_t + ZES_STRUCTURE_TYPE_SCHED_PROPERTIES ZesStructureType = 0x10 // ZES_STRUCTURE_TYPE_SCHED_PROPERTIES ::zes_sched_properties_t + ZES_STRUCTURE_TYPE_SCHED_TIMEOUT_PROPERTIES ZesStructureType = 0x11 // ZES_STRUCTURE_TYPE_SCHED_TIMEOUT_PROPERTIES ::zes_sched_timeout_properties_t + ZES_STRUCTURE_TYPE_SCHED_TIMESLICE_PROPERTIES ZesStructureType = 0x12 // ZES_STRUCTURE_TYPE_SCHED_TIMESLICE_PROPERTIES ::zes_sched_timeslice_properties_t + ZES_STRUCTURE_TYPE_STANDBY_PROPERTIES ZesStructureType = 0x13 // ZES_STRUCTURE_TYPE_STANDBY_PROPERTIES ::zes_standby_properties_t + ZES_STRUCTURE_TYPE_TEMP_PROPERTIES ZesStructureType = 0x14 // ZES_STRUCTURE_TYPE_TEMP_PROPERTIES ::zes_temp_properties_t + ZES_STRUCTURE_TYPE_DEVICE_STATE ZesStructureType = 0x15 // ZES_STRUCTURE_TYPE_DEVICE_STATE ::zes_device_state_t + ZES_STRUCTURE_TYPE_PROCESS_STATE ZesStructureType = 0x16 // ZES_STRUCTURE_TYPE_PROCESS_STATE ::zes_process_state_t + ZES_STRUCTURE_TYPE_PCI_STATE ZesStructureType = 0x17 // ZES_STRUCTURE_TYPE_PCI_STATE ::zes_pci_state_t + ZES_STRUCTURE_TYPE_FABRIC_PORT_CONFIG ZesStructureType = 0x18 // ZES_STRUCTURE_TYPE_FABRIC_PORT_CONFIG ::zes_fabric_port_config_t + ZES_STRUCTURE_TYPE_FABRIC_PORT_STATE ZesStructureType = 0x19 // ZES_STRUCTURE_TYPE_FABRIC_PORT_STATE ::zes_fabric_port_state_t + ZES_STRUCTURE_TYPE_FAN_CONFIG ZesStructureType = 0x1a // ZES_STRUCTURE_TYPE_FAN_CONFIG ::zes_fan_config_t + ZES_STRUCTURE_TYPE_FREQ_STATE ZesStructureType = 0x1b // ZES_STRUCTURE_TYPE_FREQ_STATE ::zes_freq_state_t + ZES_STRUCTURE_TYPE_OC_CAPABILITIES ZesStructureType = 0x1c // ZES_STRUCTURE_TYPE_OC_CAPABILITIES ::zes_oc_capabilities_t + ZES_STRUCTURE_TYPE_LED_STATE ZesStructureType = 0x1d // ZES_STRUCTURE_TYPE_LED_STATE ::zes_led_state_t + ZES_STRUCTURE_TYPE_MEM_STATE ZesStructureType = 0x1e // ZES_STRUCTURE_TYPE_MEM_STATE ::zes_mem_state_t + ZES_STRUCTURE_TYPE_PSU_STATE ZesStructureType = 0x1f // ZES_STRUCTURE_TYPE_PSU_STATE ::zes_psu_state_t + ZES_STRUCTURE_TYPE_BASE_STATE ZesStructureType = 0x20 // ZES_STRUCTURE_TYPE_BASE_STATE ::zes_base_state_t + ZES_STRUCTURE_TYPE_RAS_CONFIG ZesStructureType = 0x21 // ZES_STRUCTURE_TYPE_RAS_CONFIG ::zes_ras_config_t + ZES_STRUCTURE_TYPE_RAS_STATE ZesStructureType = 0x22 // ZES_STRUCTURE_TYPE_RAS_STATE ::zes_ras_state_t + ZES_STRUCTURE_TYPE_TEMP_CONFIG ZesStructureType = 0x23 // ZES_STRUCTURE_TYPE_TEMP_CONFIG ::zes_temp_config_t + ZES_STRUCTURE_TYPE_PCI_BAR_PROPERTIES_1_2 ZesStructureType = 0x24 // ZES_STRUCTURE_TYPE_PCI_BAR_PROPERTIES_1_2 ::zes_pci_bar_properties_1_2_t + ZES_STRUCTURE_TYPE_DEVICE_ECC_DESC ZesStructureType = 0x25 // ZES_STRUCTURE_TYPE_DEVICE_ECC_DESC ::zes_device_ecc_desc_t + ZES_STRUCTURE_TYPE_DEVICE_ECC_PROPERTIES ZesStructureType = 0x26 // ZES_STRUCTURE_TYPE_DEVICE_ECC_PROPERTIES ::zes_device_ecc_properties_t + ZES_STRUCTURE_TYPE_POWER_LIMIT_EXT_DESC ZesStructureType = 0x27 // ZES_STRUCTURE_TYPE_POWER_LIMIT_EXT_DESC ::zes_power_limit_ext_desc_t + ZES_STRUCTURE_TYPE_POWER_EXT_PROPERTIES ZesStructureType = 0x28 // ZES_STRUCTURE_TYPE_POWER_EXT_PROPERTIES ::zes_power_ext_properties_t + ZES_STRUCTURE_TYPE_OVERCLOCK_PROPERTIES ZesStructureType = 0x29 // ZES_STRUCTURE_TYPE_OVERCLOCK_PROPERTIES ::zes_overclock_properties_t + ZES_STRUCTURE_TYPE_FABRIC_PORT_ERROR_COUNTERS ZesStructureType = 0x2a // ZES_STRUCTURE_TYPE_FABRIC_PORT_ERROR_COUNTERS ::zes_fabric_port_error_counters_t + ZES_STRUCTURE_TYPE_ENGINE_EXT_PROPERTIES ZesStructureType = 0x2b // ZES_STRUCTURE_TYPE_ENGINE_EXT_PROPERTIES ::zes_engine_ext_properties_t + ZES_STRUCTURE_TYPE_RESET_PROPERTIES ZesStructureType = 0x2c // ZES_STRUCTURE_TYPE_RESET_PROPERTIES ::zes_reset_properties_t + ZES_STRUCTURE_TYPE_DEVICE_EXT_PROPERTIES ZesStructureType = 0x2d // ZES_STRUCTURE_TYPE_DEVICE_EXT_PROPERTIES ::zes_device_ext_properties_t + ZES_STRUCTURE_TYPE_DEVICE_UUID ZesStructureType = 0x2e // ZES_STRUCTURE_TYPE_DEVICE_UUID ::zes_uuid_t + ZES_STRUCTURE_TYPE_POWER_DOMAIN_EXP_PROPERTIES ZesStructureType = 0x00020001 // ZES_STRUCTURE_TYPE_POWER_DOMAIN_EXP_PROPERTIES ::zes_power_domain_exp_properties_t + ZES_STRUCTURE_TYPE_MEM_BANDWIDTH_COUNTER_BITS_EXP_PROPERTIES ZesStructureType = 0x00020002 // ZES_STRUCTURE_TYPE_MEM_BANDWIDTH_COUNTER_BITS_EXP_PROPERTIES ::zes_mem_bandwidth_counter_bits_exp_properties_t + ZES_STRUCTURE_TYPE_MEMORY_PAGE_OFFLINE_STATE_EXP ZesStructureType = 0x00020003 // ZES_STRUCTURE_TYPE_MEMORY_PAGE_OFFLINE_STATE_EXP ::zes_mem_page_offline_state_exp_t + ZES_STRUCTURE_TYPE_SUBDEVICE_EXP_PROPERTIES ZesStructureType = 0x00020004 // ZES_STRUCTURE_TYPE_SUBDEVICE_EXP_PROPERTIES ::zes_subdevice_exp_properties_t + ZES_STRUCTURE_TYPE_VF_EXP_PROPERTIES ZesStructureType = 0x00020005 // ZES_STRUCTURE_TYPE_VF_EXP_PROPERTIES ::zes_vf_exp_properties_t + ZES_STRUCTURE_TYPE_VF_UTIL_MEM_EXP ZesStructureType = 0x00020006 // ZES_STRUCTURE_TYPE_VF_UTIL_MEM_EXP ::zes_vf_util_mem_exp_t + ZES_STRUCTURE_TYPE_VF_UTIL_ENGINE_EXP ZesStructureType = 0x00020007 // ZES_STRUCTURE_TYPE_VF_UTIL_ENGINE_EXP ::zes_vf_util_engine_exp_t + ZES_STRUCTURE_TYPE_VF_EXP_CAPABILITIES ZesStructureType = 0x00020008 // ZES_STRUCTURE_TYPE_VF_EXP_CAPABILITIES ::zes_vf_exp_capabilities_t + ZES_STRUCTURE_TYPE_VF_UTIL_MEM_EXP2 ZesStructureType = 0x00020009 // ZES_STRUCTURE_TYPE_VF_UTIL_MEM_EXP2 ::zes_vf_util_mem_exp2_t + ZES_STRUCTURE_TYPE_VF_UTIL_ENGINE_EXP2 ZesStructureType = 0x00020010 // ZES_STRUCTURE_TYPE_VF_UTIL_ENGINE_EXP2 ::zes_vf_util_engine_exp2_t + ZES_STRUCTURE_TYPE_VF_EXP2_CAPABILITIES ZesStructureType = 0x00020011 // ZES_STRUCTURE_TYPE_VF_EXP2_CAPABILITIES ::zes_vf_exp2_capabilities_t + ZES_STRUCTURE_TYPE_DEVICE_ECC_DEFAULT_PROPERTIES_EXT ZesStructureType = 0x00020012 // ZES_STRUCTURE_TYPE_DEVICE_ECC_DEFAULT_PROPERTIES_EXT ::zes_device_ecc_default_properties_ext_t + ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_STATE ZesStructureType = 0x00020013 // ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_STATE ::zes_pci_link_speed_downgrade_ext_state_t + ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_PROPERTIES ZesStructureType = 0x00020014 // ZES_STRUCTURE_TYPE_PCI_LINK_SPEED_DOWNGRADE_EXT_PROPERTIES ::zes_pci_link_speed_downgrade_ext_properties_t + ZES_STRUCTURE_TYPE_FORCE_UINT32 ZesStructureType = 0x7fffffff // ZES_STRUCTURE_TYPE_FORCE_UINT32 Value marking end of ZES_STRUCTURE_TYPE_* ENUMs ) // ZesBaseProperties (zes_base_properties_t) Base for all properties types type ZesBaseProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). } // ZesBaseDesc (zes_base_desc_t) Base for all descriptor types type ZesBaseDesc struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). } // ZesBaseState (zes_base_state_t) Base for all state types type ZesBaseState struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). } // ZesBaseConfig (zes_base_config_t) Base for all config types type ZesBaseConfig struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). } // ZesBaseCapability (zes_base_capability_t) Base for all capability types type ZesBaseCapability struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). } - diff --git a/sysm_device.go b/sysm_device.go index de9ed55..d9b4077 100644 --- a/sysm_device.go +++ b/sysm_device.go @@ -20,38 +20,38 @@ import ( ) // ZesDeviceGet Retrieves sysman devices within a sysman driver -/// -/// @details -/// - Multiple calls to this function will return identical sysman device -/// handles, in the same order. -/// - The number and order of handles returned from this function is NOT -/// affected by the `ZE_AFFINITY_MASK`, `ZE_ENABLE_PCI_ID_DEVICE_ORDER`, -/// or `ZE_FLAT_DEVICE_HIERARCHY` environment variables. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - Multiple calls to this function will return identical sysman device +// / handles, in the same order. +// / - The number and order of handles returned from this function is NOT +// / affected by the `ZE_AFFINITY_MASK`, `ZE_ENABLE_PCI_ID_DEVICE_ORDER`, +// / or `ZE_FLAT_DEVICE_HIERARCHY` environment variables. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceGet( - hDriver ZesDriverHandle, // hDriver [in] handle of the sysman driver instance - pCount *uint32, // pCount [in,out] pointer to the number of sysman devices. if count is zero, then the driver shall update the value with the total number of sysman devices available. if count is greater than the number of sysman devices available, then the driver shall update the value with the correct number of sysman devices available. - phDevices *ZesDeviceHandle, // phDevices [in,out][optional][range(0, *pCount)] array of handle of sysman devices. if count is less than the number of sysman devices available, then driver shall only retrieve that number of sysman devices. + hDriver ZesDriverHandle, // hDriver [in] handle of the sysman driver instance + pCount *uint32, // pCount [in,out] pointer to the number of sysman devices. if count is zero, then the driver shall update the value with the total number of sysman devices available. if count is greater than the number of sysman devices available, then the driver shall update the value with the correct number of sysman devices available. + phDevices *ZesDeviceHandle, // phDevices [in,out][optional][range(0, *pCount)] array of handle of sysman devices. if count is less than the number of sysman devices available, then driver shall only retrieve that number of sysman devices. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceGet", uintptr(hDriver), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phDevices))) } @@ -64,571 +64,580 @@ const ZES_MAX_UUID_SIZE = 16 // ZesEngineTypeFlags (zes_engine_type_flags_t) Types of accelerator engines type ZesEngineTypeFlags uint32 + const ( - ZES_ENGINE_TYPE_FLAG_OTHER ZesEngineTypeFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_ENGINE_TYPE_FLAG_OTHER Undefined types of accelerators. - ZES_ENGINE_TYPE_FLAG_COMPUTE ZesEngineTypeFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZES_ENGINE_TYPE_FLAG_COMPUTE Engines that process compute kernels only (no 3D content). - ZES_ENGINE_TYPE_FLAG_3D ZesEngineTypeFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZES_ENGINE_TYPE_FLAG_3D Engines that process 3D content only (no compute kernels). - ZES_ENGINE_TYPE_FLAG_MEDIA ZesEngineTypeFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZES_ENGINE_TYPE_FLAG_MEDIA Engines that process media workloads. - ZES_ENGINE_TYPE_FLAG_DMA ZesEngineTypeFlags = /* ZE_BIT(4) */(( 1 << 4 )) // ZES_ENGINE_TYPE_FLAG_DMA Engines that copy blocks of data. - ZES_ENGINE_TYPE_FLAG_RENDER ZesEngineTypeFlags = /* ZE_BIT(5) */(( 1 << 5 )) // ZES_ENGINE_TYPE_FLAG_RENDER Engines that can process both 3D content and compute kernels. - ZES_ENGINE_TYPE_FLAG_FORCE_UINT32 ZesEngineTypeFlags = 0x7fffffff // ZES_ENGINE_TYPE_FLAG_FORCE_UINT32 Value marking end of ZES_ENGINE_TYPE_FLAG_* ENUMs + ZES_ENGINE_TYPE_FLAG_OTHER ZesEngineTypeFlags = /* ZE_BIT(0) */ (1 << 0) // ZES_ENGINE_TYPE_FLAG_OTHER Undefined types of accelerators. + ZES_ENGINE_TYPE_FLAG_COMPUTE ZesEngineTypeFlags = /* ZE_BIT(1) */ (1 << 1) // ZES_ENGINE_TYPE_FLAG_COMPUTE Engines that process compute kernels only (no 3D content). + ZES_ENGINE_TYPE_FLAG_3D ZesEngineTypeFlags = /* ZE_BIT(2) */ (1 << 2) // ZES_ENGINE_TYPE_FLAG_3D Engines that process 3D content only (no compute kernels). + ZES_ENGINE_TYPE_FLAG_MEDIA ZesEngineTypeFlags = /* ZE_BIT(3) */ (1 << 3) // ZES_ENGINE_TYPE_FLAG_MEDIA Engines that process media workloads. + ZES_ENGINE_TYPE_FLAG_DMA ZesEngineTypeFlags = /* ZE_BIT(4) */ (1 << 4) // ZES_ENGINE_TYPE_FLAG_DMA Engines that copy blocks of data. + ZES_ENGINE_TYPE_FLAG_RENDER ZesEngineTypeFlags = /* ZE_BIT(5) */ (1 << 5) // ZES_ENGINE_TYPE_FLAG_RENDER Engines that can process both 3D content and compute kernels. + ZES_ENGINE_TYPE_FLAG_FORCE_UINT32 ZesEngineTypeFlags = 0x7fffffff // ZES_ENGINE_TYPE_FLAG_FORCE_UINT32 Value marking end of ZES_ENGINE_TYPE_FLAG_* ENUMs ) // ZesRepairStatus (zes_repair_status_t) Device repair status type ZesRepairStatus uintptr + const ( - ZES_REPAIR_STATUS_UNSUPPORTED ZesRepairStatus = 0 // ZES_REPAIR_STATUS_UNSUPPORTED The device does not support in-field repairs. - ZES_REPAIR_STATUS_NOT_PERFORMED ZesRepairStatus = 1 // ZES_REPAIR_STATUS_NOT_PERFORMED The device has never been repaired. - ZES_REPAIR_STATUS_PERFORMED ZesRepairStatus = 2 // ZES_REPAIR_STATUS_PERFORMED The device has been repaired. - ZES_REPAIR_STATUS_FORCE_UINT32 ZesRepairStatus = 0x7fffffff // ZES_REPAIR_STATUS_FORCE_UINT32 Value marking end of ZES_REPAIR_STATUS_* ENUMs + ZES_REPAIR_STATUS_UNSUPPORTED ZesRepairStatus = 0 // ZES_REPAIR_STATUS_UNSUPPORTED The device does not support in-field repairs. + ZES_REPAIR_STATUS_NOT_PERFORMED ZesRepairStatus = 1 // ZES_REPAIR_STATUS_NOT_PERFORMED The device has never been repaired. + ZES_REPAIR_STATUS_PERFORMED ZesRepairStatus = 2 // ZES_REPAIR_STATUS_PERFORMED The device has been repaired. + ZES_REPAIR_STATUS_FORCE_UINT32 ZesRepairStatus = 0x7fffffff // ZES_REPAIR_STATUS_FORCE_UINT32 Value marking end of ZES_REPAIR_STATUS_* ENUMs ) // ZesResetReasonFlags (zes_reset_reason_flags_t) Device reset reasons type ZesResetReasonFlags uint32 + const ( - ZES_RESET_REASON_FLAG_WEDGED ZesResetReasonFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_RESET_REASON_FLAG_WEDGED The device needs to be reset because one or more parts of the hardware + ZES_RESET_REASON_FLAG_WEDGED ZesResetReasonFlags = /* ZE_BIT(0) */ (1 << 0) // ZES_RESET_REASON_FLAG_WEDGED The device needs to be reset because one or more parts of the hardware ///< is wedged - ZES_RESET_REASON_FLAG_REPAIR ZesResetReasonFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZES_RESET_REASON_FLAG_REPAIR The device needs to be reset in order to complete in-field repairs - ZES_RESET_REASON_FLAG_FORCE_UINT32 ZesResetReasonFlags = 0x7fffffff // ZES_RESET_REASON_FLAG_FORCE_UINT32 Value marking end of ZES_RESET_REASON_FLAG_* ENUMs + ZES_RESET_REASON_FLAG_REPAIR ZesResetReasonFlags = /* ZE_BIT(1) */ (1 << 1) // ZES_RESET_REASON_FLAG_REPAIR The device needs to be reset in order to complete in-field repairs + ZES_RESET_REASON_FLAG_FORCE_UINT32 ZesResetReasonFlags = 0x7fffffff // ZES_RESET_REASON_FLAG_FORCE_UINT32 Value marking end of ZES_RESET_REASON_FLAG_* ENUMs ) // ZesResetType (zes_reset_type_t) Device reset type type ZesResetType uintptr + const ( - ZES_RESET_TYPE_WARM ZesResetType = 0 // ZES_RESET_TYPE_WARM Apply warm reset - ZES_RESET_TYPE_COLD ZesResetType = 1 // ZES_RESET_TYPE_COLD Apply cold reset - ZES_RESET_TYPE_FLR ZesResetType = 2 // ZES_RESET_TYPE_FLR Apply FLR reset - ZES_RESET_TYPE_FORCE_UINT32 ZesResetType = 0x7fffffff // ZES_RESET_TYPE_FORCE_UINT32 Value marking end of ZES_RESET_TYPE_* ENUMs + ZES_RESET_TYPE_WARM ZesResetType = 0 // ZES_RESET_TYPE_WARM Apply warm reset + ZES_RESET_TYPE_COLD ZesResetType = 1 // ZES_RESET_TYPE_COLD Apply cold reset + ZES_RESET_TYPE_FLR ZesResetType = 2 // ZES_RESET_TYPE_FLR Apply FLR reset + ZES_RESET_TYPE_FORCE_UINT32 ZesResetType = 0x7fffffff // ZES_RESET_TYPE_FORCE_UINT32 Value marking end of ZES_RESET_TYPE_* ENUMs ) // ZesDeviceState (zes_device_state_t) Device state type ZesDeviceState struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Reset ZesResetReasonFlags // Reset [out] Indicates if the device needs to be reset and for what reasons. returns 0 (none) or combination of ::zes_reset_reason_flag_t - Repaired ZesRepairStatus // Repaired [out] Indicates if the device has been repaired + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Reset ZesResetReasonFlags // Reset [out] Indicates if the device needs to be reset and for what reasons. returns 0 (none) or combination of ::zes_reset_reason_flag_t + Repaired ZesRepairStatus // Repaired [out] Indicates if the device has been repaired } // ZesResetProperties (zes_reset_properties_t) Device reset properties type ZesResetProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Force ZeBool // Force [in] If set to true, all applications that are currently using the device will be forcibly killed. - Resettype ZesResetType // Resettype [in] Type of reset needs to be performed + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Force ZeBool // Force [in] If set to true, all applications that are currently using the device will be forcibly killed. + Resettype ZesResetType // Resettype [in] Type of reset needs to be performed } // ZesUuid (zes_uuid_t) Device universal unique id (UUID) type ZesUuid struct { - Id [ZES_MAX_UUID_SIZE]uint8 // Id [out] opaque data representing a device UUID + Id [ZES_MAX_UUID_SIZE]uint8 // Id [out] opaque data representing a device UUID } // ZesDeviceType (zes_device_type_t) Supported device types type ZesDeviceType uintptr + const ( - ZES_DEVICE_TYPE_GPU ZesDeviceType = 1 // ZES_DEVICE_TYPE_GPU Graphics Processing Unit - ZES_DEVICE_TYPE_CPU ZesDeviceType = 2 // ZES_DEVICE_TYPE_CPU Central Processing Unit - ZES_DEVICE_TYPE_FPGA ZesDeviceType = 3 // ZES_DEVICE_TYPE_FPGA Field Programmable Gate Array - ZES_DEVICE_TYPE_MCA ZesDeviceType = 4 // ZES_DEVICE_TYPE_MCA Memory Copy Accelerator - ZES_DEVICE_TYPE_VPU ZesDeviceType = 5 // ZES_DEVICE_TYPE_VPU Vision Processing Unit - ZES_DEVICE_TYPE_FORCE_UINT32 ZesDeviceType = 0x7fffffff // ZES_DEVICE_TYPE_FORCE_UINT32 Value marking end of ZES_DEVICE_TYPE_* ENUMs + ZES_DEVICE_TYPE_GPU ZesDeviceType = 1 // ZES_DEVICE_TYPE_GPU Graphics Processing Unit + ZES_DEVICE_TYPE_CPU ZesDeviceType = 2 // ZES_DEVICE_TYPE_CPU Central Processing Unit + ZES_DEVICE_TYPE_FPGA ZesDeviceType = 3 // ZES_DEVICE_TYPE_FPGA Field Programmable Gate Array + ZES_DEVICE_TYPE_MCA ZesDeviceType = 4 // ZES_DEVICE_TYPE_MCA Memory Copy Accelerator + ZES_DEVICE_TYPE_VPU ZesDeviceType = 5 // ZES_DEVICE_TYPE_VPU Vision Processing Unit + ZES_DEVICE_TYPE_FORCE_UINT32 ZesDeviceType = 0x7fffffff // ZES_DEVICE_TYPE_FORCE_UINT32 Value marking end of ZES_DEVICE_TYPE_* ENUMs ) // ZesDevicePropertyFlags (zes_device_property_flags_t) Supported device property flags type ZesDevicePropertyFlags uint32 + const ( - ZES_DEVICE_PROPERTY_FLAG_INTEGRATED ZesDevicePropertyFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_DEVICE_PROPERTY_FLAG_INTEGRATED Device is integrated with the Host. - ZES_DEVICE_PROPERTY_FLAG_SUBDEVICE ZesDevicePropertyFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZES_DEVICE_PROPERTY_FLAG_SUBDEVICE Device handle used for query represents a sub-device. - ZES_DEVICE_PROPERTY_FLAG_ECC ZesDevicePropertyFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZES_DEVICE_PROPERTY_FLAG_ECC Device supports error correction memory access. - ZES_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING ZesDevicePropertyFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZES_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING Device supports on-demand page-faulting. - ZES_DEVICE_PROPERTY_FLAG_FORCE_UINT32 ZesDevicePropertyFlags = 0x7fffffff // ZES_DEVICE_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZES_DEVICE_PROPERTY_FLAG_* ENUMs + ZES_DEVICE_PROPERTY_FLAG_INTEGRATED ZesDevicePropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZES_DEVICE_PROPERTY_FLAG_INTEGRATED Device is integrated with the Host. + ZES_DEVICE_PROPERTY_FLAG_SUBDEVICE ZesDevicePropertyFlags = /* ZE_BIT(1) */ (1 << 1) // ZES_DEVICE_PROPERTY_FLAG_SUBDEVICE Device handle used for query represents a sub-device. + ZES_DEVICE_PROPERTY_FLAG_ECC ZesDevicePropertyFlags = /* ZE_BIT(2) */ (1 << 2) // ZES_DEVICE_PROPERTY_FLAG_ECC Device supports error correction memory access. + ZES_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING ZesDevicePropertyFlags = /* ZE_BIT(3) */ (1 << 3) // ZES_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING Device supports on-demand page-faulting. + ZES_DEVICE_PROPERTY_FLAG_FORCE_UINT32 ZesDevicePropertyFlags = 0x7fffffff // ZES_DEVICE_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZES_DEVICE_PROPERTY_FLAG_* ENUMs ) // ZesDeviceProperties (zes_device_properties_t) Device properties type ZesDeviceProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Core ZeDeviceProperties // Core [out] (Deprecated, use ::zes_uuid_t in the extended structure) Core device properties - Numsubdevices uint32 // Numsubdevices [out] Number of sub-devices. A value of 0 indicates that this device doesn't have sub-devices. - Serialnumber [ZES_STRING_PROPERTY_SIZE]byte // Serialnumber [out] Manufacturing serial number (NULL terminated string value). This value is intended to reflect the Part ID/SoC ID assigned by manufacturer that is unique for a SoC. Will be set to the string "unknown" if this cannot be determined for the device. - Boardnumber [ZES_STRING_PROPERTY_SIZE]byte // Boardnumber [out] Manufacturing board number (NULL terminated string value). Alternatively "boardSerialNumber", this value is intended to reflect the string printed on board label by manufacturer. Will be set to the string "unknown" if this cannot be determined for the device. - Brandname [ZES_STRING_PROPERTY_SIZE]byte // Brandname [out] Brand name of the device (NULL terminated string value). Will be set to the string "unknown" if this cannot be determined for the device. - Modelname [ZES_STRING_PROPERTY_SIZE]byte // Modelname [out] Model name of the device (NULL terminated string value). Will be set to the string "unknown" if this cannot be determined for the device. - Vendorname [ZES_STRING_PROPERTY_SIZE]byte // Vendorname [out] Vendor name of the device (NULL terminated string value). Will be set to the string "unknown" if this cannot be determined for the device. - Driverversion [ZES_STRING_PROPERTY_SIZE]byte // Driverversion [out] Installed driver version (NULL terminated string value). Will be set to the string "unknown" if this cannot be determined for the device. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Core ZeDeviceProperties // Core [out] (Deprecated, use ::zes_uuid_t in the extended structure) Core device properties + Numsubdevices uint32 // Numsubdevices [out] Number of sub-devices. A value of 0 indicates that this device doesn't have sub-devices. + Serialnumber [ZES_STRING_PROPERTY_SIZE]byte // Serialnumber [out] Manufacturing serial number (NULL terminated string value). This value is intended to reflect the Part ID/SoC ID assigned by manufacturer that is unique for a SoC. Will be set to the string "unknown" if this cannot be determined for the device. + Boardnumber [ZES_STRING_PROPERTY_SIZE]byte // Boardnumber [out] Manufacturing board number (NULL terminated string value). Alternatively "boardSerialNumber", this value is intended to reflect the string printed on board label by manufacturer. Will be set to the string "unknown" if this cannot be determined for the device. + Brandname [ZES_STRING_PROPERTY_SIZE]byte // Brandname [out] Brand name of the device (NULL terminated string value). Will be set to the string "unknown" if this cannot be determined for the device. + Modelname [ZES_STRING_PROPERTY_SIZE]byte // Modelname [out] Model name of the device (NULL terminated string value). Will be set to the string "unknown" if this cannot be determined for the device. + Vendorname [ZES_STRING_PROPERTY_SIZE]byte // Vendorname [out] Vendor name of the device (NULL terminated string value). Will be set to the string "unknown" if this cannot be determined for the device. + Driverversion [ZES_STRING_PROPERTY_SIZE]byte // Driverversion [out] Installed driver version (NULL terminated string value). Will be set to the string "unknown" if this cannot be determined for the device. } // ZesDeviceExtProperties (zes_device_ext_properties_t) Device properties type ZesDeviceExtProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Uuid ZesUuid // Uuid [out] universal unique identifier. Note: uuid obtained from Sysman API is the same as from core API. Subdevices will have their own uuid. - Type ZesDeviceType // Type [out] generic device type - Flags ZesDevicePropertyFlags // Flags [out] 0 (none) or a valid combination of ::zes_device_property_flag_t + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Uuid ZesUuid // Uuid [out] universal unique identifier. Note: uuid obtained from Sysman API is the same as from core API. Subdevices will have their own uuid. + Type ZesDeviceType // Type [out] generic device type + Flags ZesDevicePropertyFlags // Flags [out] 0 (none) or a valid combination of ::zes_device_property_flag_t } // ZesDeviceGetProperties Get properties about the device -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesDeviceGetProperties( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pProperties *ZesDeviceProperties, // pProperties [in,out] Structure that will contain information about the device. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pProperties *ZesDeviceProperties, // pProperties [in,out] Structure that will contain information about the device. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceGetProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pProperties))) } // ZesDeviceGetState Get information about the state of the device - if a reset is -/// required, reasons for the reset and if the device has been repaired -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pState` +// / required, reasons for the reset and if the device has been repaired +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pState` func ZesDeviceGetState( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pState *ZesDeviceState, // pState [in,out] Structure that will contain information about the device. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pState *ZesDeviceState, // pState [in,out] Structure that will contain information about the device. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceGetState", uintptr(hDevice), uintptr(unsafe.Pointer(pState))) } // ZesDeviceReset Reset device -/// -/// @details -/// - Performs a PCI bus reset of the device. This will result in all -/// current device state being lost. -/// - All applications using the device should be stopped before calling -/// this function. -/// - If the force argument is specified, all applications using the device -/// will be forcibly killed. -/// - The function will block until the device has restarted or an -/// implementation defined timeout occurred waiting for the reset to -/// complete. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to perform this operation. -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE -/// + Reset cannot be performed because applications are using this device. -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// + There were problems unloading the device driver, performing a bus reset or reloading the device driver. +// / +// / @details +// / - Performs a PCI bus reset of the device. This will result in all +// / current device state being lost. +// / - All applications using the device should be stopped before calling +// / this function. +// / - If the force argument is specified, all applications using the device +// / will be forcibly killed. +// / - The function will block until the device has restarted or an +// / implementation defined timeout occurred waiting for the reset to +// / complete. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to perform this operation. +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / + Reset cannot be performed because applications are using this device. +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / + There were problems unloading the device driver, performing a bus reset or reloading the device driver. func ZesDeviceReset( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle for the device - force ZeBool, // force [in] If set to true, all applications that are currently using the device will be forcibly killed. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle for the device + force ZeBool, // force [in] If set to true, all applications that are currently using the device will be forcibly killed. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceReset", uintptr(hDevice), uintptr(force)) } // ZesDeviceResetExt Reset device extension -/// -/// @details -/// - Performs a PCI bus reset of the device. This will result in all -/// current device state being lost. -/// - Prior to calling this function, user is responsible for closing -/// applications using the device unless force argument is specified. -/// - If the force argument is specified, all applications using the device -/// will be forcibly killed. -/// - The function will block until the device has restarted or a -/// implementation specific timeout occurred waiting for the reset to -/// complete. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to perform this operation. -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE -/// + Reset cannot be performed because applications are using this device. -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// + There were problems unloading the device driver, performing a bus reset or reloading the device driver. +// / +// / @details +// / - Performs a PCI bus reset of the device. This will result in all +// / current device state being lost. +// / - Prior to calling this function, user is responsible for closing +// / applications using the device unless force argument is specified. +// / - If the force argument is specified, all applications using the device +// / will be forcibly killed. +// / - The function will block until the device has restarted or a +// / implementation specific timeout occurred waiting for the reset to +// / complete. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to perform this operation. +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / + Reset cannot be performed because applications are using this device. +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / + There were problems unloading the device driver, performing a bus reset or reloading the device driver. func ZesDeviceResetExt( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle for the device - pProperties *ZesResetProperties, // pProperties [in] Device reset properties to apply + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle for the device + pProperties *ZesResetProperties, // pProperties [in] Device reset properties to apply ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceResetExt", uintptr(hDevice), uintptr(unsafe.Pointer(pProperties))) } // ZesProcessState (zes_process_state_t) Contains information about a process that has an open connection with -/// this device -/// -/// @details -/// - The application can use the process ID to query the OS for the owner -/// and the path to the executable. +// / this device +// / +// / @details +// / - The application can use the process ID to query the OS for the owner +// / and the path to the executable. type ZesProcessState struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Processid uint32 // Processid [out] Host OS process ID. - Memsize uint64 // Memsize [out] Device memory size in bytes allocated by this process (may not necessarily be resident on the device at the time of reading). - Sharedsize uint64 // Sharedsize [out] The size of shared device memory mapped into this process (may not necessarily be resident on the device at the time of reading). - Engines ZesEngineTypeFlags // Engines [out] Bitfield of accelerator engine types being used by this process. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Processid uint32 // Processid [out] Host OS process ID. + Memsize uint64 // Memsize [out] Device memory size in bytes allocated by this process (may not necessarily be resident on the device at the time of reading). + Sharedsize uint64 // Sharedsize [out] The size of shared device memory mapped into this process (may not necessarily be resident on the device at the time of reading). + Engines ZesEngineTypeFlags // Engines [out] Bitfield of accelerator engine types being used by this process. } // ZesDeviceProcessesGetState Get information about host processes using the device -/// -/// @details -/// - The number of processes connected to the device is dynamic. This means -/// that between a call to determine the value of pCount and the -/// subsequent call, the number of processes may have increased or -/// decreased. It is recommended that a large array be passed in so as to -/// avoid receiving the error ::ZE_RESULT_ERROR_INVALID_SIZE. Also, always -/// check the returned value in pCount since it may be less than the -/// earlier call to get the required array size. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + The provided value of pCount is not big enough to store information about all the processes currently attached to the device. +// / +// / @details +// / - The number of processes connected to the device is dynamic. This means +// / that between a call to determine the value of pCount and the +// / subsequent call, the number of processes may have increased or +// / decreased. It is recommended that a large array be passed in so as to +// / avoid receiving the error ::ZE_RESULT_ERROR_INVALID_SIZE. Also, always +// / check the returned value in pCount since it may be less than the +// / earlier call to get the required array size. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + The provided value of pCount is not big enough to store information about all the processes currently attached to the device. func ZesDeviceProcessesGetState( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle for the device - pCount *uint32, // pCount [in,out] pointer to the number of processes. if count is zero, then the driver shall update the value with the total number of processes currently attached to the device. if count is greater than the number of processes currently attached to the device, then the driver shall update the value with the correct number of processes. - pProcesses *ZesProcessState, // pProcesses [in,out][optional][range(0, *pCount)] array of process information. if count is less than the number of processes currently attached to the device, then the driver shall only retrieve information about that number of processes. In this case, the return code will ::ZE_RESULT_ERROR_INVALID_SIZE. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle for the device + pCount *uint32, // pCount [in,out] pointer to the number of processes. if count is zero, then the driver shall update the value with the total number of processes currently attached to the device. if count is greater than the number of processes currently attached to the device, then the driver shall update the value with the correct number of processes. + pProcesses *ZesProcessState, // pProcesses [in,out][optional][range(0, *pCount)] array of process information. if count is less than the number of processes currently attached to the device, then the driver shall only retrieve information about that number of processes. In this case, the return code will ::ZE_RESULT_ERROR_INVALID_SIZE. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceProcessesGetState", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pProcesses))) } // ZesPciAddress (zes_pci_address_t) PCI address type ZesPciAddress struct { - Domain uint32 // Domain [out] BDF domain - Bus uint32 // Bus [out] BDF bus - Device uint32 // Device [out] BDF device - Function uint32 // Function [out] BDF function + Domain uint32 // Domain [out] BDF domain + Bus uint32 // Bus [out] BDF bus + Device uint32 // Device [out] BDF device + Function uint32 // Function [out] BDF function } // ZesPciSpeed (zes_pci_speed_t) PCI speed type ZesPciSpeed struct { - Gen int32 // Gen [out] The link generation. A value of -1 means that this property is unknown. - Width int32 // Width [out] The number of lanes. A value of -1 means that this property is unknown. - Maxbandwidth int64 // Maxbandwidth [out] The maximum bandwidth in bytes/sec (sum of all lanes). A value of -1 means that this property is unknown. + Gen int32 // Gen [out] The link generation. A value of -1 means that this property is unknown. + Width int32 // Width [out] The number of lanes. A value of -1 means that this property is unknown. + Maxbandwidth int64 // Maxbandwidth [out] The maximum bandwidth in bytes/sec (sum of all lanes). A value of -1 means that this property is unknown. } // ZesPciProperties (zes_pci_properties_t) Static PCI properties type ZesPciProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Address ZesPciAddress // Address [out] The BDF address - Maxspeed ZesPciSpeed // Maxspeed [out] Fastest port configuration supported by the device (sum of all lanes) - Havebandwidthcounters ZeBool // Havebandwidthcounters [out] Indicates whether the `rxCounter` and `txCounter` members of ::zes_pci_stats_t will have valid values - Havepacketcounters ZeBool // Havepacketcounters [out] Indicates whether the `packetCounter` member of ::zes_pci_stats_t will have a valid value - Havereplaycounters ZeBool // Havereplaycounters [out] Indicates whether the `replayCounter` member of ::zes_pci_stats_t will have a valid value + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Address ZesPciAddress // Address [out] The BDF address + Maxspeed ZesPciSpeed // Maxspeed [out] Fastest port configuration supported by the device (sum of all lanes) + Havebandwidthcounters ZeBool // Havebandwidthcounters [out] Indicates whether the `rxCounter` and `txCounter` members of ::zes_pci_stats_t will have valid values + Havepacketcounters ZeBool // Havepacketcounters [out] Indicates whether the `packetCounter` member of ::zes_pci_stats_t will have a valid value + Havereplaycounters ZeBool // Havereplaycounters [out] Indicates whether the `replayCounter` member of ::zes_pci_stats_t will have a valid value } // ZesPciLinkStatus (zes_pci_link_status_t) PCI link status type ZesPciLinkStatus uintptr + const ( - ZES_PCI_LINK_STATUS_UNKNOWN ZesPciLinkStatus = 0 // ZES_PCI_LINK_STATUS_UNKNOWN The link status could not be determined - ZES_PCI_LINK_STATUS_GOOD ZesPciLinkStatus = 1 // ZES_PCI_LINK_STATUS_GOOD The link is up and operating as expected - ZES_PCI_LINK_STATUS_QUALITY_ISSUES ZesPciLinkStatus = 2 // ZES_PCI_LINK_STATUS_QUALITY_ISSUES The link is up but has quality and/or bandwidth degradation - ZES_PCI_LINK_STATUS_STABILITY_ISSUES ZesPciLinkStatus = 3 // ZES_PCI_LINK_STATUS_STABILITY_ISSUES The link has stability issues and preventing workloads making forward + ZES_PCI_LINK_STATUS_UNKNOWN ZesPciLinkStatus = 0 // ZES_PCI_LINK_STATUS_UNKNOWN The link status could not be determined + ZES_PCI_LINK_STATUS_GOOD ZesPciLinkStatus = 1 // ZES_PCI_LINK_STATUS_GOOD The link is up and operating as expected + ZES_PCI_LINK_STATUS_QUALITY_ISSUES ZesPciLinkStatus = 2 // ZES_PCI_LINK_STATUS_QUALITY_ISSUES The link is up but has quality and/or bandwidth degradation + ZES_PCI_LINK_STATUS_STABILITY_ISSUES ZesPciLinkStatus = 3 // ZES_PCI_LINK_STATUS_STABILITY_ISSUES The link has stability issues and preventing workloads making forward ///< progress - ZES_PCI_LINK_STATUS_FORCE_UINT32 ZesPciLinkStatus = 0x7fffffff // ZES_PCI_LINK_STATUS_FORCE_UINT32 Value marking end of ZES_PCI_LINK_STATUS_* ENUMs + ZES_PCI_LINK_STATUS_FORCE_UINT32 ZesPciLinkStatus = 0x7fffffff // ZES_PCI_LINK_STATUS_FORCE_UINT32 Value marking end of ZES_PCI_LINK_STATUS_* ENUMs ) // ZesPciLinkQualIssueFlags (zes_pci_link_qual_issue_flags_t) PCI link quality degradation reasons type ZesPciLinkQualIssueFlags uint32 + const ( - ZES_PCI_LINK_QUAL_ISSUE_FLAG_REPLAYS ZesPciLinkQualIssueFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_PCI_LINK_QUAL_ISSUE_FLAG_REPLAYS A significant number of replays are occurring - ZES_PCI_LINK_QUAL_ISSUE_FLAG_SPEED ZesPciLinkQualIssueFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZES_PCI_LINK_QUAL_ISSUE_FLAG_SPEED There is a degradation in the maximum bandwidth of the link - ZES_PCI_LINK_QUAL_ISSUE_FLAG_FORCE_UINT32 ZesPciLinkQualIssueFlags = 0x7fffffff // ZES_PCI_LINK_QUAL_ISSUE_FLAG_FORCE_UINT32 Value marking end of ZES_PCI_LINK_QUAL_ISSUE_FLAG_* ENUMs + ZES_PCI_LINK_QUAL_ISSUE_FLAG_REPLAYS ZesPciLinkQualIssueFlags = /* ZE_BIT(0) */ (1 << 0) // ZES_PCI_LINK_QUAL_ISSUE_FLAG_REPLAYS A significant number of replays are occurring + ZES_PCI_LINK_QUAL_ISSUE_FLAG_SPEED ZesPciLinkQualIssueFlags = /* ZE_BIT(1) */ (1 << 1) // ZES_PCI_LINK_QUAL_ISSUE_FLAG_SPEED There is a degradation in the maximum bandwidth of the link + ZES_PCI_LINK_QUAL_ISSUE_FLAG_FORCE_UINT32 ZesPciLinkQualIssueFlags = 0x7fffffff // ZES_PCI_LINK_QUAL_ISSUE_FLAG_FORCE_UINT32 Value marking end of ZES_PCI_LINK_QUAL_ISSUE_FLAG_* ENUMs ) // ZesPciLinkStabIssueFlags (zes_pci_link_stab_issue_flags_t) PCI link stability issues type ZesPciLinkStabIssueFlags uint32 + const ( - ZES_PCI_LINK_STAB_ISSUE_FLAG_RETRAINING ZesPciLinkStabIssueFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_PCI_LINK_STAB_ISSUE_FLAG_RETRAINING Link retraining has occurred to deal with quality issues - ZES_PCI_LINK_STAB_ISSUE_FLAG_FORCE_UINT32 ZesPciLinkStabIssueFlags = 0x7fffffff // ZES_PCI_LINK_STAB_ISSUE_FLAG_FORCE_UINT32 Value marking end of ZES_PCI_LINK_STAB_ISSUE_FLAG_* ENUMs + ZES_PCI_LINK_STAB_ISSUE_FLAG_RETRAINING ZesPciLinkStabIssueFlags = /* ZE_BIT(0) */ (1 << 0) // ZES_PCI_LINK_STAB_ISSUE_FLAG_RETRAINING Link retraining has occurred to deal with quality issues + ZES_PCI_LINK_STAB_ISSUE_FLAG_FORCE_UINT32 ZesPciLinkStabIssueFlags = 0x7fffffff // ZES_PCI_LINK_STAB_ISSUE_FLAG_FORCE_UINT32 Value marking end of ZES_PCI_LINK_STAB_ISSUE_FLAG_* ENUMs ) // ZesPciState (zes_pci_state_t) Dynamic PCI state type ZesPciState struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Status ZesPciLinkStatus // Status [out] The current status of the port - Qualityissues ZesPciLinkQualIssueFlags // Qualityissues [out] If status is ::ZES_PCI_LINK_STATUS_QUALITY_ISSUES, then this gives a combination of ::zes_pci_link_qual_issue_flag_t for quality issues that have been detected; otherwise, 0 indicates there are no quality issues with the link at this time." - Stabilityissues ZesPciLinkStabIssueFlags // Stabilityissues [out] If status is ::ZES_PCI_LINK_STATUS_STABILITY_ISSUES, then this gives a combination of ::zes_pci_link_stab_issue_flag_t for reasons for the connection instability; otherwise, 0 indicates there are no connection stability issues at this time." - Speed ZesPciSpeed // Speed [out] The current port configure speed + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Status ZesPciLinkStatus // Status [out] The current status of the port + Qualityissues ZesPciLinkQualIssueFlags // Qualityissues [out] If status is ::ZES_PCI_LINK_STATUS_QUALITY_ISSUES, then this gives a combination of ::zes_pci_link_qual_issue_flag_t for quality issues that have been detected; otherwise, 0 indicates there are no quality issues with the link at this time." + Stabilityissues ZesPciLinkStabIssueFlags // Stabilityissues [out] If status is ::ZES_PCI_LINK_STATUS_STABILITY_ISSUES, then this gives a combination of ::zes_pci_link_stab_issue_flag_t for reasons for the connection instability; otherwise, 0 indicates there are no connection stability issues at this time." + Speed ZesPciSpeed // Speed [out] The current port configure speed } // ZesPciBarType (zes_pci_bar_type_t) PCI bar types type ZesPciBarType uintptr + const ( - ZES_PCI_BAR_TYPE_MMIO ZesPciBarType = 0 // ZES_PCI_BAR_TYPE_MMIO MMIO registers - ZES_PCI_BAR_TYPE_ROM ZesPciBarType = 1 // ZES_PCI_BAR_TYPE_ROM ROM aperture - ZES_PCI_BAR_TYPE_MEM ZesPciBarType = 2 // ZES_PCI_BAR_TYPE_MEM Device memory - ZES_PCI_BAR_TYPE_FORCE_UINT32 ZesPciBarType = 0x7fffffff // ZES_PCI_BAR_TYPE_FORCE_UINT32 Value marking end of ZES_PCI_BAR_TYPE_* ENUMs + ZES_PCI_BAR_TYPE_MMIO ZesPciBarType = 0 // ZES_PCI_BAR_TYPE_MMIO MMIO registers + ZES_PCI_BAR_TYPE_ROM ZesPciBarType = 1 // ZES_PCI_BAR_TYPE_ROM ROM aperture + ZES_PCI_BAR_TYPE_MEM ZesPciBarType = 2 // ZES_PCI_BAR_TYPE_MEM Device memory + ZES_PCI_BAR_TYPE_FORCE_UINT32 ZesPciBarType = 0x7fffffff // ZES_PCI_BAR_TYPE_FORCE_UINT32 Value marking end of ZES_PCI_BAR_TYPE_* ENUMs ) // ZesPciBarProperties (zes_pci_bar_properties_t) Properties of a pci bar type ZesPciBarProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZesPciBarType // Type [out] The type of bar - Index uint32 // Index [out] The index of the bar - Base uint64 // Base [out] Base address of the bar. - Size uint64 // Size [out] Size of the bar. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZesPciBarType // Type [out] The type of bar + Index uint32 // Index [out] The index of the bar + Base uint64 // Base [out] Base address of the bar. + Size uint64 // Size [out] Size of the bar. } // ZesPciBarProperties12 (zes_pci_bar_properties_1_2_t) Properties of a pci bar, including the resizable bar. type ZesPciBarProperties12 struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZesPciBarType // Type [out] The type of bar - Index uint32 // Index [out] The index of the bar - Base uint64 // Base [out] Base address of the bar. - Size uint64 // Size [out] Size of the bar. - Resizablebarsupported ZeBool // Resizablebarsupported [out] Support for Resizable Bar on this device. - Resizablebarenabled ZeBool // Resizablebarenabled [out] Resizable Bar enabled on this device + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZesPciBarType // Type [out] The type of bar + Index uint32 // Index [out] The index of the bar + Base uint64 // Base [out] Base address of the bar. + Size uint64 // Size [out] Size of the bar. + Resizablebarsupported ZeBool // Resizablebarsupported [out] Support for Resizable Bar on this device. + Resizablebarenabled ZeBool // Resizablebarenabled [out] Resizable Bar enabled on this device } // ZesPciStats (zes_pci_stats_t) PCI stats counters -/// -/// @details -/// - Percent replays is calculated by taking two snapshots (s1, s2) and -/// using the equation: %replay = 10^6 * (s2.replayCounter - -/// s1.replayCounter) / (s2.maxBandwidth * (s2.timestamp - s1.timestamp)) -/// - Percent throughput is calculated by taking two snapshots (s1, s2) and -/// using the equation: %bw = 10^6 * ((s2.rxCounter - s1.rxCounter) + -/// (s2.txCounter - s1.txCounter)) / (s2.maxBandwidth * (s2.timestamp - -/// s1.timestamp)) +// / +// / @details +// / - Percent replays is calculated by taking two snapshots (s1, s2) and +// / using the equation: %replay = 10^6 * (s2.replayCounter - +// / s1.replayCounter) / (s2.maxBandwidth * (s2.timestamp - s1.timestamp)) +// / - Percent throughput is calculated by taking two snapshots (s1, s2) and +// / using the equation: %bw = 10^6 * ((s2.rxCounter - s1.rxCounter) + +// / (s2.txCounter - s1.txCounter)) / (s2.maxBandwidth * (s2.timestamp - +// / s1.timestamp)) type ZesPciStats struct { - Timestamp uint64 // Timestamp [out] Monotonic timestamp counter in microseconds when the measurement was made. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution. - Replaycounter uint64 // Replaycounter [out] Monotonic counter for the number of replay packets (sum of all lanes). Will always be 0 when the `haveReplayCounters` member of ::zes_pci_properties_t is FALSE. - Packetcounter uint64 // Packetcounter [out] Monotonic counter for the number of packets (sum of all lanes). Will always be 0 when the `havePacketCounters` member of ::zes_pci_properties_t is FALSE. - Rxcounter uint64 // Rxcounter [out] Monotonic counter for the number of bytes received (sum of all lanes). Will always be 0 when the `haveBandwidthCounters` member of ::zes_pci_properties_t is FALSE. - Txcounter uint64 // Txcounter [out] Monotonic counter for the number of bytes transmitted (including replays) (sum of all lanes). Will always be 0 when the `haveBandwidthCounters` member of ::zes_pci_properties_t is FALSE. - Speed ZesPciSpeed // Speed [out] The current speed of the link (sum of all lanes) + Timestamp uint64 // Timestamp [out] Monotonic timestamp counter in microseconds when the measurement was made. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution. + Replaycounter uint64 // Replaycounter [out] Monotonic counter for the number of replay packets (sum of all lanes). Will always be 0 when the `haveReplayCounters` member of ::zes_pci_properties_t is FALSE. + Packetcounter uint64 // Packetcounter [out] Monotonic counter for the number of packets (sum of all lanes). Will always be 0 when the `havePacketCounters` member of ::zes_pci_properties_t is FALSE. + Rxcounter uint64 // Rxcounter [out] Monotonic counter for the number of bytes received (sum of all lanes). Will always be 0 when the `haveBandwidthCounters` member of ::zes_pci_properties_t is FALSE. + Txcounter uint64 // Txcounter [out] Monotonic counter for the number of bytes transmitted (including replays) (sum of all lanes). Will always be 0 when the `haveBandwidthCounters` member of ::zes_pci_properties_t is FALSE. + Speed ZesPciSpeed // Speed [out] The current speed of the link (sum of all lanes) } // ZesDevicePciGetProperties Get PCI properties - address, max speed -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesDevicePciGetProperties( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pProperties *ZesPciProperties, // pProperties [in,out] Will contain the PCI properties. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pProperties *ZesPciProperties, // pProperties [in,out] Will contain the PCI properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDevicePciGetProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pProperties))) } // ZesDevicePciGetState Get current PCI state - current speed -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pState` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pState` func ZesDevicePciGetState( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pState *ZesPciState, // pState [in,out] Will contain the PCI properties. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pState *ZesPciState, // pState [in,out] Will contain the PCI properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDevicePciGetState", uintptr(hDevice), uintptr(unsafe.Pointer(pState))) } // ZesDevicePciGetBars Get information about each configured bar -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDevicePciGetBars( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of PCI bars. if count is zero, then the driver shall update the value with the total number of PCI bars that are setup. if count is greater than the number of PCI bars that are setup, then the driver shall update the value with the correct number of PCI bars. - pProperties *ZesPciBarProperties, // pProperties [in,out][optional][range(0, *pCount)] array of information about setup PCI bars. if count is less than the number of PCI bars that are setup, then the driver shall only retrieve information about that number of PCI bars. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of PCI bars. if count is zero, then the driver shall update the value with the total number of PCI bars that are setup. if count is greater than the number of PCI bars that are setup, then the driver shall update the value with the correct number of PCI bars. + pProperties *ZesPciBarProperties, // pProperties [in,out][optional][range(0, *pCount)] array of information about setup PCI bars. if count is less than the number of PCI bars that are setup, then the driver shall only retrieve information about that number of PCI bars. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDevicePciGetBars", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pProperties))) } // ZesDevicePciGetStats Get PCI stats - bandwidth, number of packets, number of replays -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pStats` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to query this telemetry. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pStats` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to query this telemetry. func ZesDevicePciGetStats( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pStats *ZesPciStats, // pStats [in,out] Will contain a snapshot of the latest stats. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pStats *ZesPciStats, // pStats [in,out] Will contain a snapshot of the latest stats. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDevicePciGetStats", uintptr(hDevice), uintptr(unsafe.Pointer(pStats))) } - diff --git a/sysm_diagnostics.go b/sysm_diagnostics.go index 811a86d..a147ccc 100644 --- a/sysm_diagnostics.go +++ b/sysm_diagnostics.go @@ -21,15 +21,16 @@ import ( // ZesDiagResult (zes_diag_result_t) Diagnostic results type ZesDiagResult uintptr + const ( - ZES_DIAG_RESULT_NO_ERRORS ZesDiagResult = 0 // ZES_DIAG_RESULT_NO_ERRORS Diagnostic completed without finding errors to repair - ZES_DIAG_RESULT_ABORT ZesDiagResult = 1 // ZES_DIAG_RESULT_ABORT Diagnostic had problems running tests - ZES_DIAG_RESULT_FAIL_CANT_REPAIR ZesDiagResult = 2 // ZES_DIAG_RESULT_FAIL_CANT_REPAIR Diagnostic had problems setting up repairs - ZES_DIAG_RESULT_REBOOT_FOR_REPAIR ZesDiagResult = 3 // ZES_DIAG_RESULT_REBOOT_FOR_REPAIR Diagnostics found errors, setup for repair and reboot is required to + ZES_DIAG_RESULT_NO_ERRORS ZesDiagResult = 0 // ZES_DIAG_RESULT_NO_ERRORS Diagnostic completed without finding errors to repair + ZES_DIAG_RESULT_ABORT ZesDiagResult = 1 // ZES_DIAG_RESULT_ABORT Diagnostic had problems running tests + ZES_DIAG_RESULT_FAIL_CANT_REPAIR ZesDiagResult = 2 // ZES_DIAG_RESULT_FAIL_CANT_REPAIR Diagnostic had problems setting up repairs + ZES_DIAG_RESULT_REBOOT_FOR_REPAIR ZesDiagResult = 3 // ZES_DIAG_RESULT_REBOOT_FOR_REPAIR Diagnostics found errors, setup for repair and reboot is required to ///< complete the process - ZES_DIAG_RESULT_FORCE_UINT32 ZesDiagResult = 0x7fffffff // ZES_DIAG_RESULT_FORCE_UINT32 Value marking end of ZES_DIAG_RESULT_* ENUMs + ZES_DIAG_RESULT_FORCE_UINT32 ZesDiagResult = 0x7fffffff // ZES_DIAG_RESULT_FORCE_UINT32 Value marking end of ZES_DIAG_RESULT_* ENUMs ) @@ -41,161 +42,160 @@ const ZES_DIAG_LAST_TEST_INDEX = 0xFFFFFFFF // ZesDiagTest (zes_diag_test_t) Diagnostic test type ZesDiagTest struct { - Index uint32 // Index [out] Index of the test - Name [ZES_STRING_PROPERTY_SIZE]byte // Name [out] Name of the test + Index uint32 // Index [out] Index of the test + Name [ZES_STRING_PROPERTY_SIZE]byte // Name [out] Name of the test } // ZesDiagProperties (zes_diag_properties_t) Diagnostics test suite properties type ZesDiagProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device - Name [ZES_STRING_PROPERTY_SIZE]byte // Name [out] Name of the diagnostics test suite - Havetests ZeBool // Havetests [out] Indicates if this test suite has individual tests which can be run separately (use the function ::zesDiagnosticsGetTests() to get the list of these tests) + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Name [ZES_STRING_PROPERTY_SIZE]byte // Name [out] Name of the diagnostics test suite + Havetests ZeBool // Havetests [out] Indicates if this test suite has individual tests which can be run separately (use the function ::zesDiagnosticsGetTests() to get the list of these tests) } // ZesDeviceEnumDiagnosticTestSuites Get handle of diagnostics test suites -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumDiagnosticTestSuites( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phDiagnostics *ZesDiagHandle, // phDiagnostics [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phDiagnostics *ZesDiagHandle, // phDiagnostics [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumDiagnosticTestSuites", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phDiagnostics))) } // ZesDiagnosticsGetProperties Get properties of a diagnostics test suite -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDiagnostics` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDiagnostics` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesDiagnosticsGetProperties( - hDiagnostics ZesDiagHandle, // hDiagnostics [in] Handle for the component. - pProperties *ZesDiagProperties, // pProperties [in,out] Structure describing the properties of a diagnostics test suite + hDiagnostics ZesDiagHandle, // hDiagnostics [in] Handle for the component. + pProperties *ZesDiagProperties, // pProperties [in,out] Structure describing the properties of a diagnostics test suite ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDiagnosticsGetProperties", uintptr(hDiagnostics), uintptr(unsafe.Pointer(pProperties))) } // ZesDiagnosticsGetTests Get individual tests that can be run separately. Not all test suites -/// permit running individual tests, check the `haveTests` member of -/// ::zes_diag_properties_t. -/// -/// @details -/// - The list of available tests is returned in order of increasing test -/// index (see the `index` member of ::zes_diag_test_t). -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDiagnostics` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / permit running individual tests, check the `haveTests` member of +// / ::zes_diag_properties_t. +// / +// / @details +// / - The list of available tests is returned in order of increasing test +// / index (see the `index` member of ::zes_diag_test_t). +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDiagnostics` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDiagnosticsGetTests( - hDiagnostics ZesDiagHandle, // hDiagnostics [in] Handle for the component. - pCount *uint32, // pCount [in,out] pointer to the number of tests. if count is zero, then the driver shall update the value with the total number of tests that are available. if count is greater than the number of tests that are available, then the driver shall update the value with the correct number of tests. - pTests *ZesDiagTest, // pTests [in,out][optional][range(0, *pCount)] array of information about individual tests sorted by increasing value of the `index` member of ::zes_diag_test_t. if count is less than the number of tests that are available, then the driver shall only retrieve that number of tests. + hDiagnostics ZesDiagHandle, // hDiagnostics [in] Handle for the component. + pCount *uint32, // pCount [in,out] pointer to the number of tests. if count is zero, then the driver shall update the value with the total number of tests that are available. if count is greater than the number of tests that are available, then the driver shall update the value with the correct number of tests. + pTests *ZesDiagTest, // pTests [in,out][optional][range(0, *pCount)] array of information about individual tests sorted by increasing value of the `index` member of ::zes_diag_test_t. if count is less than the number of tests that are available, then the driver shall only retrieve that number of tests. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDiagnosticsGetTests", uintptr(hDiagnostics), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pTests))) } // ZesDiagnosticsRunTests Run a diagnostics test suite, either all tests or a subset of tests. -/// -/// @details -/// - WARNING: Running diagnostics may destroy current device state -/// information. Gracefully close any running workloads before initiating. -/// - To run all tests in a test suite, set start = -/// ::ZES_DIAG_FIRST_TEST_INDEX and end = ::ZES_DIAG_LAST_TEST_INDEX. -/// - If the test suite permits running individual tests, the `haveTests` -/// member of ::zes_diag_properties_t will be true. In this case, the -/// function ::zesDiagnosticsGetTests() can be called to get the list of -/// tests and corresponding indices that can be supplied to the arguments -/// start and end in this function. -/// - This function will block until the diagnostics have completed and -/// force reset based on result -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDiagnostics` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pResult` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to perform diagnostics. +// / +// / @details +// / - WARNING: Running diagnostics may destroy current device state +// / information. Gracefully close any running workloads before initiating. +// / - To run all tests in a test suite, set start = +// / ::ZES_DIAG_FIRST_TEST_INDEX and end = ::ZES_DIAG_LAST_TEST_INDEX. +// / - If the test suite permits running individual tests, the `haveTests` +// / member of ::zes_diag_properties_t will be true. In this case, the +// / function ::zesDiagnosticsGetTests() can be called to get the list of +// / tests and corresponding indices that can be supplied to the arguments +// / start and end in this function. +// / - This function will block until the diagnostics have completed and +// / force reset based on result +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDiagnostics` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pResult` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to perform diagnostics. func ZesDiagnosticsRunTests( - hDiagnostics ZesDiagHandle, // hDiagnostics [in] Handle for the component. - startIndex uint32, // startIndex [in] The index of the first test to run. Set to ::ZES_DIAG_FIRST_TEST_INDEX to start from the beginning. - endIndex uint32, // endIndex [in] The index of the last test to run. Set to ::ZES_DIAG_LAST_TEST_INDEX to complete all tests after the start test. - pResult *ZesDiagResult, // pResult [in,out] The result of the diagnostics + hDiagnostics ZesDiagHandle, // hDiagnostics [in] Handle for the component. + startIndex uint32, // startIndex [in] The index of the first test to run. Set to ::ZES_DIAG_FIRST_TEST_INDEX to start from the beginning. + endIndex uint32, // endIndex [in] The index of the last test to run. Set to ::ZES_DIAG_LAST_TEST_INDEX to complete all tests after the start test. + pResult *ZesDiagResult, // pResult [in,out] The result of the diagnostics ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDiagnosticsRunTests", uintptr(hDiagnostics), uintptr(startIndex), uintptr(endIndex), uintptr(unsafe.Pointer(pResult))) } - diff --git a/sysm_driver.go b/sysm_driver.go index 5951bbc..031f738 100644 --- a/sysm_driver.go +++ b/sysm_driver.go @@ -21,84 +21,85 @@ import ( // ZesInitFlags (zes_init_flags_t) Supported sysman initialization flags type ZesInitFlags uint32 + const ( - ZES_INIT_FLAG_PLACEHOLDER ZesInitFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_INIT_FLAG_PLACEHOLDER placeholder for future use - ZES_INIT_FLAG_FORCE_UINT32 ZesInitFlags = 0x7fffffff // ZES_INIT_FLAG_FORCE_UINT32 Value marking end of ZES_INIT_FLAG_* ENUMs + ZES_INIT_FLAG_PLACEHOLDER ZesInitFlags = /* ZE_BIT(0) */ (1 << 0) // ZES_INIT_FLAG_PLACEHOLDER placeholder for future use + ZES_INIT_FLAG_FORCE_UINT32 ZesInitFlags = 0x7fffffff // ZES_INIT_FLAG_FORCE_UINT32 Value marking end of ZES_INIT_FLAG_* ENUMs ) // ZesInit Initialize 'oneAPI' System Resource Management (sysman) -/// -/// @details -/// - The application must call this function or ::zeInit with the -/// `ZES_ENABLE_SYSMAN` environment variable set before calling any other -/// sysman function. -/// - If this function is not called then all other sysman functions will -/// return ::ZE_RESULT_ERROR_UNINITIALIZED. -/// - This function will only initialize sysman. To initialize other -/// functions, call ::zeInit. -/// - There is no requirement to call this function before or after -/// ::zeInit. -/// - Only one instance of sysman will be initialized per process. -/// - The application must call this function after forking new processes. -/// Each forked process must call this function. -/// - 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 sysman simultaneously. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x1 < flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / +// / @details +// / - The application must call this function or ::zeInit with the +// / `ZES_ENABLE_SYSMAN` environment variable set before calling any other +// / sysman function. +// / - If this function is not called then all other sysman functions will +// / return ::ZE_RESULT_ERROR_UNINITIALIZED. +// / - This function will only initialize sysman. To initialize other +// / functions, call ::zeInit. +// / - There is no requirement to call this function before or after +// / ::zeInit. +// / - Only one instance of sysman will be initialized per process. +// / - The application must call this function after forking new processes. +// / Each forked process must call this function. +// / - 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 sysman simultaneously. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x1 < flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY func ZesInit( - flags ZesInitFlags, // flags [in] initialization flags. currently unused, must be 0 (default). + flags ZesInitFlags, // flags [in] initialization flags. currently unused, must be 0 (default). ) (ZeResult, error) { return zecall.Call[ZeResult]("zesInit", uintptr(flags)) } // ZesDriverGet Retrieves sysman driver instances -/// -/// @details -/// - A sysman driver represents a collection of physical devices. -/// - Multiple calls to this function will return identical sysman driver -/// handles, in the same order. -/// - The application may pass nullptr for pDrivers when only querying the -/// number of sysman drivers. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - A sysman driver represents a collection of physical devices. +// / - Multiple calls to this function will return identical sysman driver +// / handles, in the same order. +// / - The application may pass nullptr for pDrivers when only querying the +// / number of sysman drivers. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDriverGet( - pCount *uint32, // pCount [in,out] pointer to the number of sysman driver instances. if count is zero, then the loader shall update the value with the total number of sysman drivers available. if count is greater than the number of sysman drivers available, then the loader shall update the value with the correct number of sysman drivers available. - phDrivers *ZesDriverHandle, // phDrivers [in,out][optional][range(0, *pCount)] array of sysman driver instance handles. if count is less than the number of sysman drivers available, then the loader shall only retrieve that number of sysman drivers. + pCount *uint32, // pCount [in,out] pointer to the number of sysman driver instances. if count is zero, then the loader shall update the value with the total number of sysman drivers available. if count is greater than the number of sysman drivers available, then the loader shall update the value with the correct number of sysman drivers available. + phDrivers *ZesDriverHandle, // phDrivers [in,out][optional][range(0, *pCount)] array of sysman driver instance handles. if count is less than the number of sysman drivers available, then the loader shall only retrieve that number of sysman drivers. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDriverGet", uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phDrivers))) } @@ -108,74 +109,73 @@ const ZES_MAX_EXTENSION_NAME = 256 // ZesDriverExtensionProperties (zes_driver_extension_properties_t) Extension properties queried using ::zesDriverGetExtensionProperties type ZesDriverExtensionProperties struct { - Name [ZES_MAX_EXTENSION_NAME]byte // Name [out] extension name - Version uint32 // Version [out] extension version using ::ZE_MAKE_VERSION + Name [ZES_MAX_EXTENSION_NAME]byte // Name [out] extension name + Version uint32 // Version [out] extension version using ::ZE_MAKE_VERSION } // ZesDriverGetExtensionProperties Retrieves extension properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDriverGetExtensionProperties( - hDriver ZesDriverHandle, // hDriver [in] handle of the driver instance - pCount *uint32, // pCount [in,out] pointer to the number of extension properties. if count is zero, then the driver shall update the value with the total number of extension properties available. if count is greater than the number of extension properties available, then the driver shall update the value with the correct number of extension properties available. - pExtensionProperties *ZesDriverExtensionProperties, // pExtensionProperties [in,out][optional][range(0, *pCount)] array of query results for extension properties. if count is less than the number of extension properties available, then driver shall only retrieve that number of extension properties. + hDriver ZesDriverHandle, // hDriver [in] handle of the driver instance + pCount *uint32, // pCount [in,out] pointer to the number of extension properties. if count is zero, then the driver shall update the value with the total number of extension properties available. if count is greater than the number of extension properties available, then the driver shall update the value with the correct number of extension properties available. + pExtensionProperties *ZesDriverExtensionProperties, // pExtensionProperties [in,out][optional][range(0, *pCount)] array of query results for extension properties. if count is less than the number of extension properties available, then driver shall only retrieve that number of extension properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDriverGetExtensionProperties", uintptr(hDriver), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pExtensionProperties))) } // ZesDriverGetExtensionFunctionAddress Retrieves function pointer for vendor-specific or experimental -/// extensions -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == name` -/// + `nullptr == ppFunctionAddress` +// / extensions +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == name` +// / + `nullptr == ppFunctionAddress` func ZesDriverGetExtensionFunctionAddress( - hDriver ZesDriverHandle, // hDriver [in] handle of the driver instance - name *byte, // name [in] extension function name - ppFunctionAddress *unsafe.Pointer, // ppFunctionAddress [out] pointer to function pointer + hDriver ZesDriverHandle, // hDriver [in] handle of the driver instance + name *byte, // name [in] extension function name + ppFunctionAddress *unsafe.Pointer, // ppFunctionAddress [out] pointer to function pointer ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDriverGetExtensionFunctionAddress", uintptr(hDriver), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(ppFunctionAddress))) } - diff --git a/sysm_ecc.go b/sysm_ecc.go index 0ec0cc6..0093240 100644 --- a/sysm_ecc.go +++ b/sysm_ecc.go @@ -21,173 +21,174 @@ import ( // ZesDeviceEccState (zes_device_ecc_state_t) ECC State type ZesDeviceEccState uintptr + const ( - ZES_DEVICE_ECC_STATE_UNAVAILABLE ZesDeviceEccState = 0 // ZES_DEVICE_ECC_STATE_UNAVAILABLE None - ZES_DEVICE_ECC_STATE_ENABLED ZesDeviceEccState = 1 // ZES_DEVICE_ECC_STATE_ENABLED ECC enabled. - ZES_DEVICE_ECC_STATE_DISABLED ZesDeviceEccState = 2 // ZES_DEVICE_ECC_STATE_DISABLED ECC disabled. - ZES_DEVICE_ECC_STATE_FORCE_UINT32 ZesDeviceEccState = 0x7fffffff // ZES_DEVICE_ECC_STATE_FORCE_UINT32 Value marking end of ZES_DEVICE_ECC_STATE_* ENUMs + ZES_DEVICE_ECC_STATE_UNAVAILABLE ZesDeviceEccState = 0 // ZES_DEVICE_ECC_STATE_UNAVAILABLE None + ZES_DEVICE_ECC_STATE_ENABLED ZesDeviceEccState = 1 // ZES_DEVICE_ECC_STATE_ENABLED ECC enabled. + ZES_DEVICE_ECC_STATE_DISABLED ZesDeviceEccState = 2 // ZES_DEVICE_ECC_STATE_DISABLED ECC disabled. + ZES_DEVICE_ECC_STATE_FORCE_UINT32 ZesDeviceEccState = 0x7fffffff // ZES_DEVICE_ECC_STATE_FORCE_UINT32 Value marking end of ZES_DEVICE_ECC_STATE_* ENUMs ) // ZesDeviceAction (zes_device_action_t) State Change Requirements type ZesDeviceAction uintptr + const ( - ZES_DEVICE_ACTION_NONE ZesDeviceAction = 0 // ZES_DEVICE_ACTION_NONE No action. - ZES_DEVICE_ACTION_WARM_CARD_RESET ZesDeviceAction = 1 // ZES_DEVICE_ACTION_WARM_CARD_RESET Warm reset of the card. - ZES_DEVICE_ACTION_COLD_CARD_RESET ZesDeviceAction = 2 // ZES_DEVICE_ACTION_COLD_CARD_RESET Cold reset of the card. - ZES_DEVICE_ACTION_COLD_SYSTEM_REBOOT ZesDeviceAction = 3 // ZES_DEVICE_ACTION_COLD_SYSTEM_REBOOT Cold reboot of the system. - ZES_DEVICE_ACTION_FORCE_UINT32 ZesDeviceAction = 0x7fffffff // ZES_DEVICE_ACTION_FORCE_UINT32 Value marking end of ZES_DEVICE_ACTION_* ENUMs + ZES_DEVICE_ACTION_NONE ZesDeviceAction = 0 // ZES_DEVICE_ACTION_NONE No action. + ZES_DEVICE_ACTION_WARM_CARD_RESET ZesDeviceAction = 1 // ZES_DEVICE_ACTION_WARM_CARD_RESET Warm reset of the card. + ZES_DEVICE_ACTION_COLD_CARD_RESET ZesDeviceAction = 2 // ZES_DEVICE_ACTION_COLD_CARD_RESET Cold reset of the card. + ZES_DEVICE_ACTION_COLD_SYSTEM_REBOOT ZesDeviceAction = 3 // ZES_DEVICE_ACTION_COLD_SYSTEM_REBOOT Cold reboot of the system. + ZES_DEVICE_ACTION_FORCE_UINT32 ZesDeviceAction = 0x7fffffff // ZES_DEVICE_ACTION_FORCE_UINT32 Value marking end of ZES_DEVICE_ACTION_* ENUMs ) // ZesDeviceEccDesc (zes_device_ecc_desc_t) ECC State Descriptor type ZesDeviceEccDesc struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - State ZesDeviceEccState // State [out] ECC state + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + State ZesDeviceEccState // State [out] ECC state } // ZesDeviceEccProperties (zes_device_ecc_properties_t) ECC State type ZesDeviceEccProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Currentstate ZesDeviceEccState // Currentstate [out] Current ECC state - Pendingstate ZesDeviceEccState // Pendingstate [out] Pending ECC state - Pendingaction ZesDeviceAction // Pendingaction [out] Pending action + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Currentstate ZesDeviceEccState // Currentstate [out] Current ECC state + Pendingstate ZesDeviceEccState // Pendingstate [out] Pending ECC state + Pendingaction ZesDeviceAction // Pendingaction [out] Pending action } // ZesDeviceEccAvailable Is ECC functionality available - true or false? -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pAvailable` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pAvailable` func ZesDeviceEccAvailable( - hDevice ZesDeviceHandle, // hDevice [in] Handle for the component. - pAvailable *ZeBool, // pAvailable [out] ECC functionality is available (true)/unavailable (false). + hDevice ZesDeviceHandle, // hDevice [in] Handle for the component. + pAvailable *ZeBool, // pAvailable [out] ECC functionality is available (true)/unavailable (false). ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEccAvailable", uintptr(hDevice), uintptr(unsafe.Pointer(pAvailable))) } // ZesDeviceEccConfigurable Is ECC support configurable - true or false? -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pConfigurable` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pConfigurable` func ZesDeviceEccConfigurable( - hDevice ZesDeviceHandle, // hDevice [in] Handle for the component. - pConfigurable *ZeBool, // pConfigurable [out] ECC can be enabled/disabled (true)/enabled/disabled (false). + hDevice ZesDeviceHandle, // hDevice [in] Handle for the component. + pConfigurable *ZeBool, // pConfigurable [out] ECC can be enabled/disabled (true)/enabled/disabled (false). ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEccConfigurable", uintptr(hDevice), uintptr(unsafe.Pointer(pConfigurable))) } // ZesDeviceGetEccState Get current ECC state, pending state, and pending action -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pState` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pState` func ZesDeviceGetEccState( - hDevice ZesDeviceHandle, // hDevice [in] Handle for the component. - pState *ZesDeviceEccProperties, // pState [out] ECC state, pending state, and pending action for state change. + hDevice ZesDeviceHandle, // hDevice [in] Handle for the component. + pState *ZesDeviceEccProperties, // pState [out] ECC state, pending state, and pending action for state change. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceGetEccState", uintptr(hDevice), uintptr(unsafe.Pointer(pState))) } // ZesDeviceSetEccState Set new ECC state -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - ::zesDeviceGetState should be called to determine pending action -/// required to implement state change. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == newState` -/// + `nullptr == pState` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZES_DEVICE_ECC_STATE_DISABLED < newState->state` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_WARNING_ACTION_REQUIRED -/// + User must look at the pendingAction attribute of pState & perform the action required to complete the ECC state change. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - ::zesDeviceGetState should be called to determine pending action +// / required to implement state change. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == newState` +// / + `nullptr == pState` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZES_DEVICE_ECC_STATE_DISABLED < newState->state` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_WARNING_ACTION_REQUIRED +// / + User must look at the pendingAction attribute of pState & perform the action required to complete the ECC state change. func ZesDeviceSetEccState( - hDevice ZesDeviceHandle, // hDevice [in] Handle for the component. - newState *ZesDeviceEccDesc, // newState [in] Pointer to desired ECC state. - pState *ZesDeviceEccProperties, // pState [out] ECC state, pending state, and pending action for state change. + hDevice ZesDeviceHandle, // hDevice [in] Handle for the component. + newState *ZesDeviceEccDesc, // newState [in] Pointer to desired ECC state. + pState *ZesDeviceEccProperties, // pState [out] ECC state, pending state, and pending action for state change. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceSetEccState", uintptr(hDevice), uintptr(unsafe.Pointer(newState)), uintptr(unsafe.Pointer(pState))) } - diff --git a/sysm_eccState.go b/sysm_eccState.go index 34c7ce0..d6ed212 100644 --- a/sysm_eccState.go +++ b/sysm_eccState.go @@ -22,19 +22,19 @@ const ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_NAME = "ZES_extension_device_ecc_def // ZesDeviceEccDefaultPropertiesExtVersion (zes_device_ecc_default_properties_ext_version_t) Device ECC default properties Extension Version(s) type ZesDeviceEccDefaultPropertiesExtVersion uintptr + const ( - ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_1_0 ZesDeviceEccDefaultPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_1_0 version 1.0 - ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_CURRENT ZesDeviceEccDefaultPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_CURRENT latest known version - ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZesDeviceEccDefaultPropertiesExtVersion = 0x7fffffff // ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_* ENUMs + ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_1_0 ZesDeviceEccDefaultPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_1_0 version 1.0 + ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_CURRENT ZesDeviceEccDefaultPropertiesExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_CURRENT latest known version + ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_FORCE_UINT32 ZesDeviceEccDefaultPropertiesExtVersion = 0x7fffffff // ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_FORCE_UINT32 Value marking end of ZES_DEVICE_ECC_DEFAULT_PROPERTIES_EXT_VERSION_* ENUMs ) // ZesDeviceEccDefaultPropertiesExt (zes_device_ecc_default_properties_ext_t) This structure may be passed to ::zesDeviceGetEccState as pNext member -/// of ::zes_device_ecc_properties_t. +// / of ::zes_device_ecc_properties_t. type ZesDeviceEccDefaultPropertiesExt struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Defaultstate ZesDeviceEccState // Defaultstate [out] Default ECC state + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Defaultstate ZesDeviceEccState // Defaultstate [out] Default ECC state } - diff --git a/sysm_engine.go b/sysm_engine.go index 1369f1e..9640c45 100644 --- a/sysm_engine.go +++ b/sysm_engine.go @@ -21,22 +21,23 @@ import ( // ZesEngineGroup (zes_engine_group_t) Accelerator engine groups type ZesEngineGroup uintptr + const ( - ZES_ENGINE_GROUP_ALL ZesEngineGroup = 0 // ZES_ENGINE_GROUP_ALL Access information about all engines combined. - ZES_ENGINE_GROUP_COMPUTE_ALL ZesEngineGroup = 1 // ZES_ENGINE_GROUP_COMPUTE_ALL Access information about all compute engines combined. Compute engines + ZES_ENGINE_GROUP_ALL ZesEngineGroup = 0 // ZES_ENGINE_GROUP_ALL Access information about all engines combined. + ZES_ENGINE_GROUP_COMPUTE_ALL ZesEngineGroup = 1 // ZES_ENGINE_GROUP_COMPUTE_ALL Access information about all compute engines combined. Compute engines ///< can only process compute kernels (no 3D content). - ZES_ENGINE_GROUP_MEDIA_ALL ZesEngineGroup = 2 // ZES_ENGINE_GROUP_MEDIA_ALL Access information about all media engines combined. - ZES_ENGINE_GROUP_COPY_ALL ZesEngineGroup = 3 // ZES_ENGINE_GROUP_COPY_ALL Access information about all copy (blitter) engines combined. - ZES_ENGINE_GROUP_COMPUTE_SINGLE ZesEngineGroup = 4 // ZES_ENGINE_GROUP_COMPUTE_SINGLE Access information about a single compute engine - this is an engine + ZES_ENGINE_GROUP_MEDIA_ALL ZesEngineGroup = 2 // ZES_ENGINE_GROUP_MEDIA_ALL Access information about all media engines combined. + ZES_ENGINE_GROUP_COPY_ALL ZesEngineGroup = 3 // ZES_ENGINE_GROUP_COPY_ALL Access information about all copy (blitter) engines combined. + ZES_ENGINE_GROUP_COMPUTE_SINGLE ZesEngineGroup = 4 // ZES_ENGINE_GROUP_COMPUTE_SINGLE Access information about a single compute engine - this is an engine ///< that can process compute kernels. Note that single engines may share ///< the same underlying accelerator resources as other engines so activity ///< of such an engine may not be indicative of the underlying resource ///< utilization - use ::ZES_ENGINE_GROUP_3D_RENDER_COMPUTE_ALL for that. - ZES_ENGINE_GROUP_RENDER_SINGLE ZesEngineGroup = 5 // ZES_ENGINE_GROUP_RENDER_SINGLE Access information about a single render engine - this is an engine + ZES_ENGINE_GROUP_RENDER_SINGLE ZesEngineGroup = 5 // ZES_ENGINE_GROUP_RENDER_SINGLE Access information about a single render engine - this is an engine ///< that can process both 3D content and compute kernels. Note that single ///< engines may share the same underlying accelerator resources as other @@ -44,168 +45,167 @@ const ( ///< underlying resource utilization - use ///< ::ZES_ENGINE_GROUP_3D_RENDER_COMPUTE_ALL for that. - ZES_ENGINE_GROUP_MEDIA_DECODE_SINGLE ZesEngineGroup = 6 // ZES_ENGINE_GROUP_MEDIA_DECODE_SINGLE [DEPRECATED] No longer supported. - ZES_ENGINE_GROUP_MEDIA_ENCODE_SINGLE ZesEngineGroup = 7 // ZES_ENGINE_GROUP_MEDIA_ENCODE_SINGLE [DEPRECATED] No longer supported. - ZES_ENGINE_GROUP_COPY_SINGLE ZesEngineGroup = 8 // ZES_ENGINE_GROUP_COPY_SINGLE Access information about a single media encode engine. Note that + ZES_ENGINE_GROUP_MEDIA_DECODE_SINGLE ZesEngineGroup = 6 // ZES_ENGINE_GROUP_MEDIA_DECODE_SINGLE [DEPRECATED] No longer supported. + ZES_ENGINE_GROUP_MEDIA_ENCODE_SINGLE ZesEngineGroup = 7 // ZES_ENGINE_GROUP_MEDIA_ENCODE_SINGLE [DEPRECATED] No longer supported. + ZES_ENGINE_GROUP_COPY_SINGLE ZesEngineGroup = 8 // ZES_ENGINE_GROUP_COPY_SINGLE Access information about a single media encode engine. Note that ///< single engines may share the same underlying accelerator resources as ///< other engines so activity of such an engine may not be indicative of ///< the underlying resource utilization - use ::ZES_ENGINE_GROUP_COPY_ALL ///< for that. - ZES_ENGINE_GROUP_MEDIA_ENHANCEMENT_SINGLE ZesEngineGroup = 9 // ZES_ENGINE_GROUP_MEDIA_ENHANCEMENT_SINGLE Access information about a single media enhancement engine. Note that + ZES_ENGINE_GROUP_MEDIA_ENHANCEMENT_SINGLE ZesEngineGroup = 9 // ZES_ENGINE_GROUP_MEDIA_ENHANCEMENT_SINGLE Access information about a single media enhancement engine. Note that ///< single engines may share the same underlying accelerator resources as ///< other engines so activity of such an engine may not be indicative of ///< the underlying resource utilization - use ::ZES_ENGINE_GROUP_MEDIA_ALL ///< for that. - ZES_ENGINE_GROUP_3D_SINGLE ZesEngineGroup = 10 // ZES_ENGINE_GROUP_3D_SINGLE [DEPRECATED] No longer supported. - ZES_ENGINE_GROUP_3D_RENDER_COMPUTE_ALL ZesEngineGroup = 11 // ZES_ENGINE_GROUP_3D_RENDER_COMPUTE_ALL [DEPRECATED] No longer supported. - ZES_ENGINE_GROUP_RENDER_ALL ZesEngineGroup = 12 // ZES_ENGINE_GROUP_RENDER_ALL Access information about all render engines combined. Render engines + ZES_ENGINE_GROUP_3D_SINGLE ZesEngineGroup = 10 // ZES_ENGINE_GROUP_3D_SINGLE [DEPRECATED] No longer supported. + ZES_ENGINE_GROUP_3D_RENDER_COMPUTE_ALL ZesEngineGroup = 11 // ZES_ENGINE_GROUP_3D_RENDER_COMPUTE_ALL [DEPRECATED] No longer supported. + ZES_ENGINE_GROUP_RENDER_ALL ZesEngineGroup = 12 // ZES_ENGINE_GROUP_RENDER_ALL Access information about all render engines combined. Render engines ///< are those than process both 3D content and compute kernels. - ZES_ENGINE_GROUP_3D_ALL ZesEngineGroup = 13 // ZES_ENGINE_GROUP_3D_ALL [DEPRECATED] No longer supported. - ZES_ENGINE_GROUP_MEDIA_CODEC_SINGLE ZesEngineGroup = 14 // ZES_ENGINE_GROUP_MEDIA_CODEC_SINGLE Access information about a single media engine. Note that single + ZES_ENGINE_GROUP_3D_ALL ZesEngineGroup = 13 // ZES_ENGINE_GROUP_3D_ALL [DEPRECATED] No longer supported. + ZES_ENGINE_GROUP_MEDIA_CODEC_SINGLE ZesEngineGroup = 14 // ZES_ENGINE_GROUP_MEDIA_CODEC_SINGLE Access information about a single media engine. Note that single ///< engines may share the same underlying accelerator resources as other ///< engines so activity of such an engine may not be indicative of the ///< underlying resource utilization - use ::ZES_ENGINE_GROUP_MEDIA_ALL for ///< that. - ZES_ENGINE_GROUP_FORCE_UINT32 ZesEngineGroup = 0x7fffffff // ZES_ENGINE_GROUP_FORCE_UINT32 Value marking end of ZES_ENGINE_GROUP_* ENUMs + ZES_ENGINE_GROUP_FORCE_UINT32 ZesEngineGroup = 0x7fffffff // ZES_ENGINE_GROUP_FORCE_UINT32 Value marking end of ZES_ENGINE_GROUP_* ENUMs ) // ZesEngineProperties (zes_engine_properties_t) Engine group properties type ZesEngineProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZesEngineGroup // Type [out] The engine group - Onsubdevice ZeBool // Onsubdevice [out] True if this resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZesEngineGroup // Type [out] The engine group + Onsubdevice ZeBool // Onsubdevice [out] True if this resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device } // ZesEngineStats (zes_engine_stats_t) Engine activity counters -/// -/// @details -/// - Percent utilization is calculated by taking two snapshots (s1, s2) and -/// using the equation: %util = (s2.activeTime - s1.activeTime) / -/// (s2.timestamp - s1.timestamp) -/// - The `activeTime` time units are implementation-specific since the -/// value is only intended to be used for calculating utilization -/// percentage. -/// - The `timestamp` should only be used to calculate delta between -/// snapshots of this structure. -/// - The application should never take the delta of `timestamp` with the -/// timestamp from a different structure since they are not guaranteed to -/// have the same base. -/// - When taking the delta, the difference between `timestamp` samples -/// could be `0`, if the frequency of sampling the snapshots is higher -/// than the frequency of the timestamp update. -/// - The absolute value of `timestamp` is only valid during within the -/// application and may be different on the next execution. +// / +// / @details +// / - Percent utilization is calculated by taking two snapshots (s1, s2) and +// / using the equation: %util = (s2.activeTime - s1.activeTime) / +// / (s2.timestamp - s1.timestamp) +// / - The `activeTime` time units are implementation-specific since the +// / value is only intended to be used for calculating utilization +// / percentage. +// / - The `timestamp` should only be used to calculate delta between +// / snapshots of this structure. +// / - The application should never take the delta of `timestamp` with the +// / timestamp from a different structure since they are not guaranteed to +// / have the same base. +// / - When taking the delta, the difference between `timestamp` samples +// / could be `0`, if the frequency of sampling the snapshots is higher +// / than the frequency of the timestamp update. +// / - The absolute value of `timestamp` is only valid during within the +// / application and may be different on the next execution. type ZesEngineStats struct { - Activetime uint64 // Activetime [out] Monotonic counter where the resource is actively running workloads. - Timestamp uint64 // Timestamp [out] Monotonic counter when activeTime counter was sampled. + Activetime uint64 // Activetime [out] Monotonic counter where the resource is actively running workloads. + Timestamp uint64 // Timestamp [out] Monotonic counter when activeTime counter was sampled. } // ZesDeviceEnumEngineGroups Get handle of engine groups -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumEngineGroups( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phEngine *ZesEngineHandle, // phEngine [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phEngine *ZesEngineHandle, // phEngine [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumEngineGroups", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phEngine))) } // ZesEngineGetProperties Get engine group properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEngine` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEngine` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesEngineGetProperties( - hEngine ZesEngineHandle, // hEngine [in] Handle for the component. - pProperties *ZesEngineProperties, // pProperties [in,out] The properties for the specified engine group. + hEngine ZesEngineHandle, // hEngine [in] Handle for the component. + pProperties *ZesEngineProperties, // pProperties [in,out] The properties for the specified engine group. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesEngineGetProperties", uintptr(hEngine), uintptr(unsafe.Pointer(pProperties))) } // ZesEngineGetActivity Get the activity stats for an engine group. -/// -/// @details -/// - This function also returns the engine activity inside a Virtual -/// Machine (VM), in the presence of hardware virtualization (SRIOV) -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEngine` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pStats` +// / +// / @details +// / - This function also returns the engine activity inside a Virtual +// / Machine (VM), in the presence of hardware virtualization (SRIOV) +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEngine` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pStats` func ZesEngineGetActivity( - hEngine ZesEngineHandle, // hEngine [in] Handle for the component. - pStats *ZesEngineStats, // pStats [in,out] Will contain a snapshot of the engine group activity counters. + hEngine ZesEngineHandle, // hEngine [in] Handle for the component. + pStats *ZesEngineStats, // pStats [in,out] Will contain a snapshot of the engine group activity counters. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesEngineGetActivity", uintptr(hEngine), uintptr(unsafe.Pointer(pStats))) } - diff --git a/sysm_engineActivity.go b/sysm_engineActivity.go index 2ebffbb..b48591a 100644 --- a/sysm_engineActivity.go +++ b/sysm_engineActivity.go @@ -24,58 +24,58 @@ const ZES_ENGINE_ACTIVITY_EXT_NAME = "ZES_extension_engine_activity" // ZesEngineActivityExtVersion (zes_engine_activity_ext_version_t) Engine Activity Extension Version(s) type ZesEngineActivityExtVersion uintptr + const ( - ZES_ENGINE_ACTIVITY_EXT_VERSION_1_0 ZesEngineActivityExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_ENGINE_ACTIVITY_EXT_VERSION_1_0 version 1.0 - ZES_ENGINE_ACTIVITY_EXT_VERSION_CURRENT ZesEngineActivityExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_ENGINE_ACTIVITY_EXT_VERSION_CURRENT latest known version - ZES_ENGINE_ACTIVITY_EXT_VERSION_FORCE_UINT32 ZesEngineActivityExtVersion = 0x7fffffff // ZES_ENGINE_ACTIVITY_EXT_VERSION_FORCE_UINT32 Value marking end of ZES_ENGINE_ACTIVITY_EXT_VERSION_* ENUMs + ZES_ENGINE_ACTIVITY_EXT_VERSION_1_0 ZesEngineActivityExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_ENGINE_ACTIVITY_EXT_VERSION_1_0 version 1.0 + ZES_ENGINE_ACTIVITY_EXT_VERSION_CURRENT ZesEngineActivityExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_ENGINE_ACTIVITY_EXT_VERSION_CURRENT latest known version + ZES_ENGINE_ACTIVITY_EXT_VERSION_FORCE_UINT32 ZesEngineActivityExtVersion = 0x7fffffff // ZES_ENGINE_ACTIVITY_EXT_VERSION_FORCE_UINT32 Value marking end of ZES_ENGINE_ACTIVITY_EXT_VERSION_* ENUMs ) // ZesEngineExtProperties (zes_engine_ext_properties_t) Extension properties related to Engine Groups -/// -/// @details -/// - This structure may be passed to ::zesEngineGetProperties by having the -/// pNext member of ::zes_engine_properties_t point at this struct. -/// - Used for SRIOV per Virtual Function device utilization by -/// ::zes_engine_group_t +// / +// / @details +// / - This structure may be passed to ::zesEngineGetProperties by having the +// / pNext member of ::zes_engine_properties_t point at this struct. +// / - Used for SRIOV per Virtual Function device utilization by +// / ::zes_engine_group_t type ZesEngineExtProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Countofvirtualfunctioninstance uint32 // Countofvirtualfunctioninstance [out] Number of Virtual Function(VF) instances associated with engine to monitor the utilization of hardware across all Virtual Function from a Physical Function (PF) instance. These VF-by-VF views should provide engine group and individual engine level granularity. This count represents the number of VF instances that are actively using the resource represented by the engine handle. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Countofvirtualfunctioninstance uint32 // Countofvirtualfunctioninstance [out] Number of Virtual Function(VF) instances associated with engine to monitor the utilization of hardware across all Virtual Function from a Physical Function (PF) instance. These VF-by-VF views should provide engine group and individual engine level granularity. This count represents the number of VF instances that are actively using the resource represented by the engine handle. } // ZesEngineGetActivityExt Get activity stats for Physical Function (PF) and each Virtual -/// Function (VF) associated with engine group. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hEngine` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE - "Engine activity extension is not supported in the environment." +// / Function (VF) associated with engine group. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hEngine` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE - "Engine activity extension is not supported in the environment." func ZesEngineGetActivityExt( - hEngine ZesEngineHandle, // hEngine [in] Handle for the component. - pCount *uint32, // pCount [in,out] Pointer to the number of VF engine stats descriptors. - if count is zero, the driver shall update the value with the total number of engine stats available. - if count is greater than the total number of engine stats available, the driver shall update the value with the correct number of engine stats available. - The count returned is the sum of number of VF instances currently available and the PF instance. - pStats *ZesEngineStats, // pStats [in,out][optional][range(0, *pCount)] array of engine group activity counters. - if count is less than the total number of engine stats available, then driver shall only retrieve that number of stats. - the implementation shall populate the vector with engine stat for PF at index 0 of the vector followed by user provided pCount-1 number of VF engine stats. + hEngine ZesEngineHandle, // hEngine [in] Handle for the component. + pCount *uint32, // pCount [in,out] Pointer to the number of VF engine stats descriptors. - if count is zero, the driver shall update the value with the total number of engine stats available. - if count is greater than the total number of engine stats available, the driver shall update the value with the correct number of engine stats available. - The count returned is the sum of number of VF instances currently available and the PF instance. + pStats *ZesEngineStats, // pStats [in,out][optional][range(0, *pCount)] array of engine group activity counters. - if count is less than the total number of engine stats available, then driver shall only retrieve that number of stats. - the implementation shall populate the vector with engine stat for PF at index 0 of the vector followed by user provided pCount-1 number of VF engine stats. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesEngineGetActivityExt", uintptr(hEngine), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pStats))) } - diff --git a/sysm_events.go b/sysm_events.go index 0e20106..461ebe1 100644 --- a/sysm_events.go +++ b/sysm_events.go @@ -21,166 +21,166 @@ import ( // ZesEventTypeFlags (zes_event_type_flags_t) Event types type ZesEventTypeFlags uint32 + const ( - ZES_EVENT_TYPE_FLAG_DEVICE_DETACH ZesEventTypeFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_EVENT_TYPE_FLAG_DEVICE_DETACH Event is triggered when the device is no longer available (due to a + ZES_EVENT_TYPE_FLAG_DEVICE_DETACH ZesEventTypeFlags = /* ZE_BIT(0) */ (1 << 0) // ZES_EVENT_TYPE_FLAG_DEVICE_DETACH Event is triggered when the device is no longer available (due to a ///< reset or being disabled). - ZES_EVENT_TYPE_FLAG_DEVICE_ATTACH ZesEventTypeFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZES_EVENT_TYPE_FLAG_DEVICE_ATTACH Event is triggered after the device is available again. - ZES_EVENT_TYPE_FLAG_DEVICE_SLEEP_STATE_ENTER ZesEventTypeFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZES_EVENT_TYPE_FLAG_DEVICE_SLEEP_STATE_ENTER Event is triggered when the driver is about to put the device into a + ZES_EVENT_TYPE_FLAG_DEVICE_ATTACH ZesEventTypeFlags = /* ZE_BIT(1) */ (1 << 1) // ZES_EVENT_TYPE_FLAG_DEVICE_ATTACH Event is triggered after the device is available again. + ZES_EVENT_TYPE_FLAG_DEVICE_SLEEP_STATE_ENTER ZesEventTypeFlags = /* ZE_BIT(2) */ (1 << 2) // ZES_EVENT_TYPE_FLAG_DEVICE_SLEEP_STATE_ENTER Event is triggered when the driver is about to put the device into a ///< deep sleep state - ZES_EVENT_TYPE_FLAG_DEVICE_SLEEP_STATE_EXIT ZesEventTypeFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZES_EVENT_TYPE_FLAG_DEVICE_SLEEP_STATE_EXIT Event is triggered when the driver is waking the device up from a deep + ZES_EVENT_TYPE_FLAG_DEVICE_SLEEP_STATE_EXIT ZesEventTypeFlags = /* ZE_BIT(3) */ (1 << 3) // ZES_EVENT_TYPE_FLAG_DEVICE_SLEEP_STATE_EXIT Event is triggered when the driver is waking the device up from a deep ///< sleep state - ZES_EVENT_TYPE_FLAG_FREQ_THROTTLED ZesEventTypeFlags = /* ZE_BIT(4) */(( 1 << 4 )) // ZES_EVENT_TYPE_FLAG_FREQ_THROTTLED Event is triggered when the frequency starts being throttled - ZES_EVENT_TYPE_FLAG_ENERGY_THRESHOLD_CROSSED ZesEventTypeFlags = /* ZE_BIT(5) */(( 1 << 5 )) // ZES_EVENT_TYPE_FLAG_ENERGY_THRESHOLD_CROSSED Event is triggered when the energy consumption threshold is reached + ZES_EVENT_TYPE_FLAG_FREQ_THROTTLED ZesEventTypeFlags = /* ZE_BIT(4) */ (1 << 4) // ZES_EVENT_TYPE_FLAG_FREQ_THROTTLED Event is triggered when the frequency starts being throttled + ZES_EVENT_TYPE_FLAG_ENERGY_THRESHOLD_CROSSED ZesEventTypeFlags = /* ZE_BIT(5) */ (1 << 5) // ZES_EVENT_TYPE_FLAG_ENERGY_THRESHOLD_CROSSED Event is triggered when the energy consumption threshold is reached ///< (use ::zesPowerSetEnergyThreshold() to configure). - ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL ZesEventTypeFlags = /* ZE_BIT(6) */(( 1 << 6 )) // ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL Event is triggered when the critical temperature is reached (use + ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL ZesEventTypeFlags = /* ZE_BIT(6) */ (1 << 6) // ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL Event is triggered when the critical temperature is reached (use ///< ::zesTemperatureSetConfig() to configure - disabled by default). - ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 ZesEventTypeFlags = /* ZE_BIT(7) */(( 1 << 7 )) // ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 Event is triggered when the temperature crosses threshold 1 (use + ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 ZesEventTypeFlags = /* ZE_BIT(7) */ (1 << 7) // ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 Event is triggered when the temperature crosses threshold 1 (use ///< ::zesTemperatureSetConfig() to configure - disabled by default). - ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 ZesEventTypeFlags = /* ZE_BIT(8) */(( 1 << 8 )) // ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 Event is triggered when the temperature crosses threshold 2 (use + ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 ZesEventTypeFlags = /* ZE_BIT(8) */ (1 << 8) // ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 Event is triggered when the temperature crosses threshold 2 (use ///< ::zesTemperatureSetConfig() to configure - disabled by default). - ZES_EVENT_TYPE_FLAG_MEM_HEALTH ZesEventTypeFlags = /* ZE_BIT(9) */(( 1 << 9 )) // ZES_EVENT_TYPE_FLAG_MEM_HEALTH Event is triggered when the health of device memory changes. - ZES_EVENT_TYPE_FLAG_FABRIC_PORT_HEALTH ZesEventTypeFlags = /* ZE_BIT(10) */(( 1 << 10 )) // ZES_EVENT_TYPE_FLAG_FABRIC_PORT_HEALTH Event is triggered when the health of fabric ports change. - ZES_EVENT_TYPE_FLAG_PCI_LINK_HEALTH ZesEventTypeFlags = /* ZE_BIT(11) */(( 1 << 11 )) // ZES_EVENT_TYPE_FLAG_PCI_LINK_HEALTH Event is triggered when the health of the PCI link changes. - ZES_EVENT_TYPE_FLAG_RAS_CORRECTABLE_ERRORS ZesEventTypeFlags = /* ZE_BIT(12) */(( 1 << 12 )) // ZES_EVENT_TYPE_FLAG_RAS_CORRECTABLE_ERRORS Event is triggered when accelerator RAS correctable errors cross + ZES_EVENT_TYPE_FLAG_MEM_HEALTH ZesEventTypeFlags = /* ZE_BIT(9) */ (1 << 9) // ZES_EVENT_TYPE_FLAG_MEM_HEALTH Event is triggered when the health of device memory changes. + ZES_EVENT_TYPE_FLAG_FABRIC_PORT_HEALTH ZesEventTypeFlags = /* ZE_BIT(10) */ (1 << 10) // ZES_EVENT_TYPE_FLAG_FABRIC_PORT_HEALTH Event is triggered when the health of fabric ports change. + ZES_EVENT_TYPE_FLAG_PCI_LINK_HEALTH ZesEventTypeFlags = /* ZE_BIT(11) */ (1 << 11) // ZES_EVENT_TYPE_FLAG_PCI_LINK_HEALTH Event is triggered when the health of the PCI link changes. + ZES_EVENT_TYPE_FLAG_RAS_CORRECTABLE_ERRORS ZesEventTypeFlags = /* ZE_BIT(12) */ (1 << 12) // ZES_EVENT_TYPE_FLAG_RAS_CORRECTABLE_ERRORS Event is triggered when accelerator RAS correctable errors cross ///< thresholds (use ::zesRasSetConfig() to configure - disabled by ///< default). - ZES_EVENT_TYPE_FLAG_RAS_UNCORRECTABLE_ERRORS ZesEventTypeFlags = /* ZE_BIT(13) */(( 1 << 13 )) // ZES_EVENT_TYPE_FLAG_RAS_UNCORRECTABLE_ERRORS Event is triggered when accelerator RAS uncorrectable errors cross + ZES_EVENT_TYPE_FLAG_RAS_UNCORRECTABLE_ERRORS ZesEventTypeFlags = /* ZE_BIT(13) */ (1 << 13) // ZES_EVENT_TYPE_FLAG_RAS_UNCORRECTABLE_ERRORS Event is triggered when accelerator RAS uncorrectable errors cross ///< thresholds (use ::zesRasSetConfig() to configure - disabled by ///< default). - ZES_EVENT_TYPE_FLAG_DEVICE_RESET_REQUIRED ZesEventTypeFlags = /* ZE_BIT(14) */(( 1 << 14 )) // ZES_EVENT_TYPE_FLAG_DEVICE_RESET_REQUIRED Event is triggered when the device needs to be reset (use + ZES_EVENT_TYPE_FLAG_DEVICE_RESET_REQUIRED ZesEventTypeFlags = /* ZE_BIT(14) */ (1 << 14) // ZES_EVENT_TYPE_FLAG_DEVICE_RESET_REQUIRED Event is triggered when the device needs to be reset (use ///< ::zesDeviceGetState() to determine the reasons for the reset). - ZES_EVENT_TYPE_FLAG_SURVIVABILITY_MODE_DETECTED ZesEventTypeFlags = /* ZE_BIT(15) */(( 1 << 15 )) // ZES_EVENT_TYPE_FLAG_SURVIVABILITY_MODE_DETECTED Event is triggered when graphics driver encounter an error condition. - ZES_EVENT_TYPE_FLAG_FORCE_UINT32 ZesEventTypeFlags = 0x7fffffff // ZES_EVENT_TYPE_FLAG_FORCE_UINT32 Value marking end of ZES_EVENT_TYPE_FLAG_* ENUMs + ZES_EVENT_TYPE_FLAG_SURVIVABILITY_MODE_DETECTED ZesEventTypeFlags = /* ZE_BIT(15) */ (1 << 15) // ZES_EVENT_TYPE_FLAG_SURVIVABILITY_MODE_DETECTED Event is triggered when graphics driver encounter an error condition. + ZES_EVENT_TYPE_FLAG_FORCE_UINT32 ZesEventTypeFlags = 0x7fffffff // ZES_EVENT_TYPE_FLAG_FORCE_UINT32 Value marking end of ZES_EVENT_TYPE_FLAG_* ENUMs ) // ZesDeviceEventRegister Specify the list of events to listen to for a given device -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0xffff < events` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0xffff < events` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZesDeviceEventRegister( - hDevice ZesDeviceHandle, // hDevice [in] The device handle. - events ZesEventTypeFlags, // events [in] List of events to listen to. + hDevice ZesDeviceHandle, // hDevice [in] The device handle. + events ZesEventTypeFlags, // events [in] List of events to listen to. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEventRegister", uintptr(hDevice), uintptr(events)) } // ZesDriverEventListen Wait for events to be received from a one or more devices. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phDevices` -/// + `nullptr == pNumDeviceEvents` -/// + `nullptr == pEvents` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to listen to events. -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + One or more of the supplied device handles belongs to a different driver. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phDevices` +// / + `nullptr == pNumDeviceEvents` +// / + `nullptr == pEvents` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to listen to events. +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + One or more of the supplied device handles belongs to a different driver. func ZesDriverEventListen( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance - timeout uint32, // timeout [in] if non-zero, then indicates the maximum time (in milliseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then will check status and return immediately; if `UINT32_MAX`, then function will not return until events arrive. - count uint32, // count [in] Number of device handles in phDevices. - phDevices *ZesDeviceHandle, // phDevices [in][range(0, count)] Device handles to listen to for events. Only devices from the provided driver handle can be specified in this list. - pNumDeviceEvents *uint32, // pNumDeviceEvents [in,out] Will contain the actual number of devices in phDevices that generated events. If non-zero, check pEvents to determine the devices and events that were received. - pEvents *ZesEventTypeFlags, // pEvents [in,out] An array that will continue the list of events for each device listened in phDevices. This array must be at least as big as count. For every device handle in phDevices, this will provide the events that occurred for that device at the same position in this array. If no event was received for a given device, the corresponding array entry will be zero. + hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance + timeout uint32, // timeout [in] if non-zero, then indicates the maximum time (in milliseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then will check status and return immediately; if `UINT32_MAX`, then function will not return until events arrive. + count uint32, // count [in] Number of device handles in phDevices. + phDevices *ZesDeviceHandle, // phDevices [in][range(0, count)] Device handles to listen to for events. Only devices from the provided driver handle can be specified in this list. + pNumDeviceEvents *uint32, // pNumDeviceEvents [in,out] Will contain the actual number of devices in phDevices that generated events. If non-zero, check pEvents to determine the devices and events that were received. + pEvents *ZesEventTypeFlags, // pEvents [in,out] An array that will continue the list of events for each device listened in phDevices. This array must be at least as big as count. For every device handle in phDevices, this will provide the events that occurred for that device at the same position in this array. If no event was received for a given device, the corresponding array entry will be zero. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDriverEventListen", uintptr(hDriver), uintptr(timeout), uintptr(count), uintptr(unsafe.Pointer(phDevices)), uintptr(unsafe.Pointer(pNumDeviceEvents)), uintptr(unsafe.Pointer(pEvents))) } // ZesDriverEventListenEx Wait for events to be received from a one or more devices. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phDevices` -/// + `nullptr == pNumDeviceEvents` -/// + `nullptr == pEvents` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to listen to events. -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + One or more of the supplied device handles belongs to a different driver. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phDevices` +// / + `nullptr == pNumDeviceEvents` +// / + `nullptr == pEvents` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to listen to events. +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + One or more of the supplied device handles belongs to a different driver. func ZesDriverEventListenEx( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance - timeout uint64, // timeout [in] if non-zero, then indicates the maximum time (in milliseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then will check status and return immediately; if `UINT64_MAX`, then function will not return until events arrive. - count uint32, // count [in] Number of device handles in phDevices. - phDevices *ZesDeviceHandle, // phDevices [in][range(0, count)] Device handles to listen to for events. Only devices from the provided driver handle can be specified in this list. - pNumDeviceEvents *uint32, // pNumDeviceEvents [in,out] Will contain the actual number of devices in phDevices that generated events. If non-zero, check pEvents to determine the devices and events that were received. - pEvents *ZesEventTypeFlags, // pEvents [in,out] An array that will continue the list of events for each device listened in phDevices. This array must be at least as big as count. For every device handle in phDevices, this will provide the events that occurred for that device at the same position in this array. If no event was received for a given device, the corresponding array entry will be zero. + hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance + timeout uint64, // timeout [in] if non-zero, then indicates the maximum time (in milliseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then will check status and return immediately; if `UINT64_MAX`, then function will not return until events arrive. + count uint32, // count [in] Number of device handles in phDevices. + phDevices *ZesDeviceHandle, // phDevices [in][range(0, count)] Device handles to listen to for events. Only devices from the provided driver handle can be specified in this list. + pNumDeviceEvents *uint32, // pNumDeviceEvents [in,out] Will contain the actual number of devices in phDevices that generated events. If non-zero, check pEvents to determine the devices and events that were received. + pEvents *ZesEventTypeFlags, // pEvents [in,out] An array that will continue the list of events for each device listened in phDevices. This array must be at least as big as count. For every device handle in phDevices, this will provide the events that occurred for that device at the same position in this array. If no event was received for a given device, the corresponding array entry will be zero. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDriverEventListenEx", uintptr(hDriver), uintptr(timeout), uintptr(count), uintptr(unsafe.Pointer(phDevices)), uintptr(unsafe.Pointer(pNumDeviceEvents)), uintptr(unsafe.Pointer(pEvents))) } - diff --git a/sysm_fabric.go b/sysm_fabric.go index b5523fe..2a640f5 100644 --- a/sysm_fabric.go +++ b/sysm_fabric.go @@ -23,429 +23,431 @@ import ( const ZES_MAX_FABRIC_PORT_MODEL_SIZE = 256 // ZES_MAX_FABRIC_LINK_TYPE_SIZE Maximum size of the buffer that will return information about link -/// types +// / types const ZES_MAX_FABRIC_LINK_TYPE_SIZE = 256 // ZesFabricPortStatus (zes_fabric_port_status_t) Fabric port status type ZesFabricPortStatus uintptr + const ( - ZES_FABRIC_PORT_STATUS_UNKNOWN ZesFabricPortStatus = 0 // ZES_FABRIC_PORT_STATUS_UNKNOWN The port status cannot be determined - ZES_FABRIC_PORT_STATUS_HEALTHY ZesFabricPortStatus = 1 // ZES_FABRIC_PORT_STATUS_HEALTHY The port is up and operating as expected - ZES_FABRIC_PORT_STATUS_DEGRADED ZesFabricPortStatus = 2 // ZES_FABRIC_PORT_STATUS_DEGRADED The port is up but has quality and/or speed degradation - ZES_FABRIC_PORT_STATUS_FAILED ZesFabricPortStatus = 3 // ZES_FABRIC_PORT_STATUS_FAILED Port connection instabilities are preventing workloads making forward + ZES_FABRIC_PORT_STATUS_UNKNOWN ZesFabricPortStatus = 0 // ZES_FABRIC_PORT_STATUS_UNKNOWN The port status cannot be determined + ZES_FABRIC_PORT_STATUS_HEALTHY ZesFabricPortStatus = 1 // ZES_FABRIC_PORT_STATUS_HEALTHY The port is up and operating as expected + ZES_FABRIC_PORT_STATUS_DEGRADED ZesFabricPortStatus = 2 // ZES_FABRIC_PORT_STATUS_DEGRADED The port is up but has quality and/or speed degradation + ZES_FABRIC_PORT_STATUS_FAILED ZesFabricPortStatus = 3 // ZES_FABRIC_PORT_STATUS_FAILED Port connection instabilities are preventing workloads making forward ///< progress - ZES_FABRIC_PORT_STATUS_DISABLED ZesFabricPortStatus = 4 // ZES_FABRIC_PORT_STATUS_DISABLED The port is configured down - ZES_FABRIC_PORT_STATUS_FORCE_UINT32 ZesFabricPortStatus = 0x7fffffff // ZES_FABRIC_PORT_STATUS_FORCE_UINT32 Value marking end of ZES_FABRIC_PORT_STATUS_* ENUMs + ZES_FABRIC_PORT_STATUS_DISABLED ZesFabricPortStatus = 4 // ZES_FABRIC_PORT_STATUS_DISABLED The port is configured down + ZES_FABRIC_PORT_STATUS_FORCE_UINT32 ZesFabricPortStatus = 0x7fffffff // ZES_FABRIC_PORT_STATUS_FORCE_UINT32 Value marking end of ZES_FABRIC_PORT_STATUS_* ENUMs ) // ZesFabricPortQualIssueFlags (zes_fabric_port_qual_issue_flags_t) Fabric port quality degradation reasons type ZesFabricPortQualIssueFlags uint32 + const ( - ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_LINK_ERRORS ZesFabricPortQualIssueFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_LINK_ERRORS Excessive link errors are occurring - ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_SPEED ZesFabricPortQualIssueFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_SPEED There is a degradation in the bitrate and/or width of the link - ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_FORCE_UINT32 ZesFabricPortQualIssueFlags = 0x7fffffff // ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_FORCE_UINT32 Value marking end of ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_* ENUMs + ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_LINK_ERRORS ZesFabricPortQualIssueFlags = /* ZE_BIT(0) */ (1 << 0) // ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_LINK_ERRORS Excessive link errors are occurring + ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_SPEED ZesFabricPortQualIssueFlags = /* ZE_BIT(1) */ (1 << 1) // ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_SPEED There is a degradation in the bitrate and/or width of the link + ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_FORCE_UINT32 ZesFabricPortQualIssueFlags = 0x7fffffff // ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_FORCE_UINT32 Value marking end of ZES_FABRIC_PORT_QUAL_ISSUE_FLAG_* ENUMs ) // ZesFabricPortFailureFlags (zes_fabric_port_failure_flags_t) Fabric port failure reasons type ZesFabricPortFailureFlags uint32 + const ( - ZES_FABRIC_PORT_FAILURE_FLAG_FAILED ZesFabricPortFailureFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_FABRIC_PORT_FAILURE_FLAG_FAILED A previously operating link has failed. Hardware will automatically + ZES_FABRIC_PORT_FAILURE_FLAG_FAILED ZesFabricPortFailureFlags = /* ZE_BIT(0) */ (1 << 0) // ZES_FABRIC_PORT_FAILURE_FLAG_FAILED A previously operating link has failed. Hardware will automatically ///< retrain this port. This state will persist until either the physical ///< connection is removed or the link trains successfully. - ZES_FABRIC_PORT_FAILURE_FLAG_TRAINING_TIMEOUT ZesFabricPortFailureFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZES_FABRIC_PORT_FAILURE_FLAG_TRAINING_TIMEOUT A connection has not been established within an expected time. + ZES_FABRIC_PORT_FAILURE_FLAG_TRAINING_TIMEOUT ZesFabricPortFailureFlags = /* ZE_BIT(1) */ (1 << 1) // ZES_FABRIC_PORT_FAILURE_FLAG_TRAINING_TIMEOUT A connection has not been established within an expected time. ///< Hardware will continue to attempt port training. This status will ///< persist until either the physical connection is removed or the link ///< successfully trains. - ZES_FABRIC_PORT_FAILURE_FLAG_FLAPPING ZesFabricPortFailureFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZES_FABRIC_PORT_FAILURE_FLAG_FLAPPING Port has excessively trained and then transitioned down for some + ZES_FABRIC_PORT_FAILURE_FLAG_FLAPPING ZesFabricPortFailureFlags = /* ZE_BIT(2) */ (1 << 2) // ZES_FABRIC_PORT_FAILURE_FLAG_FLAPPING Port has excessively trained and then transitioned down for some ///< period of time. Driver will allow port to continue to train, but will ///< not enable the port for use until the port has been disabled and ///< subsequently re-enabled using ::zesFabricPortSetConfig(). - ZES_FABRIC_PORT_FAILURE_FLAG_FORCE_UINT32 ZesFabricPortFailureFlags = 0x7fffffff // ZES_FABRIC_PORT_FAILURE_FLAG_FORCE_UINT32 Value marking end of ZES_FABRIC_PORT_FAILURE_FLAG_* ENUMs + ZES_FABRIC_PORT_FAILURE_FLAG_FORCE_UINT32 ZesFabricPortFailureFlags = 0x7fffffff // ZES_FABRIC_PORT_FAILURE_FLAG_FORCE_UINT32 Value marking end of ZES_FABRIC_PORT_FAILURE_FLAG_* ENUMs ) // ZesFabricPortId (zes_fabric_port_id_t) Unique identifier for a fabric port -/// -/// @details -/// - This not a universal identifier. The identified is garanteed to be -/// unique for the current hardware configuration of the system. Changes -/// in the hardware may result in a different identifier for a given port. -/// - The main purpose of this identifier to build up an instantaneous -/// topology map of system connectivity. An application should enumerate -/// all fabric ports and match the `remotePortId` member of -/// ::zes_fabric_port_state_t to the `portId` member of -/// ::zes_fabric_port_properties_t. +// / +// / @details +// / - This not a universal identifier. The identified is garanteed to be +// / unique for the current hardware configuration of the system. Changes +// / in the hardware may result in a different identifier for a given port. +// / - The main purpose of this identifier to build up an instantaneous +// / topology map of system connectivity. An application should enumerate +// / all fabric ports and match the `remotePortId` member of +// / ::zes_fabric_port_state_t to the `portId` member of +// / ::zes_fabric_port_properties_t. type ZesFabricPortId struct { - Fabricid uint32 // Fabricid [out] Unique identifier for the fabric end-point - Attachid uint32 // Attachid [out] Unique identifier for the device attachment point - Portnumber uint8 // Portnumber [out] The logical port number (this is typically marked somewhere on the physical device) + Fabricid uint32 // Fabricid [out] Unique identifier for the fabric end-point + Attachid uint32 // Attachid [out] Unique identifier for the device attachment point + Portnumber uint8 // Portnumber [out] The logical port number (this is typically marked somewhere on the physical device) } // ZesFabricPortSpeed (zes_fabric_port_speed_t) Fabric port speed in one direction type ZesFabricPortSpeed struct { - Bitrate int64 // Bitrate [out] Bits/sec that the link is operating at. A value of -1 means that this property is unknown. - Width int32 // Width [out] The number of lanes. A value of -1 means that this property is unknown. + Bitrate int64 // Bitrate [out] Bits/sec that the link is operating at. A value of -1 means that this property is unknown. + Width int32 // Width [out] The number of lanes. A value of -1 means that this property is unknown. } // ZesFabricPortProperties (zes_fabric_port_properties_t) Fabric port properties type ZesFabricPortProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Model [ZES_MAX_FABRIC_PORT_MODEL_SIZE]byte // Model [out] Description of port technology. Will be set to the string "unkown" if this cannot be determined for this port. - Onsubdevice ZeBool // Onsubdevice [out] True if the port is located on a sub-device; false means that the port is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device - Portid ZesFabricPortId // Portid [out] The unique port identifier - Maxrxspeed ZesFabricPortSpeed // Maxrxspeed [out] Maximum speed supported by the receive side of the port (sum of all lanes) - Maxtxspeed ZesFabricPortSpeed // Maxtxspeed [out] Maximum speed supported by the transmit side of the port (sum of all lanes) + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Model [ZES_MAX_FABRIC_PORT_MODEL_SIZE]byte // Model [out] Description of port technology. Will be set to the string "unkown" if this cannot be determined for this port. + Onsubdevice ZeBool // Onsubdevice [out] True if the port is located on a sub-device; false means that the port is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Portid ZesFabricPortId // Portid [out] The unique port identifier + Maxrxspeed ZesFabricPortSpeed // Maxrxspeed [out] Maximum speed supported by the receive side of the port (sum of all lanes) + Maxtxspeed ZesFabricPortSpeed // Maxtxspeed [out] Maximum speed supported by the transmit side of the port (sum of all lanes) } // ZesFabricLinkType (zes_fabric_link_type_t) Provides information about the fabric link attached to a port type ZesFabricLinkType struct { - Desc [ZES_MAX_FABRIC_LINK_TYPE_SIZE]byte // Desc [out] Description of link technology. Will be set to the string "unkown" if this cannot be determined for this link. + Desc [ZES_MAX_FABRIC_LINK_TYPE_SIZE]byte // Desc [out] Description of link technology. Will be set to the string "unkown" if this cannot be determined for this link. } // ZesFabricPortConfig (zes_fabric_port_config_t) Fabric port configuration type ZesFabricPortConfig struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Enabled ZeBool // Enabled [in,out] Port is configured up/down - Beaconing ZeBool // Beaconing [in,out] Beaconing is configured on/off + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Enabled ZeBool // Enabled [in,out] Port is configured up/down + Beaconing ZeBool // Beaconing [in,out] Beaconing is configured on/off } // ZesFabricPortState (zes_fabric_port_state_t) Fabric port state type ZesFabricPortState struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Status ZesFabricPortStatus // Status [out] The current status of the port - Qualityissues ZesFabricPortQualIssueFlags // Qualityissues [out] If status is ::ZES_FABRIC_PORT_STATUS_DEGRADED, then this gives a combination of ::zes_fabric_port_qual_issue_flag_t for quality issues that have been detected; otherwise, 0 indicates there are no quality issues with the link at this time. - Failurereasons ZesFabricPortFailureFlags // Failurereasons [out] If status is ::ZES_FABRIC_PORT_STATUS_FAILED, then this gives a combination of ::zes_fabric_port_failure_flag_t for reasons for the connection instability; otherwise, 0 indicates there are no connection stability issues at this time. - Remoteportid ZesFabricPortId // Remoteportid [out] The unique port identifier for the remote connection point if status is ::ZES_FABRIC_PORT_STATUS_HEALTHY, ::ZES_FABRIC_PORT_STATUS_DEGRADED or ::ZES_FABRIC_PORT_STATUS_FAILED - Rxspeed ZesFabricPortSpeed // Rxspeed [out] Current maximum receive speed (sum of all lanes) - Txspeed ZesFabricPortSpeed // Txspeed [out] Current maximum transmit speed (sum of all lanes) + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Status ZesFabricPortStatus // Status [out] The current status of the port + Qualityissues ZesFabricPortQualIssueFlags // Qualityissues [out] If status is ::ZES_FABRIC_PORT_STATUS_DEGRADED, then this gives a combination of ::zes_fabric_port_qual_issue_flag_t for quality issues that have been detected; otherwise, 0 indicates there are no quality issues with the link at this time. + Failurereasons ZesFabricPortFailureFlags // Failurereasons [out] If status is ::ZES_FABRIC_PORT_STATUS_FAILED, then this gives a combination of ::zes_fabric_port_failure_flag_t for reasons for the connection instability; otherwise, 0 indicates there are no connection stability issues at this time. + Remoteportid ZesFabricPortId // Remoteportid [out] The unique port identifier for the remote connection point if status is ::ZES_FABRIC_PORT_STATUS_HEALTHY, ::ZES_FABRIC_PORT_STATUS_DEGRADED or ::ZES_FABRIC_PORT_STATUS_FAILED + Rxspeed ZesFabricPortSpeed // Rxspeed [out] Current maximum receive speed (sum of all lanes) + Txspeed ZesFabricPortSpeed // Txspeed [out] Current maximum transmit speed (sum of all lanes) } // ZesFabricPortThroughput (zes_fabric_port_throughput_t) Fabric port throughput. type ZesFabricPortThroughput struct { - Timestamp uint64 // Timestamp [out] Monotonic timestamp counter in microseconds when the measurement was made. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution. - Rxcounter uint64 // Rxcounter [out] Monotonic counter for the number of bytes received (sum of all lanes). This includes all protocol overhead, not only the GPU traffic. - Txcounter uint64 // Txcounter [out] Monotonic counter for the number of bytes transmitted (sum of all lanes). This includes all protocol overhead, not only the GPU traffic. + Timestamp uint64 // Timestamp [out] Monotonic timestamp counter in microseconds when the measurement was made. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution. + Rxcounter uint64 // Rxcounter [out] Monotonic counter for the number of bytes received (sum of all lanes). This includes all protocol overhead, not only the GPU traffic. + Txcounter uint64 // Txcounter [out] Monotonic counter for the number of bytes transmitted (sum of all lanes). This includes all protocol overhead, not only the GPU traffic. } // ZesFabricPortErrorCounters (zes_fabric_port_error_counters_t) Fabric Port Error Counters type ZesFabricPortErrorCounters struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Linkfailurecount uint64 // Linkfailurecount [out] Link Failure Error Count reported per port - Fwcommerrorcount uint64 // Fwcommerrorcount [out] Firmware Communication Error Count reported per device - Fwerrorcount uint64 // Fwerrorcount [out] Firmware reported Error Count reported per device - Linkdegradecount uint64 // Linkdegradecount [out] Link Degrade Error Count reported per port + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Linkfailurecount uint64 // Linkfailurecount [out] Link Failure Error Count reported per port + Fwcommerrorcount uint64 // Fwcommerrorcount [out] Firmware Communication Error Count reported per device + Fwerrorcount uint64 // Fwerrorcount [out] Firmware reported Error Count reported per device + Linkdegradecount uint64 // Linkdegradecount [out] Link Degrade Error Count reported per port } // ZesDeviceEnumFabricPorts Get handle of Fabric ports in a device -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumFabricPorts( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phPort *ZesFabricPortHandle, // phPort [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phPort *ZesFabricPortHandle, // phPort [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumFabricPorts", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phPort))) } // ZesFabricPortGetProperties Get Fabric port properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPort` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPort` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesFabricPortGetProperties( - hPort ZesFabricPortHandle, // hPort [in] Handle for the component. - pProperties *ZesFabricPortProperties, // pProperties [in,out] Will contain properties of the Fabric Port. + hPort ZesFabricPortHandle, // hPort [in] Handle for the component. + pProperties *ZesFabricPortProperties, // pProperties [in,out] Will contain properties of the Fabric Port. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFabricPortGetProperties", uintptr(hPort), uintptr(unsafe.Pointer(pProperties))) } // ZesFabricPortGetLinkType Get Fabric port link type -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPort` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pLinkType` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPort` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pLinkType` func ZesFabricPortGetLinkType( - hPort ZesFabricPortHandle, // hPort [in] Handle for the component. - pLinkType *ZesFabricLinkType, // pLinkType [in,out] Will contain details about the link attached to the Fabric port. + hPort ZesFabricPortHandle, // hPort [in] Handle for the component. + pLinkType *ZesFabricLinkType, // pLinkType [in,out] Will contain details about the link attached to the Fabric port. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFabricPortGetLinkType", uintptr(hPort), uintptr(unsafe.Pointer(pLinkType))) } // ZesFabricPortGetConfig Get Fabric port configuration -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPort` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pConfig` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPort` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pConfig` func ZesFabricPortGetConfig( - hPort ZesFabricPortHandle, // hPort [in] Handle for the component. - pConfig *ZesFabricPortConfig, // pConfig [in,out] Will contain configuration of the Fabric Port. + hPort ZesFabricPortHandle, // hPort [in] Handle for the component. + pConfig *ZesFabricPortConfig, // pConfig [in,out] Will contain configuration of the Fabric Port. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFabricPortGetConfig", uintptr(hPort), uintptr(unsafe.Pointer(pConfig))) } // ZesFabricPortSetConfig Set Fabric port configuration -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPort` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pConfig` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPort` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pConfig` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. func ZesFabricPortSetConfig( - hPort ZesFabricPortHandle, // hPort [in] Handle for the component. - pConfig *ZesFabricPortConfig, // pConfig [in] Contains new configuration of the Fabric Port. + hPort ZesFabricPortHandle, // hPort [in] Handle for the component. + pConfig *ZesFabricPortConfig, // pConfig [in] Contains new configuration of the Fabric Port. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFabricPortSetConfig", uintptr(hPort), uintptr(unsafe.Pointer(pConfig))) } // ZesFabricPortGetState Get Fabric port state - status (health/degraded/failed/disabled), -/// reasons for link degradation or instability, current rx/tx speed -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPort` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pState` +// / reasons for link degradation or instability, current rx/tx speed +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPort` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pState` func ZesFabricPortGetState( - hPort ZesFabricPortHandle, // hPort [in] Handle for the component. - pState *ZesFabricPortState, // pState [in,out] Will contain the current state of the Fabric Port + hPort ZesFabricPortHandle, // hPort [in] Handle for the component. + pState *ZesFabricPortState, // pState [in,out] Will contain the current state of the Fabric Port ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFabricPortGetState", uintptr(hPort), uintptr(unsafe.Pointer(pState))) } // ZesFabricPortGetThroughput Get Fabric port throughput -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPort` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pThroughput` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to query this telemetry. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPort` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pThroughput` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to query this telemetry. func ZesFabricPortGetThroughput( - hPort ZesFabricPortHandle, // hPort [in] Handle for the component. - pThroughput *ZesFabricPortThroughput, // pThroughput [in,out] Will contain the Fabric port throughput counters. + hPort ZesFabricPortHandle, // hPort [in] Handle for the component. + pThroughput *ZesFabricPortThroughput, // pThroughput [in,out] Will contain the Fabric port throughput counters. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFabricPortGetThroughput", uintptr(hPort), uintptr(unsafe.Pointer(pThroughput))) } // ZesFabricPortGetFabricErrorCounters Get Fabric Port Error Counters -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - The memory backing the arrays for phPorts and ppThroughputs must be -/// allocated in system memory by the user who is also responsible for -/// releasing them when they are no longer needed. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPort` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pErrors` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to query this telemetry. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - The memory backing the arrays for phPorts and ppThroughputs must be +// / allocated in system memory by the user who is also responsible for +// / releasing them when they are no longer needed. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPort` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pErrors` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to query this telemetry. func ZesFabricPortGetFabricErrorCounters( - hPort ZesFabricPortHandle, // hPort [in] Handle for the component. - pErrors *ZesFabricPortErrorCounters, // pErrors [in,out] Will contain the Fabric port Error counters. + hPort ZesFabricPortHandle, // hPort [in] Handle for the component. + pErrors *ZesFabricPortErrorCounters, // pErrors [in,out] Will contain the Fabric port Error counters. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFabricPortGetFabricErrorCounters", uintptr(hPort), uintptr(unsafe.Pointer(pErrors))) } // ZesFabricPortGetMultiPortThroughput Get Fabric port throughput from multiple ports in a single call -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phPort` -/// + `nullptr == pThroughput` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phPort` +// / + `nullptr == pThroughput` func ZesFabricPortGetMultiPortThroughput( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - numPorts uint32, // numPorts [in] Number of ports enumerated in function ::zesDeviceEnumFabricPorts - phPort *ZesFabricPortHandle, // phPort [in][range(0, numPorts)] array of fabric port handles provided by user to gather throughput values. - pThroughput **ZesFabricPortThroughput, // pThroughput [out][range(0, numPorts)] array of fabric port throughput counters from multiple ports of type ::zes_fabric_port_throughput_t. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + numPorts uint32, // numPorts [in] Number of ports enumerated in function ::zesDeviceEnumFabricPorts + phPort *ZesFabricPortHandle, // phPort [in][range(0, numPorts)] array of fabric port handles provided by user to gather throughput values. + pThroughput **ZesFabricPortThroughput, // pThroughput [out][range(0, numPorts)] array of fabric port throughput counters from multiple ports of type ::zes_fabric_port_throughput_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFabricPortGetMultiPortThroughput", uintptr(hDevice), uintptr(numPorts), uintptr(unsafe.Pointer(phPort)), uintptr(unsafe.Pointer(pThroughput))) } - diff --git a/sysm_fan.go b/sysm_fan.go index d06be3d..e760e13 100644 --- a/sysm_fan.go +++ b/sysm_fan.go @@ -21,37 +21,39 @@ import ( // ZesFanSpeedMode (zes_fan_speed_mode_t) Fan resource speed mode type ZesFanSpeedMode uintptr + const ( - ZES_FAN_SPEED_MODE_DEFAULT ZesFanSpeedMode = 0 // ZES_FAN_SPEED_MODE_DEFAULT The fan speed is operating using the hardware default settings - ZES_FAN_SPEED_MODE_FIXED ZesFanSpeedMode = 1 // ZES_FAN_SPEED_MODE_FIXED The fan speed is currently set to a fixed value - ZES_FAN_SPEED_MODE_TABLE ZesFanSpeedMode = 2 // ZES_FAN_SPEED_MODE_TABLE The fan speed is currently controlled dynamically by hardware based on + ZES_FAN_SPEED_MODE_DEFAULT ZesFanSpeedMode = 0 // ZES_FAN_SPEED_MODE_DEFAULT The fan speed is operating using the hardware default settings + ZES_FAN_SPEED_MODE_FIXED ZesFanSpeedMode = 1 // ZES_FAN_SPEED_MODE_FIXED The fan speed is currently set to a fixed value + ZES_FAN_SPEED_MODE_TABLE ZesFanSpeedMode = 2 // ZES_FAN_SPEED_MODE_TABLE The fan speed is currently controlled dynamically by hardware based on ///< a temp/speed table - ZES_FAN_SPEED_MODE_FORCE_UINT32 ZesFanSpeedMode = 0x7fffffff // ZES_FAN_SPEED_MODE_FORCE_UINT32 Value marking end of ZES_FAN_SPEED_MODE_* ENUMs + ZES_FAN_SPEED_MODE_FORCE_UINT32 ZesFanSpeedMode = 0x7fffffff // ZES_FAN_SPEED_MODE_FORCE_UINT32 Value marking end of ZES_FAN_SPEED_MODE_* ENUMs ) // ZesFanSpeedUnits (zes_fan_speed_units_t) Fan speed units type ZesFanSpeedUnits uintptr + const ( - ZES_FAN_SPEED_UNITS_RPM ZesFanSpeedUnits = 0 // ZES_FAN_SPEED_UNITS_RPM The fan speed is in units of revolutions per minute (rpm) - ZES_FAN_SPEED_UNITS_PERCENT ZesFanSpeedUnits = 1 // ZES_FAN_SPEED_UNITS_PERCENT The fan speed is a percentage of the maximum speed of the fan - ZES_FAN_SPEED_UNITS_FORCE_UINT32 ZesFanSpeedUnits = 0x7fffffff // ZES_FAN_SPEED_UNITS_FORCE_UINT32 Value marking end of ZES_FAN_SPEED_UNITS_* ENUMs + ZES_FAN_SPEED_UNITS_RPM ZesFanSpeedUnits = 0 // ZES_FAN_SPEED_UNITS_RPM The fan speed is in units of revolutions per minute (rpm) + ZES_FAN_SPEED_UNITS_PERCENT ZesFanSpeedUnits = 1 // ZES_FAN_SPEED_UNITS_PERCENT The fan speed is a percentage of the maximum speed of the fan + ZES_FAN_SPEED_UNITS_FORCE_UINT32 ZesFanSpeedUnits = 0x7fffffff // ZES_FAN_SPEED_UNITS_FORCE_UINT32 Value marking end of ZES_FAN_SPEED_UNITS_* ENUMs ) // ZesFanSpeed (zes_fan_speed_t) Fan speed type ZesFanSpeed struct { - Speed int32 // Speed [in,out] The speed of the fan. On output, a value of -1 indicates that there is no fixed fan speed setting. - Units ZesFanSpeedUnits // Units [in,out] The units that the fan speed is expressed in. On output, if fan speed is -1 then units should be ignored. + Speed int32 // Speed [in,out] The speed of the fan. On output, a value of -1 indicates that there is no fixed fan speed setting. + Units ZesFanSpeedUnits // Units [in,out] The units that the fan speed is expressed in. On output, if fan speed is -1 then units should be ignored. } // ZesFanTempSpeed (zes_fan_temp_speed_t) Fan temperature/speed pair type ZesFanTempSpeed struct { - Temperature uint32 // Temperature [in,out] Temperature in degrees Celsius. - Speed ZesFanSpeed // Speed [in,out] The speed of the fan + Temperature uint32 // Temperature [in,out] Temperature in degrees Celsius. + Speed ZesFanSpeed // Speed [in,out] The speed of the fan } @@ -60,262 +62,261 @@ const ZES_FAN_TEMP_SPEED_PAIR_COUNT = 32 // ZesFanSpeedTable (zes_fan_speed_table_t) Fan speed table type ZesFanSpeedTable struct { - Numpoints int32 // Numpoints [in,out] The number of valid points in the fan speed table. 0 means that there is no fan speed table configured. -1 means that a fan speed table is not supported by the hardware. - Table [ZES_FAN_TEMP_SPEED_PAIR_COUNT]ZesFanTempSpeed // Table [in,out] Array of temperature/fan speed pairs. The table is ordered based on temperature from lowest to highest. + Numpoints int32 // Numpoints [in,out] The number of valid points in the fan speed table. 0 means that there is no fan speed table configured. -1 means that a fan speed table is not supported by the hardware. + Table [ZES_FAN_TEMP_SPEED_PAIR_COUNT]ZesFanTempSpeed // Table [in,out] Array of temperature/fan speed pairs. The table is ordered based on temperature from lowest to highest. } // ZesFanProperties (zes_fan_properties_t) Fan properties type ZesFanProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device - Cancontrol ZeBool // Cancontrol [out] Indicates if software can control the fan speed assuming the user has permissions - Supportedmodes uint32 // Supportedmodes [out] Bitfield of supported fan configuration modes (1<<::zes_fan_speed_mode_t) - Supportedunits uint32 // Supportedunits [out] Bitfield of supported fan speed units (1<<::zes_fan_speed_units_t) - Maxrpm int32 // Maxrpm [out] The maximum RPM of the fan. A value of -1 means that this property is unknown. - Maxpoints int32 // Maxpoints [out] The maximum number of points in the fan temp/speed table. A value of -1 means that this fan doesn't support providing a temp/speed table. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Cancontrol ZeBool // Cancontrol [out] Indicates if software can control the fan speed assuming the user has permissions + Supportedmodes uint32 // Supportedmodes [out] Bitfield of supported fan configuration modes (1<<::zes_fan_speed_mode_t) + Supportedunits uint32 // Supportedunits [out] Bitfield of supported fan speed units (1<<::zes_fan_speed_units_t) + Maxrpm int32 // Maxrpm [out] The maximum RPM of the fan. A value of -1 means that this property is unknown. + Maxpoints int32 // Maxpoints [out] The maximum number of points in the fan temp/speed table. A value of -1 means that this fan doesn't support providing a temp/speed table. } // ZesFanConfig (zes_fan_config_t) Fan configuration type ZesFanConfig struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Mode ZesFanSpeedMode // Mode [in,out] The fan speed mode (fixed, temp-speed table) - Speedfixed ZesFanSpeed // Speedfixed [in,out] The current fixed fan speed setting - Speedtable ZesFanSpeedTable // Speedtable [out] A table containing temperature/speed pairs + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Mode ZesFanSpeedMode // Mode [in,out] The fan speed mode (fixed, temp-speed table) + Speedfixed ZesFanSpeed // Speedfixed [in,out] The current fixed fan speed setting + Speedtable ZesFanSpeedTable // Speedtable [out] A table containing temperature/speed pairs } // ZesDeviceEnumFans Get handle of fans -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumFans( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phFan *ZesFanHandle, // phFan [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phFan *ZesFanHandle, // phFan [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumFans", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phFan))) } // ZesFanGetProperties Get fan properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFan` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFan` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesFanGetProperties( - hFan ZesFanHandle, // hFan [in] Handle for the component. - pProperties *ZesFanProperties, // pProperties [in,out] Will contain the properties of the fan. + hFan ZesFanHandle, // hFan [in] Handle for the component. + pProperties *ZesFanProperties, // pProperties [in,out] Will contain the properties of the fan. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFanGetProperties", uintptr(hFan), uintptr(unsafe.Pointer(pProperties))) } // ZesFanGetConfig Get fan configurations and the current fan speed mode (default, fixed, -/// temp-speed table) -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFan` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pConfig` +// / temp-speed table) +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFan` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pConfig` func ZesFanGetConfig( - hFan ZesFanHandle, // hFan [in] Handle for the component. - pConfig *ZesFanConfig, // pConfig [in,out] Will contain the current configuration of the fan. + hFan ZesFanHandle, // hFan [in] Handle for the component. + pConfig *ZesFanConfig, // pConfig [in,out] Will contain the current configuration of the fan. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFanGetConfig", uintptr(hFan), uintptr(unsafe.Pointer(pConfig))) } // ZesFanSetDefaultMode Configure the fan to run with hardware factory settings (set mode to -/// ::ZES_FAN_SPEED_MODE_DEFAULT) -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFan` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. +// / ::ZES_FAN_SPEED_MODE_DEFAULT) +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFan` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. func ZesFanSetDefaultMode( - hFan ZesFanHandle, // hFan [in] Handle for the component. + hFan ZesFanHandle, // hFan [in] Handle for the component. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFanSetDefaultMode", uintptr(hFan)) } // ZesFanSetFixedSpeedMode Configure the fan to rotate at a fixed speed (set mode to -/// ::ZES_FAN_SPEED_MODE_FIXED) -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFan` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == speed` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Fixing the fan speed not supported by the hardware or the fan speed units are not supported. See the `supportedModes` and `supportedUnits` members of ::zes_fan_properties_t. +// / ::ZES_FAN_SPEED_MODE_FIXED) +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFan` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == speed` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Fixing the fan speed not supported by the hardware or the fan speed units are not supported. See the `supportedModes` and `supportedUnits` members of ::zes_fan_properties_t. func ZesFanSetFixedSpeedMode( - hFan ZesFanHandle, // hFan [in] Handle for the component. - speed *ZesFanSpeed, // speed [in] The fixed fan speed setting + hFan ZesFanHandle, // hFan [in] Handle for the component. + speed *ZesFanSpeed, // speed [in] The fixed fan speed setting ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFanSetFixedSpeedMode", uintptr(hFan), uintptr(unsafe.Pointer(speed))) } // ZesFanSetSpeedTableMode Configure the fan to adjust speed based on a temperature/speed table -/// (set mode to ::ZES_FAN_SPEED_MODE_TABLE) -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFan` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == speedTable` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + The temperature/speed pairs in the array are not sorted on temperature from lowest to highest. -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Fan speed table not supported by the hardware or the fan speed units are not supported. See the `supportedModes` and `supportedUnits` members of ::zes_fan_properties_t. +// / (set mode to ::ZES_FAN_SPEED_MODE_TABLE) +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFan` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == speedTable` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + The temperature/speed pairs in the array are not sorted on temperature from lowest to highest. +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Fan speed table not supported by the hardware or the fan speed units are not supported. See the `supportedModes` and `supportedUnits` members of ::zes_fan_properties_t. func ZesFanSetSpeedTableMode( - hFan ZesFanHandle, // hFan [in] Handle for the component. - speedTable *ZesFanSpeedTable, // speedTable [in] A table containing temperature/speed pairs. + hFan ZesFanHandle, // hFan [in] Handle for the component. + speedTable *ZesFanSpeedTable, // speedTable [in] A table containing temperature/speed pairs. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFanSetSpeedTableMode", uintptr(hFan), uintptr(unsafe.Pointer(speedTable))) } // ZesFanGetState Get current state of a fan - current mode and speed -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFan` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZES_FAN_SPEED_UNITS_PERCENT < units` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pSpeed` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + The requested fan speed units are not supported. See the `supportedUnits` member of ::zes_fan_properties_t. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFan` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZES_FAN_SPEED_UNITS_PERCENT < units` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pSpeed` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + The requested fan speed units are not supported. See the `supportedUnits` member of ::zes_fan_properties_t. func ZesFanGetState( - hFan ZesFanHandle, // hFan [in] Handle for the component. - units ZesFanSpeedUnits, // units [in] The units in which the fan speed should be returned. - pSpeed *int32, // pSpeed [in,out] Will contain the current speed of the fan in the units requested. A value of -1 indicates that the fan speed cannot be measured. + hFan ZesFanHandle, // hFan [in] Handle for the component. + units ZesFanSpeedUnits, // units [in] The units in which the fan speed should be returned. + pSpeed *int32, // pSpeed [in,out] Will contain the current speed of the fan in the units requested. A value of -1 indicates that the fan speed cannot be measured. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFanGetState", uintptr(hFan), uintptr(units), uintptr(unsafe.Pointer(pSpeed))) } - diff --git a/sysm_firmware.go b/sysm_firmware.go index 3a9c51b..a231fe3 100644 --- a/sysm_firmware.go +++ b/sysm_firmware.go @@ -21,179 +21,178 @@ import ( // ZesFirmwareProperties (zes_firmware_properties_t) Firmware properties type ZesFirmwareProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device - Cancontrol ZeBool // Cancontrol [out] Indicates if software can flash the firmware assuming the user has permissions - Name [ZES_STRING_PROPERTY_SIZE]byte // Name [out] NULL terminated string value. The string "unknown" will be returned if this property cannot be determined. - Version [ZES_STRING_PROPERTY_SIZE]byte // Version [out] NULL terminated string value. The string "unknown" will be returned if this property cannot be determined. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Cancontrol ZeBool // Cancontrol [out] Indicates if software can flash the firmware assuming the user has permissions + Name [ZES_STRING_PROPERTY_SIZE]byte // Name [out] NULL terminated string value. The string "unknown" will be returned if this property cannot be determined. + Version [ZES_STRING_PROPERTY_SIZE]byte // Version [out] NULL terminated string value. The string "unknown" will be returned if this property cannot be determined. } // ZesDeviceEnumFirmwares Get handle of firmwares -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumFirmwares( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phFirmware *ZesFirmwareHandle, // phFirmware [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phFirmware *ZesFirmwareHandle, // phFirmware [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumFirmwares", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phFirmware))) } // ZesFirmwareGetProperties Get firmware properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFirmware` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFirmware` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesFirmwareGetProperties( - hFirmware ZesFirmwareHandle, // hFirmware [in] Handle for the component. - pProperties *ZesFirmwareProperties, // pProperties [in,out] Pointer to an array that will hold the properties of the firmware + hFirmware ZesFirmwareHandle, // hFirmware [in] Handle for the component. + pProperties *ZesFirmwareProperties, // pProperties [in,out] Pointer to an array that will hold the properties of the firmware ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFirmwareGetProperties", uintptr(hFirmware), uintptr(unsafe.Pointer(pProperties))) } // ZesFirmwareFlash Flash a new firmware image -/// -/// @details -/// - Any running workload must be gracefully closed before invoking this -/// function. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - This is a non-blocking call. Application may call -/// ::zesFirmwareGetFlashProgress to get completion status. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFirmware` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pImage` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to perform this operation. +// / +// / @details +// / - Any running workload must be gracefully closed before invoking this +// / function. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - This is a non-blocking call. Application may call +// / ::zesFirmwareGetFlashProgress to get completion status. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFirmware` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pImage` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to perform this operation. func ZesFirmwareFlash( - hFirmware ZesFirmwareHandle, // hFirmware [in] Handle for the component. - pImage unsafe.Pointer, // pImage [in] Image of the new firmware to flash. - size uint32, // size [in] Size of the flash image. + hFirmware ZesFirmwareHandle, // hFirmware [in] Handle for the component. + pImage unsafe.Pointer, // pImage [in] Image of the new firmware to flash. + size uint32, // size [in] Size of the flash image. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFirmwareFlash", uintptr(hFirmware), uintptr(unsafe.Pointer(pImage)), uintptr(size)) } // ZesFirmwareGetFlashProgress Get Firmware Flash Progress -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFirmware` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCompletionPercent` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFirmware` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCompletionPercent` func ZesFirmwareGetFlashProgress( - hFirmware ZesFirmwareHandle, // hFirmware [in] Handle for the component. - pCompletionPercent *uint32, // pCompletionPercent [in,out] Pointer to the Completion Percentage of Firmware Update + hFirmware ZesFirmwareHandle, // hFirmware [in] Handle for the component. + pCompletionPercent *uint32, // pCompletionPercent [in,out] Pointer to the Completion Percentage of Firmware Update ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFirmwareGetFlashProgress", uintptr(hFirmware), uintptr(unsafe.Pointer(pCompletionPercent))) } // ZesFirmwareGetConsoleLogs Get Firmware Console Logs -/// -/// @details -/// - The caller may pass nullptr for pFirmwareLog and set pSize to zero -/// when querying only for size. -/// - The caller must provide memory for Firmware log. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFirmware` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pSize` +// / +// / @details +// / - The caller may pass nullptr for pFirmwareLog and set pSize to zero +// / when querying only for size. +// / - The caller must provide memory for Firmware log. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFirmware` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pSize` func ZesFirmwareGetConsoleLogs( - hFirmware ZesFirmwareHandle, // hFirmware [in] Handle for the component. - pSize *uintptr, // pSize [in,out] size of firmware log - pFirmwareLog *byte, // pFirmwareLog [in,out][optional] pointer to null-terminated string of the log. + hFirmware ZesFirmwareHandle, // hFirmware [in] Handle for the component. + pSize *uintptr, // pSize [in,out] size of firmware log + pFirmwareLog *byte, // pFirmwareLog [in,out][optional] pointer to null-terminated string of the log. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFirmwareGetConsoleLogs", uintptr(hFirmware), uintptr(unsafe.Pointer(pSize)), uintptr(unsafe.Pointer(pFirmwareLog))) } - diff --git a/sysm_firmwareSecurityVersion.go b/sysm_firmwareSecurityVersion.go index 5cf60a6..95a3486 100644 --- a/sysm_firmwareSecurityVersion.go +++ b/sysm_firmwareSecurityVersion.go @@ -24,73 +24,73 @@ const ZES_FIRMWARE_SECURITY_VERSION_EXP_NAME = "ZES_experimental_firmware_securi // ZesFirmwareSecurityExpVersion (zes_firmware_security_exp_version_t) Firmware security version Extension Version(s) type ZesFirmwareSecurityExpVersion uintptr + const ( - ZES_FIRMWARE_SECURITY_EXP_VERSION_1_0 ZesFirmwareSecurityExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_FIRMWARE_SECURITY_EXP_VERSION_1_0 version 1.0 - ZES_FIRMWARE_SECURITY_EXP_VERSION_CURRENT ZesFirmwareSecurityExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_FIRMWARE_SECURITY_EXP_VERSION_CURRENT latest known version - ZES_FIRMWARE_SECURITY_EXP_VERSION_FORCE_UINT32 ZesFirmwareSecurityExpVersion = 0x7fffffff // ZES_FIRMWARE_SECURITY_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_FIRMWARE_SECURITY_EXP_VERSION_* ENUMs + ZES_FIRMWARE_SECURITY_EXP_VERSION_1_0 ZesFirmwareSecurityExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_FIRMWARE_SECURITY_EXP_VERSION_1_0 version 1.0 + ZES_FIRMWARE_SECURITY_EXP_VERSION_CURRENT ZesFirmwareSecurityExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_FIRMWARE_SECURITY_EXP_VERSION_CURRENT latest known version + ZES_FIRMWARE_SECURITY_EXP_VERSION_FORCE_UINT32 ZesFirmwareSecurityExpVersion = 0x7fffffff // ZES_FIRMWARE_SECURITY_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_FIRMWARE_SECURITY_EXP_VERSION_* ENUMs ) // ZesFirmwareGetSecurityVersionExp Get the firmware security version number of the currently running -/// firmware -/// -/// @details -/// - The application should create a character array of size -/// ::ZES_STRING_PROPERTY_SIZE and reference it for the `pVersion` -/// parameter. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFirmware` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pVersion` +// / firmware +// / +// / @details +// / - The application should create a character array of size +// / ::ZES_STRING_PROPERTY_SIZE and reference it for the `pVersion` +// / parameter. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFirmware` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pVersion` func ZesFirmwareGetSecurityVersionExp( - hFirmware ZesFirmwareHandle, // hFirmware [in] Handle for the component. - pVersion *byte, // pVersion [in,out] NULL terminated string value. The string "unknown" will be returned if this property cannot be determined. + hFirmware ZesFirmwareHandle, // hFirmware [in] Handle for the component. + pVersion *byte, // pVersion [in,out] NULL terminated string value. The string "unknown" will be returned if this property cannot be determined. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFirmwareGetSecurityVersionExp", uintptr(hFirmware), uintptr(unsafe.Pointer(pVersion))) } // ZesFirmwareSetSecurityVersionExp Set the firmware security version number -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFirmware` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFirmware` func ZesFirmwareSetSecurityVersionExp( - hFirmware ZesFirmwareHandle, // hFirmware [in] Handle for the component. + hFirmware ZesFirmwareHandle, // hFirmware [in] Handle for the component. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFirmwareSetSecurityVersionExp", uintptr(hFirmware)) } - diff --git a/sysm_frequency.go b/sysm_frequency.go index 50e927e..7159390 100644 --- a/sysm_frequency.go +++ b/sysm_frequency.go @@ -21,773 +21,775 @@ import ( // ZesFreqDomain (zes_freq_domain_t) Frequency domains. type ZesFreqDomain uintptr + const ( - ZES_FREQ_DOMAIN_GPU ZesFreqDomain = 0 // ZES_FREQ_DOMAIN_GPU GPU Core Domain. - ZES_FREQ_DOMAIN_MEMORY ZesFreqDomain = 1 // ZES_FREQ_DOMAIN_MEMORY Local Memory Domain. - ZES_FREQ_DOMAIN_MEDIA ZesFreqDomain = 2 // ZES_FREQ_DOMAIN_MEDIA GPU Media Domain. - ZES_FREQ_DOMAIN_FORCE_UINT32 ZesFreqDomain = 0x7fffffff // ZES_FREQ_DOMAIN_FORCE_UINT32 Value marking end of ZES_FREQ_DOMAIN_* ENUMs + ZES_FREQ_DOMAIN_GPU ZesFreqDomain = 0 // ZES_FREQ_DOMAIN_GPU GPU Core Domain. + ZES_FREQ_DOMAIN_MEMORY ZesFreqDomain = 1 // ZES_FREQ_DOMAIN_MEMORY Local Memory Domain. + ZES_FREQ_DOMAIN_MEDIA ZesFreqDomain = 2 // ZES_FREQ_DOMAIN_MEDIA GPU Media Domain. + ZES_FREQ_DOMAIN_FORCE_UINT32 ZesFreqDomain = 0x7fffffff // ZES_FREQ_DOMAIN_FORCE_UINT32 Value marking end of ZES_FREQ_DOMAIN_* ENUMs ) // ZesFreqProperties (zes_freq_properties_t) Frequency properties -/// -/// @details -/// - Indicates if this frequency domain can be overclocked (if true, -/// functions such as ::zesFrequencyOcSetFrequencyTarget() are supported). -/// - The min/max hardware frequencies are specified for non-overclock -/// configurations. For overclock configurations, use -/// ::zesFrequencyOcGetFrequencyTarget() to determine the maximum -/// frequency that can be requested. +// / +// / @details +// / - Indicates if this frequency domain can be overclocked (if true, +// / functions such as ::zesFrequencyOcSetFrequencyTarget() are supported). +// / - The min/max hardware frequencies are specified for non-overclock +// / configurations. For overclock configurations, use +// / ::zesFrequencyOcGetFrequencyTarget() to determine the maximum +// / frequency that can be requested. type ZesFreqProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZesFreqDomain // Type [out] The hardware block that this frequency domain controls (GPU, memory, ...) - Onsubdevice ZeBool // Onsubdevice [out] True if this resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device - Cancontrol ZeBool // Cancontrol [out] Indicates if software can control the frequency of this domain assuming the user has permissions - Isthrottleeventsupported ZeBool // Isthrottleeventsupported [out] Indicates if software can register to receive event ::ZES_EVENT_TYPE_FLAG_FREQ_THROTTLED - Min float64 // Min [out] The minimum hardware clock frequency in units of MHz. - Max float64 // Max [out] The maximum non-overclock hardware clock frequency in units of MHz. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZesFreqDomain // Type [out] The hardware block that this frequency domain controls (GPU, memory, ...) + Onsubdevice ZeBool // Onsubdevice [out] True if this resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Cancontrol ZeBool // Cancontrol [out] Indicates if software can control the frequency of this domain assuming the user has permissions + Isthrottleeventsupported ZeBool // Isthrottleeventsupported [out] Indicates if software can register to receive event ::ZES_EVENT_TYPE_FLAG_FREQ_THROTTLED + Min float64 // Min [out] The minimum hardware clock frequency in units of MHz. + Max float64 // Max [out] The maximum non-overclock hardware clock frequency in units of MHz. } // ZesFreqRange (zes_freq_range_t) Frequency range between which the hardware can operate. -/// -/// @details -/// - When setting limits, they will be clamped to the hardware limits. -/// - When setting limits, ensure that the max frequency is greater than or -/// equal to the min frequency specified. -/// - When setting limits to return to factory settings, specify -1 for both -/// the min and max limit. +// / +// / @details +// / - When setting limits, they will be clamped to the hardware limits. +// / - When setting limits, ensure that the max frequency is greater than or +// / equal to the min frequency specified. +// / - When setting limits to return to factory settings, specify -1 for both +// / the min and max limit. type ZesFreqRange struct { - Min float64 // Min [in,out] The min frequency in MHz below which hardware frequency management will not request frequencies. On input, setting to 0 will permit the frequency to go down to the hardware minimum while setting to -1 will return the min frequency limit to the factory value (can be larger than the hardware min). On output, a negative value indicates that no external minimum frequency limit is in effect. - Max float64 // Max [in,out] The max frequency in MHz above which hardware frequency management will not request frequencies. On input, setting to 0 or a very big number will permit the frequency to go all the way up to the hardware maximum while setting to -1 will return the max frequency to the factory value (which can be less than the hardware max). On output, a negative number indicates that no external maximum frequency limit is in effect. + Min float64 // Min [in,out] The min frequency in MHz below which hardware frequency management will not request frequencies. On input, setting to 0 will permit the frequency to go down to the hardware minimum while setting to -1 will return the min frequency limit to the factory value (can be larger than the hardware min). On output, a negative value indicates that no external minimum frequency limit is in effect. + Max float64 // Max [in,out] The max frequency in MHz above which hardware frequency management will not request frequencies. On input, setting to 0 or a very big number will permit the frequency to go all the way up to the hardware maximum while setting to -1 will return the max frequency to the factory value (which can be less than the hardware max). On output, a negative number indicates that no external maximum frequency limit is in effect. } // ZesFreqThrottleReasonFlags (zes_freq_throttle_reason_flags_t) Frequency throttle reasons type ZesFreqThrottleReasonFlags uint32 + const ( - ZES_FREQ_THROTTLE_REASON_FLAG_AVE_PWR_CAP ZesFreqThrottleReasonFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_FREQ_THROTTLE_REASON_FLAG_AVE_PWR_CAP frequency throttled due to average power excursion (PL1) - ZES_FREQ_THROTTLE_REASON_FLAG_BURST_PWR_CAP ZesFreqThrottleReasonFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZES_FREQ_THROTTLE_REASON_FLAG_BURST_PWR_CAP frequency throttled due to burst power excursion (PL2) - ZES_FREQ_THROTTLE_REASON_FLAG_CURRENT_LIMIT ZesFreqThrottleReasonFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZES_FREQ_THROTTLE_REASON_FLAG_CURRENT_LIMIT frequency throttled due to current excursion (PL4) - ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL_LIMIT ZesFreqThrottleReasonFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL_LIMIT frequency throttled due to thermal excursion (T > TjMax) - ZES_FREQ_THROTTLE_REASON_FLAG_PSU_ALERT ZesFreqThrottleReasonFlags = /* ZE_BIT(4) */(( 1 << 4 )) // ZES_FREQ_THROTTLE_REASON_FLAG_PSU_ALERT frequency throttled due to power supply assertion - ZES_FREQ_THROTTLE_REASON_FLAG_SW_RANGE ZesFreqThrottleReasonFlags = /* ZE_BIT(5) */(( 1 << 5 )) // ZES_FREQ_THROTTLE_REASON_FLAG_SW_RANGE frequency throttled due to software supplied frequency range - ZES_FREQ_THROTTLE_REASON_FLAG_HW_RANGE ZesFreqThrottleReasonFlags = /* ZE_BIT(6) */(( 1 << 6 )) // ZES_FREQ_THROTTLE_REASON_FLAG_HW_RANGE frequency throttled due to a sub block that has a lower frequency + ZES_FREQ_THROTTLE_REASON_FLAG_AVE_PWR_CAP ZesFreqThrottleReasonFlags = /* ZE_BIT(0) */ (1 << 0) // ZES_FREQ_THROTTLE_REASON_FLAG_AVE_PWR_CAP frequency throttled due to average power excursion (PL1) + ZES_FREQ_THROTTLE_REASON_FLAG_BURST_PWR_CAP ZesFreqThrottleReasonFlags = /* ZE_BIT(1) */ (1 << 1) // ZES_FREQ_THROTTLE_REASON_FLAG_BURST_PWR_CAP frequency throttled due to burst power excursion (PL2) + ZES_FREQ_THROTTLE_REASON_FLAG_CURRENT_LIMIT ZesFreqThrottleReasonFlags = /* ZE_BIT(2) */ (1 << 2) // ZES_FREQ_THROTTLE_REASON_FLAG_CURRENT_LIMIT frequency throttled due to current excursion (PL4) + ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL_LIMIT ZesFreqThrottleReasonFlags = /* ZE_BIT(3) */ (1 << 3) // ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL_LIMIT frequency throttled due to thermal excursion (T > TjMax) + ZES_FREQ_THROTTLE_REASON_FLAG_PSU_ALERT ZesFreqThrottleReasonFlags = /* ZE_BIT(4) */ (1 << 4) // ZES_FREQ_THROTTLE_REASON_FLAG_PSU_ALERT frequency throttled due to power supply assertion + ZES_FREQ_THROTTLE_REASON_FLAG_SW_RANGE ZesFreqThrottleReasonFlags = /* ZE_BIT(5) */ (1 << 5) // ZES_FREQ_THROTTLE_REASON_FLAG_SW_RANGE frequency throttled due to software supplied frequency range + ZES_FREQ_THROTTLE_REASON_FLAG_HW_RANGE ZesFreqThrottleReasonFlags = /* ZE_BIT(6) */ (1 << 6) // ZES_FREQ_THROTTLE_REASON_FLAG_HW_RANGE frequency throttled due to a sub block that has a lower frequency ///< range when it receives clocks - ZES_FREQ_THROTTLE_REASON_FLAG_VOLTAGE ZesFreqThrottleReasonFlags = /* ZE_BIT(7) */(( 1 << 7 )) // ZES_FREQ_THROTTLE_REASON_FLAG_VOLTAGE frequency throttled due to voltage excursion - ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL ZesFreqThrottleReasonFlags = /* ZE_BIT(8) */(( 1 << 8 )) // ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL frequency throttled due to thermal conditions - ZES_FREQ_THROTTLE_REASON_FLAG_POWER ZesFreqThrottleReasonFlags = /* ZE_BIT(9) */(( 1 << 9 )) // ZES_FREQ_THROTTLE_REASON_FLAG_POWER frequency throttled due to power constraints - ZES_FREQ_THROTTLE_REASON_FLAG_FORCE_UINT32 ZesFreqThrottleReasonFlags = 0x7fffffff // ZES_FREQ_THROTTLE_REASON_FLAG_FORCE_UINT32 Value marking end of ZES_FREQ_THROTTLE_REASON_FLAG_* ENUMs + ZES_FREQ_THROTTLE_REASON_FLAG_VOLTAGE ZesFreqThrottleReasonFlags = /* ZE_BIT(7) */ (1 << 7) // ZES_FREQ_THROTTLE_REASON_FLAG_VOLTAGE frequency throttled due to voltage excursion + ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL ZesFreqThrottleReasonFlags = /* ZE_BIT(8) */ (1 << 8) // ZES_FREQ_THROTTLE_REASON_FLAG_THERMAL frequency throttled due to thermal conditions + ZES_FREQ_THROTTLE_REASON_FLAG_POWER ZesFreqThrottleReasonFlags = /* ZE_BIT(9) */ (1 << 9) // ZES_FREQ_THROTTLE_REASON_FLAG_POWER frequency throttled due to power constraints + ZES_FREQ_THROTTLE_REASON_FLAG_FORCE_UINT32 ZesFreqThrottleReasonFlags = 0x7fffffff // ZES_FREQ_THROTTLE_REASON_FLAG_FORCE_UINT32 Value marking end of ZES_FREQ_THROTTLE_REASON_FLAG_* ENUMs ) // ZesFreqState (zes_freq_state_t) Frequency state type ZesFreqState struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Currentvoltage float64 // Currentvoltage [out] Current voltage in Volts. A negative value indicates that this property is not known. - Request float64 // Request [out] The current frequency request in MHz. A negative value indicates that this property is not known. - Tdp float64 // Tdp [out] The maximum frequency in MHz supported under the current TDP conditions. This fluctuates dynamically based on the power and thermal limits of the part. A negative value indicates that this property is not known. - Efficient float64 // Efficient [out] The efficient minimum frequency in MHz. A negative value indicates that this property is not known. - Actual float64 // Actual [out] The resolved frequency in MHz. A negative value indicates that this property is not known. - Throttlereasons ZesFreqThrottleReasonFlags // Throttlereasons [out] The reasons that the frequency is being limited by the hardware. Returns 0 (frequency not throttled) or a combination of ::zes_freq_throttle_reason_flag_t. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Currentvoltage float64 // Currentvoltage [out] Current voltage in Volts. A negative value indicates that this property is not known. + Request float64 // Request [out] The current frequency request in MHz. A negative value indicates that this property is not known. + Tdp float64 // Tdp [out] The maximum frequency in MHz supported under the current TDP conditions. This fluctuates dynamically based on the power and thermal limits of the part. A negative value indicates that this property is not known. + Efficient float64 // Efficient [out] The efficient minimum frequency in MHz. A negative value indicates that this property is not known. + Actual float64 // Actual [out] The resolved frequency in MHz. A negative value indicates that this property is not known. + Throttlereasons ZesFreqThrottleReasonFlags // Throttlereasons [out] The reasons that the frequency is being limited by the hardware. Returns 0 (frequency not throttled) or a combination of ::zes_freq_throttle_reason_flag_t. } // ZesFreqThrottleTime (zes_freq_throttle_time_t) Frequency throttle time snapshot -/// -/// @details -/// - Percent time throttled is calculated by taking two snapshots (s1, s2) -/// and using the equation: %throttled = (s2.throttleTime - -/// s1.throttleTime) / (s2.timestamp - s1.timestamp) +// / +// / @details +// / - Percent time throttled is calculated by taking two snapshots (s1, s2) +// / and using the equation: %throttled = (s2.throttleTime - +// / s1.throttleTime) / (s2.timestamp - s1.timestamp) type ZesFreqThrottleTime struct { - Throttletime uint64 // Throttletime [out] The monotonic counter of time in microseconds that the frequency has been limited by the hardware. - Timestamp uint64 // Timestamp [out] Microsecond timestamp when throttleTime was captured. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution. + Throttletime uint64 // Throttletime [out] The monotonic counter of time in microseconds that the frequency has been limited by the hardware. + Timestamp uint64 // Timestamp [out] Microsecond timestamp when throttleTime was captured. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution. } // ZesOcMode (zes_oc_mode_t) Overclocking modes -/// -/// @details -/// - [DEPRECATED] No longer supported. +// / +// / @details +// / - [DEPRECATED] No longer supported. type ZesOcMode uintptr + const ( - ZES_OC_MODE_OFF ZesOcMode = 0 // ZES_OC_MODE_OFF Overclocking if off - hardware is running using factory default + ZES_OC_MODE_OFF ZesOcMode = 0 // ZES_OC_MODE_OFF Overclocking if off - hardware is running using factory default ///< voltages/frequencies. - ZES_OC_MODE_OVERRIDE ZesOcMode = 1 // ZES_OC_MODE_OVERRIDE Overclock override mode - In this mode, a fixed user-supplied voltage + ZES_OC_MODE_OVERRIDE ZesOcMode = 1 // ZES_OC_MODE_OVERRIDE Overclock override mode - In this mode, a fixed user-supplied voltage ///< is applied independent of the frequency request. The maximum permitted ///< frequency can also be increased. This mode disables INTERPOLATIVE and ///< FIXED modes. - ZES_OC_MODE_INTERPOLATIVE ZesOcMode = 2 // ZES_OC_MODE_INTERPOLATIVE Overclock interpolative mode - In this mode, the voltage/frequency + ZES_OC_MODE_INTERPOLATIVE ZesOcMode = 2 // ZES_OC_MODE_INTERPOLATIVE Overclock interpolative mode - In this mode, the voltage/frequency ///< curve can be extended with a new voltage/frequency point that will be ///< interpolated. The existing voltage/frequency points can also be offset ///< (up or down) by a fixed voltage. This mode disables FIXED and OVERRIDE ///< modes. - ZES_OC_MODE_FIXED ZesOcMode = 3 // ZES_OC_MODE_FIXED Overclocking fixed Mode - In this mode, hardware will disable most + ZES_OC_MODE_FIXED ZesOcMode = 3 // ZES_OC_MODE_FIXED Overclocking fixed Mode - In this mode, hardware will disable most ///< frequency throttling and lock the frequency and voltage at the ///< specified overclock values. This mode disables OVERRIDE and ///< INTERPOLATIVE modes. This mode can damage the part, most of the ///< protections are disabled on this mode. - ZES_OC_MODE_FORCE_UINT32 ZesOcMode = 0x7fffffff // ZES_OC_MODE_FORCE_UINT32 Value marking end of ZES_OC_MODE_* ENUMs + ZES_OC_MODE_FORCE_UINT32 ZesOcMode = 0x7fffffff // ZES_OC_MODE_FORCE_UINT32 Value marking end of ZES_OC_MODE_* ENUMs ) // ZesOcCapabilities (zes_oc_capabilities_t) Overclocking properties -/// -/// @details -/// - Provides all the overclocking capabilities and properties supported by -/// the device for the frequency domain. -/// - [DEPRECATED] No longer supported. +// / +// / @details +// / - Provides all the overclocking capabilities and properties supported by +// / the device for the frequency domain. +// / - [DEPRECATED] No longer supported. type ZesOcCapabilities struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Isocsupported ZeBool // Isocsupported [out] Indicates if any overclocking features are supported on this frequency domain. - Maxfactorydefaultfrequency float64 // Maxfactorydefaultfrequency [out] Factory default non-overclock maximum frequency in Mhz. - Maxfactorydefaultvoltage float64 // Maxfactorydefaultvoltage [out] Factory default voltage used for the non-overclock maximum frequency in MHz. - Maxocfrequency float64 // Maxocfrequency [out] Maximum hardware overclocking frequency limit in Mhz. - Minocvoltageoffset float64 // Minocvoltageoffset [out] The minimum voltage offset that can be applied to the voltage/frequency curve. Note that this number can be negative. - Maxocvoltageoffset float64 // Maxocvoltageoffset [out] The maximum voltage offset that can be applied to the voltage/frequency curve. - Maxocvoltage float64 // Maxocvoltage [out] The maximum overclock voltage that hardware supports. - Istjmaxsupported ZeBool // Istjmaxsupported [out] Indicates if the maximum temperature limit (TjMax) can be changed for this frequency domain. - Isiccmaxsupported ZeBool // Isiccmaxsupported [out] Indicates if the maximum current (IccMax) can be changed for this frequency domain. - Ishighvoltmodecapable ZeBool // Ishighvoltmodecapable [out] Indicates if this frequency domains supports a feature to set very high voltages. - Ishighvoltmodeenabled ZeBool // Ishighvoltmodeenabled [out] Indicates if very high voltages are permitted on this frequency domain. - Isextendedmodesupported ZeBool // Isextendedmodesupported [out] Indicates if the extended overclocking features are supported. If this is supported, increments are on 1 Mhz basis. - Isfixedmodesupported ZeBool // Isfixedmodesupported [out] Indicates if the fixed mode is supported. In this mode, hardware will disable most frequency throttling and lock the frequency and voltage at the specified overclock values. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Isocsupported ZeBool // Isocsupported [out] Indicates if any overclocking features are supported on this frequency domain. + Maxfactorydefaultfrequency float64 // Maxfactorydefaultfrequency [out] Factory default non-overclock maximum frequency in Mhz. + Maxfactorydefaultvoltage float64 // Maxfactorydefaultvoltage [out] Factory default voltage used for the non-overclock maximum frequency in MHz. + Maxocfrequency float64 // Maxocfrequency [out] Maximum hardware overclocking frequency limit in Mhz. + Minocvoltageoffset float64 // Minocvoltageoffset [out] The minimum voltage offset that can be applied to the voltage/frequency curve. Note that this number can be negative. + Maxocvoltageoffset float64 // Maxocvoltageoffset [out] The maximum voltage offset that can be applied to the voltage/frequency curve. + Maxocvoltage float64 // Maxocvoltage [out] The maximum overclock voltage that hardware supports. + Istjmaxsupported ZeBool // Istjmaxsupported [out] Indicates if the maximum temperature limit (TjMax) can be changed for this frequency domain. + Isiccmaxsupported ZeBool // Isiccmaxsupported [out] Indicates if the maximum current (IccMax) can be changed for this frequency domain. + Ishighvoltmodecapable ZeBool // Ishighvoltmodecapable [out] Indicates if this frequency domains supports a feature to set very high voltages. + Ishighvoltmodeenabled ZeBool // Ishighvoltmodeenabled [out] Indicates if very high voltages are permitted on this frequency domain. + Isextendedmodesupported ZeBool // Isextendedmodesupported [out] Indicates if the extended overclocking features are supported. If this is supported, increments are on 1 Mhz basis. + Isfixedmodesupported ZeBool // Isfixedmodesupported [out] Indicates if the fixed mode is supported. In this mode, hardware will disable most frequency throttling and lock the frequency and voltage at the specified overclock values. } // ZesDeviceEnumFrequencyDomains Get handle of frequency domains -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumFrequencyDomains( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phFrequency *ZesFreqHandle, // phFrequency [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phFrequency *ZesFreqHandle, // phFrequency [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumFrequencyDomains", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phFrequency))) } // ZesFrequencyGetProperties Get frequency properties - available frequencies -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesFrequencyGetProperties( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - pProperties *ZesFreqProperties, // pProperties [in,out] The frequency properties for the specified domain. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + pProperties *ZesFreqProperties, // pProperties [in,out] The frequency properties for the specified domain. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyGetProperties", uintptr(hFrequency), uintptr(unsafe.Pointer(pProperties))) } // ZesFrequencyGetAvailableClocks Get available non-overclocked hardware clock frequencies for the -/// frequency domain -/// -/// @details -/// - The list of available frequencies is returned in order of slowest to -/// fastest. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / frequency domain +// / +// / @details +// / - The list of available frequencies is returned in order of slowest to +// / fastest. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesFrequencyGetAvailableClocks( - hFrequency ZesFreqHandle, // hFrequency [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of frequencies. if count is zero, then the driver shall update the value with the total number of frequencies that are available. if count is greater than the number of frequencies that are available, then the driver shall update the value with the correct number of frequencies. - phFrequency *float64, // phFrequency [in,out][optional][range(0, *pCount)] array of frequencies in units of MHz and sorted from slowest to fastest. if count is less than the number of frequencies that are available, then the driver shall only retrieve that number of frequencies. + hFrequency ZesFreqHandle, // hFrequency [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of frequencies. if count is zero, then the driver shall update the value with the total number of frequencies that are available. if count is greater than the number of frequencies that are available, then the driver shall update the value with the correct number of frequencies. + phFrequency *float64, // phFrequency [in,out][optional][range(0, *pCount)] array of frequencies in units of MHz and sorted from slowest to fastest. if count is less than the number of frequencies that are available, then the driver shall only retrieve that number of frequencies. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyGetAvailableClocks", uintptr(hFrequency), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phFrequency))) } // ZesFrequencyGetRange Get current frequency limits -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pLimits` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pLimits` func ZesFrequencyGetRange( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - pLimits *ZesFreqRange, // pLimits [in,out] The range between which the hardware can operate for the specified domain. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + pLimits *ZesFreqRange, // pLimits [in,out] The range between which the hardware can operate for the specified domain. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyGetRange", uintptr(hFrequency), uintptr(unsafe.Pointer(pLimits))) } // ZesFrequencySetRange Set frequency range between which the hardware can operate. -/// -/// @details -/// - The application may call this function with the frequency range min -/// and max values set to `-1` to request the frequency be (re)set to the -/// default values. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pLimits` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. +// / +// / @details +// / - The application may call this function with the frequency range min +// / and max values set to `-1` to request the frequency be (re)set to the +// / default values. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pLimits` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. func ZesFrequencySetRange( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - pLimits *ZesFreqRange, // pLimits [in] The limits between which the hardware can operate for the specified domain. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + pLimits *ZesFreqRange, // pLimits [in] The limits between which the hardware can operate for the specified domain. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencySetRange", uintptr(hFrequency), uintptr(unsafe.Pointer(pLimits))) } // ZesFrequencyGetState Get current frequency state - frequency request, actual frequency, TDP -/// limits -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pState` +// / limits +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pState` func ZesFrequencyGetState( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - pState *ZesFreqState, // pState [in,out] Frequency state for the specified domain. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + pState *ZesFreqState, // pState [in,out] Frequency state for the specified domain. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyGetState", uintptr(hFrequency), uintptr(unsafe.Pointer(pState))) } // ZesFrequencyGetThrottleTime Get frequency throttle time -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pThrottleTime` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pThrottleTime` func ZesFrequencyGetThrottleTime( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - pThrottleTime *ZesFreqThrottleTime, // pThrottleTime [in,out] Will contain a snapshot of the throttle time counters for the specified domain. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + pThrottleTime *ZesFreqThrottleTime, // pThrottleTime [in,out] Will contain a snapshot of the throttle time counters for the specified domain. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyGetThrottleTime", uintptr(hFrequency), uintptr(unsafe.Pointer(pThrottleTime))) } // ZesFrequencyOcGetCapabilities Get the overclocking capabilities. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] No longer supported. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pOcCapabilities` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] No longer supported. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pOcCapabilities` func ZesFrequencyOcGetCapabilities( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - pOcCapabilities *ZesOcCapabilities, // pOcCapabilities [in,out] Pointer to the capabilities structure. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + pOcCapabilities *ZesOcCapabilities, // pOcCapabilities [in,out] Pointer to the capabilities structure. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyOcGetCapabilities", uintptr(hFrequency), uintptr(unsafe.Pointer(pOcCapabilities))) } // ZesFrequencyOcGetFrequencyTarget Get the current overclocking frequency target, if extended moded is -/// supported, will returned in 1 Mhz granularity. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] No longer supported. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCurrentOcFrequency` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). -/// + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). -/// + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device. -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + Overclocking feature is locked on this frequency domain. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. +// / supported, will returned in 1 Mhz granularity. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] No longer supported. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCurrentOcFrequency` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). +// / + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). +// / + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device. +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + Overclocking feature is locked on this frequency domain. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. func ZesFrequencyOcGetFrequencyTarget( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - pCurrentOcFrequency *float64, // pCurrentOcFrequency [out] Overclocking Frequency in MHz, if extended moded is supported, will returned in 1 Mhz granularity, else, in multiples of 50 Mhz. This cannot be greater than the `maxOcFrequency` member of ::zes_oc_capabilities_t. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + pCurrentOcFrequency *float64, // pCurrentOcFrequency [out] Overclocking Frequency in MHz, if extended moded is supported, will returned in 1 Mhz granularity, else, in multiples of 50 Mhz. This cannot be greater than the `maxOcFrequency` member of ::zes_oc_capabilities_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyOcGetFrequencyTarget", uintptr(hFrequency), uintptr(unsafe.Pointer(pCurrentOcFrequency))) } // ZesFrequencyOcSetFrequencyTarget Set the current overclocking frequency target, if extended moded is -/// supported, can be set in 1 Mhz granularity. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] No longer supported. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). -/// + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). -/// + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device. -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + Overclocking feature is locked on this frequency domain. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. +// / supported, can be set in 1 Mhz granularity. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] No longer supported. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). +// / + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). +// / + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device. +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + Overclocking feature is locked on this frequency domain. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. func ZesFrequencyOcSetFrequencyTarget( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - CurrentOcFrequency float64, // CurrentOcFrequency [in] Overclocking Frequency in MHz, if extended moded is supported, it could be set in 1 Mhz granularity, else, in multiples of 50 Mhz. This cannot be greater than the `maxOcFrequency` member of ::zes_oc_capabilities_t. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + CurrentOcFrequency float64, // CurrentOcFrequency [in] Overclocking Frequency in MHz, if extended moded is supported, it could be set in 1 Mhz granularity, else, in multiples of 50 Mhz. This cannot be greater than the `maxOcFrequency` member of ::zes_oc_capabilities_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyOcSetFrequencyTarget", uintptr(hFrequency), uintptr(CurrentOcFrequency)) } // ZesFrequencyOcGetVoltageTarget Get the current overclocking voltage settings. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] No longer supported. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCurrentVoltageTarget` -/// + `nullptr == pCurrentVoltageOffset` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). -/// + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). -/// + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device. -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + Overclocking feature is locked on this frequency domain. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] No longer supported. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCurrentVoltageTarget` +// / + `nullptr == pCurrentVoltageOffset` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). +// / + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). +// / + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device. +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + Overclocking feature is locked on this frequency domain. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. func ZesFrequencyOcGetVoltageTarget( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - pCurrentVoltageTarget *float64, // pCurrentVoltageTarget [out] Overclock voltage in Volts. This cannot be greater than the `maxOcVoltage` member of ::zes_oc_capabilities_t. - pCurrentVoltageOffset *float64, // pCurrentVoltageOffset [out] This voltage offset is applied to all points on the voltage/frequency curve, including the new overclock voltageTarget. Valid range is between the `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + pCurrentVoltageTarget *float64, // pCurrentVoltageTarget [out] Overclock voltage in Volts. This cannot be greater than the `maxOcVoltage` member of ::zes_oc_capabilities_t. + pCurrentVoltageOffset *float64, // pCurrentVoltageOffset [out] This voltage offset is applied to all points on the voltage/frequency curve, including the new overclock voltageTarget. Valid range is between the `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyOcGetVoltageTarget", uintptr(hFrequency), uintptr(unsafe.Pointer(pCurrentVoltageTarget)), uintptr(unsafe.Pointer(pCurrentVoltageOffset))) } // ZesFrequencyOcSetVoltageTarget Set the current overclocking voltage settings. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] No longer supported. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). -/// + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). -/// + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device. -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + Overclocking feature is locked on this frequency domain. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] No longer supported. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). +// / + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). +// / + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device. +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + Overclocking feature is locked on this frequency domain. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. func ZesFrequencyOcSetVoltageTarget( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - CurrentVoltageTarget float64, // CurrentVoltageTarget [in] Overclock voltage in Volts. This cannot be greater than the `maxOcVoltage` member of ::zes_oc_capabilities_t. - CurrentVoltageOffset float64, // CurrentVoltageOffset [in] This voltage offset is applied to all points on the voltage/frequency curve, include the new overclock voltageTarget. Valid range is between the `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + CurrentVoltageTarget float64, // CurrentVoltageTarget [in] Overclock voltage in Volts. This cannot be greater than the `maxOcVoltage` member of ::zes_oc_capabilities_t. + CurrentVoltageOffset float64, // CurrentVoltageOffset [in] This voltage offset is applied to all points on the voltage/frequency curve, include the new overclock voltageTarget. Valid range is between the `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyOcSetVoltageTarget", uintptr(hFrequency), uintptr(CurrentVoltageTarget), uintptr(CurrentVoltageOffset)) } // ZesFrequencyOcSetMode Set the current overclocking mode. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] No longer supported. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZES_OC_MODE_FIXED < CurrentOcMode` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). -/// + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). -/// + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device. -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + Overclocking feature is locked on this frequency domain. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] No longer supported. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZES_OC_MODE_FIXED < CurrentOcMode` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). +// / + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). +// / + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device. +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + Overclocking feature is locked on this frequency domain. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. func ZesFrequencyOcSetMode( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - CurrentOcMode ZesOcMode, // CurrentOcMode [in] Current Overclocking Mode ::zes_oc_mode_t. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + CurrentOcMode ZesOcMode, // CurrentOcMode [in] Current Overclocking Mode ::zes_oc_mode_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyOcSetMode", uintptr(hFrequency), uintptr(CurrentOcMode)) } // ZesFrequencyOcGetMode Get the current overclocking mode. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] No longer supported. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCurrentOcMode` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). -/// + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). -/// + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device. -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + Overclocking feature is locked on this frequency domain. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] No longer supported. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCurrentOcMode` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). +// / + The specified voltage and/or frequency overclock settings exceed the hardware values (see the `maxOcFrequency`, `maxOcVoltage`, `minOcVoltageOffset` and `maxOcVoltageOffset` members of ::zes_oc_capabilities_t). +// / + Requested voltage overclock is very high but the `isHighVoltModeEnabled` member of ::zes_oc_capabilities_t is not enabled for the device. +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + Overclocking feature is locked on this frequency domain. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. func ZesFrequencyOcGetMode( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - pCurrentOcMode *ZesOcMode, // pCurrentOcMode [out] Current Overclocking Mode ::zes_oc_mode_t. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + pCurrentOcMode *ZesOcMode, // pCurrentOcMode [out] Current Overclocking Mode ::zes_oc_mode_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyOcGetMode", uintptr(hFrequency), uintptr(unsafe.Pointer(pCurrentOcMode))) } // ZesFrequencyOcGetIccMax Get the maximum current limit setting. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] No longer supported. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pOcIccMax` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). -/// + Capability the `isIccMaxSupported` member of ::zes_oc_capabilities_t is false for this frequency domain. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] No longer supported. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pOcIccMax` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). +// / + Capability the `isIccMaxSupported` member of ::zes_oc_capabilities_t is false for this frequency domain. func ZesFrequencyOcGetIccMax( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - pOcIccMax *float64, // pOcIccMax [in,out] Will contain the maximum current limit in Amperes on successful return. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + pOcIccMax *float64, // pOcIccMax [in,out] Will contain the maximum current limit in Amperes on successful return. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyOcGetIccMax", uintptr(hFrequency), uintptr(unsafe.Pointer(pOcIccMax))) } // ZesFrequencyOcSetIccMax Change the maximum current limit setting. -/// -/// @details -/// - Setting ocIccMax to 0.0 will return the value to the factory default. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] No longer supported. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). -/// + The `isIccMaxSupported` member of ::zes_oc_capabilities_t is false for this frequency domain. -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + Overclocking feature is locked on this frequency domain. -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + The specified current limit is too low or too high. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. +// / +// / @details +// / - Setting ocIccMax to 0.0 will return the value to the factory default. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] No longer supported. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). +// / + The `isIccMaxSupported` member of ::zes_oc_capabilities_t is false for this frequency domain. +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + Overclocking feature is locked on this frequency domain. +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + The specified current limit is too low or too high. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. func ZesFrequencyOcSetIccMax( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - ocIccMax float64, // ocIccMax [in] The new maximum current limit in Amperes. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + ocIccMax float64, // ocIccMax [in] The new maximum current limit in Amperes. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyOcSetIccMax", uintptr(hFrequency), uintptr(ocIccMax)) } // ZesFrequencyOcGetTjMax Get the maximum temperature limit setting. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] No longer supported. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pOcTjMax` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] No longer supported. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pOcTjMax` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). func ZesFrequencyOcGetTjMax( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - pOcTjMax *float64, // pOcTjMax [in,out] Will contain the maximum temperature limit in degrees Celsius on successful return. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + pOcTjMax *float64, // pOcTjMax [in,out] Will contain the maximum temperature limit in degrees Celsius on successful return. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyOcGetTjMax", uintptr(hFrequency), uintptr(unsafe.Pointer(pOcTjMax))) } // ZesFrequencyOcSetTjMax Change the maximum temperature limit setting. -/// -/// @details -/// - Setting ocTjMax to 0.0 will return the value to the factory default. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] No longer supported. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hFrequency` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). -/// + The `isTjMaxSupported` member of ::zes_oc_capabilities_t is false for this frequency domain. -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + Overclocking feature is locked on this frequency domain. -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + The specified temperature limit is too high. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. +// / +// / @details +// / - Setting ocTjMax to 0.0 will return the value to the factory default. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] No longer supported. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hFrequency` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Overclocking is not supported on this frequency domain (see the `isOcSupported` member of ::zes_oc_capabilities_t). +// / + The `isTjMaxSupported` member of ::zes_oc_capabilities_t is false for this frequency domain. +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + Overclocking feature is locked on this frequency domain. +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + The specified temperature limit is too high. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. func ZesFrequencyOcSetTjMax( - hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. - ocTjMax float64, // ocTjMax [in] The new maximum temperature limit in degrees Celsius. + hFrequency ZesFreqHandle, // hFrequency [in] Handle for the component. + ocTjMax float64, // ocTjMax [in] The new maximum temperature limit in degrees Celsius. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesFrequencyOcSetTjMax", uintptr(hFrequency), uintptr(ocTjMax)) } - diff --git a/sysm_led.go b/sysm_led.go index dbf1622..f73a90a 100644 --- a/sysm_led.go +++ b/sysm_led.go @@ -21,186 +21,185 @@ import ( // ZesLedProperties (zes_led_properties_t) LED properties type ZesLedProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device - Cancontrol ZeBool // Cancontrol [out] Indicates if software can control the LED assuming the user has permissions - Havergb ZeBool // Havergb [out] Indicates if the LED is RGB capable + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Cancontrol ZeBool // Cancontrol [out] Indicates if software can control the LED assuming the user has permissions + Havergb ZeBool // Havergb [out] Indicates if the LED is RGB capable } // ZesLedColor (zes_led_color_t) LED color type ZesLedColor struct { - Red float64 // Red [in,out][range(0.0, 1.0)] The LED red value. On output, a value less than 0.0 indicates that the color is not known. - Green float64 // Green [in,out][range(0.0, 1.0)] The LED green value. On output, a value less than 0.0 indicates that the color is not known. - Blue float64 // Blue [in,out][range(0.0, 1.0)] The LED blue value. On output, a value less than 0.0 indicates that the color is not known. + Red float64 // Red [in,out][range(0.0, 1.0)] The LED red value. On output, a value less than 0.0 indicates that the color is not known. + Green float64 // Green [in,out][range(0.0, 1.0)] The LED green value. On output, a value less than 0.0 indicates that the color is not known. + Blue float64 // Blue [in,out][range(0.0, 1.0)] The LED blue value. On output, a value less than 0.0 indicates that the color is not known. } // ZesLedState (zes_led_state_t) LED state type ZesLedState struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Ison ZeBool // Ison [out] Indicates if the LED is on or off - Color ZesLedColor // Color [out] Color of the LED + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Ison ZeBool // Ison [out] Indicates if the LED is on or off + Color ZesLedColor // Color [out] Color of the LED } // ZesDeviceEnumLeds Get handle of LEDs -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumLeds( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phLed *ZesLedHandle, // phLed [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phLed *ZesLedHandle, // phLed [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumLeds", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phLed))) } // ZesLedGetProperties Get LED properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hLed` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hLed` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesLedGetProperties( - hLed ZesLedHandle, // hLed [in] Handle for the component. - pProperties *ZesLedProperties, // pProperties [in,out] Will contain the properties of the LED. + hLed ZesLedHandle, // hLed [in] Handle for the component. + pProperties *ZesLedProperties, // pProperties [in,out] Will contain the properties of the LED. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesLedGetProperties", uintptr(hLed), uintptr(unsafe.Pointer(pProperties))) } // ZesLedGetState Get current state of a LED - on/off, color -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hLed` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pState` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hLed` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pState` func ZesLedGetState( - hLed ZesLedHandle, // hLed [in] Handle for the component. - pState *ZesLedState, // pState [in,out] Will contain the current state of the LED. + hLed ZesLedHandle, // hLed [in] Handle for the component. + pState *ZesLedState, // pState [in,out] Will contain the current state of the LED. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesLedGetState", uintptr(hLed), uintptr(unsafe.Pointer(pState))) } // ZesLedSetState Turn the LED on/off -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hLed` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hLed` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. func ZesLedSetState( - hLed ZesLedHandle, // hLed [in] Handle for the component. - enable ZeBool, // enable [in] Set to TRUE to turn the LED on, FALSE to turn off. + hLed ZesLedHandle, // hLed [in] Handle for the component. + enable ZeBool, // enable [in] Set to TRUE to turn the LED on, FALSE to turn off. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesLedSetState", uintptr(hLed), uintptr(enable)) } // ZesLedSetColor Set the color of the LED -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hLed` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pColor` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + This LED doesn't not support color changes. See the `haveRGB` member of ::zes_led_properties_t. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hLed` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pColor` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + This LED doesn't not support color changes. See the `haveRGB` member of ::zes_led_properties_t. func ZesLedSetColor( - hLed ZesLedHandle, // hLed [in] Handle for the component. - pColor *ZesLedColor, // pColor [in] New color of the LED. + hLed ZesLedHandle, // hLed [in] Handle for the component. + pColor *ZesLedColor, // pColor [in] New color of the LED. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesLedSetColor", uintptr(hLed), uintptr(unsafe.Pointer(pColor))) } - diff --git a/sysm_memPageOfflineState.go b/sysm_memPageOfflineState.go index e23cf57..85c76fa 100644 --- a/sysm_memPageOfflineState.go +++ b/sysm_memPageOfflineState.go @@ -22,24 +22,24 @@ const ZES_MEM_PAGE_OFFLINE_STATE_EXP_NAME = "ZES_extension_mem_state" // ZesMemPageOfflineStateExpVersion (zes_mem_page_offline_state_exp_version_t) Memory State Extension Version(s) type ZesMemPageOfflineStateExpVersion uintptr + const ( - ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_1_0 ZesMemPageOfflineStateExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_1_0 version 1.0 - ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_CURRENT ZesMemPageOfflineStateExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_CURRENT latest known version - ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_FORCE_UINT32 ZesMemPageOfflineStateExpVersion = 0x7fffffff // ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_* ENUMs + ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_1_0 ZesMemPageOfflineStateExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_1_0 version 1.0 + ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_CURRENT ZesMemPageOfflineStateExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_CURRENT latest known version + ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_FORCE_UINT32 ZesMemPageOfflineStateExpVersion = 0x7fffffff // ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_MEM_PAGE_OFFLINE_STATE_EXP_VERSION_* ENUMs ) // ZesMemPageOfflineStateExp (zes_mem_page_offline_state_exp_t) Extension properties for Memory State -/// -/// @details -/// - This structure may be returned from ::zesMemoryGetState via the -/// `pNext` member of ::zes_mem_state_t -/// - These additional parameters get Memory Page Offline Metrics +// / +// / @details +// / - This structure may be returned from ::zesMemoryGetState via the +// / `pNext` member of ::zes_mem_state_t +// / - These additional parameters get Memory Page Offline Metrics type ZesMemPageOfflineStateExp struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Memorypageoffline uint32 // Memorypageoffline [out] Returns the number of Memory Pages Offline - Maxmemorypageoffline uint32 // Maxmemorypageoffline [out] Returns the Allowed Memory Pages Offline + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Memorypageoffline uint32 // Memorypageoffline [out] Returns the number of Memory Pages Offline + Maxmemorypageoffline uint32 // Maxmemorypageoffline [out] Returns the Allowed Memory Pages Offline } - diff --git a/sysm_memory.go b/sysm_memory.go index dbeff79..bdb5586 100644 --- a/sysm_memory.go +++ b/sysm_memory.go @@ -21,239 +21,241 @@ import ( // ZesMemType (zes_mem_type_t) Memory module types type ZesMemType uintptr + const ( - ZES_MEM_TYPE_HBM ZesMemType = 0 // ZES_MEM_TYPE_HBM HBM memory - ZES_MEM_TYPE_DDR ZesMemType = 1 // ZES_MEM_TYPE_DDR DDR memory - ZES_MEM_TYPE_DDR3 ZesMemType = 2 // ZES_MEM_TYPE_DDR3 DDR3 memory - ZES_MEM_TYPE_DDR4 ZesMemType = 3 // ZES_MEM_TYPE_DDR4 DDR4 memory - ZES_MEM_TYPE_DDR5 ZesMemType = 4 // ZES_MEM_TYPE_DDR5 DDR5 memory - ZES_MEM_TYPE_LPDDR ZesMemType = 5 // ZES_MEM_TYPE_LPDDR LPDDR memory - ZES_MEM_TYPE_LPDDR3 ZesMemType = 6 // ZES_MEM_TYPE_LPDDR3 LPDDR3 memory - ZES_MEM_TYPE_LPDDR4 ZesMemType = 7 // ZES_MEM_TYPE_LPDDR4 LPDDR4 memory - ZES_MEM_TYPE_LPDDR5 ZesMemType = 8 // ZES_MEM_TYPE_LPDDR5 LPDDR5 memory - ZES_MEM_TYPE_SRAM ZesMemType = 9 // ZES_MEM_TYPE_SRAM SRAM memory - ZES_MEM_TYPE_L1 ZesMemType = 10 // ZES_MEM_TYPE_L1 L1 cache - ZES_MEM_TYPE_L3 ZesMemType = 11 // ZES_MEM_TYPE_L3 L3 cache - ZES_MEM_TYPE_GRF ZesMemType = 12 // ZES_MEM_TYPE_GRF Execution unit register file - ZES_MEM_TYPE_SLM ZesMemType = 13 // ZES_MEM_TYPE_SLM Execution unit shared local memory - ZES_MEM_TYPE_GDDR4 ZesMemType = 14 // ZES_MEM_TYPE_GDDR4 GDDR4 memory - ZES_MEM_TYPE_GDDR5 ZesMemType = 15 // ZES_MEM_TYPE_GDDR5 GDDR5 memory - ZES_MEM_TYPE_GDDR5X ZesMemType = 16 // ZES_MEM_TYPE_GDDR5X GDDR5X memory - ZES_MEM_TYPE_GDDR6 ZesMemType = 17 // ZES_MEM_TYPE_GDDR6 GDDR6 memory - ZES_MEM_TYPE_GDDR6X ZesMemType = 18 // ZES_MEM_TYPE_GDDR6X GDDR6X memory - ZES_MEM_TYPE_GDDR7 ZesMemType = 19 // ZES_MEM_TYPE_GDDR7 GDDR7 memory - ZES_MEM_TYPE_FORCE_UINT32 ZesMemType = 0x7fffffff // ZES_MEM_TYPE_FORCE_UINT32 Value marking end of ZES_MEM_TYPE_* ENUMs + ZES_MEM_TYPE_HBM ZesMemType = 0 // ZES_MEM_TYPE_HBM HBM memory + ZES_MEM_TYPE_DDR ZesMemType = 1 // ZES_MEM_TYPE_DDR DDR memory + ZES_MEM_TYPE_DDR3 ZesMemType = 2 // ZES_MEM_TYPE_DDR3 DDR3 memory + ZES_MEM_TYPE_DDR4 ZesMemType = 3 // ZES_MEM_TYPE_DDR4 DDR4 memory + ZES_MEM_TYPE_DDR5 ZesMemType = 4 // ZES_MEM_TYPE_DDR5 DDR5 memory + ZES_MEM_TYPE_LPDDR ZesMemType = 5 // ZES_MEM_TYPE_LPDDR LPDDR memory + ZES_MEM_TYPE_LPDDR3 ZesMemType = 6 // ZES_MEM_TYPE_LPDDR3 LPDDR3 memory + ZES_MEM_TYPE_LPDDR4 ZesMemType = 7 // ZES_MEM_TYPE_LPDDR4 LPDDR4 memory + ZES_MEM_TYPE_LPDDR5 ZesMemType = 8 // ZES_MEM_TYPE_LPDDR5 LPDDR5 memory + ZES_MEM_TYPE_SRAM ZesMemType = 9 // ZES_MEM_TYPE_SRAM SRAM memory + ZES_MEM_TYPE_L1 ZesMemType = 10 // ZES_MEM_TYPE_L1 L1 cache + ZES_MEM_TYPE_L3 ZesMemType = 11 // ZES_MEM_TYPE_L3 L3 cache + ZES_MEM_TYPE_GRF ZesMemType = 12 // ZES_MEM_TYPE_GRF Execution unit register file + ZES_MEM_TYPE_SLM ZesMemType = 13 // ZES_MEM_TYPE_SLM Execution unit shared local memory + ZES_MEM_TYPE_GDDR4 ZesMemType = 14 // ZES_MEM_TYPE_GDDR4 GDDR4 memory + ZES_MEM_TYPE_GDDR5 ZesMemType = 15 // ZES_MEM_TYPE_GDDR5 GDDR5 memory + ZES_MEM_TYPE_GDDR5X ZesMemType = 16 // ZES_MEM_TYPE_GDDR5X GDDR5X memory + ZES_MEM_TYPE_GDDR6 ZesMemType = 17 // ZES_MEM_TYPE_GDDR6 GDDR6 memory + ZES_MEM_TYPE_GDDR6X ZesMemType = 18 // ZES_MEM_TYPE_GDDR6X GDDR6X memory + ZES_MEM_TYPE_GDDR7 ZesMemType = 19 // ZES_MEM_TYPE_GDDR7 GDDR7 memory + ZES_MEM_TYPE_FORCE_UINT32 ZesMemType = 0x7fffffff // ZES_MEM_TYPE_FORCE_UINT32 Value marking end of ZES_MEM_TYPE_* ENUMs ) // ZesMemLoc (zes_mem_loc_t) Memory module location type ZesMemLoc uintptr + const ( - ZES_MEM_LOC_SYSTEM ZesMemLoc = 0 // ZES_MEM_LOC_SYSTEM System memory - ZES_MEM_LOC_DEVICE ZesMemLoc = 1 // ZES_MEM_LOC_DEVICE On board local device memory - ZES_MEM_LOC_FORCE_UINT32 ZesMemLoc = 0x7fffffff // ZES_MEM_LOC_FORCE_UINT32 Value marking end of ZES_MEM_LOC_* ENUMs + ZES_MEM_LOC_SYSTEM ZesMemLoc = 0 // ZES_MEM_LOC_SYSTEM System memory + ZES_MEM_LOC_DEVICE ZesMemLoc = 1 // ZES_MEM_LOC_DEVICE On board local device memory + ZES_MEM_LOC_FORCE_UINT32 ZesMemLoc = 0x7fffffff // ZES_MEM_LOC_FORCE_UINT32 Value marking end of ZES_MEM_LOC_* ENUMs ) // ZesMemHealth (zes_mem_health_t) Memory health type ZesMemHealth uintptr + const ( - ZES_MEM_HEALTH_UNKNOWN ZesMemHealth = 0 // ZES_MEM_HEALTH_UNKNOWN The memory health cannot be determined. - ZES_MEM_HEALTH_OK ZesMemHealth = 1 // ZES_MEM_HEALTH_OK All memory channels are healthy. - ZES_MEM_HEALTH_DEGRADED ZesMemHealth = 2 // ZES_MEM_HEALTH_DEGRADED Excessive correctable errors have been detected on one or more + ZES_MEM_HEALTH_UNKNOWN ZesMemHealth = 0 // ZES_MEM_HEALTH_UNKNOWN The memory health cannot be determined. + ZES_MEM_HEALTH_OK ZesMemHealth = 1 // ZES_MEM_HEALTH_OK All memory channels are healthy. + ZES_MEM_HEALTH_DEGRADED ZesMemHealth = 2 // ZES_MEM_HEALTH_DEGRADED Excessive correctable errors have been detected on one or more ///< channels. Device should be reset. - ZES_MEM_HEALTH_CRITICAL ZesMemHealth = 3 // ZES_MEM_HEALTH_CRITICAL Operating with reduced memory to cover banks with too many + ZES_MEM_HEALTH_CRITICAL ZesMemHealth = 3 // ZES_MEM_HEALTH_CRITICAL Operating with reduced memory to cover banks with too many ///< uncorrectable errors. - ZES_MEM_HEALTH_REPLACE ZesMemHealth = 4 // ZES_MEM_HEALTH_REPLACE Device should be replaced due to excessive uncorrectable errors. - ZES_MEM_HEALTH_FORCE_UINT32 ZesMemHealth = 0x7fffffff // ZES_MEM_HEALTH_FORCE_UINT32 Value marking end of ZES_MEM_HEALTH_* ENUMs + ZES_MEM_HEALTH_REPLACE ZesMemHealth = 4 // ZES_MEM_HEALTH_REPLACE Device should be replaced due to excessive uncorrectable errors. + ZES_MEM_HEALTH_FORCE_UINT32 ZesMemHealth = 0x7fffffff // ZES_MEM_HEALTH_FORCE_UINT32 Value marking end of ZES_MEM_HEALTH_* ENUMs ) // ZesMemProperties (zes_mem_properties_t) Memory properties type ZesMemProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZesMemType // Type [out] The memory type - Onsubdevice ZeBool // Onsubdevice [out] True if this resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device - Location ZesMemLoc // Location [out] Location of this memory (system, device) - Physicalsize uint64 // Physicalsize [out] Physical memory capacity in bytes. A value of 0 indicates that this property is not known. However, a call to zesMemoryGetState() will return the available free physical memory. - Buswidth int32 // Buswidth [out] Width of the memory bus. A value of -1 means that this property is unknown. - Numchannels int32 // Numchannels [out] The number of memory channels. A value of -1 means that this property is unknown. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZesMemType // Type [out] The memory type + Onsubdevice ZeBool // Onsubdevice [out] True if this resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Location ZesMemLoc // Location [out] Location of this memory (system, device) + Physicalsize uint64 // Physicalsize [out] Physical memory capacity in bytes. A value of 0 indicates that this property is not known. However, a call to zesMemoryGetState() will return the available free physical memory. + Buswidth int32 // Buswidth [out] Width of the memory bus. A value of -1 means that this property is unknown. + Numchannels int32 // Numchannels [out] The number of memory channels. A value of -1 means that this property is unknown. } // ZesMemState (zes_mem_state_t) Memory state - health, allocated -/// -/// @details -/// - Percent free is given by 100 * free / pysical mem size. +// / +// / @details +// / - Percent free is given by 100 * free / pysical mem size. type ZesMemState struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Health ZesMemHealth // Health [out] Indicates the health of the memory - Free uint64 // Free [out] The free physical memory in bytes - Size uint64 // Size [out] The total allocatable memory in bytes (can be less than the `physicalSize` member of ::zes_mem_properties_t). *DEPRECATED* This member can no longer track the allocatable memory reliably. Clients depending on this information can use the zeDeviceGetMemoryProperties with ze_device_usablemem_size_ext_properties_t extention to get information of the available usable memory. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Health ZesMemHealth // Health [out] Indicates the health of the memory + Free uint64 // Free [out] The free physical memory in bytes + Size uint64 // Size [out] The total allocatable memory in bytes (can be less than the `physicalSize` member of ::zes_mem_properties_t). *DEPRECATED* This member can no longer track the allocatable memory reliably. Clients depending on this information can use the zeDeviceGetMemoryProperties with ze_device_usablemem_size_ext_properties_t extention to get information of the available usable memory. } // ZesMemBandwidth (zes_mem_bandwidth_t) Memory bandwidth -/// -/// @details -/// - Percent bandwidth is calculated by taking two snapshots (s1, s2) and -/// using the equation: %bw = 10^6 * ((s2.readCounter - s1.readCounter) + -/// (s2.writeCounter - s1.writeCounter)) / (s2.maxBandwidth * -/// (s2.timestamp - s1.timestamp)) -/// - Counter can roll over and rollover needs to be handled by comparing -/// the current read against the previous read -/// - Counter is a 32 byte transaction count, which means the calculated -/// delta (delta = current_value - previous_value or delta = 2^32 - -/// previous_value + current_value in case of rollover) needs to be -/// multiplied by 32 to get delta between samples in actual byte count +// / +// / @details +// / - Percent bandwidth is calculated by taking two snapshots (s1, s2) and +// / using the equation: %bw = 10^6 * ((s2.readCounter - s1.readCounter) + +// / (s2.writeCounter - s1.writeCounter)) / (s2.maxBandwidth * +// / (s2.timestamp - s1.timestamp)) +// / - Counter can roll over and rollover needs to be handled by comparing +// / the current read against the previous read +// / - Counter is a 32 byte transaction count, which means the calculated +// / delta (delta = current_value - previous_value or delta = 2^32 - +// / previous_value + current_value in case of rollover) needs to be +// / multiplied by 32 to get delta between samples in actual byte count type ZesMemBandwidth struct { - Readcounter uint64 // Readcounter [out] Total bytes read from memory - Writecounter uint64 // Writecounter [out] Total bytes written to memory - Maxbandwidth uint64 // Maxbandwidth [out] Current maximum bandwidth in units of bytes/sec - Timestamp uint64 // Timestamp [out] The timestamp in microseconds when these measurements were sampled. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution. + Readcounter uint64 // Readcounter [out] Total bytes read from memory + Writecounter uint64 // Writecounter [out] Total bytes written to memory + Maxbandwidth uint64 // Maxbandwidth [out] Current maximum bandwidth in units of bytes/sec + Timestamp uint64 // Timestamp [out] The timestamp in microseconds when these measurements were sampled. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution. } // ZesMemExtBandwidth (zes_mem_ext_bandwidth_t) Extension properties for Memory bandwidth -/// -/// @details -/// - Number of counter bits -/// - [DEPRECATED] No longer supported. +// / +// / @details +// / - Number of counter bits +// / - [DEPRECATED] No longer supported. type ZesMemExtBandwidth struct { - Memorytimestampvalidbits uint32 // Memorytimestampvalidbits [out] Returns the number of valid bits in the timestamp values + Memorytimestampvalidbits uint32 // Memorytimestampvalidbits [out] Returns the number of valid bits in the timestamp values } // ZesDeviceEnumMemoryModules Get handle of memory modules -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumMemoryModules( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phMemory *ZesMemHandle, // phMemory [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phMemory *ZesMemHandle, // phMemory [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumMemoryModules", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phMemory))) } // ZesMemoryGetProperties Get memory properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMemory` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMemory` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesMemoryGetProperties( - hMemory ZesMemHandle, // hMemory [in] Handle for the component. - pProperties *ZesMemProperties, // pProperties [in,out] Will contain memory properties. + hMemory ZesMemHandle, // hMemory [in] Handle for the component. + pProperties *ZesMemProperties, // pProperties [in,out] Will contain memory properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesMemoryGetProperties", uintptr(hMemory), uintptr(unsafe.Pointer(pProperties))) } // ZesMemoryGetState Get memory state - health, allocated -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMemory` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pState` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMemory` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pState` func ZesMemoryGetState( - hMemory ZesMemHandle, // hMemory [in] Handle for the component. - pState *ZesMemState, // pState [in,out] Will contain the current health and allocated memory. + hMemory ZesMemHandle, // hMemory [in] Handle for the component. + pState *ZesMemState, // pState [in,out] Will contain the current health and allocated memory. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesMemoryGetState", uintptr(hMemory), uintptr(unsafe.Pointer(pState))) } // ZesMemoryGetBandwidth Get memory bandwidth -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMemory` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pBandwidth` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to query this telemetry. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMemory` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pBandwidth` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to query this telemetry. func ZesMemoryGetBandwidth( - hMemory ZesMemHandle, // hMemory [in] Handle for the component. - pBandwidth *ZesMemBandwidth, // pBandwidth [in,out] Will contain the total number of bytes read from and written to memory, as well as the current maximum bandwidth. + hMemory ZesMemHandle, // hMemory [in] Handle for the component. + pBandwidth *ZesMemBandwidth, // pBandwidth [in,out] Will contain the total number of bytes read from and written to memory, as well as the current maximum bandwidth. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesMemoryGetBandwidth", uintptr(hMemory), uintptr(unsafe.Pointer(pBandwidth))) } - diff --git a/sysm_memoryBwCounterValidBits.go b/sysm_memoryBwCounterValidBits.go index 86a54af..b806469 100644 --- a/sysm_memoryBwCounterValidBits.go +++ b/sysm_memoryBwCounterValidBits.go @@ -22,26 +22,26 @@ const ZES_MEMORY_BANDWIDTH_COUNTER_BITS_EXP_PROPERTIES_NAME = "ZES_extension_mem // ZesMemBandwidthCounterBitsExpVersion (zes_mem_bandwidth_counter_bits_exp_version_t) Memory Bandwidth Counter Valid Bits Extension Version(s) type ZesMemBandwidthCounterBitsExpVersion uintptr + const ( - ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_1_0 ZesMemBandwidthCounterBitsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_1_0 version 1.0 - ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_CURRENT ZesMemBandwidthCounterBitsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_CURRENT latest known version - ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_FORCE_UINT32 ZesMemBandwidthCounterBitsExpVersion = 0x7fffffff // ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_* ENUMs + ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_1_0 ZesMemBandwidthCounterBitsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_1_0 version 1.0 + ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_CURRENT ZesMemBandwidthCounterBitsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_CURRENT latest known version + ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_FORCE_UINT32 ZesMemBandwidthCounterBitsExpVersion = 0x7fffffff // ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_MEM_BANDWIDTH_COUNTER_BITS_EXP_VERSION_* ENUMs ) // ZesMemBandwidthCounterBitsExpProperties (zes_mem_bandwidth_counter_bits_exp_properties_t) Extension properties for reporting valid bit count for memory -/// bandwidth counter value -/// -/// @details -/// - Number of valid read and write counter bits of memory bandwidth -/// - This structure may be returned from ::zesMemoryGetProperties via the -/// `pNext` member of ::zes_mem_properties_t. -/// - Used for denoting number of valid bits in the counter value returned -/// in ::zes_mem_bandwidth_t. +// / bandwidth counter value +// / +// / @details +// / - Number of valid read and write counter bits of memory bandwidth +// / - This structure may be returned from ::zesMemoryGetProperties via the +// / `pNext` member of ::zes_mem_properties_t. +// / - Used for denoting number of valid bits in the counter value returned +// / in ::zes_mem_bandwidth_t. type ZesMemBandwidthCounterBitsExpProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Validbitscount uint32 // Validbitscount [out] Returns the number of valid bits in the counter values + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Validbitscount uint32 // Validbitscount [out] Returns the number of valid bits in the counter values } - diff --git a/sysm_pciLinkSpeedDowngrade.go b/sysm_pciLinkSpeedDowngrade.go index c477304..d1a525e 100644 --- a/sysm_pciLinkSpeedDowngrade.go +++ b/sysm_pciLinkSpeedDowngrade.go @@ -24,67 +24,67 @@ const ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_NAME = "ZES_extension_pci_link_speed_down // ZesPciLinkSpeedDowngradeExtVersion (zes_pci_link_speed_downgrade_ext_version_t) PCI Link Speed Downgrade Extension Version(s) type ZesPciLinkSpeedDowngradeExtVersion uintptr + const ( - ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_1_0 ZesPciLinkSpeedDowngradeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_1_0 version 1.0 - ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_CURRENT ZesPciLinkSpeedDowngradeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_CURRENT latest known version - ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_FORCE_UINT32 ZesPciLinkSpeedDowngradeExtVersion = 0x7fffffff // ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_FORCE_UINT32 Value marking end of ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_* ENUMs + ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_1_0 ZesPciLinkSpeedDowngradeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_1_0 version 1.0 + ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_CURRENT ZesPciLinkSpeedDowngradeExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_CURRENT latest known version + ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_FORCE_UINT32 ZesPciLinkSpeedDowngradeExtVersion = 0x7fffffff // ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_FORCE_UINT32 Value marking end of ZES_PCI_LINK_SPEED_DOWNGRADE_EXT_VERSION_* ENUMs ) // ZesPciLinkSpeedDowngradeExtState (zes_pci_link_speed_downgrade_ext_state_t) Query PCIe downgrade status. -/// -/// @details -/// - This structure can be passed in the 'pNext' of ::zes_pci_state_t +// / +// / @details +// / - This structure can be passed in the 'pNext' of ::zes_pci_state_t type ZesPciLinkSpeedDowngradeExtState struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Pcilinkspeeddowngradestatus ZeBool // Pcilinkspeeddowngradestatus [out] Returns the current PCIe downgrade status. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Pcilinkspeeddowngradestatus ZeBool // Pcilinkspeeddowngradestatus [out] Returns the current PCIe downgrade status. } // ZesPciLinkSpeedDowngradeExtProperties (zes_pci_link_speed_downgrade_ext_properties_t) Query PCIe downgrade capability. -/// -/// @details -/// - This structure can be passed in the 'pNext' of ::zes_pci_properties_t +// / +// / @details +// / - This structure can be passed in the 'pNext' of ::zes_pci_properties_t type ZesPciLinkSpeedDowngradeExtProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Pcilinkspeedupdatecapable ZeBool // Pcilinkspeedupdatecapable [out] Returns if PCIe downgrade capability is available. - Maxpcigensupported int32 // Maxpcigensupported [out] Returns the max supported PCIe generation of the device. -1 indicates the information is not available + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Pcilinkspeedupdatecapable ZeBool // Pcilinkspeedupdatecapable [out] Returns if PCIe downgrade capability is available. + Maxpcigensupported int32 // Maxpcigensupported [out] Returns the max supported PCIe generation of the device. -1 indicates the information is not available } // ZesDevicePciLinkSpeedUpdateExt Update PCI Link Speed (Downgrade or Upgrade (restore to its default -/// speed)) -/// -/// @details -/// - This function allows updating the PCI link speed to downgrade or -/// upgrade (restore to its default speed) the connection. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pendingAction` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to perform this operation. +// / speed)) +// / +// / @details +// / - This function allows updating the PCI link speed to downgrade or +// / upgrade (restore to its default speed) the connection. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pendingAction` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to perform this operation. func ZesDevicePciLinkSpeedUpdateExt( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - shouldDowngrade ZeBool, // shouldDowngrade [in] boolean value to decide whether to perform PCIe downgrade(true) or set to default speed(false) - pendingAction *ZesDeviceAction, // pendingAction [out] Pending action + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + shouldDowngrade ZeBool, // shouldDowngrade [in] boolean value to decide whether to perform PCIe downgrade(true) or set to default speed(false) + pendingAction *ZesDeviceAction, // pendingAction [out] Pending action ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDevicePciLinkSpeedUpdateExt", uintptr(hDevice), uintptr(shouldDowngrade), uintptr(unsafe.Pointer(pendingAction))) } - diff --git a/sysm_performance.go b/sysm_performance.go index 676bd88..241b0c2 100644 --- a/sysm_performance.go +++ b/sysm_performance.go @@ -21,141 +21,140 @@ import ( // ZesPerfProperties (zes_perf_properties_t) Static information about a Performance Factor domain type ZesPerfProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Onsubdevice ZeBool // Onsubdevice [out] True if this Performance Factor affects accelerators located on a sub-device - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device - Engines ZesEngineTypeFlags // Engines [out] Bitfield of accelerator engine types that are affected by this Performance Factor. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Onsubdevice ZeBool // Onsubdevice [out] True if this Performance Factor affects accelerators located on a sub-device + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Engines ZesEngineTypeFlags // Engines [out] Bitfield of accelerator engine types that are affected by this Performance Factor. } // ZesDeviceEnumPerformanceFactorDomains Get handles to accelerator domains whose performance can be optimized -/// via a Performance Factor -/// -/// @details -/// - A Performance Factor should be tuned for each workload. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / via a Performance Factor +// / +// / @details +// / - A Performance Factor should be tuned for each workload. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumPerformanceFactorDomains( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phPerf *ZesPerfHandle, // phPerf [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phPerf *ZesPerfHandle, // phPerf [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumPerformanceFactorDomains", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phPerf))) } // ZesPerformanceFactorGetProperties Get properties about a Performance Factor domain -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPerf` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPerf` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesPerformanceFactorGetProperties( - hPerf ZesPerfHandle, // hPerf [in] Handle for the Performance Factor domain. - pProperties *ZesPerfProperties, // pProperties [in,out] Will contain information about the specified Performance Factor domain. + hPerf ZesPerfHandle, // hPerf [in] Handle for the Performance Factor domain. + pProperties *ZesPerfProperties, // pProperties [in,out] Will contain information about the specified Performance Factor domain. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPerformanceFactorGetProperties", uintptr(hPerf), uintptr(unsafe.Pointer(pProperties))) } // ZesPerformanceFactorGetConfig Get current Performance Factor for a given domain -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPerf` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pFactor` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPerf` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pFactor` func ZesPerformanceFactorGetConfig( - hPerf ZesPerfHandle, // hPerf [in] Handle for the Performance Factor domain. - pFactor *float64, // pFactor [in,out] Will contain the actual Performance Factor being used by the hardware (may not be the same as the requested Performance Factor). + hPerf ZesPerfHandle, // hPerf [in] Handle for the Performance Factor domain. + pFactor *float64, // pFactor [in,out] Will contain the actual Performance Factor being used by the hardware (may not be the same as the requested Performance Factor). ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPerformanceFactorGetConfig", uintptr(hPerf), uintptr(unsafe.Pointer(pFactor))) } // ZesPerformanceFactorSetConfig Change the performance factor for a domain -/// -/// @details -/// - The Performance Factor is a number between 0 and 100. -/// - A Performance Factor is a hint to the hardware. Depending on the -/// hardware, the request may not be granted. Follow up this function with -/// a call to ::zesPerformanceFactorGetConfig() to determine the actual -/// factor being used by the hardware. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPerf` +// / +// / @details +// / - The Performance Factor is a number between 0 and 100. +// / - A Performance Factor is a hint to the hardware. Depending on the +// / hardware, the request may not be granted. Follow up this function with +// / a call to ::zesPerformanceFactorGetConfig() to determine the actual +// / factor being used by the hardware. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPerf` func ZesPerformanceFactorSetConfig( - hPerf ZesPerfHandle, // hPerf [in] Handle for the Performance Factor domain. - factor float64, // factor [in] The new Performance Factor. + hPerf ZesPerfHandle, // hPerf [in] Handle for the Performance Factor domain. + factor float64, // factor [in] The new Performance Factor. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPerformanceFactorSetConfig", uintptr(hPerf), uintptr(factor)) } - diff --git a/sysm_power.go b/sysm_power.go index 34c5ee0..6a25f5a 100644 --- a/sysm_power.go +++ b/sysm_power.go @@ -21,421 +21,424 @@ import ( // ZesPowerDomain (zes_power_domain_t) Power Domain type ZesPowerDomain uintptr + const ( - ZES_POWER_DOMAIN_UNKNOWN ZesPowerDomain = 0 // ZES_POWER_DOMAIN_UNKNOWN The PUnit power domain level cannot be determined. - ZES_POWER_DOMAIN_CARD ZesPowerDomain = 1 // ZES_POWER_DOMAIN_CARD The PUnit power domain is a card-level power domain. - ZES_POWER_DOMAIN_PACKAGE ZesPowerDomain = 2 // ZES_POWER_DOMAIN_PACKAGE The PUnit power domain is a package-level power domain. - ZES_POWER_DOMAIN_STACK ZesPowerDomain = 3 // ZES_POWER_DOMAIN_STACK The PUnit power domain is a stack-level power domain. - ZES_POWER_DOMAIN_MEMORY ZesPowerDomain = 4 // ZES_POWER_DOMAIN_MEMORY The PUnit power domain is a memory-level power domain. - ZES_POWER_DOMAIN_GPU ZesPowerDomain = 5 // ZES_POWER_DOMAIN_GPU The PUnit power domain is a GPU-level power domain. - ZES_POWER_DOMAIN_FORCE_UINT32 ZesPowerDomain = 0x7fffffff // ZES_POWER_DOMAIN_FORCE_UINT32 Value marking end of ZES_POWER_DOMAIN_* ENUMs + ZES_POWER_DOMAIN_UNKNOWN ZesPowerDomain = 0 // ZES_POWER_DOMAIN_UNKNOWN The PUnit power domain level cannot be determined. + ZES_POWER_DOMAIN_CARD ZesPowerDomain = 1 // ZES_POWER_DOMAIN_CARD The PUnit power domain is a card-level power domain. + ZES_POWER_DOMAIN_PACKAGE ZesPowerDomain = 2 // ZES_POWER_DOMAIN_PACKAGE The PUnit power domain is a package-level power domain. + ZES_POWER_DOMAIN_STACK ZesPowerDomain = 3 // ZES_POWER_DOMAIN_STACK The PUnit power domain is a stack-level power domain. + ZES_POWER_DOMAIN_MEMORY ZesPowerDomain = 4 // ZES_POWER_DOMAIN_MEMORY The PUnit power domain is a memory-level power domain. + ZES_POWER_DOMAIN_GPU ZesPowerDomain = 5 // ZES_POWER_DOMAIN_GPU The PUnit power domain is a GPU-level power domain. + ZES_POWER_DOMAIN_FORCE_UINT32 ZesPowerDomain = 0x7fffffff // ZES_POWER_DOMAIN_FORCE_UINT32 Value marking end of ZES_POWER_DOMAIN_* ENUMs ) // ZesPowerLevel (zes_power_level_t) Power Level Type type ZesPowerLevel uintptr + const ( - ZES_POWER_LEVEL_UNKNOWN ZesPowerLevel = 0 // ZES_POWER_LEVEL_UNKNOWN The PUnit power monitoring duration cannot be determined. - ZES_POWER_LEVEL_SUSTAINED ZesPowerLevel = 1 // ZES_POWER_LEVEL_SUSTAINED The PUnit determines effective power draw by computing a moving + ZES_POWER_LEVEL_UNKNOWN ZesPowerLevel = 0 // ZES_POWER_LEVEL_UNKNOWN The PUnit power monitoring duration cannot be determined. + ZES_POWER_LEVEL_SUSTAINED ZesPowerLevel = 1 // ZES_POWER_LEVEL_SUSTAINED The PUnit determines effective power draw by computing a moving ///< average of the actual power draw over a time interval (longer than ///< BURST). - ZES_POWER_LEVEL_BURST ZesPowerLevel = 2 // ZES_POWER_LEVEL_BURST The PUnit determines effective power draw by computing a moving + ZES_POWER_LEVEL_BURST ZesPowerLevel = 2 // ZES_POWER_LEVEL_BURST The PUnit determines effective power draw by computing a moving ///< average of the actual power draw over a time interval (longer than ///< PEAK). - ZES_POWER_LEVEL_PEAK ZesPowerLevel = 3 // ZES_POWER_LEVEL_PEAK The PUnit determines effective power draw by computing a moving + ZES_POWER_LEVEL_PEAK ZesPowerLevel = 3 // ZES_POWER_LEVEL_PEAK The PUnit determines effective power draw by computing a moving ///< average of the actual power draw over a very short time interval. - ZES_POWER_LEVEL_INSTANTANEOUS ZesPowerLevel = 4 // ZES_POWER_LEVEL_INSTANTANEOUS The PUnit predicts effective power draw using the current device + ZES_POWER_LEVEL_INSTANTANEOUS ZesPowerLevel = 4 // ZES_POWER_LEVEL_INSTANTANEOUS The PUnit predicts effective power draw using the current device ///< configuration (frequency, voltage, etc...) & throttles proactively to ///< stay within the specified limit. - ZES_POWER_LEVEL_FORCE_UINT32 ZesPowerLevel = 0x7fffffff // ZES_POWER_LEVEL_FORCE_UINT32 Value marking end of ZES_POWER_LEVEL_* ENUMs + ZES_POWER_LEVEL_FORCE_UINT32 ZesPowerLevel = 0x7fffffff // ZES_POWER_LEVEL_FORCE_UINT32 Value marking end of ZES_POWER_LEVEL_* ENUMs ) // ZesPowerSource (zes_power_source_t) Power Source Type type ZesPowerSource uintptr + const ( - ZES_POWER_SOURCE_ANY ZesPowerSource = 0 // ZES_POWER_SOURCE_ANY Limit active no matter whether the power source is mains powered or + ZES_POWER_SOURCE_ANY ZesPowerSource = 0 // ZES_POWER_SOURCE_ANY Limit active no matter whether the power source is mains powered or ///< battery powered. - ZES_POWER_SOURCE_MAINS ZesPowerSource = 1 // ZES_POWER_SOURCE_MAINS Limit active only when the device is mains powered. - ZES_POWER_SOURCE_BATTERY ZesPowerSource = 2 // ZES_POWER_SOURCE_BATTERY Limit active only when the device is battery powered. - ZES_POWER_SOURCE_FORCE_UINT32 ZesPowerSource = 0x7fffffff // ZES_POWER_SOURCE_FORCE_UINT32 Value marking end of ZES_POWER_SOURCE_* ENUMs + ZES_POWER_SOURCE_MAINS ZesPowerSource = 1 // ZES_POWER_SOURCE_MAINS Limit active only when the device is mains powered. + ZES_POWER_SOURCE_BATTERY ZesPowerSource = 2 // ZES_POWER_SOURCE_BATTERY Limit active only when the device is battery powered. + ZES_POWER_SOURCE_FORCE_UINT32 ZesPowerSource = 0x7fffffff // ZES_POWER_SOURCE_FORCE_UINT32 Value marking end of ZES_POWER_SOURCE_* ENUMs ) // ZesLimitUnit (zes_limit_unit_t) Limit Unit type ZesLimitUnit uintptr + const ( - ZES_LIMIT_UNIT_UNKNOWN ZesLimitUnit = 0 // ZES_LIMIT_UNIT_UNKNOWN The PUnit power monitoring unit cannot be determined. - ZES_LIMIT_UNIT_CURRENT ZesLimitUnit = 1 // ZES_LIMIT_UNIT_CURRENT The limit is specified in milliamperes of current drawn. - ZES_LIMIT_UNIT_POWER ZesLimitUnit = 2 // ZES_LIMIT_UNIT_POWER The limit is specified in milliwatts of power generated. - ZES_LIMIT_UNIT_FORCE_UINT32 ZesLimitUnit = 0x7fffffff // ZES_LIMIT_UNIT_FORCE_UINT32 Value marking end of ZES_LIMIT_UNIT_* ENUMs + ZES_LIMIT_UNIT_UNKNOWN ZesLimitUnit = 0 // ZES_LIMIT_UNIT_UNKNOWN The PUnit power monitoring unit cannot be determined. + ZES_LIMIT_UNIT_CURRENT ZesLimitUnit = 1 // ZES_LIMIT_UNIT_CURRENT The limit is specified in milliamperes of current drawn. + ZES_LIMIT_UNIT_POWER ZesLimitUnit = 2 // ZES_LIMIT_UNIT_POWER The limit is specified in milliwatts of power generated. + ZES_LIMIT_UNIT_FORCE_UINT32 ZesLimitUnit = 0x7fffffff // ZES_LIMIT_UNIT_FORCE_UINT32 Value marking end of ZES_LIMIT_UNIT_* ENUMs ) // ZesPowerProperties (zes_power_properties_t) Properties related to device power settings type ZesPowerProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Onsubdevice ZeBool // Onsubdevice [out] True if this resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device - Cancontrol ZeBool // Cancontrol [out] Software can change the power limits of this domain assuming the user has permissions. - Isenergythresholdsupported ZeBool // Isenergythresholdsupported [out] Indicates if this power domain supports the energy threshold event (::ZES_EVENT_TYPE_FLAG_ENERGY_THRESHOLD_CROSSED). - Defaultlimit int32 // Defaultlimit [out] (Deprecated) The factory default TDP power limit of the part in milliwatts. A value of -1 means that this is not known. - Minlimit int32 // Minlimit [out] (Deprecated) The minimum power limit in milliwatts that can be requested. A value of -1 means that this is not known. - Maxlimit int32 // Maxlimit [out] (Deprecated) The maximum power limit in milliwatts that can be requested. A value of -1 means that this is not known. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Onsubdevice ZeBool // Onsubdevice [out] True if this resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Cancontrol ZeBool // Cancontrol [out] Software can change the power limits of this domain assuming the user has permissions. + Isenergythresholdsupported ZeBool // Isenergythresholdsupported [out] Indicates if this power domain supports the energy threshold event (::ZES_EVENT_TYPE_FLAG_ENERGY_THRESHOLD_CROSSED). + Defaultlimit int32 // Defaultlimit [out] (Deprecated) The factory default TDP power limit of the part in milliwatts. A value of -1 means that this is not known. + Minlimit int32 // Minlimit [out] (Deprecated) The minimum power limit in milliwatts that can be requested. A value of -1 means that this is not known. + Maxlimit int32 // Maxlimit [out] (Deprecated) The maximum power limit in milliwatts that can be requested. A value of -1 means that this is not known. } // ZesPowerEnergyCounter (zes_power_energy_counter_t) Energy counter snapshot -/// -/// @details -/// - Average power is calculated by taking two snapshots (s1, s2) and using -/// the equation: PowerWatts = (s2.energy - s1.energy) / (s2.timestamp - -/// s1.timestamp) +// / +// / @details +// / - Average power is calculated by taking two snapshots (s1, s2) and using +// / the equation: PowerWatts = (s2.energy - s1.energy) / (s2.timestamp - +// / s1.timestamp) type ZesPowerEnergyCounter struct { - Energy uint64 // Energy [out] The monotonic energy counter in microjoules. - Timestamp uint64 // Timestamp [out] Microsecond timestamp when energy was captured. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution. + Energy uint64 // Energy [out] The monotonic energy counter in microjoules. + Timestamp uint64 // Timestamp [out] Microsecond timestamp when energy was captured. This timestamp should only be used to calculate delta time between snapshots of this structure. Never take the delta of this timestamp with the timestamp from a different structure since they are not guaranteed to have the same base. The absolute value of the timestamp is only valid during within the application and may be different on the next execution. } // ZesPowerSustainedLimit (zes_power_sustained_limit_t) Sustained power limits -/// -/// @details -/// - The power controller (Punit) will throttle the operating frequency if -/// the power averaged over a window (typically seconds) exceeds this -/// limit. -/// - [DEPRECATED] No longer supported. +// / +// / @details +// / - The power controller (Punit) will throttle the operating frequency if +// / the power averaged over a window (typically seconds) exceeds this +// / limit. +// / - [DEPRECATED] No longer supported. type ZesPowerSustainedLimit struct { - Enabled ZeBool // Enabled [in,out] indicates if the limit is enabled (true) or ignored (false) - Power int32 // Power [in,out] power limit in milliwatts - Interval int32 // Interval [in,out] power averaging window (Tau) in milliseconds + Enabled ZeBool // Enabled [in,out] indicates if the limit is enabled (true) or ignored (false) + Power int32 // Power [in,out] power limit in milliwatts + Interval int32 // Interval [in,out] power averaging window (Tau) in milliseconds } // ZesPowerBurstLimit (zes_power_burst_limit_t) Burst power limit -/// -/// @details -/// - The power controller (Punit) will throttle the operating frequency of -/// the device if the power averaged over a few milliseconds exceeds a -/// limit known as PL2. Typically PL2 > PL1 so that it permits the -/// frequency to burst higher for short periods than would be otherwise -/// permitted by PL1. -/// - [DEPRECATED] No longer supported. +// / +// / @details +// / - The power controller (Punit) will throttle the operating frequency of +// / the device if the power averaged over a few milliseconds exceeds a +// / limit known as PL2. Typically PL2 > PL1 so that it permits the +// / frequency to burst higher for short periods than would be otherwise +// / permitted by PL1. +// / - [DEPRECATED] No longer supported. type ZesPowerBurstLimit struct { - Enabled ZeBool // Enabled [in,out] indicates if the limit is enabled (true) or ignored (false) - Power int32 // Power [in,out] power limit in milliwatts + Enabled ZeBool // Enabled [in,out] indicates if the limit is enabled (true) or ignored (false) + Power int32 // Power [in,out] power limit in milliwatts } // ZesPowerPeakLimit (zes_power_peak_limit_t) Peak power limit -/// -/// @details -/// - The power controller (Punit) will reactively/proactively throttle the -/// operating frequency of the device when the instantaneous/100usec power -/// exceeds this limit. The limit is known as PL4 or Psys. It expresses -/// the maximum power that can be drawn from the power supply. -/// - If this power limit is removed or set too high, the power supply will -/// generate an interrupt when it detects an overcurrent condition and the -/// power controller will throttle the device frequencies down to min. It -/// is thus better to tune the PL4 value in order to avoid such -/// excursions. -/// - [DEPRECATED] No longer supported. +// / +// / @details +// / - The power controller (Punit) will reactively/proactively throttle the +// / operating frequency of the device when the instantaneous/100usec power +// / exceeds this limit. The limit is known as PL4 or Psys. It expresses +// / the maximum power that can be drawn from the power supply. +// / - If this power limit is removed or set too high, the power supply will +// / generate an interrupt when it detects an overcurrent condition and the +// / power controller will throttle the device frequencies down to min. It +// / is thus better to tune the PL4 value in order to avoid such +// / excursions. +// / - [DEPRECATED] No longer supported. type ZesPowerPeakLimit struct { - Powerac int32 // Powerac [in,out] power limit in milliwatts for the AC power source. - Powerdc int32 // Powerdc [in,out] power limit in milliwatts for the DC power source. On input, this is ignored if the product does not have a battery. On output, this will be -1 if the product does not have a battery. + Powerac int32 // Powerac [in,out] power limit in milliwatts for the AC power source. + Powerdc int32 // Powerdc [in,out] power limit in milliwatts for the DC power source. On input, this is ignored if the product does not have a battery. On output, this will be -1 if the product does not have a battery. } // ZesEnergyThreshold (zes_energy_threshold_t) Energy threshold -/// -/// @details -/// - . +// / +// / @details +// / - . type ZesEnergyThreshold struct { - Enable ZeBool // Enable [in,out] Indicates if the energy threshold is enabled. - Threshold float64 // Threshold [in,out] The energy threshold in Joules. Will be 0.0 if no threshold has been set. - Processid uint32 // Processid [in,out] The host process ID that set the energy threshold. Will be 0xFFFFFFFF if no threshold has been set. + Enable ZeBool // Enable [in,out] Indicates if the energy threshold is enabled. + Threshold float64 // Threshold [in,out] The energy threshold in Joules. Will be 0.0 if no threshold has been set. + Processid uint32 // Processid [in,out] The host process ID that set the energy threshold. Will be 0xFFFFFFFF if no threshold has been set. } // ZesDeviceEnumPowerDomains Get handle of power domains -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumPowerDomains( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phPower *ZesPwrHandle, // phPower [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phPower *ZesPwrHandle, // phPower [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumPowerDomains", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phPower))) } // ZesDeviceGetCardPowerDomain Get handle of the PCIe card-level power -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] No longer supported. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phPower` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + The device does not provide access to card level power controls or telemetry. An invalid power domain handle will be returned in phPower. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] No longer supported. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phPower` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + The device does not provide access to card level power controls or telemetry. An invalid power domain handle will be returned in phPower. func ZesDeviceGetCardPowerDomain( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - phPower *ZesPwrHandle, // phPower [in,out] power domain handle for the entire PCIe card. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + phPower *ZesPwrHandle, // phPower [in,out] power domain handle for the entire PCIe card. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceGetCardPowerDomain", uintptr(hDevice), uintptr(unsafe.Pointer(phPower))) } // ZesPowerGetProperties Get properties related to a power domain -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPower` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPower` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesPowerGetProperties( - hPower ZesPwrHandle, // hPower [in] Handle for the component. - pProperties *ZesPowerProperties, // pProperties [in,out] Structure that will contain property data. + hPower ZesPwrHandle, // hPower [in] Handle for the component. + pProperties *ZesPowerProperties, // pProperties [in,out] Structure that will contain property data. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPowerGetProperties", uintptr(hPower), uintptr(unsafe.Pointer(pProperties))) } // ZesPowerGetEnergyCounter Get energy counter -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPower` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pEnergy` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPower` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pEnergy` func ZesPowerGetEnergyCounter( - hPower ZesPwrHandle, // hPower [in] Handle for the component. - pEnergy *ZesPowerEnergyCounter, // pEnergy [in,out] Will contain the latest snapshot of the energy counter and timestamp when the last counter value was measured. + hPower ZesPwrHandle, // hPower [in] Handle for the component. + pEnergy *ZesPowerEnergyCounter, // pEnergy [in,out] Will contain the latest snapshot of the energy counter and timestamp when the last counter value was measured. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPowerGetEnergyCounter", uintptr(hPower), uintptr(unsafe.Pointer(pEnergy))) } // ZesPowerGetLimits Get power limits -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] Use ::zesPowerGetLimitsExt. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPower` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] Use ::zesPowerGetLimitsExt. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPower` func ZesPowerGetLimits( - hPower ZesPwrHandle, // hPower [in] Handle for the component. - pSustained *ZesPowerSustainedLimit, // pSustained [in,out][optional] The sustained power limit. If this is null, the current sustained power limits will not be returned. - pBurst *ZesPowerBurstLimit, // pBurst [in,out][optional] The burst power limit. If this is null, the current peak power limits will not be returned. - pPeak *ZesPowerPeakLimit, // pPeak [in,out][optional] The peak power limit. If this is null, the peak power limits will not be returned. + hPower ZesPwrHandle, // hPower [in] Handle for the component. + pSustained *ZesPowerSustainedLimit, // pSustained [in,out][optional] The sustained power limit. If this is null, the current sustained power limits will not be returned. + pBurst *ZesPowerBurstLimit, // pBurst [in,out][optional] The burst power limit. If this is null, the current peak power limits will not be returned. + pPeak *ZesPowerPeakLimit, // pPeak [in,out][optional] The peak power limit. If this is null, the peak power limits will not be returned. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPowerGetLimits", uintptr(hPower), uintptr(unsafe.Pointer(pSustained)), uintptr(unsafe.Pointer(pBurst)), uintptr(unsafe.Pointer(pPeak))) } // ZesPowerSetLimits Set power limits -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] Use ::zesPowerSetLimitsExt. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPower` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + The device is in use, meaning that the GPU is under Over clocking, applying power limits under overclocking is not supported. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] Use ::zesPowerSetLimitsExt. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPower` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + The device is in use, meaning that the GPU is under Over clocking, applying power limits under overclocking is not supported. func ZesPowerSetLimits( - hPower ZesPwrHandle, // hPower [in] Handle for the component. - pSustained *ZesPowerSustainedLimit, // pSustained [in][optional] The sustained power limit. If this is null, no changes will be made to the sustained power limits. - pBurst *ZesPowerBurstLimit, // pBurst [in][optional] The burst power limit. If this is null, no changes will be made to the burst power limits. - pPeak *ZesPowerPeakLimit, // pPeak [in][optional] The peak power limit. If this is null, no changes will be made to the peak power limits. + hPower ZesPwrHandle, // hPower [in] Handle for the component. + pSustained *ZesPowerSustainedLimit, // pSustained [in][optional] The sustained power limit. If this is null, no changes will be made to the sustained power limits. + pBurst *ZesPowerBurstLimit, // pBurst [in][optional] The burst power limit. If this is null, no changes will be made to the burst power limits. + pPeak *ZesPowerPeakLimit, // pPeak [in][optional] The peak power limit. If this is null, no changes will be made to the peak power limits. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPowerSetLimits", uintptr(hPower), uintptr(unsafe.Pointer(pSustained)), uintptr(unsafe.Pointer(pBurst)), uintptr(unsafe.Pointer(pPeak))) } // ZesPowerGetEnergyThreshold Get energy threshold -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPower` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pThreshold` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Energy threshold not supported on this power domain (check the `isEnergyThresholdSupported` member of ::zes_power_properties_t). -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to request this feature. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPower` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pThreshold` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Energy threshold not supported on this power domain (check the `isEnergyThresholdSupported` member of ::zes_power_properties_t). +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to request this feature. func ZesPowerGetEnergyThreshold( - hPower ZesPwrHandle, // hPower [in] Handle for the component. - pThreshold *ZesEnergyThreshold, // pThreshold [in,out] Returns information about the energy threshold setting - enabled/energy threshold/process ID. + hPower ZesPwrHandle, // hPower [in] Handle for the component. + pThreshold *ZesEnergyThreshold, // pThreshold [in,out] Returns information about the energy threshold setting - enabled/energy threshold/process ID. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPowerGetEnergyThreshold", uintptr(hPower), uintptr(unsafe.Pointer(pThreshold))) } // ZesPowerSetEnergyThreshold Set energy threshold -/// -/// @details -/// - An event ::ZES_EVENT_TYPE_FLAG_ENERGY_THRESHOLD_CROSSED will be -/// generated when the delta energy consumed starting from this call -/// exceeds the specified threshold. Use the function -/// ::zesDeviceEventRegister() to start receiving the event. -/// - Only one running process can control the energy threshold at a given -/// time. If another process attempts to change the energy threshold, the -/// error ::ZE_RESULT_ERROR_NOT_AVAILABLE will be returned. The function -/// ::zesPowerGetEnergyThreshold() to determine the process ID currently -/// controlling this setting. -/// - Calling this function will remove any pending energy thresholds and -/// start counting from the time of this call. -/// - Once the energy threshold has been reached and the event generated, -/// the threshold is automatically removed. It is up to the application to -/// request a new threshold. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPower` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Energy threshold not supported on this power domain (check the `isEnergyThresholdSupported` member of ::zes_power_properties_t). -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to request this feature. -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + Another running process has set the energy threshold. +// / +// / @details +// / - An event ::ZES_EVENT_TYPE_FLAG_ENERGY_THRESHOLD_CROSSED will be +// / generated when the delta energy consumed starting from this call +// / exceeds the specified threshold. Use the function +// / ::zesDeviceEventRegister() to start receiving the event. +// / - Only one running process can control the energy threshold at a given +// / time. If another process attempts to change the energy threshold, the +// / error ::ZE_RESULT_ERROR_NOT_AVAILABLE will be returned. The function +// / ::zesPowerGetEnergyThreshold() to determine the process ID currently +// / controlling this setting. +// / - Calling this function will remove any pending energy thresholds and +// / start counting from the time of this call. +// / - Once the energy threshold has been reached and the event generated, +// / the threshold is automatically removed. It is up to the application to +// / request a new threshold. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPower` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Energy threshold not supported on this power domain (check the `isEnergyThresholdSupported` member of ::zes_power_properties_t). +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to request this feature. +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + Another running process has set the energy threshold. func ZesPowerSetEnergyThreshold( - hPower ZesPwrHandle, // hPower [in] Handle for the component. - threshold float64, // threshold [in] The energy threshold to be set in joules. + hPower ZesPwrHandle, // hPower [in] Handle for the component. + threshold float64, // threshold [in] The energy threshold to be set in joules. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPowerSetEnergyThreshold", uintptr(hPower), uintptr(threshold)) } - diff --git a/sysm_powerDomainProperties.go b/sysm_powerDomainProperties.go index ece0f8e..ca225a0 100644 --- a/sysm_powerDomainProperties.go +++ b/sysm_powerDomainProperties.go @@ -22,24 +22,24 @@ const ZES_POWER_DOMAIN_PROPERTIES_EXP_NAME = "ZES_extension_power_domain_propert // ZesPowerDomainPropertiesExpVersion (zes_power_domain_properties_exp_version_t) Power Domain Properties Extension Version(s) type ZesPowerDomainPropertiesExpVersion uintptr + const ( - ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_1_0 ZesPowerDomainPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_1_0 version 1.0 - ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_CURRENT ZesPowerDomainPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_CURRENT latest known version - ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_FORCE_UINT32 ZesPowerDomainPropertiesExpVersion = 0x7fffffff // ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_* ENUMs + ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_1_0 ZesPowerDomainPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_1_0 version 1.0 + ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_CURRENT ZesPowerDomainPropertiesExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_CURRENT latest known version + ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_FORCE_UINT32 ZesPowerDomainPropertiesExpVersion = 0x7fffffff // ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_POWER_DOMAIN_PROPERTIES_EXP_VERSION_* ENUMs ) // ZesPowerDomainExpProperties (zes_power_domain_exp_properties_t) Extension structure for providing power domain information associated -/// with a power handle -/// -/// @details -/// - This structure may be returned from ::zesPowerGetProperties via the -/// `pNext` member of ::zes_power_properties_t. -/// - Used for associating a power handle with a power domain. +// / with a power handle +// / +// / @details +// / - This structure may be returned from ::zesPowerGetProperties via the +// / `pNext` member of ::zes_power_properties_t. +// / - Used for associating a power handle with a power domain. type ZesPowerDomainExpProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Powerdomain ZesPowerDomain // Powerdomain [out] Power domain associated with the power handle. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Powerdomain ZesPowerDomain // Powerdomain [out] Power domain associated with the power handle. } - diff --git a/sysm_powerLimits.go b/sysm_powerLimits.go index b250aa2..99349cb 100644 --- a/sysm_powerLimits.go +++ b/sysm_powerLimits.go @@ -24,119 +24,119 @@ const ZES_POWER_LIMITS_EXT_NAME = "ZES_extension_power_limits" // ZesPowerLimitsExtVersion (zes_power_limits_ext_version_t) Power Limits Extension Version(s) type ZesPowerLimitsExtVersion uintptr + const ( - ZES_POWER_LIMITS_EXT_VERSION_1_0 ZesPowerLimitsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_POWER_LIMITS_EXT_VERSION_1_0 version 1.0 - ZES_POWER_LIMITS_EXT_VERSION_CURRENT ZesPowerLimitsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_POWER_LIMITS_EXT_VERSION_CURRENT latest known version - ZES_POWER_LIMITS_EXT_VERSION_FORCE_UINT32 ZesPowerLimitsExtVersion = 0x7fffffff // ZES_POWER_LIMITS_EXT_VERSION_FORCE_UINT32 Value marking end of ZES_POWER_LIMITS_EXT_VERSION_* ENUMs + ZES_POWER_LIMITS_EXT_VERSION_1_0 ZesPowerLimitsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_POWER_LIMITS_EXT_VERSION_1_0 version 1.0 + ZES_POWER_LIMITS_EXT_VERSION_CURRENT ZesPowerLimitsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_POWER_LIMITS_EXT_VERSION_CURRENT latest known version + ZES_POWER_LIMITS_EXT_VERSION_FORCE_UINT32 ZesPowerLimitsExtVersion = 0x7fffffff // ZES_POWER_LIMITS_EXT_VERSION_FORCE_UINT32 Value marking end of ZES_POWER_LIMITS_EXT_VERSION_* ENUMs ) // ZesPowerLimitExtDesc (zes_power_limit_ext_desc_t) Device power/current limit descriptor. type ZesPowerLimitExtDesc struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Level ZesPowerLevel // Level [in,out] duration type over which the power draw is measured, i.e. sustained, burst, peak, or critical. - Source ZesPowerSource // Source [out] source of power used by the system, i.e. AC or DC. - Limitunit ZesLimitUnit // Limitunit [out] unit used for specifying limit, i.e. current units (milliamps) or power units (milliwatts). - Enabledstatelocked ZeBool // Enabledstatelocked [out] indicates if the power limit state (enabled/ignored) can be set (false) or is locked (true). - Enabled ZeBool // Enabled [in,out] indicates if the limit is enabled (true) or ignored (false). If enabledStateIsLocked is True, this value is ignored. - Intervalvaluelocked ZeBool // Intervalvaluelocked [out] indicates if the interval can be modified (false) or is fixed (true). - Interval int32 // Interval [in,out] power averaging window in milliseconds. If intervalValueLocked is true, this value is ignored. - Limitvaluelocked ZeBool // Limitvaluelocked [out] indicates if the limit can be set (false) or if the limit is fixed (true). - Limit int32 // Limit [in,out] limit value. If limitValueLocked is true, this value is ignored. The value should be provided in the unit specified by limitUnit. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Level ZesPowerLevel // Level [in,out] duration type over which the power draw is measured, i.e. sustained, burst, peak, or critical. + Source ZesPowerSource // Source [out] source of power used by the system, i.e. AC or DC. + Limitunit ZesLimitUnit // Limitunit [out] unit used for specifying limit, i.e. current units (milliamps) or power units (milliwatts). + Enabledstatelocked ZeBool // Enabledstatelocked [out] indicates if the power limit state (enabled/ignored) can be set (false) or is locked (true). + Enabled ZeBool // Enabled [in,out] indicates if the limit is enabled (true) or ignored (false). If enabledStateIsLocked is True, this value is ignored. + Intervalvaluelocked ZeBool // Intervalvaluelocked [out] indicates if the interval can be modified (false) or is fixed (true). + Interval int32 // Interval [in,out] power averaging window in milliseconds. If intervalValueLocked is true, this value is ignored. + Limitvaluelocked ZeBool // Limitvaluelocked [out] indicates if the limit can be set (false) or if the limit is fixed (true). + Limit int32 // Limit [in,out] limit value. If limitValueLocked is true, this value is ignored. The value should be provided in the unit specified by limitUnit. } // ZesPowerExtProperties (zes_power_ext_properties_t) Extension properties related to device power settings -/// -/// @details -/// - This structure may be returned from ::zesPowerGetProperties via the -/// `pNext` member of ::zes_power_properties_t. -/// - This structure may also be returned from ::zesPowerGetProperties via -/// the `pNext` member of ::zes_power_ext_properties_t -/// - Used for determining the power domain level, i.e. card-level v/s -/// package-level v/s stack-level & the factory default power limits. +// / +// / @details +// / - This structure may be returned from ::zesPowerGetProperties via the +// / `pNext` member of ::zes_power_properties_t. +// / - This structure may also be returned from ::zesPowerGetProperties via +// / the `pNext` member of ::zes_power_ext_properties_t +// / - Used for determining the power domain level, i.e. card-level v/s +// / package-level v/s stack-level & the factory default power limits. type ZesPowerExtProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Domain ZesPowerDomain // Domain [out] domain that the power limit belongs to. - Defaultlimit *ZesPowerLimitExtDesc // Defaultlimit [out] the factory default limit of the part. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Domain ZesPowerDomain // Domain [out] domain that the power limit belongs to. + Defaultlimit *ZesPowerLimitExtDesc // Defaultlimit [out] the factory default limit of the part. } // ZesPowerGetLimitsExt Get power limits -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - This function returns all the power limits associated with the -/// supplied power domain. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPower` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - This function returns all the power limits associated with the +// / supplied power domain. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPower` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesPowerGetLimitsExt( - hPower ZesPwrHandle, // hPower [in] Power domain handle instance. - pCount *uint32, // pCount [in,out] Pointer to the number of power limit descriptors. If count is zero, then the driver shall update the value with the total number of components of this type that are available. If count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - pSustained *ZesPowerLimitExtDesc, // pSustained [in,out][optional][range(0, *pCount)] Array of query results for power limit descriptors. If count is less than the number of components of this type that are available, then the driver shall only retrieve that number of components. + hPower ZesPwrHandle, // hPower [in] Power domain handle instance. + pCount *uint32, // pCount [in,out] Pointer to the number of power limit descriptors. If count is zero, then the driver shall update the value with the total number of components of this type that are available. If count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + pSustained *ZesPowerLimitExtDesc, // pSustained [in,out][optional][range(0, *pCount)] Array of query results for power limit descriptors. If count is less than the number of components of this type that are available, then the driver shall only retrieve that number of components. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPowerGetLimitsExt", uintptr(hPower), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pSustained))) } // ZesPowerSetLimitsExt Set power limits -/// -/// @details -/// - The application can only modify unlocked members of the limit -/// descriptors returned by ::zesPowerGetLimitsExt. -/// - Not all the limits returned by ::zesPowerGetLimitsExt need to be -/// supplied to this function. -/// - Limits do not have to be supplied in the same order as returned by -/// ::zesPowerGetLimitsExt. -/// - The same limit can be supplied multiple times. Limits are applied in -/// the order in which they are supplied. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPower` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + The device is in use, meaning that the GPU is under Over clocking, applying power limits under overclocking is not supported. +// / +// / @details +// / - The application can only modify unlocked members of the limit +// / descriptors returned by ::zesPowerGetLimitsExt. +// / - Not all the limits returned by ::zesPowerGetLimitsExt need to be +// / supplied to this function. +// / - Limits do not have to be supplied in the same order as returned by +// / ::zesPowerGetLimitsExt. +// / - The same limit can be supplied multiple times. Limits are applied in +// / the order in which they are supplied. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPower` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + The device is in use, meaning that the GPU is under Over clocking, applying power limits under overclocking is not supported. func ZesPowerSetLimitsExt( - hPower ZesPwrHandle, // hPower [in] Handle for the component. - pCount *uint32, // pCount [in] Pointer to the number of power limit descriptors. - pSustained *ZesPowerLimitExtDesc, // pSustained [in][optional][range(0, *pCount)] Array of power limit descriptors. + hPower ZesPwrHandle, // hPower [in] Handle for the component. + pCount *uint32, // pCount [in] Pointer to the number of power limit descriptors. + pSustained *ZesPowerLimitExtDesc, // pSustained [in][optional][range(0, *pCount)] Array of power limit descriptors. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPowerSetLimitsExt", uintptr(hPower), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pSustained))) } - diff --git a/sysm_psu.go b/sysm_psu.go index 42dad1e..bd9bd1b 100644 --- a/sysm_psu.go +++ b/sysm_psu.go @@ -21,131 +21,131 @@ import ( // ZesPsuVoltageStatus (zes_psu_voltage_status_t) PSU voltage status type ZesPsuVoltageStatus uintptr + const ( - ZES_PSU_VOLTAGE_STATUS_UNKNOWN ZesPsuVoltageStatus = 0 // ZES_PSU_VOLTAGE_STATUS_UNKNOWN The status of the power supply voltage controllers cannot be + ZES_PSU_VOLTAGE_STATUS_UNKNOWN ZesPsuVoltageStatus = 0 // ZES_PSU_VOLTAGE_STATUS_UNKNOWN The status of the power supply voltage controllers cannot be ///< determined - ZES_PSU_VOLTAGE_STATUS_NORMAL ZesPsuVoltageStatus = 1 // ZES_PSU_VOLTAGE_STATUS_NORMAL No unusual voltages have been detected - ZES_PSU_VOLTAGE_STATUS_OVER ZesPsuVoltageStatus = 2 // ZES_PSU_VOLTAGE_STATUS_OVER Over-voltage has occurred - ZES_PSU_VOLTAGE_STATUS_UNDER ZesPsuVoltageStatus = 3 // ZES_PSU_VOLTAGE_STATUS_UNDER Under-voltage has occurred - ZES_PSU_VOLTAGE_STATUS_FORCE_UINT32 ZesPsuVoltageStatus = 0x7fffffff // ZES_PSU_VOLTAGE_STATUS_FORCE_UINT32 Value marking end of ZES_PSU_VOLTAGE_STATUS_* ENUMs + ZES_PSU_VOLTAGE_STATUS_NORMAL ZesPsuVoltageStatus = 1 // ZES_PSU_VOLTAGE_STATUS_NORMAL No unusual voltages have been detected + ZES_PSU_VOLTAGE_STATUS_OVER ZesPsuVoltageStatus = 2 // ZES_PSU_VOLTAGE_STATUS_OVER Over-voltage has occurred + ZES_PSU_VOLTAGE_STATUS_UNDER ZesPsuVoltageStatus = 3 // ZES_PSU_VOLTAGE_STATUS_UNDER Under-voltage has occurred + ZES_PSU_VOLTAGE_STATUS_FORCE_UINT32 ZesPsuVoltageStatus = 0x7fffffff // ZES_PSU_VOLTAGE_STATUS_FORCE_UINT32 Value marking end of ZES_PSU_VOLTAGE_STATUS_* ENUMs ) // ZesPsuProperties (zes_psu_properties_t) Static properties of the power supply type ZesPsuProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device - Havefan ZeBool // Havefan [out] True if the power supply has a fan - Amplimit int32 // Amplimit [out] The maximum electrical current in milliamperes that can be drawn. A value of -1 indicates that this property cannot be determined. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Havefan ZeBool // Havefan [out] True if the power supply has a fan + Amplimit int32 // Amplimit [out] The maximum electrical current in milliamperes that can be drawn. A value of -1 indicates that this property cannot be determined. } // ZesPsuState (zes_psu_state_t) Dynamic state of the power supply type ZesPsuState struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Voltstatus ZesPsuVoltageStatus // Voltstatus [out] The current PSU voltage status - Fanfailed ZeBool // Fanfailed [out] Indicates if the fan has failed - Temperature int32 // Temperature [out] Read the current heatsink temperature in degrees Celsius. A value of -1 indicates that this property cannot be determined. - Current int32 // Current [out] The amps being drawn in milliamperes. A value of -1 indicates that this property cannot be determined. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Voltstatus ZesPsuVoltageStatus // Voltstatus [out] The current PSU voltage status + Fanfailed ZeBool // Fanfailed [out] Indicates if the fan has failed + Temperature int32 // Temperature [out] Read the current heatsink temperature in degrees Celsius. A value of -1 indicates that this property cannot be determined. + Current int32 // Current [out] The amps being drawn in milliamperes. A value of -1 indicates that this property cannot be determined. } // ZesDeviceEnumPsus Get handle of power supplies -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumPsus( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phPsu *ZesPsuHandle, // phPsu [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phPsu *ZesPsuHandle, // phPsu [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumPsus", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phPsu))) } // ZesPsuGetProperties Get power supply properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPsu` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPsu` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesPsuGetProperties( - hPsu ZesPsuHandle, // hPsu [in] Handle for the component. - pProperties *ZesPsuProperties, // pProperties [in,out] Will contain the properties of the power supply. + hPsu ZesPsuHandle, // hPsu [in] Handle for the component. + pProperties *ZesPsuProperties, // pProperties [in,out] Will contain the properties of the power supply. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPsuGetProperties", uintptr(hPsu), uintptr(unsafe.Pointer(pProperties))) } // ZesPsuGetState Get current power supply state -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hPsu` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pState` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hPsu` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pState` func ZesPsuGetState( - hPsu ZesPsuHandle, // hPsu [in] Handle for the component. - pState *ZesPsuState, // pState [in,out] Will contain the current state of the power supply. + hPsu ZesPsuHandle, // hPsu [in] Handle for the component. + pState *ZesPsuState, // pState [in,out] Will contain the current state of the power supply. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPsuGetState", uintptr(hPsu), uintptr(unsafe.Pointer(pState))) } - diff --git a/sysm_ras.go b/sysm_ras.go index 41ecddd..bf6b099 100644 --- a/sysm_ras.go +++ b/sysm_ras.go @@ -21,36 +21,38 @@ import ( // ZesRasErrorType (zes_ras_error_type_t) RAS error type type ZesRasErrorType uintptr + const ( - ZES_RAS_ERROR_TYPE_CORRECTABLE ZesRasErrorType = 0 // ZES_RAS_ERROR_TYPE_CORRECTABLE Errors were corrected by hardware - ZES_RAS_ERROR_TYPE_UNCORRECTABLE ZesRasErrorType = 1 // ZES_RAS_ERROR_TYPE_UNCORRECTABLE Error were not corrected - ZES_RAS_ERROR_TYPE_FORCE_UINT32 ZesRasErrorType = 0x7fffffff // ZES_RAS_ERROR_TYPE_FORCE_UINT32 Value marking end of ZES_RAS_ERROR_TYPE_* ENUMs + ZES_RAS_ERROR_TYPE_CORRECTABLE ZesRasErrorType = 0 // ZES_RAS_ERROR_TYPE_CORRECTABLE Errors were corrected by hardware + ZES_RAS_ERROR_TYPE_UNCORRECTABLE ZesRasErrorType = 1 // ZES_RAS_ERROR_TYPE_UNCORRECTABLE Error were not corrected + ZES_RAS_ERROR_TYPE_FORCE_UINT32 ZesRasErrorType = 0x7fffffff // ZES_RAS_ERROR_TYPE_FORCE_UINT32 Value marking end of ZES_RAS_ERROR_TYPE_* ENUMs ) // ZesRasErrorCat (zes_ras_error_cat_t) RAS error categories type ZesRasErrorCat uintptr + const ( - ZES_RAS_ERROR_CAT_RESET ZesRasErrorCat = 0 // ZES_RAS_ERROR_CAT_RESET The number of accelerator engine resets attempted by the driver - ZES_RAS_ERROR_CAT_PROGRAMMING_ERRORS ZesRasErrorCat = 1 // ZES_RAS_ERROR_CAT_PROGRAMMING_ERRORS The number of hardware exceptions generated by the way workloads have + ZES_RAS_ERROR_CAT_RESET ZesRasErrorCat = 0 // ZES_RAS_ERROR_CAT_RESET The number of accelerator engine resets attempted by the driver + ZES_RAS_ERROR_CAT_PROGRAMMING_ERRORS ZesRasErrorCat = 1 // ZES_RAS_ERROR_CAT_PROGRAMMING_ERRORS The number of hardware exceptions generated by the way workloads have ///< programmed the hardware - ZES_RAS_ERROR_CAT_DRIVER_ERRORS ZesRasErrorCat = 2 // ZES_RAS_ERROR_CAT_DRIVER_ERRORS The number of low level driver communication errors have occurred - ZES_RAS_ERROR_CAT_COMPUTE_ERRORS ZesRasErrorCat = 3 // ZES_RAS_ERROR_CAT_COMPUTE_ERRORS The number of errors that have occurred in the compute accelerator + ZES_RAS_ERROR_CAT_DRIVER_ERRORS ZesRasErrorCat = 2 // ZES_RAS_ERROR_CAT_DRIVER_ERRORS The number of low level driver communication errors have occurred + ZES_RAS_ERROR_CAT_COMPUTE_ERRORS ZesRasErrorCat = 3 // ZES_RAS_ERROR_CAT_COMPUTE_ERRORS The number of errors that have occurred in the compute accelerator ///< hardware - ZES_RAS_ERROR_CAT_NON_COMPUTE_ERRORS ZesRasErrorCat = 4 // ZES_RAS_ERROR_CAT_NON_COMPUTE_ERRORS The number of errors that have occurred in the fixed-function + ZES_RAS_ERROR_CAT_NON_COMPUTE_ERRORS ZesRasErrorCat = 4 // ZES_RAS_ERROR_CAT_NON_COMPUTE_ERRORS The number of errors that have occurred in the fixed-function ///< accelerator hardware - ZES_RAS_ERROR_CAT_CACHE_ERRORS ZesRasErrorCat = 5 // ZES_RAS_ERROR_CAT_CACHE_ERRORS The number of errors that have occurred in caches (L1/L3/register + ZES_RAS_ERROR_CAT_CACHE_ERRORS ZesRasErrorCat = 5 // ZES_RAS_ERROR_CAT_CACHE_ERRORS The number of errors that have occurred in caches (L1/L3/register ///< file/shared local memory/sampler) - ZES_RAS_ERROR_CAT_DISPLAY_ERRORS ZesRasErrorCat = 6 // ZES_RAS_ERROR_CAT_DISPLAY_ERRORS The number of errors that have occurred in the display - ZES_RAS_ERROR_CAT_FORCE_UINT32 ZesRasErrorCat = 0x7fffffff // ZES_RAS_ERROR_CAT_FORCE_UINT32 Value marking end of ZES_RAS_ERROR_CAT_* ENUMs + ZES_RAS_ERROR_CAT_DISPLAY_ERRORS ZesRasErrorCat = 6 // ZES_RAS_ERROR_CAT_DISPLAY_ERRORS The number of errors that have occurred in the display + ZES_RAS_ERROR_CAT_FORCE_UINT32 ZesRasErrorCat = 0x7fffffff // ZES_RAS_ERROR_CAT_FORCE_UINT32 Value marking end of ZES_RAS_ERROR_CAT_* ENUMs ) @@ -59,236 +61,235 @@ const ZES_MAX_RAS_ERROR_CATEGORY_COUNT = 7 // ZesRasProperties (zes_ras_properties_t) RAS properties type ZesRasProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZesRasErrorType // Type [out] The type of RAS error - Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZesRasErrorType // Type [out] The type of RAS error + Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device } // ZesRasState (zes_ras_state_t) RAS error details type ZesRasState struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Category [ZES_MAX_RAS_ERROR_CATEGORY_COUNT]uint64 // Category [in][out] Breakdown of error by category + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Category [ZES_MAX_RAS_ERROR_CATEGORY_COUNT]uint64 // Category [in][out] Breakdown of error by category } // ZesRasConfig (zes_ras_config_t) RAS error configuration - thresholds used for triggering RAS events -/// (::ZES_EVENT_TYPE_FLAG_RAS_CORRECTABLE_ERRORS, -/// ::ZES_EVENT_TYPE_FLAG_RAS_UNCORRECTABLE_ERRORS) -/// -/// @details -/// - The driver maintains a total counter which is updated every time a -/// hardware block covered by the corresponding RAS error set notifies -/// that an error has occurred. When this total count goes above the -/// totalThreshold specified below, a RAS event is triggered. -/// - The driver also maintains a counter for each category of RAS error -/// (see ::zes_ras_state_t for a breakdown). Each time a hardware block of -/// that category notifies that an error has occurred, that corresponding -/// category counter is updated. When it goes above the threshold -/// specified in detailedThresholds, a RAS event is triggered. +// / (::ZES_EVENT_TYPE_FLAG_RAS_CORRECTABLE_ERRORS, +// / ::ZES_EVENT_TYPE_FLAG_RAS_UNCORRECTABLE_ERRORS) +// / +// / @details +// / - The driver maintains a total counter which is updated every time a +// / hardware block covered by the corresponding RAS error set notifies +// / that an error has occurred. When this total count goes above the +// / totalThreshold specified below, a RAS event is triggered. +// / - The driver also maintains a counter for each category of RAS error +// / (see ::zes_ras_state_t for a breakdown). Each time a hardware block of +// / that category notifies that an error has occurred, that corresponding +// / category counter is updated. When it goes above the threshold +// / specified in detailedThresholds, a RAS event is triggered. type ZesRasConfig struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Totalthreshold uint64 // Totalthreshold [in,out] If the total RAS errors exceeds this threshold, the event will be triggered. A value of 0ULL disables triggering the event based on the total counter. - Detailedthresholds ZesRasState // Detailedthresholds [in,out] If the RAS errors for each category exceed the threshold for that category, the event will be triggered. A value of 0ULL will disable an event being triggered for that category. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Totalthreshold uint64 // Totalthreshold [in,out] If the total RAS errors exceeds this threshold, the event will be triggered. A value of 0ULL disables triggering the event based on the total counter. + Detailedthresholds ZesRasState // Detailedthresholds [in,out] If the RAS errors for each category exceed the threshold for that category, the event will be triggered. A value of 0ULL will disable an event being triggered for that category. } // ZesDeviceEnumRasErrorSets Get handle of all RAS error sets on a device -/// -/// @details -/// - A RAS error set is a collection of RAS error counters of a given type -/// (correctable/uncorrectable) from hardware blocks contained within a -/// sub-device or within the device. -/// - A device without sub-devices will typically return two handles, one -/// for correctable errors sets and one for uncorrectable error sets. -/// - A device with sub-devices will return RAS error sets for each -/// sub-device and possibly RAS error sets for hardware blocks outside the -/// sub-devices. -/// - If the function completes successfully but pCount is set to 0, RAS -/// features are not available/enabled on this device. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - A RAS error set is a collection of RAS error counters of a given type +// / (correctable/uncorrectable) from hardware blocks contained within a +// / sub-device or within the device. +// / - A device without sub-devices will typically return two handles, one +// / for correctable errors sets and one for uncorrectable error sets. +// / - A device with sub-devices will return RAS error sets for each +// / sub-device and possibly RAS error sets for hardware blocks outside the +// / sub-devices. +// / - If the function completes successfully but pCount is set to 0, RAS +// / features are not available/enabled on this device. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumRasErrorSets( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phRas *ZesRasHandle, // phRas [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phRas *ZesRasHandle, // phRas [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumRasErrorSets", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phRas))) } // ZesRasGetProperties Get RAS properties of a given RAS error set - this enables discovery -/// of the type of RAS error set (correctable/uncorrectable) and if -/// located on a sub-device -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hRas` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / of the type of RAS error set (correctable/uncorrectable) and if +// / located on a sub-device +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hRas` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesRasGetProperties( - hRas ZesRasHandle, // hRas [in] Handle for the component. - pProperties *ZesRasProperties, // pProperties [in,out] Structure describing RAS properties + hRas ZesRasHandle, // hRas [in] Handle for the component. + pProperties *ZesRasProperties, // pProperties [in,out] Structure describing RAS properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zesRasGetProperties", uintptr(hRas), uintptr(unsafe.Pointer(pProperties))) } // ZesRasGetConfig Get RAS error thresholds that control when RAS events are generated -/// -/// @details -/// - The driver maintains counters for all RAS error sets and error -/// categories. Events are generated when errors occur. The configuration -/// enables setting thresholds to limit when events are sent. -/// - When a particular RAS correctable error counter exceeds the configured -/// threshold, the event ::ZES_EVENT_TYPE_FLAG_RAS_CORRECTABLE_ERRORS will -/// be triggered. -/// - When a particular RAS uncorrectable error counter exceeds the -/// configured threshold, the event -/// ::ZES_EVENT_TYPE_FLAG_RAS_UNCORRECTABLE_ERRORS will be triggered. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hRas` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pConfig` +// / +// / @details +// / - The driver maintains counters for all RAS error sets and error +// / categories. Events are generated when errors occur. The configuration +// / enables setting thresholds to limit when events are sent. +// / - When a particular RAS correctable error counter exceeds the configured +// / threshold, the event ::ZES_EVENT_TYPE_FLAG_RAS_CORRECTABLE_ERRORS will +// / be triggered. +// / - When a particular RAS uncorrectable error counter exceeds the +// / configured threshold, the event +// / ::ZES_EVENT_TYPE_FLAG_RAS_UNCORRECTABLE_ERRORS will be triggered. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hRas` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pConfig` func ZesRasGetConfig( - hRas ZesRasHandle, // hRas [in] Handle for the component. - pConfig *ZesRasConfig, // pConfig [in,out] Will be populed with the current RAS configuration - thresholds used to trigger events + hRas ZesRasHandle, // hRas [in] Handle for the component. + pConfig *ZesRasConfig, // pConfig [in,out] Will be populed with the current RAS configuration - thresholds used to trigger events ) (ZeResult, error) { return zecall.Call[ZeResult]("zesRasGetConfig", uintptr(hRas), uintptr(unsafe.Pointer(pConfig))) } // ZesRasSetConfig Set RAS error thresholds that control when RAS events are generated -/// -/// @details -/// - The driver maintains counters for all RAS error sets and error -/// categories. Events are generated when errors occur. The configuration -/// enables setting thresholds to limit when events are sent. -/// - When a particular RAS correctable error counter exceeds the specified -/// threshold, the event ::ZES_EVENT_TYPE_FLAG_RAS_CORRECTABLE_ERRORS will -/// be generated. -/// - When a particular RAS uncorrectable error counter exceeds the -/// specified threshold, the event -/// ::ZES_EVENT_TYPE_FLAG_RAS_UNCORRECTABLE_ERRORS will be generated. -/// - Call ::zesRasGetState() and set the clear flag to true to restart -/// event generation once counters have exceeded thresholds. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hRas` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pConfig` -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + Another running process is controlling these settings. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + Don't have permissions to set thresholds. +// / +// / @details +// / - The driver maintains counters for all RAS error sets and error +// / categories. Events are generated when errors occur. The configuration +// / enables setting thresholds to limit when events are sent. +// / - When a particular RAS correctable error counter exceeds the specified +// / threshold, the event ::ZES_EVENT_TYPE_FLAG_RAS_CORRECTABLE_ERRORS will +// / be generated. +// / - When a particular RAS uncorrectable error counter exceeds the +// / specified threshold, the event +// / ::ZES_EVENT_TYPE_FLAG_RAS_UNCORRECTABLE_ERRORS will be generated. +// / - Call ::zesRasGetState() and set the clear flag to true to restart +// / event generation once counters have exceeded thresholds. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hRas` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pConfig` +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + Another running process is controlling these settings. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + Don't have permissions to set thresholds. func ZesRasSetConfig( - hRas ZesRasHandle, // hRas [in] Handle for the component. - pConfig *ZesRasConfig, // pConfig [in] Change the RAS configuration - thresholds used to trigger events + hRas ZesRasHandle, // hRas [in] Handle for the component. + pConfig *ZesRasConfig, // pConfig [in] Change the RAS configuration - thresholds used to trigger events ) (ZeResult, error) { return zecall.Call[ZeResult]("zesRasSetConfig", uintptr(hRas), uintptr(unsafe.Pointer(pConfig))) } // ZesRasGetState Get the current value of RAS error counters for a particular error set -/// -/// @details -/// - Clearing errors will affect other threads/applications - the counter -/// values will start from zero. -/// - Clearing errors requires write permissions. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hRas` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pState` -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + Don't have permissions to clear error counters. +// / +// / @details +// / - Clearing errors will affect other threads/applications - the counter +// / values will start from zero. +// / - Clearing errors requires write permissions. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hRas` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pState` +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + Don't have permissions to clear error counters. func ZesRasGetState( - hRas ZesRasHandle, // hRas [in] Handle for the component. - clear ZeBool, // clear [in] Set to 1 to clear the counters of this type - pState *ZesRasState, // pState [in,out] Breakdown of where errors have occurred + hRas ZesRasHandle, // hRas [in] Handle for the component. + clear ZeBool, // clear [in] Set to 1 to clear the counters of this type + pState *ZesRasState, // pState [in,out] Breakdown of where errors have occurred ) (ZeResult, error) { return zecall.Call[ZeResult]("zesRasGetState", uintptr(hRas), uintptr(clear), uintptr(unsafe.Pointer(pState))) } - diff --git a/sysm_rasState.go b/sysm_rasState.go index 8a667cd..2a7f0bf 100644 --- a/sysm_rasState.go +++ b/sysm_rasState.go @@ -24,119 +24,120 @@ const ZES_RAS_GET_STATE_EXP_NAME = "ZES_extension_ras_state" // ZesRasStateExpVersion (zes_ras_state_exp_version_t) RAS Get State Extension Version(s) type ZesRasStateExpVersion uintptr + const ( - ZES_RAS_STATE_EXP_VERSION_1_0 ZesRasStateExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_RAS_STATE_EXP_VERSION_1_0 version 1.0 - ZES_RAS_STATE_EXP_VERSION_CURRENT ZesRasStateExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_RAS_STATE_EXP_VERSION_CURRENT latest known version - ZES_RAS_STATE_EXP_VERSION_FORCE_UINT32 ZesRasStateExpVersion = 0x7fffffff // ZES_RAS_STATE_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_RAS_STATE_EXP_VERSION_* ENUMs + ZES_RAS_STATE_EXP_VERSION_1_0 ZesRasStateExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_RAS_STATE_EXP_VERSION_1_0 version 1.0 + ZES_RAS_STATE_EXP_VERSION_CURRENT ZesRasStateExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_RAS_STATE_EXP_VERSION_CURRENT latest known version + ZES_RAS_STATE_EXP_VERSION_FORCE_UINT32 ZesRasStateExpVersion = 0x7fffffff // ZES_RAS_STATE_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_RAS_STATE_EXP_VERSION_* ENUMs ) // ZesRasErrorCategoryExp (zes_ras_error_category_exp_t) RAS error categories type ZesRasErrorCategoryExp uintptr + const ( - ZES_RAS_ERROR_CATEGORY_EXP_RESET ZesRasErrorCategoryExp = 0 // ZES_RAS_ERROR_CATEGORY_EXP_RESET The number of accelerator engine resets attempted by the driver - ZES_RAS_ERROR_CATEGORY_EXP_PROGRAMMING_ERRORS ZesRasErrorCategoryExp = 1 // ZES_RAS_ERROR_CATEGORY_EXP_PROGRAMMING_ERRORS The number of hardware exceptions generated by the way workloads have + ZES_RAS_ERROR_CATEGORY_EXP_RESET ZesRasErrorCategoryExp = 0 // ZES_RAS_ERROR_CATEGORY_EXP_RESET The number of accelerator engine resets attempted by the driver + ZES_RAS_ERROR_CATEGORY_EXP_PROGRAMMING_ERRORS ZesRasErrorCategoryExp = 1 // ZES_RAS_ERROR_CATEGORY_EXP_PROGRAMMING_ERRORS The number of hardware exceptions generated by the way workloads have ///< programmed the hardware - ZES_RAS_ERROR_CATEGORY_EXP_DRIVER_ERRORS ZesRasErrorCategoryExp = 2 // ZES_RAS_ERROR_CATEGORY_EXP_DRIVER_ERRORS The number of low level driver communication errors have occurred - ZES_RAS_ERROR_CATEGORY_EXP_COMPUTE_ERRORS ZesRasErrorCategoryExp = 3 // ZES_RAS_ERROR_CATEGORY_EXP_COMPUTE_ERRORS The number of errors that have occurred in the compute accelerator + ZES_RAS_ERROR_CATEGORY_EXP_DRIVER_ERRORS ZesRasErrorCategoryExp = 2 // ZES_RAS_ERROR_CATEGORY_EXP_DRIVER_ERRORS The number of low level driver communication errors have occurred + ZES_RAS_ERROR_CATEGORY_EXP_COMPUTE_ERRORS ZesRasErrorCategoryExp = 3 // ZES_RAS_ERROR_CATEGORY_EXP_COMPUTE_ERRORS The number of errors that have occurred in the compute accelerator ///< hardware - ZES_RAS_ERROR_CATEGORY_EXP_NON_COMPUTE_ERRORS ZesRasErrorCategoryExp = 4 // ZES_RAS_ERROR_CATEGORY_EXP_NON_COMPUTE_ERRORS The number of errors that have occurred in the fixed-function + ZES_RAS_ERROR_CATEGORY_EXP_NON_COMPUTE_ERRORS ZesRasErrorCategoryExp = 4 // ZES_RAS_ERROR_CATEGORY_EXP_NON_COMPUTE_ERRORS The number of errors that have occurred in the fixed-function ///< accelerator hardware - ZES_RAS_ERROR_CATEGORY_EXP_CACHE_ERRORS ZesRasErrorCategoryExp = 5 // ZES_RAS_ERROR_CATEGORY_EXP_CACHE_ERRORS The number of errors that have occurred in caches (L1/L3/register + ZES_RAS_ERROR_CATEGORY_EXP_CACHE_ERRORS ZesRasErrorCategoryExp = 5 // ZES_RAS_ERROR_CATEGORY_EXP_CACHE_ERRORS The number of errors that have occurred in caches (L1/L3/register ///< file/shared local memory/sampler) - ZES_RAS_ERROR_CATEGORY_EXP_DISPLAY_ERRORS ZesRasErrorCategoryExp = 6 // ZES_RAS_ERROR_CATEGORY_EXP_DISPLAY_ERRORS The number of errors that have occurred in the display - ZES_RAS_ERROR_CATEGORY_EXP_MEMORY_ERRORS ZesRasErrorCategoryExp = 7 // ZES_RAS_ERROR_CATEGORY_EXP_MEMORY_ERRORS The number of errors that have occurred in Memory - ZES_RAS_ERROR_CATEGORY_EXP_SCALE_ERRORS ZesRasErrorCategoryExp = 8 // ZES_RAS_ERROR_CATEGORY_EXP_SCALE_ERRORS The number of errors that have occurred in Scale Fabric - ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS ZesRasErrorCategoryExp = 9 // ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS The number of errors that have occurred in L3 Fabric - ZES_RAS_ERROR_CATEGORY_EXP_FORCE_UINT32 ZesRasErrorCategoryExp = 0x7fffffff // ZES_RAS_ERROR_CATEGORY_EXP_FORCE_UINT32 Value marking end of ZES_RAS_ERROR_CATEGORY_EXP_* ENUMs + ZES_RAS_ERROR_CATEGORY_EXP_DISPLAY_ERRORS ZesRasErrorCategoryExp = 6 // ZES_RAS_ERROR_CATEGORY_EXP_DISPLAY_ERRORS The number of errors that have occurred in the display + ZES_RAS_ERROR_CATEGORY_EXP_MEMORY_ERRORS ZesRasErrorCategoryExp = 7 // ZES_RAS_ERROR_CATEGORY_EXP_MEMORY_ERRORS The number of errors that have occurred in Memory + ZES_RAS_ERROR_CATEGORY_EXP_SCALE_ERRORS ZesRasErrorCategoryExp = 8 // ZES_RAS_ERROR_CATEGORY_EXP_SCALE_ERRORS The number of errors that have occurred in Scale Fabric + ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS ZesRasErrorCategoryExp = 9 // ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS The number of errors that have occurred in L3 Fabric + ZES_RAS_ERROR_CATEGORY_EXP_FORCE_UINT32 ZesRasErrorCategoryExp = 0x7fffffff // ZES_RAS_ERROR_CATEGORY_EXP_FORCE_UINT32 Value marking end of ZES_RAS_ERROR_CATEGORY_EXP_* ENUMs ) // ZesRasStateExp (zes_ras_state_exp_t) Extension structure for providing RAS error counters for different -/// error sets +// / error sets type ZesRasStateExp struct { - Category ZesRasErrorCategoryExp // Category [out] category for which error counter is provided. - Errorcounter uint64 // Errorcounter [out] Current value of RAS counter for specific error category. + Category ZesRasErrorCategoryExp // Category [out] category for which error counter is provided. + Errorcounter uint64 // Errorcounter [out] Current value of RAS counter for specific error category. } // ZesRasGetStateExp Ras Get State -/// -/// @details -/// - This function retrieves error counters for different RAS error -/// categories. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hRas` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - This function retrieves error counters for different RAS error +// / categories. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hRas` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesRasGetStateExp( - hRas ZesRasHandle, // hRas [in] Handle for the component. - pCount *uint32, // pCount [in,out] pointer to the number of RAS state structures that can be retrieved. if count is zero, then the driver shall update the value with the total number of error categories for which state can be retrieved. if count is greater than the number of RAS states available, then the driver shall update the value with the correct number of RAS states available. - pState *ZesRasStateExp, // pState [in,out][optional][range(0, *pCount)] array of query results for RAS error states for different categories. if count is less than the number of RAS states available, then driver shall only retrieve that number of RAS states. + hRas ZesRasHandle, // hRas [in] Handle for the component. + pCount *uint32, // pCount [in,out] pointer to the number of RAS state structures that can be retrieved. if count is zero, then the driver shall update the value with the total number of error categories for which state can be retrieved. if count is greater than the number of RAS states available, then the driver shall update the value with the correct number of RAS states available. + pState *ZesRasStateExp, // pState [in,out][optional][range(0, *pCount)] array of query results for RAS error states for different categories. if count is less than the number of RAS states available, then driver shall only retrieve that number of RAS states. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesRasGetStateExp", uintptr(hRas), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pState))) } // ZesRasClearStateExp Ras Clear State -/// -/// @details -/// - This function clears error counters for a RAS error category. -/// - Clearing errors will affect other threads/applications - the counter -/// values will start from zero. -/// - Clearing errors requires write permissions. -/// - The application should not call this function from simultaneous -/// threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hRas` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS < category` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + Don't have permissions to clear error counters. +// / +// / @details +// / - This function clears error counters for a RAS error category. +// / - Clearing errors will affect other threads/applications - the counter +// / values will start from zero. +// / - Clearing errors requires write permissions. +// / - The application should not call this function from simultaneous +// / threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hRas` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS < category` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + Don't have permissions to clear error counters. func ZesRasClearStateExp( - hRas ZesRasHandle, // hRas [in] Handle for the component. - category ZesRasErrorCategoryExp, // category [in] category for which error counter is to be cleared. + hRas ZesRasHandle, // hRas [in] Handle for the component. + category ZesRasErrorCategoryExp, // category [in] category for which error counter is to be cleared. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesRasClearStateExp", uintptr(hRas), uintptr(category)) } - diff --git a/sysm_scheduler.go b/sysm_scheduler.go index 5eb0acc..f7e728e 100644 --- a/sysm_scheduler.go +++ b/sysm_scheduler.go @@ -21,381 +21,381 @@ import ( // ZesSchedMode (zes_sched_mode_t) Scheduler mode type ZesSchedMode uintptr + const ( - ZES_SCHED_MODE_TIMEOUT ZesSchedMode = 0 // ZES_SCHED_MODE_TIMEOUT Multiple applications or contexts are submitting work to the hardware. + ZES_SCHED_MODE_TIMEOUT ZesSchedMode = 0 // ZES_SCHED_MODE_TIMEOUT Multiple applications or contexts are submitting work to the hardware. ///< When higher priority work arrives, the scheduler attempts to pause the ///< current executing work within some timeout interval, then submits the ///< other work. - ZES_SCHED_MODE_TIMESLICE ZesSchedMode = 1 // ZES_SCHED_MODE_TIMESLICE The scheduler attempts to fairly timeslice hardware execution time + ZES_SCHED_MODE_TIMESLICE ZesSchedMode = 1 // ZES_SCHED_MODE_TIMESLICE The scheduler attempts to fairly timeslice hardware execution time ///< between multiple contexts submitting work to the hardware ///< concurrently. - ZES_SCHED_MODE_EXCLUSIVE ZesSchedMode = 2 // ZES_SCHED_MODE_EXCLUSIVE Any application or context can run indefinitely on the hardware + ZES_SCHED_MODE_EXCLUSIVE ZesSchedMode = 2 // ZES_SCHED_MODE_EXCLUSIVE Any application or context can run indefinitely on the hardware ///< without being preempted or terminated. All pending work for other ///< contexts must wait until the running context completes with no further ///< submitted work. - ZES_SCHED_MODE_COMPUTE_UNIT_DEBUG ZesSchedMode = 3 // ZES_SCHED_MODE_COMPUTE_UNIT_DEBUG [DEPRECATED] No longer supported. - ZES_SCHED_MODE_FORCE_UINT32 ZesSchedMode = 0x7fffffff // ZES_SCHED_MODE_FORCE_UINT32 Value marking end of ZES_SCHED_MODE_* ENUMs + ZES_SCHED_MODE_COMPUTE_UNIT_DEBUG ZesSchedMode = 3 // ZES_SCHED_MODE_COMPUTE_UNIT_DEBUG [DEPRECATED] No longer supported. + ZES_SCHED_MODE_FORCE_UINT32 ZesSchedMode = 0x7fffffff // ZES_SCHED_MODE_FORCE_UINT32 Value marking end of ZES_SCHED_MODE_* ENUMs ) // ZesSchedProperties (zes_sched_properties_t) Properties related to scheduler component type ZesSchedProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Onsubdevice ZeBool // Onsubdevice [out] True if this resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device - Cancontrol ZeBool // Cancontrol [out] Software can change the scheduler component configuration assuming the user has permissions. - Engines ZesEngineTypeFlags // Engines [out] Bitfield of accelerator engine types that are managed by this scheduler component. Note that there can be more than one scheduler component for the same type of accelerator engine. - Supportedmodes uint32 // Supportedmodes [out] Bitfield of scheduler modes that can be configured for this scheduler component (bitfield of 1<<::zes_sched_mode_t). + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Onsubdevice ZeBool // Onsubdevice [out] True if this resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Cancontrol ZeBool // Cancontrol [out] Software can change the scheduler component configuration assuming the user has permissions. + Engines ZesEngineTypeFlags // Engines [out] Bitfield of accelerator engine types that are managed by this scheduler component. Note that there can be more than one scheduler component for the same type of accelerator engine. + Supportedmodes uint32 // Supportedmodes [out] Bitfield of scheduler modes that can be configured for this scheduler component (bitfield of 1<<::zes_sched_mode_t). } // ZES_SCHED_WATCHDOG_DISABLE Disable forward progress guard timeout. -const ZES_SCHED_WATCHDOG_DISABLE = ((^uint64(0))) +const ZES_SCHED_WATCHDOG_DISABLE = (^uint64(0)) // ZesSchedTimeoutProperties (zes_sched_timeout_properties_t) Configuration for timeout scheduler mode (::ZES_SCHED_MODE_TIMEOUT) type ZesSchedTimeoutProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Watchdogtimeout uint64 // Watchdogtimeout [in,out] The maximum time in microseconds that the scheduler will wait for a batch of work submitted to a hardware engine to complete or to be preempted so as to run another context. If this time is exceeded, the hardware engine is reset and the context terminated. If set to ::ZES_SCHED_WATCHDOG_DISABLE, a running workload can run as long as it wants without being terminated, but preemption attempts to run other contexts are permitted but not enforced. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Watchdogtimeout uint64 // Watchdogtimeout [in,out] The maximum time in microseconds that the scheduler will wait for a batch of work submitted to a hardware engine to complete or to be preempted so as to run another context. If this time is exceeded, the hardware engine is reset and the context terminated. If set to ::ZES_SCHED_WATCHDOG_DISABLE, a running workload can run as long as it wants without being terminated, but preemption attempts to run other contexts are permitted but not enforced. } // ZesSchedTimesliceProperties (zes_sched_timeslice_properties_t) Configuration for timeslice scheduler mode -/// (::ZES_SCHED_MODE_TIMESLICE) +// / (::ZES_SCHED_MODE_TIMESLICE) type ZesSchedTimesliceProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Interval uint64 // Interval [in,out] The average interval in microseconds that a submission for a context will run on a hardware engine before being preempted out to run a pending submission for another context. - Yieldtimeout uint64 // Yieldtimeout [in,out] The maximum time in microseconds that the scheduler will wait to preempt a workload running on an engine before deciding to reset the hardware engine and terminating the associated context. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Interval uint64 // Interval [in,out] The average interval in microseconds that a submission for a context will run on a hardware engine before being preempted out to run a pending submission for another context. + Yieldtimeout uint64 // Yieldtimeout [in,out] The maximum time in microseconds that the scheduler will wait to preempt a workload running on an engine before deciding to reset the hardware engine and terminating the associated context. } // ZesDeviceEnumSchedulers Returns handles to scheduler components. -/// -/// @details -/// - Each scheduler component manages the distribution of work across one -/// or more accelerator engines. -/// - If an application wishes to change the scheduler behavior for all -/// accelerator engines of a specific type (e.g. compute), it should -/// select all the handles where the `engines` member -/// ::zes_sched_properties_t contains that type. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - Each scheduler component manages the distribution of work across one +// / or more accelerator engines. +// / - If an application wishes to change the scheduler behavior for all +// / accelerator engines of a specific type (e.g. compute), it should +// / select all the handles where the `engines` member +// / ::zes_sched_properties_t contains that type. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumSchedulers( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phScheduler *ZesSchedHandle, // phScheduler [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phScheduler *ZesSchedHandle, // phScheduler [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumSchedulers", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phScheduler))) } // ZesSchedulerGetProperties Get properties related to a scheduler component -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hScheduler` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hScheduler` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesSchedulerGetProperties( - hScheduler ZesSchedHandle, // hScheduler [in] Handle for the component. - pProperties *ZesSchedProperties, // pProperties [in,out] Structure that will contain property data. + hScheduler ZesSchedHandle, // hScheduler [in] Handle for the component. + pProperties *ZesSchedProperties, // pProperties [in,out] Structure that will contain property data. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesSchedulerGetProperties", uintptr(hScheduler), uintptr(unsafe.Pointer(pProperties))) } // ZesSchedulerGetCurrentMode Get current scheduling mode in effect on a scheduler component. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hScheduler` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pMode` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + This scheduler component does not support scheduler modes. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hScheduler` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pMode` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + This scheduler component does not support scheduler modes. func ZesSchedulerGetCurrentMode( - hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. - pMode *ZesSchedMode, // pMode [in,out] Will contain the current scheduler mode. + hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. + pMode *ZesSchedMode, // pMode [in,out] Will contain the current scheduler mode. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesSchedulerGetCurrentMode", uintptr(hScheduler), uintptr(unsafe.Pointer(pMode))) } // ZesSchedulerGetTimeoutModeProperties Get scheduler config for mode ::ZES_SCHED_MODE_TIMEOUT -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hScheduler` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pConfig` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + This scheduler component does not support scheduler modes. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hScheduler` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pConfig` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + This scheduler component does not support scheduler modes. func ZesSchedulerGetTimeoutModeProperties( - hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. - getDefaults ZeBool, // getDefaults [in] If TRUE, the driver will return the system default properties for this mode, otherwise it will return the current properties. - pConfig *ZesSchedTimeoutProperties, // pConfig [in,out] Will contain the current parameters for this mode. + hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. + getDefaults ZeBool, // getDefaults [in] If TRUE, the driver will return the system default properties for this mode, otherwise it will return the current properties. + pConfig *ZesSchedTimeoutProperties, // pConfig [in,out] Will contain the current parameters for this mode. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesSchedulerGetTimeoutModeProperties", uintptr(hScheduler), uintptr(getDefaults), uintptr(unsafe.Pointer(pConfig))) } // ZesSchedulerGetTimesliceModeProperties Get scheduler config for mode ::ZES_SCHED_MODE_TIMESLICE -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hScheduler` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pConfig` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + This scheduler component does not support scheduler modes. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hScheduler` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pConfig` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + This scheduler component does not support scheduler modes. func ZesSchedulerGetTimesliceModeProperties( - hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. - getDefaults ZeBool, // getDefaults [in] If TRUE, the driver will return the system default properties for this mode, otherwise it will return the current properties. - pConfig *ZesSchedTimesliceProperties, // pConfig [in,out] Will contain the current parameters for this mode. + hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. + getDefaults ZeBool, // getDefaults [in] If TRUE, the driver will return the system default properties for this mode, otherwise it will return the current properties. + pConfig *ZesSchedTimesliceProperties, // pConfig [in,out] Will contain the current parameters for this mode. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesSchedulerGetTimesliceModeProperties", uintptr(hScheduler), uintptr(getDefaults), uintptr(unsafe.Pointer(pConfig))) } // ZesSchedulerSetTimeoutMode Change scheduler mode to ::ZES_SCHED_MODE_TIMEOUT or update scheduler -/// mode parameters if already running in this mode. -/// -/// @details -/// - This mode is optimized for multiple applications or contexts -/// submitting work to the hardware. When higher priority work arrives, -/// the scheduler attempts to pause the current executing work within some -/// timeout interval, then submits the other work. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hScheduler` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` -/// + `nullptr == pNeedReload` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + This scheduler component does not support scheduler modes. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make this modification. +// / mode parameters if already running in this mode. +// / +// / @details +// / - This mode is optimized for multiple applications or contexts +// / submitting work to the hardware. When higher priority work arrives, +// / the scheduler attempts to pause the current executing work within some +// / timeout interval, then submits the other work. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hScheduler` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` +// / + `nullptr == pNeedReload` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + This scheduler component does not support scheduler modes. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make this modification. func ZesSchedulerSetTimeoutMode( - hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. - pProperties *ZesSchedTimeoutProperties, // pProperties [in] The properties to use when configurating this mode. - pNeedReload *ZeBool, // pNeedReload [in,out] Will be set to TRUE if a device driver reload is needed to apply the new scheduler mode. + hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. + pProperties *ZesSchedTimeoutProperties, // pProperties [in] The properties to use when configurating this mode. + pNeedReload *ZeBool, // pNeedReload [in,out] Will be set to TRUE if a device driver reload is needed to apply the new scheduler mode. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesSchedulerSetTimeoutMode", uintptr(hScheduler), uintptr(unsafe.Pointer(pProperties)), uintptr(unsafe.Pointer(pNeedReload))) } // ZesSchedulerSetTimesliceMode Change scheduler mode to ::ZES_SCHED_MODE_TIMESLICE or update -/// scheduler mode parameters if already running in this mode. -/// -/// @details -/// - This mode is optimized to provide fair sharing of hardware execution -/// time between multiple contexts submitting work to the hardware -/// concurrently. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hScheduler` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` -/// + `nullptr == pNeedReload` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + This scheduler component does not support scheduler modes. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make this modification. +// / scheduler mode parameters if already running in this mode. +// / +// / @details +// / - This mode is optimized to provide fair sharing of hardware execution +// / time between multiple contexts submitting work to the hardware +// / concurrently. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hScheduler` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` +// / + `nullptr == pNeedReload` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + This scheduler component does not support scheduler modes. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make this modification. func ZesSchedulerSetTimesliceMode( - hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. - pProperties *ZesSchedTimesliceProperties, // pProperties [in] The properties to use when configurating this mode. - pNeedReload *ZeBool, // pNeedReload [in,out] Will be set to TRUE if a device driver reload is needed to apply the new scheduler mode. + hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. + pProperties *ZesSchedTimesliceProperties, // pProperties [in] The properties to use when configurating this mode. + pNeedReload *ZeBool, // pNeedReload [in,out] Will be set to TRUE if a device driver reload is needed to apply the new scheduler mode. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesSchedulerSetTimesliceMode", uintptr(hScheduler), uintptr(unsafe.Pointer(pProperties)), uintptr(unsafe.Pointer(pNeedReload))) } // ZesSchedulerSetExclusiveMode Change scheduler mode to ::ZES_SCHED_MODE_EXCLUSIVE -/// -/// @details -/// - This mode is optimized for single application/context use-cases. It -/// permits a context to run indefinitely on the hardware without being -/// preempted or terminated. All pending work for other contexts must wait -/// until the running context completes with no further submitted work. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hScheduler` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pNeedReload` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + This scheduler component does not support scheduler modes. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make this modification. +// / +// / @details +// / - This mode is optimized for single application/context use-cases. It +// / permits a context to run indefinitely on the hardware without being +// / preempted or terminated. All pending work for other contexts must wait +// / until the running context completes with no further submitted work. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hScheduler` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pNeedReload` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + This scheduler component does not support scheduler modes. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make this modification. func ZesSchedulerSetExclusiveMode( - hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. - pNeedReload *ZeBool, // pNeedReload [in,out] Will be set to TRUE if a device driver reload is needed to apply the new scheduler mode. + hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. + pNeedReload *ZeBool, // pNeedReload [in,out] Will be set to TRUE if a device driver reload is needed to apply the new scheduler mode. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesSchedulerSetExclusiveMode", uintptr(hScheduler), uintptr(unsafe.Pointer(pNeedReload))) } // ZesSchedulerSetComputeUnitDebugMode Change scheduler mode to ::ZES_SCHED_MODE_COMPUTE_UNIT_DEBUG -/// -/// @details -/// - This is a special mode that must ben enabled when debugging an -/// application that uses this device e.g. using the Level0 Debug API. -/// - It ensures that only one command queue can execute work on the -/// hardware at a given time. Work is permitted to run as long as needed -/// without enforcing any scheduler fairness policies. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - [DEPRECATED] No longer supported. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hScheduler` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pNeedReload` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + This scheduler component does not support scheduler modes. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make this modification. +// / +// / @details +// / - This is a special mode that must ben enabled when debugging an +// / application that uses this device e.g. using the Level0 Debug API. +// / - It ensures that only one command queue can execute work on the +// / hardware at a given time. Work is permitted to run as long as needed +// / without enforcing any scheduler fairness policies. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - [DEPRECATED] No longer supported. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hScheduler` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pNeedReload` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + This scheduler component does not support scheduler modes. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make this modification. func ZesSchedulerSetComputeUnitDebugMode( - hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. - pNeedReload *ZeBool, // pNeedReload [in,out] Will be set to TRUE if a device driver reload is needed to apply the new scheduler mode. + hScheduler ZesSchedHandle, // hScheduler [in] Sysman handle for the component. + pNeedReload *ZeBool, // pNeedReload [in,out] Will be set to TRUE if a device driver reload is needed to apply the new scheduler mode. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesSchedulerSetComputeUnitDebugMode", uintptr(hScheduler), uintptr(unsafe.Pointer(pNeedReload))) } - diff --git a/sysm_standby.go b/sysm_standby.go index 8f008cf..48e6dc8 100644 --- a/sysm_standby.go +++ b/sysm_standby.go @@ -21,158 +21,159 @@ import ( // ZesStandbyType (zes_standby_type_t) Standby hardware components type ZesStandbyType uintptr + const ( - ZES_STANDBY_TYPE_GLOBAL ZesStandbyType = 0 // ZES_STANDBY_TYPE_GLOBAL Control the overall standby policy of the device/sub-device - ZES_STANDBY_TYPE_FORCE_UINT32 ZesStandbyType = 0x7fffffff // ZES_STANDBY_TYPE_FORCE_UINT32 Value marking end of ZES_STANDBY_TYPE_* ENUMs + ZES_STANDBY_TYPE_GLOBAL ZesStandbyType = 0 // ZES_STANDBY_TYPE_GLOBAL Control the overall standby policy of the device/sub-device + ZES_STANDBY_TYPE_FORCE_UINT32 ZesStandbyType = 0x7fffffff // ZES_STANDBY_TYPE_FORCE_UINT32 Value marking end of ZES_STANDBY_TYPE_* ENUMs ) // ZesStandbyProperties (zes_standby_properties_t) Standby hardware component properties type ZesStandbyProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZesStandbyType // Type [out] Which standby hardware component this controls - Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZesStandbyType // Type [out] Which standby hardware component this controls + Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device } // ZesStandbyPromoMode (zes_standby_promo_mode_t) Standby promotion modes type ZesStandbyPromoMode uintptr + const ( - ZES_STANDBY_PROMO_MODE_DEFAULT ZesStandbyPromoMode = 0 // ZES_STANDBY_PROMO_MODE_DEFAULT Best compromise between performance and energy savings. - ZES_STANDBY_PROMO_MODE_NEVER ZesStandbyPromoMode = 1 // ZES_STANDBY_PROMO_MODE_NEVER The device/component will never shutdown. This can improve performance + ZES_STANDBY_PROMO_MODE_DEFAULT ZesStandbyPromoMode = 0 // ZES_STANDBY_PROMO_MODE_DEFAULT Best compromise between performance and energy savings. + ZES_STANDBY_PROMO_MODE_NEVER ZesStandbyPromoMode = 1 // ZES_STANDBY_PROMO_MODE_NEVER The device/component will never shutdown. This can improve performance ///< but uses more energy. - ZES_STANDBY_PROMO_MODE_FORCE_UINT32 ZesStandbyPromoMode = 0x7fffffff // ZES_STANDBY_PROMO_MODE_FORCE_UINT32 Value marking end of ZES_STANDBY_PROMO_MODE_* ENUMs + ZES_STANDBY_PROMO_MODE_FORCE_UINT32 ZesStandbyPromoMode = 0x7fffffff // ZES_STANDBY_PROMO_MODE_FORCE_UINT32 Value marking end of ZES_STANDBY_PROMO_MODE_* ENUMs ) // ZesDeviceEnumStandbyDomains Get handle of standby controls -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumStandbyDomains( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phStandby *ZesStandbyHandle, // phStandby [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phStandby *ZesStandbyHandle, // phStandby [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumStandbyDomains", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phStandby))) } // ZesStandbyGetProperties Get standby hardware component properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hStandby` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hStandby` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesStandbyGetProperties( - hStandby ZesStandbyHandle, // hStandby [in] Handle for the component. - pProperties *ZesStandbyProperties, // pProperties [in,out] Will contain the standby hardware properties. + hStandby ZesStandbyHandle, // hStandby [in] Handle for the component. + pProperties *ZesStandbyProperties, // pProperties [in,out] Will contain the standby hardware properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesStandbyGetProperties", uintptr(hStandby), uintptr(unsafe.Pointer(pProperties))) } // ZesStandbyGetMode Get the current standby promotion mode -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hStandby` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pMode` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hStandby` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pMode` func ZesStandbyGetMode( - hStandby ZesStandbyHandle, // hStandby [in] Handle for the component. - pMode *ZesStandbyPromoMode, // pMode [in,out] Will contain the current standby mode. + hStandby ZesStandbyHandle, // hStandby [in] Handle for the component. + pMode *ZesStandbyPromoMode, // pMode [in,out] Will contain the current standby mode. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesStandbyGetMode", uintptr(hStandby), uintptr(unsafe.Pointer(pMode))) } // ZesStandbySetMode Set standby promotion mode -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hStandby` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZES_STANDBY_PROMO_MODE_NEVER < mode` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to make these modifications. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hStandby` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZES_STANDBY_PROMO_MODE_NEVER < mode` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to make these modifications. func ZesStandbySetMode( - hStandby ZesStandbyHandle, // hStandby [in] Handle for the component. - mode ZesStandbyPromoMode, // mode [in] New standby mode. + hStandby ZesStandbyHandle, // hStandby [in] Handle for the component. + mode ZesStandbyPromoMode, // mode [in] New standby mode. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesStandbySetMode", uintptr(hStandby), uintptr(mode)) } - diff --git a/sysm_sysmanDeviceMapping.go b/sysm_sysmanDeviceMapping.go index a786b79..550636c 100644 --- a/sysm_sysmanDeviceMapping.go +++ b/sysm_sysmanDeviceMapping.go @@ -24,88 +24,88 @@ const ZES_SYSMAN_DEVICE_MAPPING_EXP_NAME = "ZES_experimental_sysman_device_mappi // ZesSysmanDeviceMappingExpVersion (zes_sysman_device_mapping_exp_version_t) Sysman Device Mapping Extension Version(s) type ZesSysmanDeviceMappingExpVersion uintptr + const ( - ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_1_0 ZesSysmanDeviceMappingExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_1_0 version 1.0 - ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_CURRENT ZesSysmanDeviceMappingExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_CURRENT latest known version - ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_FORCE_UINT32 ZesSysmanDeviceMappingExpVersion = 0x7fffffff // ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_* ENUMs + ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_1_0 ZesSysmanDeviceMappingExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_1_0 version 1.0 + ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_CURRENT ZesSysmanDeviceMappingExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_CURRENT latest known version + ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_FORCE_UINT32 ZesSysmanDeviceMappingExpVersion = 0x7fffffff // ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_SYSMAN_DEVICE_MAPPING_EXP_VERSION_* ENUMs ) // ZesSubdeviceExpProperties (zes_subdevice_exp_properties_t) Sub Device Properties type ZesSubdeviceExpProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Subdeviceid uint32 // Subdeviceid [out] this gives the ID of the sub device - Uuid ZesUuid // Uuid [out] universal unique identifier of the sub device. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Subdeviceid uint32 // Subdeviceid [out] this gives the ID of the sub device + Uuid ZesUuid // Uuid [out] universal unique identifier of the sub device. } // ZesDeviceGetSubDevicePropertiesExp Retrieves sub device properties for the given sysman device handle -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceGetSubDevicePropertiesExp( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of sub devices. if count is zero, then the driver shall update the value with the total number of sub devices currently attached to the device. if count is greater than the number of sub devices currently attached to the device, then the driver shall update the value with the correct number of sub devices. - pSubdeviceProps *ZesSubdeviceExpProperties, // pSubdeviceProps [in,out][optional][range(0, *pCount)] array of sub device property structures. if count is less than the number of sysman sub devices available, then the driver shall only retrieve that number of sub device property structures. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of sub devices. if count is zero, then the driver shall update the value with the total number of sub devices currently attached to the device. if count is greater than the number of sub devices currently attached to the device, then the driver shall update the value with the correct number of sub devices. + pSubdeviceProps *ZesSubdeviceExpProperties, // pSubdeviceProps [in,out][optional][range(0, *pCount)] array of sub device property structures. if count is less than the number of sysman sub devices available, then the driver shall only retrieve that number of sub device property structures. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceGetSubDevicePropertiesExp", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pSubdeviceProps))) } // ZesDriverGetDeviceByUuidExp Retrieves sysman device and subdevice index for the given UUID and -/// sysman driver -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phDevice` -/// + `nullptr == onSubdevice` -/// + `nullptr == subdeviceId` +// / sysman driver +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phDevice` +// / + `nullptr == onSubdevice` +// / + `nullptr == subdeviceId` func ZesDriverGetDeviceByUuidExp( - hDriver ZesDriverHandle, // hDriver [in] handle of the sysman driver instance - uuid *ZesUuid, // uuid [in] universal unique identifier. (gozel hack: converted to a hidden pointer from a struct value) - phDevice *ZesDeviceHandle, // phDevice [out] Sysman handle of the device. - onSubdevice *ZeBool, // onSubdevice [out] True if the UUID belongs to the sub-device; false means that UUID belongs to the root device. - subdeviceId *uint32, // subdeviceId [out] If onSubdevice is true, this gives the ID of the sub-device + hDriver ZesDriverHandle, // hDriver [in] handle of the sysman driver instance + uuid *ZesUuid, // uuid [in] universal unique identifier. (gozel hack: converted to a hidden pointer from a struct value) + phDevice *ZesDeviceHandle, // phDevice [out] Sysman handle of the device. + onSubdevice *ZeBool, // onSubdevice [out] True if the UUID belongs to the sub-device; false means that UUID belongs to the root device. + subdeviceId *uint32, // subdeviceId [out] If onSubdevice is true, this gives the ID of the sub-device ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDriverGetDeviceByUuidExp", uintptr(hDriver), uintptr(unsafe.Pointer(uuid)), uintptr(unsafe.Pointer(phDevice)), uintptr(unsafe.Pointer(onSubdevice)), uintptr(unsafe.Pointer(subdeviceId))) } - diff --git a/sysm_temperature.go b/sysm_temperature.go index 52fd201..2bb69fc 100644 --- a/sysm_temperature.go +++ b/sysm_temperature.go @@ -21,229 +21,229 @@ import ( // ZesTempSensors (zes_temp_sensors_t) Temperature sensors type ZesTempSensors uintptr + const ( - ZES_TEMP_SENSORS_GLOBAL ZesTempSensors = 0 // ZES_TEMP_SENSORS_GLOBAL The maximum temperature across all device sensors - ZES_TEMP_SENSORS_GPU ZesTempSensors = 1 // ZES_TEMP_SENSORS_GPU The maximum temperature across all sensors in the GPU - ZES_TEMP_SENSORS_MEMORY ZesTempSensors = 2 // ZES_TEMP_SENSORS_MEMORY The maximum temperature across all sensors in the local memory - ZES_TEMP_SENSORS_GLOBAL_MIN ZesTempSensors = 3 // ZES_TEMP_SENSORS_GLOBAL_MIN The minimum temperature across all device sensors - ZES_TEMP_SENSORS_GPU_MIN ZesTempSensors = 4 // ZES_TEMP_SENSORS_GPU_MIN The minimum temperature across all sensors in the GPU - ZES_TEMP_SENSORS_MEMORY_MIN ZesTempSensors = 5 // ZES_TEMP_SENSORS_MEMORY_MIN The minimum temperature across all sensors in the local device memory - ZES_TEMP_SENSORS_GPU_BOARD ZesTempSensors = 6 // ZES_TEMP_SENSORS_GPU_BOARD The maximum temperature across all sensors in the GPU Board - ZES_TEMP_SENSORS_GPU_BOARD_MIN ZesTempSensors = 7 // ZES_TEMP_SENSORS_GPU_BOARD_MIN The minimum temperature across all sensors in the GPU Board - ZES_TEMP_SENSORS_VOLTAGE_REGULATOR ZesTempSensors = 8 // ZES_TEMP_SENSORS_VOLTAGE_REGULATOR The maximum temperature across all sensors in the Voltage Regulator - ZES_TEMP_SENSORS_FORCE_UINT32 ZesTempSensors = 0x7fffffff // ZES_TEMP_SENSORS_FORCE_UINT32 Value marking end of ZES_TEMP_SENSORS_* ENUMs + ZES_TEMP_SENSORS_GLOBAL ZesTempSensors = 0 // ZES_TEMP_SENSORS_GLOBAL The maximum temperature across all device sensors + ZES_TEMP_SENSORS_GPU ZesTempSensors = 1 // ZES_TEMP_SENSORS_GPU The maximum temperature across all sensors in the GPU + ZES_TEMP_SENSORS_MEMORY ZesTempSensors = 2 // ZES_TEMP_SENSORS_MEMORY The maximum temperature across all sensors in the local memory + ZES_TEMP_SENSORS_GLOBAL_MIN ZesTempSensors = 3 // ZES_TEMP_SENSORS_GLOBAL_MIN The minimum temperature across all device sensors + ZES_TEMP_SENSORS_GPU_MIN ZesTempSensors = 4 // ZES_TEMP_SENSORS_GPU_MIN The minimum temperature across all sensors in the GPU + ZES_TEMP_SENSORS_MEMORY_MIN ZesTempSensors = 5 // ZES_TEMP_SENSORS_MEMORY_MIN The minimum temperature across all sensors in the local device memory + ZES_TEMP_SENSORS_GPU_BOARD ZesTempSensors = 6 // ZES_TEMP_SENSORS_GPU_BOARD The maximum temperature across all sensors in the GPU Board + ZES_TEMP_SENSORS_GPU_BOARD_MIN ZesTempSensors = 7 // ZES_TEMP_SENSORS_GPU_BOARD_MIN The minimum temperature across all sensors in the GPU Board + ZES_TEMP_SENSORS_VOLTAGE_REGULATOR ZesTempSensors = 8 // ZES_TEMP_SENSORS_VOLTAGE_REGULATOR The maximum temperature across all sensors in the Voltage Regulator + ZES_TEMP_SENSORS_FORCE_UINT32 ZesTempSensors = 0x7fffffff // ZES_TEMP_SENSORS_FORCE_UINT32 Value marking end of ZES_TEMP_SENSORS_* ENUMs ) // ZesTempProperties (zes_temp_properties_t) Temperature sensor properties type ZesTempProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZesTempSensors // Type [out] Which part of the device the temperature sensor measures - Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device - Maxtemperature float64 // Maxtemperature [out] Will contain the maximum temperature for the specific device in degrees Celsius. - Iscriticaltempsupported ZeBool // Iscriticaltempsupported [out] Indicates if the critical temperature event ::ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL is supported - Isthreshold1supported ZeBool // Isthreshold1supported [out] Indicates if the temperature threshold 1 event ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 is supported - Isthreshold2supported ZeBool // Isthreshold2supported [out] Indicates if the temperature threshold 2 event ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 is supported + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZesTempSensors // Type [out] Which part of the device the temperature sensor measures + Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device + Maxtemperature float64 // Maxtemperature [out] Will contain the maximum temperature for the specific device in degrees Celsius. + Iscriticaltempsupported ZeBool // Iscriticaltempsupported [out] Indicates if the critical temperature event ::ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL is supported + Isthreshold1supported ZeBool // Isthreshold1supported [out] Indicates if the temperature threshold 1 event ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 is supported + Isthreshold2supported ZeBool // Isthreshold2supported [out] Indicates if the temperature threshold 2 event ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 is supported } // ZesTempThreshold (zes_temp_threshold_t) Temperature sensor threshold type ZesTempThreshold struct { - Enablelowtohigh ZeBool // Enablelowtohigh [in,out] Trigger an event when the temperature crosses from below the threshold to above. - Enablehightolow ZeBool // Enablehightolow [in,out] Trigger an event when the temperature crosses from above the threshold to below. - Threshold float64 // Threshold [in,out] The threshold in degrees Celsius. + Enablelowtohigh ZeBool // Enablelowtohigh [in,out] Trigger an event when the temperature crosses from below the threshold to above. + Enablehightolow ZeBool // Enablehightolow [in,out] Trigger an event when the temperature crosses from above the threshold to below. + Threshold float64 // Threshold [in,out] The threshold in degrees Celsius. } // ZesTempConfig (zes_temp_config_t) Temperature configuration - which events should be triggered and the -/// trigger conditions. +// / trigger conditions. type ZesTempConfig struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Enablecritical ZeBool // Enablecritical [in,out] Indicates if event ::ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL should be triggered by the driver. - Threshold1 ZesTempThreshold // Threshold1 [in,out] Configuration controlling if and when event ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 should be triggered by the driver. - Threshold2 ZesTempThreshold // Threshold2 [in,out] Configuration controlling if and when event ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 should be triggered by the driver. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Enablecritical ZeBool // Enablecritical [in,out] Indicates if event ::ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL should be triggered by the driver. + Threshold1 ZesTempThreshold // Threshold1 [in,out] Configuration controlling if and when event ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 should be triggered by the driver. + Threshold2 ZesTempThreshold // Threshold2 [in,out] Configuration controlling if and when event ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 should be triggered by the driver. } // ZesDeviceEnumTemperatureSensors Get handle of temperature sensors -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumTemperatureSensors( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phTemperature *ZesTempHandle, // phTemperature [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phTemperature *ZesTempHandle, // phTemperature [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumTemperatureSensors", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phTemperature))) } // ZesTemperatureGetProperties Get temperature sensor properties -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hTemperature` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hTemperature` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesTemperatureGetProperties( - hTemperature ZesTempHandle, // hTemperature [in] Handle for the component. - pProperties *ZesTempProperties, // pProperties [in,out] Will contain the temperature sensor properties. + hTemperature ZesTempHandle, // hTemperature [in] Handle for the component. + pProperties *ZesTempProperties, // pProperties [in,out] Will contain the temperature sensor properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesTemperatureGetProperties", uintptr(hTemperature), uintptr(unsafe.Pointer(pProperties))) } // ZesTemperatureGetConfig Get temperature configuration for this sensor - which events are -/// triggered and the trigger conditions -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hTemperature` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pConfig` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Temperature thresholds are not supported on this temperature sensor. Generally this is only supported for temperature sensor ::ZES_TEMP_SENSORS_GLOBAL. -/// + One or both of the thresholds is not supported. Check the `isThreshold1Supported` and `isThreshold2Supported` members of ::zes_temp_properties_t. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to request this feature. +// / triggered and the trigger conditions +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hTemperature` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pConfig` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Temperature thresholds are not supported on this temperature sensor. Generally this is only supported for temperature sensor ::ZES_TEMP_SENSORS_GLOBAL. +// / + One or both of the thresholds is not supported. Check the `isThreshold1Supported` and `isThreshold2Supported` members of ::zes_temp_properties_t. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to request this feature. func ZesTemperatureGetConfig( - hTemperature ZesTempHandle, // hTemperature [in] Handle for the component. - pConfig *ZesTempConfig, // pConfig [in,out] Returns current configuration. + hTemperature ZesTempHandle, // hTemperature [in] Handle for the component. + pConfig *ZesTempConfig, // pConfig [in,out] Returns current configuration. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesTemperatureGetConfig", uintptr(hTemperature), uintptr(unsafe.Pointer(pConfig))) } // ZesTemperatureSetConfig Set temperature configuration for this sensor - indicates which events -/// are triggered and the trigger conditions -/// -/// @details -/// - Events ::ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL will be triggered when -/// temperature reaches the critical range. Use the function -/// ::zesDeviceEventRegister() to start receiving this event. -/// - Events ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 and -/// ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 will be generated when -/// temperature cross the thresholds set using this function. Use the -/// function ::zesDeviceEventRegister() to start receiving these events. -/// - Only one running process can set the temperature configuration at a -/// time. If another process attempts to change the configuration, the -/// error ::ZE_RESULT_ERROR_NOT_AVAILABLE will be returned. The function -/// ::zesTemperatureGetConfig() will return the process ID currently -/// controlling these settings. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hTemperature` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pConfig` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + Temperature thresholds are not supported on this temperature sensor. Generally they are only supported for temperature sensor ::ZES_TEMP_SENSORS_GLOBAL. -/// + Enabling the critical temperature event is not supported. Check the `isCriticalTempSupported` member of ::zes_temp_properties_t. -/// + One or both of the thresholds is not supported. Check the `isThreshold1Supported` and `isThreshold2Supported` members of ::zes_temp_properties_t. -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + User does not have permissions to request this feature. -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + Another running process is controlling these settings. -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + One or both the thresholds is above TjMax (see ::zesFrequencyOcGetTjMax()). Temperature thresholds must be below this value. +// / are triggered and the trigger conditions +// / +// / @details +// / - Events ::ZES_EVENT_TYPE_FLAG_TEMP_CRITICAL will be triggered when +// / temperature reaches the critical range. Use the function +// / ::zesDeviceEventRegister() to start receiving this event. +// / - Events ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD1 and +// / ::ZES_EVENT_TYPE_FLAG_TEMP_THRESHOLD2 will be generated when +// / temperature cross the thresholds set using this function. Use the +// / function ::zesDeviceEventRegister() to start receiving these events. +// / - Only one running process can set the temperature configuration at a +// / time. If another process attempts to change the configuration, the +// / error ::ZE_RESULT_ERROR_NOT_AVAILABLE will be returned. The function +// / ::zesTemperatureGetConfig() will return the process ID currently +// / controlling these settings. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hTemperature` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pConfig` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + Temperature thresholds are not supported on this temperature sensor. Generally they are only supported for temperature sensor ::ZES_TEMP_SENSORS_GLOBAL. +// / + Enabling the critical temperature event is not supported. Check the `isCriticalTempSupported` member of ::zes_temp_properties_t. +// / + One or both of the thresholds is not supported. Check the `isThreshold1Supported` and `isThreshold2Supported` members of ::zes_temp_properties_t. +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + User does not have permissions to request this feature. +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + Another running process is controlling these settings. +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + One or both the thresholds is above TjMax (see ::zesFrequencyOcGetTjMax()). Temperature thresholds must be below this value. func ZesTemperatureSetConfig( - hTemperature ZesTempHandle, // hTemperature [in] Handle for the component. - pConfig *ZesTempConfig, // pConfig [in] New configuration. + hTemperature ZesTempHandle, // hTemperature [in] Handle for the component. + pConfig *ZesTempConfig, // pConfig [in] New configuration. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesTemperatureSetConfig", uintptr(hTemperature), uintptr(unsafe.Pointer(pConfig))) } // ZesTemperatureGetState Get the temperature from a specified sensor -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hTemperature` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pTemperature` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hTemperature` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pTemperature` func ZesTemperatureGetState( - hTemperature ZesTempHandle, // hTemperature [in] Handle for the component. - pTemperature *float64, // pTemperature [in,out] Will contain the temperature read from the specified sensor in degrees Celsius. + hTemperature ZesTempHandle, // hTemperature [in] Handle for the component. + pTemperature *float64, // pTemperature [in,out] Will contain the temperature read from the specified sensor in degrees Celsius. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesTemperatureGetState", uintptr(hTemperature), uintptr(unsafe.Pointer(pTemperature))) } - diff --git a/sysm_virtualFunctionManagement.go b/sysm_virtualFunctionManagement.go index a66d0ee..12f2d6c 100644 --- a/sysm_virtualFunctionManagement.go +++ b/sysm_virtualFunctionManagement.go @@ -24,479 +24,481 @@ const ZES_VIRTUAL_FUNCTION_MANAGEMENT_EXP_NAME = "ZES_experimental_virtual_funct // ZesVfManagementExpVersion (zes_vf_management_exp_version_t) Virtual Function Management Extension Version(s) type ZesVfManagementExpVersion uintptr + const ( - ZES_VF_MANAGEMENT_EXP_VERSION_1_0 ZesVfManagementExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZES_VF_MANAGEMENT_EXP_VERSION_1_0 version 1.0 (deprecated) - ZES_VF_MANAGEMENT_EXP_VERSION_1_1 ZesVfManagementExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */((( 1 << 16 )|( 1 & 0x0000ffff))) // ZES_VF_MANAGEMENT_EXP_VERSION_1_1 version 1.1 (deprecated) - ZES_VF_MANAGEMENT_EXP_VERSION_1_2 ZesVfManagementExpVersion = /* ZE_MAKE_VERSION( 1, 2 ) */((( 1 << 16 )|( 2 & 0x0000ffff))) // ZES_VF_MANAGEMENT_EXP_VERSION_1_2 version 1.2 - ZES_VF_MANAGEMENT_EXP_VERSION_CURRENT ZesVfManagementExpVersion = /* ZE_MAKE_VERSION( 1, 2 ) */((( 1 << 16 )|( 2 & 0x0000ffff))) // ZES_VF_MANAGEMENT_EXP_VERSION_CURRENT latest known version - ZES_VF_MANAGEMENT_EXP_VERSION_FORCE_UINT32 ZesVfManagementExpVersion = 0x7fffffff // ZES_VF_MANAGEMENT_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_VF_MANAGEMENT_EXP_VERSION_* ENUMs + ZES_VF_MANAGEMENT_EXP_VERSION_1_0 ZesVfManagementExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZES_VF_MANAGEMENT_EXP_VERSION_1_0 version 1.0 (deprecated) + ZES_VF_MANAGEMENT_EXP_VERSION_1_1 ZesVfManagementExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */ ((1 << 16) | (1 & 0x0000ffff)) // ZES_VF_MANAGEMENT_EXP_VERSION_1_1 version 1.1 (deprecated) + ZES_VF_MANAGEMENT_EXP_VERSION_1_2 ZesVfManagementExpVersion = /* ZE_MAKE_VERSION( 1, 2 ) */ ((1 << 16) | (2 & 0x0000ffff)) // ZES_VF_MANAGEMENT_EXP_VERSION_1_2 version 1.2 + ZES_VF_MANAGEMENT_EXP_VERSION_CURRENT ZesVfManagementExpVersion = /* ZE_MAKE_VERSION( 1, 2 ) */ ((1 << 16) | (2 & 0x0000ffff)) // ZES_VF_MANAGEMENT_EXP_VERSION_CURRENT latest known version + ZES_VF_MANAGEMENT_EXP_VERSION_FORCE_UINT32 ZesVfManagementExpVersion = 0x7fffffff // ZES_VF_MANAGEMENT_EXP_VERSION_FORCE_UINT32 Value marking end of ZES_VF_MANAGEMENT_EXP_VERSION_* ENUMs ) // ZesVfInfoMemTypeExpFlags (zes_vf_info_mem_type_exp_flags_t) Virtual function memory types (deprecated) type ZesVfInfoMemTypeExpFlags uint32 + const ( - ZES_VF_INFO_MEM_TYPE_EXP_FLAG_MEM_TYPE_SYSTEM ZesVfInfoMemTypeExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_VF_INFO_MEM_TYPE_EXP_FLAG_MEM_TYPE_SYSTEM System memory - ZES_VF_INFO_MEM_TYPE_EXP_FLAG_MEM_TYPE_DEVICE ZesVfInfoMemTypeExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZES_VF_INFO_MEM_TYPE_EXP_FLAG_MEM_TYPE_DEVICE Device local memory - ZES_VF_INFO_MEM_TYPE_EXP_FLAG_FORCE_UINT32 ZesVfInfoMemTypeExpFlags = 0x7fffffff // ZES_VF_INFO_MEM_TYPE_EXP_FLAG_FORCE_UINT32 Value marking end of ZES_VF_INFO_MEM_TYPE_EXP_FLAG_* ENUMs + ZES_VF_INFO_MEM_TYPE_EXP_FLAG_MEM_TYPE_SYSTEM ZesVfInfoMemTypeExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZES_VF_INFO_MEM_TYPE_EXP_FLAG_MEM_TYPE_SYSTEM System memory + ZES_VF_INFO_MEM_TYPE_EXP_FLAG_MEM_TYPE_DEVICE ZesVfInfoMemTypeExpFlags = /* ZE_BIT(1) */ (1 << 1) // ZES_VF_INFO_MEM_TYPE_EXP_FLAG_MEM_TYPE_DEVICE Device local memory + ZES_VF_INFO_MEM_TYPE_EXP_FLAG_FORCE_UINT32 ZesVfInfoMemTypeExpFlags = 0x7fffffff // ZES_VF_INFO_MEM_TYPE_EXP_FLAG_FORCE_UINT32 Value marking end of ZES_VF_INFO_MEM_TYPE_EXP_FLAG_* ENUMs ) // ZesVfInfoUtilExpFlags (zes_vf_info_util_exp_flags_t) Virtual function utilization flag bit fields (deprecated) type ZesVfInfoUtilExpFlags uint32 + const ( - ZES_VF_INFO_UTIL_EXP_FLAG_INFO_NONE ZesVfInfoUtilExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZES_VF_INFO_UTIL_EXP_FLAG_INFO_NONE No info associated with virtual function - ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_CPU ZesVfInfoUtilExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_CPU System memory utilization associated with virtual function - ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_GPU ZesVfInfoUtilExpFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_GPU Device memory utilization associated with virtual function - ZES_VF_INFO_UTIL_EXP_FLAG_INFO_ENGINE ZesVfInfoUtilExpFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZES_VF_INFO_UTIL_EXP_FLAG_INFO_ENGINE Engine utilization associated with virtual function - ZES_VF_INFO_UTIL_EXP_FLAG_FORCE_UINT32 ZesVfInfoUtilExpFlags = 0x7fffffff // ZES_VF_INFO_UTIL_EXP_FLAG_FORCE_UINT32 Value marking end of ZES_VF_INFO_UTIL_EXP_FLAG_* ENUMs + ZES_VF_INFO_UTIL_EXP_FLAG_INFO_NONE ZesVfInfoUtilExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZES_VF_INFO_UTIL_EXP_FLAG_INFO_NONE No info associated with virtual function + ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_CPU ZesVfInfoUtilExpFlags = /* ZE_BIT(1) */ (1 << 1) // ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_CPU System memory utilization associated with virtual function + ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_GPU ZesVfInfoUtilExpFlags = /* ZE_BIT(2) */ (1 << 2) // ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_GPU Device memory utilization associated with virtual function + ZES_VF_INFO_UTIL_EXP_FLAG_INFO_ENGINE ZesVfInfoUtilExpFlags = /* ZE_BIT(3) */ (1 << 3) // ZES_VF_INFO_UTIL_EXP_FLAG_INFO_ENGINE Engine utilization associated with virtual function + ZES_VF_INFO_UTIL_EXP_FLAG_FORCE_UINT32 ZesVfInfoUtilExpFlags = 0x7fffffff // ZES_VF_INFO_UTIL_EXP_FLAG_FORCE_UINT32 Value marking end of ZES_VF_INFO_UTIL_EXP_FLAG_* ENUMs ) // ZesVfExpProperties (zes_vf_exp_properties_t) Virtual function management properties (deprecated) type ZesVfExpProperties struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Address ZesPciAddress // Address [out] Virtual function BDF address - Uuid ZesUuid // Uuid [out] universal unique identifier of the device - Flags ZesVfInfoUtilExpFlags // Flags [out] utilization flags available. May be 0 or a valid combination of ::zes_vf_info_util_exp_flag_t. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Address ZesPciAddress // Address [out] Virtual function BDF address + Uuid ZesUuid // Uuid [out] universal unique identifier of the device + Flags ZesVfInfoUtilExpFlags // Flags [out] utilization flags available. May be 0 or a valid combination of ::zes_vf_info_util_exp_flag_t. } // ZesVfUtilMemExp (zes_vf_util_mem_exp_t) Provides memory utilization values for a virtual function (deprecated) type ZesVfUtilMemExp struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Memtypeflags ZesVfInfoMemTypeExpFlags // Memtypeflags [out] Memory type flags. - Free uint64 // Free [out] Free memory size in bytes. - Size uint64 // Size [out] Total allocatable memory in bytes. - Timestamp uint64 // Timestamp [out] Wall clock time from VF when value was sampled. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Memtypeflags ZesVfInfoMemTypeExpFlags // Memtypeflags [out] Memory type flags. + Free uint64 // Free [out] Free memory size in bytes. + Size uint64 // Size [out] Total allocatable memory in bytes. + Timestamp uint64 // Timestamp [out] Wall clock time from VF when value was sampled. } // ZesVfUtilEngineExp (zes_vf_util_engine_exp_t) Provides engine utilization values for a virtual function (deprecated) type ZesVfUtilEngineExp struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZesEngineGroup // Type [out] The engine group. - Activecountervalue uint64 // Activecountervalue [out] Represents active counter. - Samplingcountervalue uint64 // Samplingcountervalue [out] Represents counter value when activeCounterValue was sampled. - Timestamp uint64 // Timestamp [out] Wall clock time when the activeCounterValue was sampled. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZesEngineGroup // Type [out] The engine group. + Activecountervalue uint64 // Activecountervalue [out] Represents active counter. + Samplingcountervalue uint64 // Samplingcountervalue [out] Represents counter value when activeCounterValue was sampled. + Timestamp uint64 // Timestamp [out] Wall clock time when the activeCounterValue was sampled. } // ZesVfExpCapabilities (zes_vf_exp_capabilities_t) Virtual function management capabilities (deprecated) type ZesVfExpCapabilities struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Address ZesPciAddress // Address [out] Virtual function BDF address - Vfdevicememsize uint32 // Vfdevicememsize [out] Virtual function memory size in kilo bytes - Vfid uint32 // Vfid [out] Virtual Function ID + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Address ZesPciAddress // Address [out] Virtual function BDF address + Vfdevicememsize uint32 // Vfdevicememsize [out] Virtual function memory size in kilo bytes + Vfid uint32 // Vfid [out] Virtual Function ID } // ZesVfExp2Capabilities (zes_vf_exp2_capabilities_t) Virtual function management capabilities type ZesVfExp2Capabilities struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Address ZesPciAddress // Address [out] Virtual function BDF address - Vfdevicememsize uint64 // Vfdevicememsize [out] Virtual function memory size in bytes - Vfid uint32 // Vfid [out] Virtual Function ID + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Address ZesPciAddress // Address [out] Virtual function BDF address + Vfdevicememsize uint64 // Vfdevicememsize [out] Virtual function memory size in bytes + Vfid uint32 // Vfid [out] Virtual Function ID } // ZesVfUtilMemExp2 (zes_vf_util_mem_exp2_t) Provides memory utilization values for a virtual function type ZesVfUtilMemExp2 struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Vfmemlocation ZesMemLoc // Vfmemlocation [out] Location of this memory (system, device) - Vfmemutilized uint64 // Vfmemutilized [out] Utilized memory size in bytes. + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Vfmemlocation ZesMemLoc // Vfmemlocation [out] Location of this memory (system, device) + Vfmemutilized uint64 // Vfmemutilized [out] Utilized memory size in bytes. } // ZesVfUtilEngineExp2 (zes_vf_util_engine_exp2_t) Provides engine utilization values for a virtual function -/// -/// @details -/// - Percent utilization is calculated by taking two snapshots (s1, s2) and -/// using the equation: %util = (s2.activeCounterValue - -/// s1.activeCounterValue) / (s2.samplingCounterValue - -/// s1.samplingCounterValue) +// / +// / @details +// / - Percent utilization is calculated by taking two snapshots (s1, s2) and +// / using the equation: %util = (s2.activeCounterValue - +// / s1.activeCounterValue) / (s2.samplingCounterValue - +// / s1.samplingCounterValue) type ZesVfUtilEngineExp2 struct { - Stype ZesStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Vfenginetype ZesEngineGroup // Vfenginetype [out] The engine group. - Activecountervalue uint64 // Activecountervalue [out] Represents active counter. - Samplingcountervalue uint64 // Samplingcountervalue [out] Represents counter value when activeCounterValue was sampled. Refer to the formulae above for calculating the utilization percent + Stype ZesStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Vfenginetype ZesEngineGroup // Vfenginetype [out] The engine group. + Activecountervalue uint64 // Activecountervalue [out] Represents active counter. + Samplingcountervalue uint64 // Samplingcountervalue [out] Represents counter value when activeCounterValue was sampled. Refer to the formulae above for calculating the utilization percent } // ZesDeviceEnumActiveVFExp Get handle of virtual function modules -/// -/// @details -/// - [DEPRECATED] No longer supported. Use ::zesDeviceEnumEnabledVFExp. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - [DEPRECATED] No longer supported. Use ::zesDeviceEnumEnabledVFExp. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumActiveVFExp( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phVFhandle *ZesVfHandle, // phVFhandle [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phVFhandle *ZesVfHandle, // phVFhandle [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumActiveVFExp", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phVFhandle))) } // ZesVFManagementGetVFPropertiesExp Get virtual function management properties -/// -/// @details -/// - [DEPRECATED] No longer supported. Use -/// ::zesVFManagementGetVFCapabilitiesExp. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hVFhandle` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - [DEPRECATED] No longer supported. Use +// / ::zesVFManagementGetVFCapabilitiesExp. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hVFhandle` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZesVFManagementGetVFPropertiesExp( - hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the VF component. - pProperties *ZesVfExpProperties, // pProperties [in,out] Will contain VF properties. + hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the VF component. + pProperties *ZesVfExpProperties, // pProperties [in,out] Will contain VF properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesVFManagementGetVFPropertiesExp", uintptr(hVFhandle), uintptr(unsafe.Pointer(pProperties))) } // ZesVFManagementGetVFMemoryUtilizationExp Get memory activity stats for each available memory types associated -/// with Virtual Function (VF) -/// -/// @details -/// - [DEPRECATED] No longer supported. Use -/// ::zesVFManagementGetVFMemoryUtilizationExp2. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hVFhandle` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / with Virtual Function (VF) +// / +// / @details +// / - [DEPRECATED] No longer supported. Use +// / ::zesVFManagementGetVFMemoryUtilizationExp2. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hVFhandle` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesVFManagementGetVFMemoryUtilizationExp( - hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the component. - pCount *uint32, // pCount [in,out] Pointer to the number of VF memory stats descriptors. - if count is zero, the driver shall update the value with the total number of memory stats available. - if count is greater than the total number of memory stats available, the driver shall update the value with the correct number of memory stats available. - The count returned is the sum of number of VF instances currently available and the PF instance. - pMemUtil *ZesVfUtilMemExp, // pMemUtil [in,out][optional][range(0, *pCount)] array of memory group activity counters. - if count is less than the total number of memory stats available, then driver shall only retrieve that number of stats. - the implementation shall populate the vector pCount-1 number of VF memory stats. + hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the component. + pCount *uint32, // pCount [in,out] Pointer to the number of VF memory stats descriptors. - if count is zero, the driver shall update the value with the total number of memory stats available. - if count is greater than the total number of memory stats available, the driver shall update the value with the correct number of memory stats available. - The count returned is the sum of number of VF instances currently available and the PF instance. + pMemUtil *ZesVfUtilMemExp, // pMemUtil [in,out][optional][range(0, *pCount)] array of memory group activity counters. - if count is less than the total number of memory stats available, then driver shall only retrieve that number of stats. - the implementation shall populate the vector pCount-1 number of VF memory stats. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesVFManagementGetVFMemoryUtilizationExp", uintptr(hVFhandle), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pMemUtil))) } // ZesVFManagementGetVFEngineUtilizationExp Get engine activity stats for each available engine group associated -/// with Virtual Function (VF) -/// -/// @details -/// - [DEPRECATED] No longer supported. Use -/// ::zesVFManagementGetVFEngineUtilizationExp2. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hVFhandle` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / with Virtual Function (VF) +// / +// / @details +// / - [DEPRECATED] No longer supported. Use +// / ::zesVFManagementGetVFEngineUtilizationExp2. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hVFhandle` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesVFManagementGetVFEngineUtilizationExp( - hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the component. - pCount *uint32, // pCount [in,out] Pointer to the number of VF engine stats descriptors. - if count is zero, the driver shall update the value with the total number of engine stats available. - if count is greater than the total number of engine stats available, the driver shall update the value with the correct number of engine stats available. - The count returned is the sum of number of VF instances currently available and the PF instance. - pEngineUtil *ZesVfUtilEngineExp, // pEngineUtil [in,out][optional][range(0, *pCount)] array of engine group activity counters. - if count is less than the total number of engine stats available, then driver shall only retrieve that number of stats. - the implementation shall populate the vector pCount-1 number of VF engine stats. + hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the component. + pCount *uint32, // pCount [in,out] Pointer to the number of VF engine stats descriptors. - if count is zero, the driver shall update the value with the total number of engine stats available. - if count is greater than the total number of engine stats available, the driver shall update the value with the correct number of engine stats available. - The count returned is the sum of number of VF instances currently available and the PF instance. + pEngineUtil *ZesVfUtilEngineExp, // pEngineUtil [in,out][optional][range(0, *pCount)] array of engine group activity counters. - if count is less than the total number of engine stats available, then driver shall only retrieve that number of stats. - the implementation shall populate the vector pCount-1 number of VF engine stats. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesVFManagementGetVFEngineUtilizationExp", uintptr(hVFhandle), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pEngineUtil))) } // ZesVFManagementSetVFTelemetryModeExp Configure utilization telemetry enabled or disabled associated with -/// Virtual Function (VF) -/// -/// @details -/// - [DEPRECATED] No longer supported. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hVFhandle` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0xf < flags` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / Virtual Function (VF) +// / +// / @details +// / - [DEPRECATED] No longer supported. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hVFhandle` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0xf < flags` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZesVFManagementSetVFTelemetryModeExp( - hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the component. - flags ZesVfInfoUtilExpFlags, // flags [in] utilization flags to enable or disable. May be 0 or a valid combination of ::zes_vf_info_util_exp_flag_t. - enable ZeBool, // enable [in] Enable utilization telemetry. + hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the component. + flags ZesVfInfoUtilExpFlags, // flags [in] utilization flags to enable or disable. May be 0 or a valid combination of ::zes_vf_info_util_exp_flag_t. + enable ZeBool, // enable [in] Enable utilization telemetry. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesVFManagementSetVFTelemetryModeExp", uintptr(hVFhandle), uintptr(flags), uintptr(enable)) } // ZesVFManagementSetVFTelemetrySamplingIntervalExp Set sampling interval to monitor for a particular utilization -/// telemetry associated with Virtual Function (VF) -/// -/// @details -/// - [DEPRECATED] No longer supported. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hVFhandle` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0xf < flag` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / telemetry associated with Virtual Function (VF) +// / +// / @details +// / - [DEPRECATED] No longer supported. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hVFhandle` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0xf < flag` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZesVFManagementSetVFTelemetrySamplingIntervalExp( - hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the component. - flag ZesVfInfoUtilExpFlags, // flag [in] utilization flags to set sampling interval. May be 0 or a valid combination of ::zes_vf_info_util_exp_flag_t. - samplingInterval uint64, // samplingInterval [in] Sampling interval value. + hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the component. + flag ZesVfInfoUtilExpFlags, // flag [in] utilization flags to set sampling interval. May be 0 or a valid combination of ::zes_vf_info_util_exp_flag_t. + samplingInterval uint64, // samplingInterval [in] Sampling interval value. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesVFManagementSetVFTelemetrySamplingIntervalExp", uintptr(hVFhandle), uintptr(flag), uintptr(samplingInterval)) } // ZesDeviceEnumEnabledVFExp Get handle of virtual function modules -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesDeviceEnumEnabledVFExp( - hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. - pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. - phVFhandle *ZesVfHandle, // phVFhandle [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. + hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. + pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. + phVFhandle *ZesVfHandle, // phVFhandle [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumEnabledVFExp", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phVFhandle))) } // ZesVFManagementGetVFCapabilitiesExp Get virtual function management capabilities -/// -/// @details -/// - [DEPRECATED] No longer supported. Use -/// ::zesVFManagementGetVFCapabilitiesExp2. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hVFhandle` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCapability` +// / +// / @details +// / - [DEPRECATED] No longer supported. Use +// / ::zesVFManagementGetVFCapabilitiesExp2. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hVFhandle` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCapability` func ZesVFManagementGetVFCapabilitiesExp( - hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the VF component. - pCapability *ZesVfExpCapabilities, // pCapability [in,out] Will contain VF capability. + hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the VF component. + pCapability *ZesVfExpCapabilities, // pCapability [in,out] Will contain VF capability. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesVFManagementGetVFCapabilitiesExp", uintptr(hVFhandle), uintptr(unsafe.Pointer(pCapability))) } // ZesVFManagementGetVFMemoryUtilizationExp2 Get memory activity stats for each available memory types associated -/// with Virtual Function (VF) -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - If VF is disable/pause/not active, utilization will give zero value. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hVFhandle` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / with Virtual Function (VF) +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - If VF is disable/pause/not active, utilization will give zero value. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hVFhandle` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesVFManagementGetVFMemoryUtilizationExp2( - hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the component. - pCount *uint32, // pCount [in,out] Pointer to the number of VF memory stats descriptors. - if count is zero, the driver shall update the value with the total number of memory stats available. - if count is greater than the total number of memory stats available, the driver shall update the value with the correct number of memory stats available. - pMemUtil *ZesVfUtilMemExp2, // pMemUtil [in,out][optional][range(0, *pCount)] array of memory group activity counters. - if count is less than the total number of memory stats available, then driver shall only retrieve that number of stats. - the implementation shall populate the vector pCount-1 number of VF memory stats. + hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the component. + pCount *uint32, // pCount [in,out] Pointer to the number of VF memory stats descriptors. - if count is zero, the driver shall update the value with the total number of memory stats available. - if count is greater than the total number of memory stats available, the driver shall update the value with the correct number of memory stats available. + pMemUtil *ZesVfUtilMemExp2, // pMemUtil [in,out][optional][range(0, *pCount)] array of memory group activity counters. - if count is less than the total number of memory stats available, then driver shall only retrieve that number of stats. - the implementation shall populate the vector pCount-1 number of VF memory stats. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesVFManagementGetVFMemoryUtilizationExp2", uintptr(hVFhandle), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pMemUtil))) } // ZesVFManagementGetVFEngineUtilizationExp2 Get engine activity stats for each available engine group associated -/// with Virtual Function (VF) -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// - If VF is disable/pause/not active, utilization will give zero value. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hVFhandle` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / with Virtual Function (VF) +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / - If VF is disable/pause/not active, utilization will give zero value. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hVFhandle` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZesVFManagementGetVFEngineUtilizationExp2( - hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the component. - pCount *uint32, // pCount [in,out] Pointer to the number of VF engine stats descriptors. - if count is zero, the driver shall update the value with the total number of engine stats available. - if count is greater than the total number of engine stats available, the driver shall update the value with the correct number of engine stats available. - pEngineUtil *ZesVfUtilEngineExp2, // pEngineUtil [in,out][optional][range(0, *pCount)] array of engine group activity counters. - if count is less than the total number of engine stats available, then driver shall only retrieve that number of stats. - the implementation shall populate the vector pCount-1 number of VF engine stats. + hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the component. + pCount *uint32, // pCount [in,out] Pointer to the number of VF engine stats descriptors. - if count is zero, the driver shall update the value with the total number of engine stats available. - if count is greater than the total number of engine stats available, the driver shall update the value with the correct number of engine stats available. + pEngineUtil *ZesVfUtilEngineExp2, // pEngineUtil [in,out][optional][range(0, *pCount)] array of engine group activity counters. - if count is less than the total number of engine stats available, then driver shall only retrieve that number of stats. - the implementation shall populate the vector pCount-1 number of VF engine stats. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesVFManagementGetVFEngineUtilizationExp2", uintptr(hVFhandle), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pEngineUtil))) } // ZesVFManagementGetVFCapabilitiesExp2 Get virtual function management capabilities -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hVFhandle` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCapability` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hVFhandle` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCapability` func ZesVFManagementGetVFCapabilitiesExp2( - hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the VF component. - pCapability *ZesVfExp2Capabilities, // pCapability [in,out] Will contain VF capability. + hVFhandle ZesVfHandle, // hVFhandle [in] Sysman handle for the VF component. + pCapability *ZesVfExp2Capabilities, // pCapability [in,out] Will contain VF capability. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesVFManagementGetVFCapabilitiesExp2", uintptr(hVFhandle), uintptr(unsafe.Pointer(pCapability))) } - diff --git a/tols_GlobalTimestamps.go b/tols_GlobalTimestamps.go index 6f8c54e..fe4ad0a 100644 --- a/tols_GlobalTimestamps.go +++ b/tols_GlobalTimestamps.go @@ -24,60 +24,60 @@ const ZET_GLOBAL_METRICS_TIMESTAMPS_EXP_NAME = "ZET_experimental_global_metric_t // ZeMetricGlobalTimestampsExpVersion (ze_metric_global_timestamps_exp_version_t) Global Metric Timestamps Experimental Extension Version(s) type ZeMetricGlobalTimestampsExpVersion uintptr + const ( - ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_1_0 ZeMetricGlobalTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_1_0 version 1.0 - ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_CURRENT ZeMetricGlobalTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_CURRENT latest known version - ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 ZeMetricGlobalTimestampsExpVersion = 0x7fffffff // ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_* ENUMs + ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_1_0 ZeMetricGlobalTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_1_0 version 1.0 + ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_CURRENT ZeMetricGlobalTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_CURRENT latest known version + ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 ZeMetricGlobalTimestampsExpVersion = 0x7fffffff // ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_* ENUMs ) // ZetMetricGlobalTimestampsResolutionExp (zet_metric_global_timestamps_resolution_exp_t) Metric timestamps resolution -/// -/// @details -/// - This structure may be returned from ::zetMetricGroupGetProperties via -/// the `pNext` member of ::zet_metric_group_properties_t. -/// - Used for mapping metric timestamps to other timers. +// / +// / @details +// / - This structure may be returned from ::zetMetricGroupGetProperties via +// / the `pNext` member of ::zet_metric_group_properties_t. +// / - Used for mapping metric timestamps to other timers. type ZetMetricGlobalTimestampsResolutionExp struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Timerresolution uint64 // Timerresolution [out] Returns the resolution of metrics timer (used for timestamps) in cycles/sec. - Timestampvalidbits uint64 // Timestampvalidbits [out] Returns the number of valid bits in the timestamp value. + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Timerresolution uint64 // Timerresolution [out] Returns the resolution of metrics timer (used for timestamps) in cycles/sec. + Timestampvalidbits uint64 // Timestampvalidbits [out] Returns the number of valid bits in the timestamp value. } // ZetMetricGroupGetGlobalTimestampsExp Returns metric timestamps synchronized with global device timestamps, -/// optionally synchronized with host -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - By default, the global and metrics timestamps are synchronized to the -/// device. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricGroup` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == globalTimestamp` -/// + `nullptr == metricTimestamp` +// / optionally synchronized with host +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - By default, the global and metrics timestamps are synchronized to the +// / device. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricGroup` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == globalTimestamp` +// / + `nullptr == metricTimestamp` func ZetMetricGroupGetGlobalTimestampsExp( - hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group - synchronizedWithHost ZeBool, // synchronizedWithHost [in] Returns the timestamps synchronized to the host or the device. - globalTimestamp *uint64, // globalTimestamp [out] Device timestamp. - metricTimestamp *uint64, // metricTimestamp [out] Metric timestamp. + hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group + synchronizedWithHost ZeBool, // synchronizedWithHost [in] Returns the timestamps synchronized to the host or the device. + globalTimestamp *uint64, // globalTimestamp [out] Device timestamp. + metricTimestamp *uint64, // metricTimestamp [out] Metric timestamp. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGroupGetGlobalTimestampsExp", uintptr(hMetricGroup), uintptr(synchronizedWithHost), uintptr(unsafe.Pointer(globalTimestamp)), uintptr(unsafe.Pointer(metricTimestamp))) } - diff --git a/tols_common.go b/tols_common.go index 362d39c..09ccdde 100644 --- a/tols_common.go +++ b/tols_common.go @@ -58,63 +58,65 @@ type ZetDebugSessionHandle uintptr // ZetStructureType (zet_structure_type_t) Defines structure types type ZetStructureType uintptr + const ( - ZET_STRUCTURE_TYPE_METRIC_GROUP_PROPERTIES ZetStructureType = 0x1 // ZET_STRUCTURE_TYPE_METRIC_GROUP_PROPERTIES ::zet_metric_group_properties_t - ZET_STRUCTURE_TYPE_METRIC_PROPERTIES ZetStructureType = 0x2 // ZET_STRUCTURE_TYPE_METRIC_PROPERTIES ::zet_metric_properties_t - ZET_STRUCTURE_TYPE_METRIC_STREAMER_DESC ZetStructureType = 0x3 // ZET_STRUCTURE_TYPE_METRIC_STREAMER_DESC ::zet_metric_streamer_desc_t - ZET_STRUCTURE_TYPE_METRIC_QUERY_POOL_DESC ZetStructureType = 0x4 // ZET_STRUCTURE_TYPE_METRIC_QUERY_POOL_DESC ::zet_metric_query_pool_desc_t - ZET_STRUCTURE_TYPE_PROFILE_PROPERTIES ZetStructureType = 0x5 // ZET_STRUCTURE_TYPE_PROFILE_PROPERTIES ::zet_profile_properties_t - ZET_STRUCTURE_TYPE_DEVICE_DEBUG_PROPERTIES ZetStructureType = 0x6 // ZET_STRUCTURE_TYPE_DEVICE_DEBUG_PROPERTIES ::zet_device_debug_properties_t - ZET_STRUCTURE_TYPE_DEBUG_MEMORY_SPACE_DESC ZetStructureType = 0x7 // ZET_STRUCTURE_TYPE_DEBUG_MEMORY_SPACE_DESC ::zet_debug_memory_space_desc_t - ZET_STRUCTURE_TYPE_DEBUG_REGSET_PROPERTIES ZetStructureType = 0x8 // ZET_STRUCTURE_TYPE_DEBUG_REGSET_PROPERTIES ::zet_debug_regset_properties_t - ZET_STRUCTURE_TYPE_GLOBAL_METRICS_TIMESTAMPS_EXP_PROPERTIES ZetStructureType = 0x9 // ZET_STRUCTURE_TYPE_GLOBAL_METRICS_TIMESTAMPS_EXP_PROPERTIES ::zet_metric_global_timestamps_resolution_exp_t. Deprecated, use + ZET_STRUCTURE_TYPE_METRIC_GROUP_PROPERTIES ZetStructureType = 0x1 // ZET_STRUCTURE_TYPE_METRIC_GROUP_PROPERTIES ::zet_metric_group_properties_t + ZET_STRUCTURE_TYPE_METRIC_PROPERTIES ZetStructureType = 0x2 // ZET_STRUCTURE_TYPE_METRIC_PROPERTIES ::zet_metric_properties_t + ZET_STRUCTURE_TYPE_METRIC_STREAMER_DESC ZetStructureType = 0x3 // ZET_STRUCTURE_TYPE_METRIC_STREAMER_DESC ::zet_metric_streamer_desc_t + ZET_STRUCTURE_TYPE_METRIC_QUERY_POOL_DESC ZetStructureType = 0x4 // ZET_STRUCTURE_TYPE_METRIC_QUERY_POOL_DESC ::zet_metric_query_pool_desc_t + ZET_STRUCTURE_TYPE_PROFILE_PROPERTIES ZetStructureType = 0x5 // ZET_STRUCTURE_TYPE_PROFILE_PROPERTIES ::zet_profile_properties_t + ZET_STRUCTURE_TYPE_DEVICE_DEBUG_PROPERTIES ZetStructureType = 0x6 // ZET_STRUCTURE_TYPE_DEVICE_DEBUG_PROPERTIES ::zet_device_debug_properties_t + ZET_STRUCTURE_TYPE_DEBUG_MEMORY_SPACE_DESC ZetStructureType = 0x7 // ZET_STRUCTURE_TYPE_DEBUG_MEMORY_SPACE_DESC ::zet_debug_memory_space_desc_t + ZET_STRUCTURE_TYPE_DEBUG_REGSET_PROPERTIES ZetStructureType = 0x8 // ZET_STRUCTURE_TYPE_DEBUG_REGSET_PROPERTIES ::zet_debug_regset_properties_t + ZET_STRUCTURE_TYPE_GLOBAL_METRICS_TIMESTAMPS_EXP_PROPERTIES ZetStructureType = 0x9 // ZET_STRUCTURE_TYPE_GLOBAL_METRICS_TIMESTAMPS_EXP_PROPERTIES ::zet_metric_global_timestamps_resolution_exp_t. Deprecated, use ///< ::ZET_STRUCTURE_TYPE_METRIC_GLOBAL_TIMESTAMPS_RESOLUTION_EXP. - ZET_STRUCTURE_TYPE_METRIC_GLOBAL_TIMESTAMPS_RESOLUTION_EXP ZetStructureType = 0x9 // ZET_STRUCTURE_TYPE_METRIC_GLOBAL_TIMESTAMPS_RESOLUTION_EXP ::zet_metric_global_timestamps_resolution_exp_t - ZET_STRUCTURE_TYPE_TRACER_EXP_DESC ZetStructureType = 0x00010001 // ZET_STRUCTURE_TYPE_TRACER_EXP_DESC ::zet_tracer_exp_desc_t - ZET_STRUCTURE_TYPE_METRICS_CALCULATE_EXP_DESC ZetStructureType = 0x00010002 // ZET_STRUCTURE_TYPE_METRICS_CALCULATE_EXP_DESC ::zet_metric_calculate_exp_desc_t. Deprecated, use + ZET_STRUCTURE_TYPE_METRIC_GLOBAL_TIMESTAMPS_RESOLUTION_EXP ZetStructureType = 0x9 // ZET_STRUCTURE_TYPE_METRIC_GLOBAL_TIMESTAMPS_RESOLUTION_EXP ::zet_metric_global_timestamps_resolution_exp_t + ZET_STRUCTURE_TYPE_TRACER_EXP_DESC ZetStructureType = 0x00010001 // ZET_STRUCTURE_TYPE_TRACER_EXP_DESC ::zet_tracer_exp_desc_t + ZET_STRUCTURE_TYPE_METRICS_CALCULATE_EXP_DESC ZetStructureType = 0x00010002 // ZET_STRUCTURE_TYPE_METRICS_CALCULATE_EXP_DESC ::zet_metric_calculate_exp_desc_t. Deprecated, use ///< ::ZET_STRUCTURE_TYPE_METRIC_CALCULATE_EXP_DESC. - ZET_STRUCTURE_TYPE_METRIC_CALCULATE_EXP_DESC ZetStructureType = 0x00010002 // ZET_STRUCTURE_TYPE_METRIC_CALCULATE_EXP_DESC ::zet_metric_calculate_exp_desc_t - ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_EXP_PROPERTIES ZetStructureType = 0x00010003 // ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_EXP_PROPERTIES ::zet_metric_programmable_exp_properties_t - ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_PARAM_INFO_EXP ZetStructureType = 0x00010004 // ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_PARAM_INFO_EXP ::zet_metric_programmable_param_info_exp_t - ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_PARAM_VALUE_INFO_EXP ZetStructureType = 0x00010005 // ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_PARAM_VALUE_INFO_EXP ::zet_metric_programmable_param_value_info_exp_t - ZET_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP ZetStructureType = 0x00010006 // ZET_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP ::zet_metric_group_type_exp_t - ZET_STRUCTURE_TYPE_EXPORT_DMA_EXP_PROPERTIES ZetStructureType = 0x00010007 // ZET_STRUCTURE_TYPE_EXPORT_DMA_EXP_PROPERTIES ::zet_export_dma_buf_exp_properties_t - ZET_STRUCTURE_TYPE_METRIC_TRACER_EXP_DESC ZetStructureType = 0x00010008 // ZET_STRUCTURE_TYPE_METRIC_TRACER_EXP_DESC ::zet_metric_tracer_exp_desc_t - ZET_STRUCTURE_TYPE_METRIC_SOURCE_ID_EXP ZetStructureType = 0x00010009 // ZET_STRUCTURE_TYPE_METRIC_SOURCE_ID_EXP ::zet_metric_source_id_exp_t - ZET_STRUCTURE_TYPE_FORCE_UINT32 ZetStructureType = 0x7fffffff // ZET_STRUCTURE_TYPE_FORCE_UINT32 Value marking end of ZET_STRUCTURE_TYPE_* ENUMs + ZET_STRUCTURE_TYPE_METRIC_CALCULATE_EXP_DESC ZetStructureType = 0x00010002 // ZET_STRUCTURE_TYPE_METRIC_CALCULATE_EXP_DESC ::zet_metric_calculate_exp_desc_t + ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_EXP_PROPERTIES ZetStructureType = 0x00010003 // ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_EXP_PROPERTIES ::zet_metric_programmable_exp_properties_t + ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_PARAM_INFO_EXP ZetStructureType = 0x00010004 // ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_PARAM_INFO_EXP ::zet_metric_programmable_param_info_exp_t + ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_PARAM_VALUE_INFO_EXP ZetStructureType = 0x00010005 // ZET_STRUCTURE_TYPE_METRIC_PROGRAMMABLE_PARAM_VALUE_INFO_EXP ::zet_metric_programmable_param_value_info_exp_t + ZET_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP ZetStructureType = 0x00010006 // ZET_STRUCTURE_TYPE_METRIC_GROUP_TYPE_EXP ::zet_metric_group_type_exp_t + ZET_STRUCTURE_TYPE_EXPORT_DMA_EXP_PROPERTIES ZetStructureType = 0x00010007 // ZET_STRUCTURE_TYPE_EXPORT_DMA_EXP_PROPERTIES ::zet_export_dma_buf_exp_properties_t + ZET_STRUCTURE_TYPE_METRIC_TRACER_EXP_DESC ZetStructureType = 0x00010008 // ZET_STRUCTURE_TYPE_METRIC_TRACER_EXP_DESC ::zet_metric_tracer_exp_desc_t + ZET_STRUCTURE_TYPE_METRIC_SOURCE_ID_EXP ZetStructureType = 0x00010009 // ZET_STRUCTURE_TYPE_METRIC_SOURCE_ID_EXP ::zet_metric_source_id_exp_t + ZET_STRUCTURE_TYPE_FORCE_UINT32 ZetStructureType = 0x7fffffff // ZET_STRUCTURE_TYPE_FORCE_UINT32 Value marking end of ZET_STRUCTURE_TYPE_* ENUMs ) // ZetBaseProperties (zet_base_properties_t) Base for all properties types type ZetBaseProperties struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). } // ZetBaseDesc (zet_base_desc_t) Base for all descriptor types type ZetBaseDesc struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). } // ZetValueType (zet_value_type_t) Supported value types type ZetValueType uintptr + const ( - ZET_VALUE_TYPE_UINT32 ZetValueType = 0 // ZET_VALUE_TYPE_UINT32 32-bit unsigned-integer - ZET_VALUE_TYPE_UINT64 ZetValueType = 1 // ZET_VALUE_TYPE_UINT64 64-bit unsigned-integer - ZET_VALUE_TYPE_FLOAT32 ZetValueType = 2 // ZET_VALUE_TYPE_FLOAT32 32-bit floating-point - ZET_VALUE_TYPE_FLOAT64 ZetValueType = 3 // ZET_VALUE_TYPE_FLOAT64 64-bit floating-point - ZET_VALUE_TYPE_BOOL8 ZetValueType = 4 // ZET_VALUE_TYPE_BOOL8 8-bit boolean - ZET_VALUE_TYPE_STRING ZetValueType = 5 // ZET_VALUE_TYPE_STRING C string - ZET_VALUE_TYPE_UINT8 ZetValueType = 6 // ZET_VALUE_TYPE_UINT8 8-bit unsigned-integer - ZET_VALUE_TYPE_UINT16 ZetValueType = 7 // ZET_VALUE_TYPE_UINT16 16-bit unsigned-integer - ZET_VALUE_TYPE_FORCE_UINT32 ZetValueType = 0x7fffffff // ZET_VALUE_TYPE_FORCE_UINT32 Value marking end of ZET_VALUE_TYPE_* ENUMs + ZET_VALUE_TYPE_UINT32 ZetValueType = 0 // ZET_VALUE_TYPE_UINT32 32-bit unsigned-integer + ZET_VALUE_TYPE_UINT64 ZetValueType = 1 // ZET_VALUE_TYPE_UINT64 64-bit unsigned-integer + ZET_VALUE_TYPE_FLOAT32 ZetValueType = 2 // ZET_VALUE_TYPE_FLOAT32 32-bit floating-point + ZET_VALUE_TYPE_FLOAT64 ZetValueType = 3 // ZET_VALUE_TYPE_FLOAT64 64-bit floating-point + ZET_VALUE_TYPE_BOOL8 ZetValueType = 4 // ZET_VALUE_TYPE_BOOL8 8-bit boolean + ZET_VALUE_TYPE_STRING ZetValueType = 5 // ZET_VALUE_TYPE_STRING C string + ZET_VALUE_TYPE_UINT8 ZetValueType = 6 // ZET_VALUE_TYPE_UINT8 8-bit unsigned-integer + ZET_VALUE_TYPE_UINT16 ZetValueType = 7 // ZET_VALUE_TYPE_UINT16 16-bit unsigned-integer + ZET_VALUE_TYPE_FORCE_UINT32 ZetValueType = 0x7fffffff // ZET_VALUE_TYPE_FORCE_UINT32 Value marking end of ZET_VALUE_TYPE_* ENUMs ) @@ -123,8 +125,7 @@ type ZetValue [8]byte // ZetTypedValue (zet_typed_value_t) Typed value type ZetTypedValue struct { - Type ZetValueType // Type [out] type of value - Value ZetValue // Value [out] value + Type ZetValueType // Type [out] type of value + Value ZetValue // Value [out] value } - diff --git a/tols_concurrentMetricGroup.go b/tols_concurrentMetricGroup.go index 8106fe2..0e252fd 100644 --- a/tols_concurrentMetricGroup.go +++ b/tols_concurrentMetricGroup.go @@ -24,42 +24,42 @@ const ZET_CONCURRENT_METRIC_GROUPS_EXP_NAME = "ZET_experimental_concurrent_metri // ZetConcurrentMetricGroupsExpVersion (zet_concurrent_metric_groups_exp_version_t) Concurrent Metric Groups Experimental Extension Version(s) type ZetConcurrentMetricGroupsExpVersion uintptr + const ( - ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_1_0 ZetConcurrentMetricGroupsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_1_0 version 1.0 - ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_CURRENT ZetConcurrentMetricGroupsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_CURRENT latest known version - ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_FORCE_UINT32 ZetConcurrentMetricGroupsExpVersion = 0x7fffffff // ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_* ENUMs + ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_1_0 ZetConcurrentMetricGroupsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_1_0 version 1.0 + ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_CURRENT ZetConcurrentMetricGroupsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_CURRENT latest known version + ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_FORCE_UINT32 ZetConcurrentMetricGroupsExpVersion = 0x7fffffff // ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_CONCURRENT_METRIC_GROUPS_EXP_VERSION_* ENUMs ) // ZetDeviceGetConcurrentMetricGroupsExp Get sets of metric groups which could be collected concurrently. -/// -/// @details -/// - Re-arrange the input metric groups to provide sets of concurrent -/// metric groups. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` +// / +// / @details +// / - Re-arrange the input metric groups to provide sets of concurrent +// / metric groups. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` func ZetDeviceGetConcurrentMetricGroupsExp( - hDevice ZetDeviceHandle, // hDevice [in] handle of the device - metricGroupCount uint32, // metricGroupCount [in] metric group count - phMetricGroups *ZetMetricGroupHandle, // phMetricGroups [in,out] metrics groups to be re-arranged to be sets of concurrent groups - pMetricGroupsCountPerConcurrentGroup *uint32, // pMetricGroupsCountPerConcurrentGroup [in,out][optional][*pConcurrentGroupCount] count of metric groups per concurrent group. - pConcurrentGroupCount *uint32, // pConcurrentGroupCount [out] number of concurrent groups. The value of this parameter could be used to determine the number of replays necessary. + hDevice ZetDeviceHandle, // hDevice [in] handle of the device + metricGroupCount uint32, // metricGroupCount [in] metric group count + phMetricGroups *ZetMetricGroupHandle, // phMetricGroups [in,out] metrics groups to be re-arranged to be sets of concurrent groups + pMetricGroupsCountPerConcurrentGroup *uint32, // pMetricGroupsCountPerConcurrentGroup [in,out][optional][*pConcurrentGroupCount] count of metric groups per concurrent group. + pConcurrentGroupCount *uint32, // pConcurrentGroupCount [out] number of concurrent groups. The value of this parameter could be used to determine the number of replays necessary. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDeviceGetConcurrentMetricGroupsExp", uintptr(hDevice), uintptr(metricGroupCount), uintptr(unsafe.Pointer(phMetricGroups)), uintptr(unsafe.Pointer(pMetricGroupsCountPerConcurrentGroup)), uintptr(unsafe.Pointer(pConcurrentGroupCount))) } - diff --git a/tols_debug.go b/tols_debug.go index b74cdd6..5ac6ff6 100644 --- a/tols_debug.go +++ b/tols_debug.go @@ -21,187 +21,192 @@ import ( // ZetDeviceDebugPropertyFlags (zet_device_debug_property_flags_t) Supported device debug property flags type ZetDeviceDebugPropertyFlags uint32 + const ( - ZET_DEVICE_DEBUG_PROPERTY_FLAG_ATTACH ZetDeviceDebugPropertyFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZET_DEVICE_DEBUG_PROPERTY_FLAG_ATTACH the device supports attaching for debug - ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32 ZetDeviceDebugPropertyFlags = 0x7fffffff // ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZET_DEVICE_DEBUG_PROPERTY_FLAG_* ENUMs + ZET_DEVICE_DEBUG_PROPERTY_FLAG_ATTACH ZetDeviceDebugPropertyFlags = /* ZE_BIT(0) */ (1 << 0) // ZET_DEVICE_DEBUG_PROPERTY_FLAG_ATTACH the device supports attaching for debug + ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32 ZetDeviceDebugPropertyFlags = 0x7fffffff // ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32 Value marking end of ZET_DEVICE_DEBUG_PROPERTY_FLAG_* ENUMs ) // ZetDeviceDebugProperties (zet_device_debug_properties_t) Device debug properties queried using ::zetDeviceGetDebugProperties. type ZetDeviceDebugProperties struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZetDeviceDebugPropertyFlags // Flags [out] returns 0 (none) or a valid combination of ::zet_device_debug_property_flag_t + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZetDeviceDebugPropertyFlags // Flags [out] returns 0 (none) or a valid combination of ::zet_device_debug_property_flag_t } // ZetDeviceGetDebugProperties Retrieves debug properties of the device. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pDebugProperties` +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pDebugProperties` func ZetDeviceGetDebugProperties( - hDevice ZetDeviceHandle, // hDevice [in] device handle - pDebugProperties *ZetDeviceDebugProperties, // pDebugProperties [in,out] query result for debug properties + hDevice ZetDeviceHandle, // hDevice [in] device handle + pDebugProperties *ZetDeviceDebugProperties, // pDebugProperties [in,out] query result for debug properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDeviceGetDebugProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pDebugProperties))) } // ZetDebugConfig (zet_debug_config_t) Debug configuration provided to ::zetDebugAttach type ZetDebugConfig struct { - Pid uint32 // Pid [in] the host process identifier + Pid uint32 // Pid [in] the host process identifier } // ZetDebugAttach Attach to a device. -/// -/// @details -/// - The device must be enabled for debug; see -/// ::zesSchedulerSetComputeUnitDebugMode. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == config` -/// + `nullptr == phDebug` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// + attaching to this device is not supported -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// + caller does not have sufficient permissions -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + a debugger is already attached +// / +// / @details +// / - The device must be enabled for debug; see +// / ::zesSchedulerSetComputeUnitDebugMode. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == config` +// / + `nullptr == phDebug` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / + attaching to this device is not supported +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / + caller does not have sufficient permissions +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + a debugger is already attached func ZetDebugAttach( - hDevice ZetDeviceHandle, // hDevice [in] device handle - config *ZetDebugConfig, // config [in] the debug configuration - phDebug *ZetDebugSessionHandle, // phDebug [out] debug session handle + hDevice ZetDeviceHandle, // hDevice [in] device handle + config *ZetDebugConfig, // config [in] the debug configuration + phDebug *ZetDebugSessionHandle, // phDebug [out] debug session handle ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDebugAttach", uintptr(hDevice), uintptr(unsafe.Pointer(config)), uintptr(unsafe.Pointer(phDebug))) } // ZetDebugDetach Close a debug session. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDebug` +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDebug` func ZetDebugDetach( - hDebug ZetDebugSessionHandle, // hDebug [in][release] debug session handle + hDebug ZetDebugSessionHandle, // hDebug [in][release] debug session handle ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDebugDetach", uintptr(hDebug)) } // ZetDebugEventFlags (zet_debug_event_flags_t) Supported debug event flags. type ZetDebugEventFlags uint32 + const ( - ZET_DEBUG_EVENT_FLAG_NEED_ACK ZetDebugEventFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZET_DEBUG_EVENT_FLAG_NEED_ACK The event needs to be acknowledged by calling + ZET_DEBUG_EVENT_FLAG_NEED_ACK ZetDebugEventFlags = /* ZE_BIT(0) */ (1 << 0) // ZET_DEBUG_EVENT_FLAG_NEED_ACK The event needs to be acknowledged by calling ///< ::zetDebugAcknowledgeEvent. - ZET_DEBUG_EVENT_FLAG_FORCE_UINT32 ZetDebugEventFlags = 0x7fffffff // ZET_DEBUG_EVENT_FLAG_FORCE_UINT32 Value marking end of ZET_DEBUG_EVENT_FLAG_* ENUMs + ZET_DEBUG_EVENT_FLAG_FORCE_UINT32 ZetDebugEventFlags = 0x7fffffff // ZET_DEBUG_EVENT_FLAG_FORCE_UINT32 Value marking end of ZET_DEBUG_EVENT_FLAG_* ENUMs ) // ZetDebugEventType (zet_debug_event_type_t) Supported debug event types. type ZetDebugEventType uintptr + const ( - ZET_DEBUG_EVENT_TYPE_INVALID ZetDebugEventType = 0 // ZET_DEBUG_EVENT_TYPE_INVALID The event is invalid - ZET_DEBUG_EVENT_TYPE_DETACHED ZetDebugEventType = 1 // ZET_DEBUG_EVENT_TYPE_DETACHED The tool was detached - ZET_DEBUG_EVENT_TYPE_PROCESS_ENTRY ZetDebugEventType = 2 // ZET_DEBUG_EVENT_TYPE_PROCESS_ENTRY The debuggee process created command queues on the device - ZET_DEBUG_EVENT_TYPE_PROCESS_EXIT ZetDebugEventType = 3 // ZET_DEBUG_EVENT_TYPE_PROCESS_EXIT The debuggee process destroyed all command queues on the device - ZET_DEBUG_EVENT_TYPE_MODULE_LOAD ZetDebugEventType = 4 // ZET_DEBUG_EVENT_TYPE_MODULE_LOAD An in-memory module was loaded onto the device - ZET_DEBUG_EVENT_TYPE_MODULE_UNLOAD ZetDebugEventType = 5 // ZET_DEBUG_EVENT_TYPE_MODULE_UNLOAD An in-memory module is about to get unloaded from the device - ZET_DEBUG_EVENT_TYPE_THREAD_STOPPED ZetDebugEventType = 6 // ZET_DEBUG_EVENT_TYPE_THREAD_STOPPED The thread stopped due to a device exception - ZET_DEBUG_EVENT_TYPE_THREAD_UNAVAILABLE ZetDebugEventType = 7 // ZET_DEBUG_EVENT_TYPE_THREAD_UNAVAILABLE The thread is not available to be stopped - ZET_DEBUG_EVENT_TYPE_PAGE_FAULT ZetDebugEventType = 8 // ZET_DEBUG_EVENT_TYPE_PAGE_FAULT A page request could not be completed on the device - ZET_DEBUG_EVENT_TYPE_FORCE_UINT32 ZetDebugEventType = 0x7fffffff // ZET_DEBUG_EVENT_TYPE_FORCE_UINT32 Value marking end of ZET_DEBUG_EVENT_TYPE_* ENUMs + ZET_DEBUG_EVENT_TYPE_INVALID ZetDebugEventType = 0 // ZET_DEBUG_EVENT_TYPE_INVALID The event is invalid + ZET_DEBUG_EVENT_TYPE_DETACHED ZetDebugEventType = 1 // ZET_DEBUG_EVENT_TYPE_DETACHED The tool was detached + ZET_DEBUG_EVENT_TYPE_PROCESS_ENTRY ZetDebugEventType = 2 // ZET_DEBUG_EVENT_TYPE_PROCESS_ENTRY The debuggee process created command queues on the device + ZET_DEBUG_EVENT_TYPE_PROCESS_EXIT ZetDebugEventType = 3 // ZET_DEBUG_EVENT_TYPE_PROCESS_EXIT The debuggee process destroyed all command queues on the device + ZET_DEBUG_EVENT_TYPE_MODULE_LOAD ZetDebugEventType = 4 // ZET_DEBUG_EVENT_TYPE_MODULE_LOAD An in-memory module was loaded onto the device + ZET_DEBUG_EVENT_TYPE_MODULE_UNLOAD ZetDebugEventType = 5 // ZET_DEBUG_EVENT_TYPE_MODULE_UNLOAD An in-memory module is about to get unloaded from the device + ZET_DEBUG_EVENT_TYPE_THREAD_STOPPED ZetDebugEventType = 6 // ZET_DEBUG_EVENT_TYPE_THREAD_STOPPED The thread stopped due to a device exception + ZET_DEBUG_EVENT_TYPE_THREAD_UNAVAILABLE ZetDebugEventType = 7 // ZET_DEBUG_EVENT_TYPE_THREAD_UNAVAILABLE The thread is not available to be stopped + ZET_DEBUG_EVENT_TYPE_PAGE_FAULT ZetDebugEventType = 8 // ZET_DEBUG_EVENT_TYPE_PAGE_FAULT A page request could not be completed on the device + ZET_DEBUG_EVENT_TYPE_FORCE_UINT32 ZetDebugEventType = 0x7fffffff // ZET_DEBUG_EVENT_TYPE_FORCE_UINT32 Value marking end of ZET_DEBUG_EVENT_TYPE_* ENUMs ) // ZetDebugDetachReason (zet_debug_detach_reason_t) Supported debug detach reasons. type ZetDebugDetachReason uintptr + const ( - ZET_DEBUG_DETACH_REASON_INVALID ZetDebugDetachReason = 0 // ZET_DEBUG_DETACH_REASON_INVALID The detach reason is not valid - ZET_DEBUG_DETACH_REASON_HOST_EXIT ZetDebugDetachReason = 1 // ZET_DEBUG_DETACH_REASON_HOST_EXIT The host process exited - ZET_DEBUG_DETACH_REASON_FORCE_UINT32 ZetDebugDetachReason = 0x7fffffff // ZET_DEBUG_DETACH_REASON_FORCE_UINT32 Value marking end of ZET_DEBUG_DETACH_REASON_* ENUMs + ZET_DEBUG_DETACH_REASON_INVALID ZetDebugDetachReason = 0 // ZET_DEBUG_DETACH_REASON_INVALID The detach reason is not valid + ZET_DEBUG_DETACH_REASON_HOST_EXIT ZetDebugDetachReason = 1 // ZET_DEBUG_DETACH_REASON_HOST_EXIT The host process exited + ZET_DEBUG_DETACH_REASON_FORCE_UINT32 ZetDebugDetachReason = 0x7fffffff // ZET_DEBUG_DETACH_REASON_FORCE_UINT32 Value marking end of ZET_DEBUG_DETACH_REASON_* ENUMs ) // ZetDebugEventInfoDetached (zet_debug_event_info_detached_t) Event information for ::ZET_DEBUG_EVENT_TYPE_DETACHED type ZetDebugEventInfoDetached struct { - Reason ZetDebugDetachReason // Reason [out] the detach reason + Reason ZetDebugDetachReason // Reason [out] the detach reason } // ZetDebugEventInfoModule (zet_debug_event_info_module_t) Event information for ::ZET_DEBUG_EVENT_TYPE_MODULE_LOAD and -/// ::ZET_DEBUG_EVENT_TYPE_MODULE_UNLOAD +// / ::ZET_DEBUG_EVENT_TYPE_MODULE_UNLOAD type ZetDebugEventInfoModule struct { - Format ZetModuleDebugInfoFormat // Format [out] the module format - Modulebegin uint64 // Modulebegin [out] the begin address of the in-memory module (inclusive) - Moduleend uint64 // Moduleend [out] the end address of the in-memory module (exclusive) - Load uint64 // Load [out] the load address of the module on the device + Format ZetModuleDebugInfoFormat // Format [out] the module format + Modulebegin uint64 // Modulebegin [out] the begin address of the in-memory module (inclusive) + Moduleend uint64 // Moduleend [out] the end address of the in-memory module (exclusive) + Load uint64 // Load [out] the load address of the module on the device } // ZetDebugEventInfoThreadStopped (zet_debug_event_info_thread_stopped_t) Event information for ::ZET_DEBUG_EVENT_TYPE_THREAD_STOPPED and -/// ::ZET_DEBUG_EVENT_TYPE_THREAD_UNAVAILABLE +// / ::ZET_DEBUG_EVENT_TYPE_THREAD_UNAVAILABLE type ZetDebugEventInfoThreadStopped struct { - Thread ZeDeviceThread // Thread [out] the stopped/unavailable thread + Thread ZeDeviceThread // Thread [out] the stopped/unavailable thread } // ZetDebugPageFaultReason (zet_debug_page_fault_reason_t) Page fault reasons. type ZetDebugPageFaultReason uintptr + const ( - ZET_DEBUG_PAGE_FAULT_REASON_INVALID ZetDebugPageFaultReason = 0 // ZET_DEBUG_PAGE_FAULT_REASON_INVALID The page fault reason is not valid - ZET_DEBUG_PAGE_FAULT_REASON_MAPPING_ERROR ZetDebugPageFaultReason = 1 // ZET_DEBUG_PAGE_FAULT_REASON_MAPPING_ERROR The address is not mapped - ZET_DEBUG_PAGE_FAULT_REASON_PERMISSION_ERROR ZetDebugPageFaultReason = 2 // ZET_DEBUG_PAGE_FAULT_REASON_PERMISSION_ERROR Invalid access permissions - ZET_DEBUG_PAGE_FAULT_REASON_FORCE_UINT32 ZetDebugPageFaultReason = 0x7fffffff // ZET_DEBUG_PAGE_FAULT_REASON_FORCE_UINT32 Value marking end of ZET_DEBUG_PAGE_FAULT_REASON_* ENUMs + ZET_DEBUG_PAGE_FAULT_REASON_INVALID ZetDebugPageFaultReason = 0 // ZET_DEBUG_PAGE_FAULT_REASON_INVALID The page fault reason is not valid + ZET_DEBUG_PAGE_FAULT_REASON_MAPPING_ERROR ZetDebugPageFaultReason = 1 // ZET_DEBUG_PAGE_FAULT_REASON_MAPPING_ERROR The address is not mapped + ZET_DEBUG_PAGE_FAULT_REASON_PERMISSION_ERROR ZetDebugPageFaultReason = 2 // ZET_DEBUG_PAGE_FAULT_REASON_PERMISSION_ERROR Invalid access permissions + ZET_DEBUG_PAGE_FAULT_REASON_FORCE_UINT32 ZetDebugPageFaultReason = 0x7fffffff // ZET_DEBUG_PAGE_FAULT_REASON_FORCE_UINT32 Value marking end of ZET_DEBUG_PAGE_FAULT_REASON_* ENUMs ) // ZetDebugEventInfoPageFault (zet_debug_event_info_page_fault_t) Event information for ::ZET_DEBUG_EVENT_TYPE_PAGE_FAULT type ZetDebugEventInfoPageFault struct { - Address uint64 // Address [out] the faulting address - Mask uint64 // Mask [out] the alignment mask - Reason ZetDebugPageFaultReason // Reason [out] the page fault reason + Address uint64 // Address [out] the faulting address + Mask uint64 // Mask [out] the alignment mask + Reason ZetDebugPageFaultReason // Reason [out] the page fault reason } @@ -210,361 +215,362 @@ type ZetDebugEventInfo [32]byte // ZetDebugEvent (zet_debug_event_t) A debug event on the device. type ZetDebugEvent struct { - Type ZetDebugEventType // Type [out] the event type - Flags ZetDebugEventFlags // Flags [out] returns 0 (none) or a combination of ::zet_debug_event_flag_t - Info ZetDebugEventInfo // Info [out] event type specific information + Type ZetDebugEventType // Type [out] the event type + Flags ZetDebugEventFlags // Flags [out] returns 0 (none) or a combination of ::zet_debug_event_flag_t + Info ZetDebugEventInfo // Info [out] event type specific information } // ZetDebugReadEvent Read the topmost debug event. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDebug` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == event` -/// - ::ZE_RESULT_NOT_READY -/// + the timeout expired +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDebug` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == event` +// / - ::ZE_RESULT_NOT_READY +// / + the timeout expired func ZetDebugReadEvent( - hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle - timeout uint64, // timeout [in] if non-zero, then indicates the maximum time (in milliseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then immediately returns the status of the event; if `UINT64_MAX`, then function will not return until complete or device is lost. Due to external dependencies, timeout may be rounded to the closest value allowed by the accuracy of those dependencies. - event *ZetDebugEvent, // event [in,out] a pointer to a ::zet_debug_event_t. + hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle + timeout uint64, // timeout [in] if non-zero, then indicates the maximum time (in milliseconds) to yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY; if zero, then immediately returns the status of the event; if `UINT64_MAX`, then function will not return until complete or device is lost. Due to external dependencies, timeout may be rounded to the closest value allowed by the accuracy of those dependencies. + event *ZetDebugEvent, // event [in,out] a pointer to a ::zet_debug_event_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDebugReadEvent", uintptr(hDebug), uintptr(timeout), uintptr(unsafe.Pointer(event))) } // ZetDebugAcknowledgeEvent Acknowledge a debug event. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDebug` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == event` +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDebug` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == event` func ZetDebugAcknowledgeEvent( - hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle - event *ZetDebugEvent, // event [in] a pointer to a ::zet_debug_event_t. + hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle + event *ZetDebugEvent, // event [in] a pointer to a ::zet_debug_event_t. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDebugAcknowledgeEvent", uintptr(hDebug), uintptr(unsafe.Pointer(event))) } // ZetDebugInterrupt Interrupt device threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDebug` -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + the thread is already stopped or unavailable +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDebug` +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + the thread is already stopped or unavailable func ZetDebugInterrupt( - hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle - thread *ZeDeviceThread, // thread [in] the thread to interrupt (gozel hack: converted to a hidden pointer from a struct value) + hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle + thread *ZeDeviceThread, // thread [in] the thread to interrupt (gozel hack: converted to a hidden pointer from a struct value) ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDebugInterrupt", uintptr(hDebug), uintptr(unsafe.Pointer(thread))) } // ZetDebugResume Resume device threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDebug` -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + the thread is already running or unavailable +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDebug` +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + the thread is already running or unavailable func ZetDebugResume( - hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle - thread *ZeDeviceThread, // thread [in] the thread to resume (gozel hack: converted to a hidden pointer from a struct value) + hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle + thread *ZeDeviceThread, // thread [in] the thread to resume (gozel hack: converted to a hidden pointer from a struct value) ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDebugResume", uintptr(hDebug), uintptr(unsafe.Pointer(thread))) } // ZetDebugMemorySpaceType (zet_debug_memory_space_type_t) Supported device memory space types. type ZetDebugMemorySpaceType uintptr + const ( - ZET_DEBUG_MEMORY_SPACE_TYPE_DEFAULT ZetDebugMemorySpaceType = 0 // ZET_DEBUG_MEMORY_SPACE_TYPE_DEFAULT default memory space (attribute may be omitted) - ZET_DEBUG_MEMORY_SPACE_TYPE_SLM ZetDebugMemorySpaceType = 1 // ZET_DEBUG_MEMORY_SPACE_TYPE_SLM shared local memory space (GPU-only) - ZET_DEBUG_MEMORY_SPACE_TYPE_ELF ZetDebugMemorySpaceType = 2 // ZET_DEBUG_MEMORY_SPACE_TYPE_ELF ELF file memory space - ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER ZetDebugMemorySpaceType = 3 // ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER Barrier memory space - ZET_DEBUG_MEMORY_SPACE_TYPE_FORCE_UINT32 ZetDebugMemorySpaceType = 0x7fffffff // ZET_DEBUG_MEMORY_SPACE_TYPE_FORCE_UINT32 Value marking end of ZET_DEBUG_MEMORY_SPACE_TYPE_* ENUMs + ZET_DEBUG_MEMORY_SPACE_TYPE_DEFAULT ZetDebugMemorySpaceType = 0 // ZET_DEBUG_MEMORY_SPACE_TYPE_DEFAULT default memory space (attribute may be omitted) + ZET_DEBUG_MEMORY_SPACE_TYPE_SLM ZetDebugMemorySpaceType = 1 // ZET_DEBUG_MEMORY_SPACE_TYPE_SLM shared local memory space (GPU-only) + ZET_DEBUG_MEMORY_SPACE_TYPE_ELF ZetDebugMemorySpaceType = 2 // ZET_DEBUG_MEMORY_SPACE_TYPE_ELF ELF file memory space + ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER ZetDebugMemorySpaceType = 3 // ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER Barrier memory space + ZET_DEBUG_MEMORY_SPACE_TYPE_FORCE_UINT32 ZetDebugMemorySpaceType = 0x7fffffff // ZET_DEBUG_MEMORY_SPACE_TYPE_FORCE_UINT32 Value marking end of ZET_DEBUG_MEMORY_SPACE_TYPE_* ENUMs ) // ZetDebugMemorySpaceDesc (zet_debug_memory_space_desc_t) Device memory space descriptor type ZetDebugMemorySpaceDesc struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZetDebugMemorySpaceType // Type [in] type of memory space - Address uint64 // Address [in] the virtual address within the memory space + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZetDebugMemorySpaceType // Type [in] type of memory space + Address uint64 // Address [in] the virtual address within the memory space } // ZetDebugReadMemory Read memory. -/// -/// @details -/// - The thread identifier 'all' can be used for accessing the default -/// memory space, e.g. for setting breakpoints. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDebug` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == buffer` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + the thread is running or unavailable -/// + the memory cannot be accessed from the supplied thread +// / +// / @details +// / - The thread identifier 'all' can be used for accessing the default +// / memory space, e.g. for setting breakpoints. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDebug` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == buffer` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER < desc->type` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + the thread is running or unavailable +// / + the memory cannot be accessed from the supplied thread func ZetDebugReadMemory( - hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle - thread *ZeDeviceThread, // thread [in] the thread identifier. (gozel hack: converted to a hidden pointer from a struct value) - desc *ZetDebugMemorySpaceDesc, // desc [in] memory space descriptor - size uintptr, // size [in] the number of bytes to read - buffer unsafe.Pointer, // buffer [in,out] a buffer to hold a copy of the memory + hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle + thread *ZeDeviceThread, // thread [in] the thread identifier. (gozel hack: converted to a hidden pointer from a struct value) + desc *ZetDebugMemorySpaceDesc, // desc [in] memory space descriptor + size uintptr, // size [in] the number of bytes to read + buffer unsafe.Pointer, // buffer [in,out] a buffer to hold a copy of the memory ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDebugReadMemory", uintptr(hDebug), uintptr(unsafe.Pointer(thread)), uintptr(unsafe.Pointer(desc)), uintptr(size), uintptr(unsafe.Pointer(buffer))) } // ZetDebugWriteMemory Write memory. -/// -/// @details -/// - The thread identifier 'all' can be used for accessing the default -/// memory space, e.g. for setting breakpoints. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDebug` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == buffer` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + the thread is running or unavailable -/// + the memory cannot be accessed from the supplied thread +// / +// / @details +// / - The thread identifier 'all' can be used for accessing the default +// / memory space, e.g. for setting breakpoints. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDebug` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == buffer` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZET_DEBUG_MEMORY_SPACE_TYPE_BARRIER < desc->type` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + the thread is running or unavailable +// / + the memory cannot be accessed from the supplied thread func ZetDebugWriteMemory( - hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle - thread *ZeDeviceThread, // thread [in] the thread identifier. (gozel hack: converted to a hidden pointer from a struct value) - desc *ZetDebugMemorySpaceDesc, // desc [in] memory space descriptor - size uintptr, // size [in] the number of bytes to write - buffer unsafe.Pointer, // buffer [in] a buffer holding the pattern to write + hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle + thread *ZeDeviceThread, // thread [in] the thread identifier. (gozel hack: converted to a hidden pointer from a struct value) + desc *ZetDebugMemorySpaceDesc, // desc [in] memory space descriptor + size uintptr, // size [in] the number of bytes to write + buffer unsafe.Pointer, // buffer [in] a buffer holding the pattern to write ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDebugWriteMemory", uintptr(hDebug), uintptr(unsafe.Pointer(thread)), uintptr(unsafe.Pointer(desc)), uintptr(size), uintptr(unsafe.Pointer(buffer))) } // ZetDebugRegsetFlags (zet_debug_regset_flags_t) Supported general register set flags. type ZetDebugRegsetFlags uint32 + const ( - ZET_DEBUG_REGSET_FLAG_READABLE ZetDebugRegsetFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZET_DEBUG_REGSET_FLAG_READABLE register set is readable - ZET_DEBUG_REGSET_FLAG_WRITEABLE ZetDebugRegsetFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZET_DEBUG_REGSET_FLAG_WRITEABLE register set is writeable - ZET_DEBUG_REGSET_FLAG_FORCE_UINT32 ZetDebugRegsetFlags = 0x7fffffff // ZET_DEBUG_REGSET_FLAG_FORCE_UINT32 Value marking end of ZET_DEBUG_REGSET_FLAG_* ENUMs + ZET_DEBUG_REGSET_FLAG_READABLE ZetDebugRegsetFlags = /* ZE_BIT(0) */ (1 << 0) // ZET_DEBUG_REGSET_FLAG_READABLE register set is readable + ZET_DEBUG_REGSET_FLAG_WRITEABLE ZetDebugRegsetFlags = /* ZE_BIT(1) */ (1 << 1) // ZET_DEBUG_REGSET_FLAG_WRITEABLE register set is writeable + ZET_DEBUG_REGSET_FLAG_FORCE_UINT32 ZetDebugRegsetFlags = 0x7fffffff // ZET_DEBUG_REGSET_FLAG_FORCE_UINT32 Value marking end of ZET_DEBUG_REGSET_FLAG_* ENUMs ) // ZetDebugRegsetProperties (zet_debug_regset_properties_t) Device register set properties queried using -/// ::zetDebugGetRegisterSetProperties. +// / ::zetDebugGetRegisterSetProperties. type ZetDebugRegsetProperties struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type uint32 // Type [out] device-specific register set type - Version uint32 // Version [out] device-specific version of this register set - Generalflags ZetDebugRegsetFlags // Generalflags [out] general register set flags - Deviceflags uint32 // Deviceflags [out] device-specific register set flags - Count uint32 // Count [out] number of registers in the set - Bitsize uint32 // Bitsize [out] the size of a register in bits - Bytesize uint32 // Bytesize [out] the size required for reading or writing a register in bytes + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type uint32 // Type [out] device-specific register set type + Version uint32 // Version [out] device-specific version of this register set + Generalflags ZetDebugRegsetFlags // Generalflags [out] general register set flags + Deviceflags uint32 // Deviceflags [out] device-specific register set flags + Count uint32 // Count [out] number of registers in the set + Bitsize uint32 // Bitsize [out] the size of a register in bits + Bytesize uint32 // Bytesize [out] the size required for reading or writing a register in bytes } // ZetDebugGetRegisterSetProperties Retrieves debug register set properties. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZetDebugGetRegisterSetProperties( - hDevice ZetDeviceHandle, // hDevice [in] device handle - pCount *uint32, // pCount [in,out] pointer to the number of register set properties. if count is zero, then the driver shall update the value with the total number of register set properties available. if count is greater than the number of register set properties available, then the driver shall update the value with the correct number of registry set properties available. - pRegisterSetProperties *ZetDebugRegsetProperties, // pRegisterSetProperties [in,out][optional][range(0, *pCount)] array of query results for register set properties. if count is less than the number of register set properties available, then driver shall only retrieve that number of register set properties. + hDevice ZetDeviceHandle, // hDevice [in] device handle + pCount *uint32, // pCount [in,out] pointer to the number of register set properties. if count is zero, then the driver shall update the value with the total number of register set properties available. if count is greater than the number of register set properties available, then the driver shall update the value with the correct number of registry set properties available. + pRegisterSetProperties *ZetDebugRegsetProperties, // pRegisterSetProperties [in,out][optional][range(0, *pCount)] array of query results for register set properties. if count is less than the number of register set properties available, then driver shall only retrieve that number of register set properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDebugGetRegisterSetProperties", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pRegisterSetProperties))) } // ZetDebugGetThreadRegisterSetProperties Retrieves debug register set properties for a given thread. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDebug` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + the thread is running or unavailable -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + the thread argument specifies more than one or a non-existant thread +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDebug` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + the thread is running or unavailable +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + the thread argument specifies more than one or a non-existant thread func ZetDebugGetThreadRegisterSetProperties( - hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle - thread *ZeDeviceThread, // thread [in] the thread identifier specifying a single stopped thread (gozel hack: converted to a hidden pointer from a struct value) - pCount *uint32, // pCount [in,out] pointer to the number of register set properties. if count is zero, then the driver shall update the value with the total number of register set properties available. if count is greater than the number of register set properties available, then the driver shall update the value with the correct number of registry set properties available. - pRegisterSetProperties *ZetDebugRegsetProperties, // pRegisterSetProperties [in,out][optional][range(0, *pCount)] array of query results for register set properties. if count is less than the number of register set properties available, then driver shall only retrieve that number of register set properties. + hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle + thread *ZeDeviceThread, // thread [in] the thread identifier specifying a single stopped thread (gozel hack: converted to a hidden pointer from a struct value) + pCount *uint32, // pCount [in,out] pointer to the number of register set properties. if count is zero, then the driver shall update the value with the total number of register set properties available. if count is greater than the number of register set properties available, then the driver shall update the value with the correct number of registry set properties available. + pRegisterSetProperties *ZetDebugRegsetProperties, // pRegisterSetProperties [in,out][optional][range(0, *pCount)] array of query results for register set properties. if count is less than the number of register set properties available, then driver shall only retrieve that number of register set properties. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDebugGetThreadRegisterSetProperties", uintptr(hDebug), uintptr(unsafe.Pointer(thread)), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pRegisterSetProperties))) } // ZetDebugReadRegisters Read register state. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDebug` -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + the thread is running or unavailable +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDebug` +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + the thread is running or unavailable func ZetDebugReadRegisters( - hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle - thread *ZeDeviceThread, // thread [in] the thread identifier (gozel hack: converted to a hidden pointer from a struct value) - typ uint32, // typ [in] register set type - start uint32, // start [in] the starting offset into the register state area; must be less than the `count` member of ::zet_debug_regset_properties_t for the type - count uint32, // count [in] the number of registers to read; start+count must be less than or equal to the `count` member of ::zet_debug_regset_properties_t for the type - pRegisterValues unsafe.Pointer, // pRegisterValues [in,out][optional][range(0, count)] buffer of register values + hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle + thread *ZeDeviceThread, // thread [in] the thread identifier (gozel hack: converted to a hidden pointer from a struct value) + typ uint32, // typ [in] register set type + start uint32, // start [in] the starting offset into the register state area; must be less than the `count` member of ::zet_debug_regset_properties_t for the type + count uint32, // count [in] the number of registers to read; start+count must be less than or equal to the `count` member of ::zet_debug_regset_properties_t for the type + pRegisterValues unsafe.Pointer, // pRegisterValues [in,out][optional][range(0, count)] buffer of register values ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDebugReadRegisters", uintptr(hDebug), uintptr(unsafe.Pointer(thread)), uintptr(typ), uintptr(start), uintptr(count), uintptr(unsafe.Pointer(pRegisterValues))) } // ZetDebugWriteRegisters Write register state. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDebug` -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// + the thread is running or unavailable +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDebug` +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / + the thread is running or unavailable func ZetDebugWriteRegisters( - hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle - thread *ZeDeviceThread, // thread [in] the thread identifier (gozel hack: converted to a hidden pointer from a struct value) - typ uint32, // typ [in] register set type - start uint32, // start [in] the starting offset into the register state area; must be less than the `count` member of ::zet_debug_regset_properties_t for the type - count uint32, // count [in] the number of registers to write; start+count must be less than or equal to the `count` member of ::zet_debug_regset_properties_t for the type - pRegisterValues unsafe.Pointer, // pRegisterValues [in,out][optional][range(0, count)] buffer of register values + hDebug ZetDebugSessionHandle, // hDebug [in] debug session handle + thread *ZeDeviceThread, // thread [in] the thread identifier (gozel hack: converted to a hidden pointer from a struct value) + typ uint32, // typ [in] register set type + start uint32, // start [in] the starting offset into the register state area; must be less than the `count` member of ::zet_debug_regset_properties_t for the type + count uint32, // count [in] the number of registers to write; start+count must be less than or equal to the `count` member of ::zet_debug_regset_properties_t for the type + pRegisterValues unsafe.Pointer, // pRegisterValues [in,out][optional][range(0, count)] buffer of register values ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDebugWriteRegisters", uintptr(hDebug), uintptr(unsafe.Pointer(thread)), uintptr(typ), uintptr(start), uintptr(count), uintptr(unsafe.Pointer(pRegisterValues))) } - diff --git a/tols_metric.go b/tols_metric.go index e0b9507..fcb2064 100644 --- a/tols_metric.go +++ b/tols_metric.go @@ -20,32 +20,32 @@ import ( ) // ZetMetricGroupGet Retrieves metric group for a device. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZetMetricGroupGet( - hDevice ZetDeviceHandle, // hDevice [in] handle of the device - pCount *uint32, // pCount [in,out] pointer to the number of metric groups. if count is zero, then the driver shall update the value with the total number of metric groups available. if count is greater than the number of metric groups available, then the driver shall update the value with the correct number of metric groups available. - phMetricGroups *ZetMetricGroupHandle, // phMetricGroups [in,out][optional][range(0, *pCount)] array of handle of metric groups. if count is less than the number of metric groups available, then driver shall only retrieve that number of metric groups. + hDevice ZetDeviceHandle, // hDevice [in] handle of the device + pCount *uint32, // pCount [in,out] pointer to the number of metric groups. if count is zero, then the driver shall update the value with the total number of metric groups available. if count is greater than the number of metric groups available, then the driver shall update the value with the correct number of metric groups available. + phMetricGroups *ZetMetricGroupHandle, // phMetricGroups [in,out][optional][range(0, *pCount)] array of handle of metric groups. if count is less than the number of metric groups available, then driver shall only retrieve that number of metric groups. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGroupGet", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phMetricGroups))) } @@ -58,161 +58,164 @@ const ZET_MAX_METRIC_GROUP_DESCRIPTION = 256 // ZetMetricGroupSamplingTypeFlags (zet_metric_group_sampling_type_flags_t) Metric group sampling type type ZetMetricGroupSamplingTypeFlags uint32 + const ( - ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EVENT_BASED ZetMetricGroupSamplingTypeFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EVENT_BASED Event based sampling - ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_TIME_BASED ZetMetricGroupSamplingTypeFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_TIME_BASED Time based sampling - ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EXP_TRACER_BASED ZetMetricGroupSamplingTypeFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EXP_TRACER_BASED Experimental Tracer based sampling - ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_FORCE_UINT32 ZetMetricGroupSamplingTypeFlags = 0x7fffffff // ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_FORCE_UINT32 Value marking end of ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_* ENUMs + ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EVENT_BASED ZetMetricGroupSamplingTypeFlags = /* ZE_BIT(0) */ (1 << 0) // ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EVENT_BASED Event based sampling + ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_TIME_BASED ZetMetricGroupSamplingTypeFlags = /* ZE_BIT(1) */ (1 << 1) // ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_TIME_BASED Time based sampling + ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EXP_TRACER_BASED ZetMetricGroupSamplingTypeFlags = /* ZE_BIT(2) */ (1 << 2) // ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EXP_TRACER_BASED Experimental Tracer based sampling + ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_FORCE_UINT32 ZetMetricGroupSamplingTypeFlags = 0x7fffffff // ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_FORCE_UINT32 Value marking end of ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_* ENUMs ) // ZetMetricGroupProperties (zet_metric_group_properties_t) Metric group properties queried using ::zetMetricGroupGetProperties type ZetMetricGroupProperties struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Name [ZET_MAX_METRIC_GROUP_NAME]byte // Name [out] metric group name - Description [ZET_MAX_METRIC_GROUP_DESCRIPTION]byte // Description [out] metric group description - Samplingtype ZetMetricGroupSamplingTypeFlags // Samplingtype [out] metric group sampling type. returns a combination of ::zet_metric_group_sampling_type_flag_t. - Domain uint32 // Domain [out] metric group domain number. Cannot use multiple, simultaneous metric groups from the same domain. - Metriccount uint32 // Metriccount [out] metric count belonging to this group + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Name [ZET_MAX_METRIC_GROUP_NAME]byte // Name [out] metric group name + Description [ZET_MAX_METRIC_GROUP_DESCRIPTION]byte // Description [out] metric group description + Samplingtype ZetMetricGroupSamplingTypeFlags // Samplingtype [out] metric group sampling type. returns a combination of ::zet_metric_group_sampling_type_flag_t. + Domain uint32 // Domain [out] metric group domain number. Cannot use multiple, simultaneous metric groups from the same domain. + Metriccount uint32 // Metriccount [out] metric count belonging to this group } // ZetMetricGroupGetProperties Retrieves attributes of a metric group. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricGroup` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricGroup` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZetMetricGroupGetProperties( - hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group - pProperties *ZetMetricGroupProperties, // pProperties [in,out] metric group properties + hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group + pProperties *ZetMetricGroupProperties, // pProperties [in,out] metric group properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGroupGetProperties", uintptr(hMetricGroup), uintptr(unsafe.Pointer(pProperties))) } // ZetMetricType (zet_metric_type_t) Metric types type ZetMetricType uintptr + const ( - ZET_METRIC_TYPE_DURATION ZetMetricType = 0 // ZET_METRIC_TYPE_DURATION Metric type: duration - ZET_METRIC_TYPE_EVENT ZetMetricType = 1 // ZET_METRIC_TYPE_EVENT Metric type: event - ZET_METRIC_TYPE_EVENT_WITH_RANGE ZetMetricType = 2 // ZET_METRIC_TYPE_EVENT_WITH_RANGE Metric type: event with range - ZET_METRIC_TYPE_THROUGHPUT ZetMetricType = 3 // ZET_METRIC_TYPE_THROUGHPUT Metric type: throughput - ZET_METRIC_TYPE_TIMESTAMP ZetMetricType = 4 // ZET_METRIC_TYPE_TIMESTAMP Metric type: timestamp - ZET_METRIC_TYPE_FLAG ZetMetricType = 5 // ZET_METRIC_TYPE_FLAG Metric type: flag - ZET_METRIC_TYPE_RATIO ZetMetricType = 6 // ZET_METRIC_TYPE_RATIO Metric type: ratio - ZET_METRIC_TYPE_RAW ZetMetricType = 7 // ZET_METRIC_TYPE_RAW Metric type: raw - ZET_METRIC_TYPE_EVENT_EXP_TIMESTAMP ZetMetricType = 0x7ffffff9 // ZET_METRIC_TYPE_EVENT_EXP_TIMESTAMP Metric type: event with only timestamp and value has no meaning - ZET_METRIC_TYPE_EVENT_EXP_START ZetMetricType = 0x7ffffffa // ZET_METRIC_TYPE_EVENT_EXP_START Metric type: the first event of a start/end event pair - ZET_METRIC_TYPE_EVENT_EXP_END ZetMetricType = 0x7ffffffb // ZET_METRIC_TYPE_EVENT_EXP_END Metric type: the second event of a start/end event pair - ZET_METRIC_TYPE_EVENT_EXP_MONOTONIC_WRAPS_VALUE ZetMetricType = 0x7ffffffc // ZET_METRIC_TYPE_EVENT_EXP_MONOTONIC_WRAPS_VALUE Metric type: value of the event is a monotonically increasing value + ZET_METRIC_TYPE_DURATION ZetMetricType = 0 // ZET_METRIC_TYPE_DURATION Metric type: duration + ZET_METRIC_TYPE_EVENT ZetMetricType = 1 // ZET_METRIC_TYPE_EVENT Metric type: event + ZET_METRIC_TYPE_EVENT_WITH_RANGE ZetMetricType = 2 // ZET_METRIC_TYPE_EVENT_WITH_RANGE Metric type: event with range + ZET_METRIC_TYPE_THROUGHPUT ZetMetricType = 3 // ZET_METRIC_TYPE_THROUGHPUT Metric type: throughput + ZET_METRIC_TYPE_TIMESTAMP ZetMetricType = 4 // ZET_METRIC_TYPE_TIMESTAMP Metric type: timestamp + ZET_METRIC_TYPE_FLAG ZetMetricType = 5 // ZET_METRIC_TYPE_FLAG Metric type: flag + ZET_METRIC_TYPE_RATIO ZetMetricType = 6 // ZET_METRIC_TYPE_RATIO Metric type: ratio + ZET_METRIC_TYPE_RAW ZetMetricType = 7 // ZET_METRIC_TYPE_RAW Metric type: raw + ZET_METRIC_TYPE_EVENT_EXP_TIMESTAMP ZetMetricType = 0x7ffffff9 // ZET_METRIC_TYPE_EVENT_EXP_TIMESTAMP Metric type: event with only timestamp and value has no meaning + ZET_METRIC_TYPE_EVENT_EXP_START ZetMetricType = 0x7ffffffa // ZET_METRIC_TYPE_EVENT_EXP_START Metric type: the first event of a start/end event pair + ZET_METRIC_TYPE_EVENT_EXP_END ZetMetricType = 0x7ffffffb // ZET_METRIC_TYPE_EVENT_EXP_END Metric type: the second event of a start/end event pair + ZET_METRIC_TYPE_EVENT_EXP_MONOTONIC_WRAPS_VALUE ZetMetricType = 0x7ffffffc // ZET_METRIC_TYPE_EVENT_EXP_MONOTONIC_WRAPS_VALUE Metric type: value of the event is a monotonically increasing value ///< that can wrap around - ZET_METRIC_TYPE_EXP_EXPORT_DMA_BUF ZetMetricType = 0x7ffffffd // ZET_METRIC_TYPE_EXP_EXPORT_DMA_BUF Metric which exports linux dma_buf, which could be imported/mapped to + ZET_METRIC_TYPE_EXP_EXPORT_DMA_BUF ZetMetricType = 0x7ffffffd // ZET_METRIC_TYPE_EXP_EXPORT_DMA_BUF Metric which exports linux dma_buf, which could be imported/mapped to ///< the host process - ZET_METRIC_TYPE_IP_EXP ZetMetricType = 0x7ffffffe // ZET_METRIC_TYPE_IP_EXP Metric type: instruction pointer. Deprecated, use + ZET_METRIC_TYPE_IP_EXP ZetMetricType = 0x7ffffffe // ZET_METRIC_TYPE_IP_EXP Metric type: instruction pointer. Deprecated, use ///< ::ZET_METRIC_TYPE_IP. - ZET_METRIC_TYPE_IP ZetMetricType = 0x7ffffffe // ZET_METRIC_TYPE_IP Metric type: instruction pointer - ZET_METRIC_TYPE_FORCE_UINT32 ZetMetricType = 0x7fffffff // ZET_METRIC_TYPE_FORCE_UINT32 Value marking end of ZET_METRIC_TYPE_* ENUMs + ZET_METRIC_TYPE_IP ZetMetricType = 0x7ffffffe // ZET_METRIC_TYPE_IP Metric type: instruction pointer + ZET_METRIC_TYPE_FORCE_UINT32 ZetMetricType = 0x7fffffff // ZET_METRIC_TYPE_FORCE_UINT32 Value marking end of ZET_METRIC_TYPE_* ENUMs ) // ZetMetricGroupCalculationType (zet_metric_group_calculation_type_t) Metric group calculation type type ZetMetricGroupCalculationType uintptr + const ( - ZET_METRIC_GROUP_CALCULATION_TYPE_METRIC_VALUES ZetMetricGroupCalculationType = 0 // ZET_METRIC_GROUP_CALCULATION_TYPE_METRIC_VALUES Calculated metric values from raw data. - ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES ZetMetricGroupCalculationType = 1 // ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES Maximum metric values. - ZET_METRIC_GROUP_CALCULATION_TYPE_FORCE_UINT32 ZetMetricGroupCalculationType = 0x7fffffff // ZET_METRIC_GROUP_CALCULATION_TYPE_FORCE_UINT32 Value marking end of ZET_METRIC_GROUP_CALCULATION_TYPE_* ENUMs + ZET_METRIC_GROUP_CALCULATION_TYPE_METRIC_VALUES ZetMetricGroupCalculationType = 0 // ZET_METRIC_GROUP_CALCULATION_TYPE_METRIC_VALUES Calculated metric values from raw data. + ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES ZetMetricGroupCalculationType = 1 // ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES Maximum metric values. + ZET_METRIC_GROUP_CALCULATION_TYPE_FORCE_UINT32 ZetMetricGroupCalculationType = 0x7fffffff // ZET_METRIC_GROUP_CALCULATION_TYPE_FORCE_UINT32 Value marking end of ZET_METRIC_GROUP_CALCULATION_TYPE_* ENUMs ) // ZetMetricGroupCalculateMetricValues Calculates metric values from raw data. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricGroup` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pRawData` -/// + `nullptr == pMetricValueCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricGroup` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pRawData` +// / + `nullptr == pMetricValueCount` func ZetMetricGroupCalculateMetricValues( - hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group - typ ZetMetricGroupCalculationType, // typ [in] calculation type to be applied on raw data - rawDataSize uintptr, // rawDataSize [in] size in bytes of raw data buffer - pRawData *uint8, // pRawData [in][range(0, rawDataSize)] buffer of raw data to calculate - pMetricValueCount *uint32, // pMetricValueCount [in,out] pointer to number of metric values calculated. if count is zero, then the driver shall update the value with the total number of metric values to be calculated. if count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of metric values to be calculated. - pMetricValues *ZetTypedValue, // pMetricValues [in,out][optional][range(0, *pMetricValueCount)] buffer of calculated metrics. if count is less than the number available in the raw data buffer, then driver shall only calculate that number of metric values. + hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group + typ ZetMetricGroupCalculationType, // typ [in] calculation type to be applied on raw data + rawDataSize uintptr, // rawDataSize [in] size in bytes of raw data buffer + pRawData *uint8, // pRawData [in][range(0, rawDataSize)] buffer of raw data to calculate + pMetricValueCount *uint32, // pMetricValueCount [in,out] pointer to number of metric values calculated. if count is zero, then the driver shall update the value with the total number of metric values to be calculated. if count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of metric values to be calculated. + pMetricValues *ZetTypedValue, // pMetricValues [in,out][optional][range(0, *pMetricValueCount)] buffer of calculated metrics. if count is less than the number available in the raw data buffer, then driver shall only calculate that number of metric values. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGroupCalculateMetricValues", uintptr(hMetricGroup), uintptr(typ), uintptr(rawDataSize), uintptr(unsafe.Pointer(pRawData)), uintptr(unsafe.Pointer(pMetricValueCount)), uintptr(unsafe.Pointer(pMetricValues))) } // ZetMetricGet Retrieves metric from a metric group. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricGroup` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricGroup` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZetMetricGet( - hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group - pCount *uint32, // pCount [in,out] pointer to the number of metrics. if count is zero, then the driver shall update the value with the total number of metrics available. if count is greater than the number of metrics available, then the driver shall update the value with the correct number of metrics available. - phMetrics *ZetMetricHandle, // phMetrics [in,out][optional][range(0, *pCount)] array of handle of metrics. if count is less than the number of metrics available, then driver shall only retrieve that number of metrics. + hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group + pCount *uint32, // pCount [in,out] pointer to the number of metrics. if count is zero, then the driver shall update the value with the total number of metrics available. if count is greater than the number of metrics available, then the driver shall update the value with the correct number of metrics available. + phMetrics *ZetMetricHandle, // phMetrics [in,out][optional][range(0, *pCount)] array of handle of metrics. if count is less than the number of metrics available, then driver shall only retrieve that number of metrics. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGet", uintptr(hMetricGroup), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phMetrics))) } @@ -231,572 +234,572 @@ const ZET_MAX_METRIC_RESULT_UNITS = 256 // ZetMetricProperties (zet_metric_properties_t) Metric properties queried using ::zetMetricGetProperties type ZetMetricProperties struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Name [ZET_MAX_METRIC_NAME]byte // Name [out] metric name - Description [ZET_MAX_METRIC_DESCRIPTION]byte // Description [out] metric description - Component [ZET_MAX_METRIC_COMPONENT]byte // Component [out] metric component - Tiernumber uint32 // Tiernumber [out] number of tier - Metrictype ZetMetricType // Metrictype [out] metric type - Resulttype ZetValueType // Resulttype [out] metric result type - Resultunits [ZET_MAX_METRIC_RESULT_UNITS]byte // Resultunits [out] metric result units + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Name [ZET_MAX_METRIC_NAME]byte // Name [out] metric name + Description [ZET_MAX_METRIC_DESCRIPTION]byte // Description [out] metric description + Component [ZET_MAX_METRIC_COMPONENT]byte // Component [out] metric component + Tiernumber uint32 // Tiernumber [out] number of tier + Metrictype ZetMetricType // Metrictype [out] metric type + Resulttype ZetValueType // Resulttype [out] metric result type + Resultunits [ZET_MAX_METRIC_RESULT_UNITS]byte // Resultunits [out] metric result units } // ZetMetricGetProperties Retrieves attributes of a metric. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetric` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetric` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZetMetricGetProperties( - hMetric ZetMetricHandle, // hMetric [in] handle of the metric - pProperties *ZetMetricProperties, // pProperties [in,out] metric properties + hMetric ZetMetricHandle, // hMetric [in] handle of the metric + pProperties *ZetMetricProperties, // pProperties [in,out] metric properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGetProperties", uintptr(hMetric), uintptr(unsafe.Pointer(pProperties))) } // ZetContextActivateMetricGroups Activates metric groups. -/// -/// @details -/// - Immediately reconfigures the device to activate only those metric -/// groups provided. -/// - Any metric groups previously activated but not provided will be -/// deactivated. -/// - Deactivating metric groups that are still in-use will result in -/// undefined behavior. -/// - All metric groups must have different domains, see -/// ::zet_metric_group_properties_t. -/// - The application must **not** call this function from simultaneous -/// threads with the same device handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phMetricGroups) && (0 < count)` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + Multiple metric groups share the same domain +// / +// / @details +// / - Immediately reconfigures the device to activate only those metric +// / groups provided. +// / - Any metric groups previously activated but not provided will be +// / deactivated. +// / - Deactivating metric groups that are still in-use will result in +// / undefined behavior. +// / - All metric groups must have different domains, see +// / ::zet_metric_group_properties_t. +// / - The application must **not** call this function from simultaneous +// / threads with the same device handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phMetricGroups) && (0 < count)` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + Multiple metric groups share the same domain func ZetContextActivateMetricGroups( - hContext ZetContextHandle, // hContext [in] handle of the context object - hDevice ZetDeviceHandle, // hDevice [in] handle of the device - count uint32, // count [in] metric group count to activate; must be 0 if `nullptr == phMetricGroups` - phMetricGroups *ZetMetricGroupHandle, // phMetricGroups [in][optional][range(0, count)] handles of the metric groups to activate. nullptr deactivates all previously used metric groups. all metrics groups must come from a different domains. metric query and metric stream must use activated metric groups. + hContext ZetContextHandle, // hContext [in] handle of the context object + hDevice ZetDeviceHandle, // hDevice [in] handle of the device + count uint32, // count [in] metric group count to activate; must be 0 if `nullptr == phMetricGroups` + phMetricGroups *ZetMetricGroupHandle, // phMetricGroups [in][optional][range(0, count)] handles of the metric groups to activate. nullptr deactivates all previously used metric groups. all metrics groups must come from a different domains. metric query and metric stream must use activated metric groups. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetContextActivateMetricGroups", uintptr(hContext), uintptr(hDevice), uintptr(count), uintptr(unsafe.Pointer(phMetricGroups))) } // ZetMetricStreamerDesc (zet_metric_streamer_desc_t) Metric streamer descriptor type ZetMetricStreamerDesc struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Notifyeverynreports uint32 // Notifyeverynreports [in,out] number of collected reports after which notification event will be signaled. If the requested value is not supported exactly, then the driver may use a value that is the closest supported approximation and shall update this member during ::zetMetricStreamerOpen. - Samplingperiod uint32 // Samplingperiod [in,out] streamer sampling period in nanoseconds. If the requested value is not supported exactly, then the driver may use a value that is the closest supported approximation and shall update this member during ::zetMetricStreamerOpen. + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Notifyeverynreports uint32 // Notifyeverynreports [in,out] number of collected reports after which notification event will be signaled. If the requested value is not supported exactly, then the driver may use a value that is the closest supported approximation and shall update this member during ::zetMetricStreamerOpen. + Samplingperiod uint32 // Samplingperiod [in,out] streamer sampling period in nanoseconds. If the requested value is not supported exactly, then the driver may use a value that is the closest supported approximation and shall update this member during ::zetMetricStreamerOpen. } // ZetMetricStreamerOpen Opens metric streamer for a device. -/// -/// @details -/// - The notification event must have been created from an event pool that -/// was created using ::ZE_EVENT_POOL_FLAG_HOST_VISIBLE flag. -/// - The duration of the signal event created from an event pool that was -/// created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag is undefined. -/// However, for consistency and orthogonality the event will report -/// correctly as signaled when used by other event API functionality. -/// - The application must **not** call this function from simultaneous -/// threads with the same device handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// + `nullptr == hMetricGroup` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phMetricStreamer` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / +// / @details +// / - The notification event must have been created from an event pool that +// / was created using ::ZE_EVENT_POOL_FLAG_HOST_VISIBLE flag. +// / - The duration of the signal event created from an event pool that was +// / created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag is undefined. +// / However, for consistency and orthogonality the event will report +// / correctly as signaled when used by other event API functionality. +// / - The application must **not** call this function from simultaneous +// / threads with the same device handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / + `nullptr == hMetricGroup` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phMetricStreamer` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT func ZetMetricStreamerOpen( - hContext ZetContextHandle, // hContext [in] handle of the context object - hDevice ZetDeviceHandle, // hDevice [in] handle of the device - hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group - desc *ZetMetricStreamerDesc, // desc [in,out] metric streamer descriptor - hNotificationEvent ZeEventHandle, // hNotificationEvent [in][optional] event used for report availability notification - phMetricStreamer *ZetMetricStreamerHandle, // phMetricStreamer [out] handle of metric streamer + hContext ZetContextHandle, // hContext [in] handle of the context object + hDevice ZetDeviceHandle, // hDevice [in] handle of the device + hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group + desc *ZetMetricStreamerDesc, // desc [in,out] metric streamer descriptor + hNotificationEvent ZeEventHandle, // hNotificationEvent [in][optional] event used for report availability notification + phMetricStreamer *ZetMetricStreamerHandle, // phMetricStreamer [out] handle of metric streamer ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricStreamerOpen", uintptr(hContext), uintptr(hDevice), uintptr(hMetricGroup), uintptr(unsafe.Pointer(desc)), uintptr(hNotificationEvent), uintptr(unsafe.Pointer(phMetricStreamer))) } // ZetCommandListAppendMetricStreamerMarker Append metric streamer marker into a command list. -/// -/// @details -/// - The application must ensure the metric streamer is accessible by the -/// device on which the command list was created. -/// - The application must ensure the command list and metric streamer were -/// created on the same context. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// - Allow to associate metric stream time based metrics with executed -/// workload. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hMetricStreamer` +// / +// / @details +// / - The application must ensure the metric streamer is accessible by the +// / device on which the command list was created. +// / - The application must ensure the command list and metric streamer were +// / created on the same context. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / - Allow to associate metric stream time based metrics with executed +// / workload. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hMetricStreamer` func ZetCommandListAppendMetricStreamerMarker( - hCommandList ZetCommandListHandle, // hCommandList [in] handle of the command list - hMetricStreamer ZetMetricStreamerHandle, // hMetricStreamer [in] handle of the metric streamer - value uint32, // value [in] streamer marker value + hCommandList ZetCommandListHandle, // hCommandList [in] handle of the command list + hMetricStreamer ZetMetricStreamerHandle, // hMetricStreamer [in] handle of the metric streamer + value uint32, // value [in] streamer marker value ) (ZeResult, error) { return zecall.Call[ZeResult]("zetCommandListAppendMetricStreamerMarker", uintptr(hCommandList), uintptr(hMetricStreamer), uintptr(value)) } // ZetMetricStreamerClose Closes metric streamer. -/// -/// @details -/// - The application must **not** call this function from simultaneous -/// threads with the same metric streamer handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricStreamer` +// / +// / @details +// / - The application must **not** call this function from simultaneous +// / threads with the same metric streamer handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricStreamer` func ZetMetricStreamerClose( - hMetricStreamer ZetMetricStreamerHandle, // hMetricStreamer [in][release] handle of the metric streamer + hMetricStreamer ZetMetricStreamerHandle, // hMetricStreamer [in][release] handle of the metric streamer ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricStreamerClose", uintptr(hMetricStreamer)) } // ZetMetricStreamerReadData Reads data from metric streamer. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricStreamer` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pRawDataSize` -/// - ::ZE_RESULT_WARNING_DROPPED_DATA -/// + Metric streamer data may have been dropped. Reduce sampling period. +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricStreamer` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pRawDataSize` +// / - ::ZE_RESULT_WARNING_DROPPED_DATA +// / + Metric streamer data may have been dropped. Reduce sampling period. func ZetMetricStreamerReadData( - hMetricStreamer ZetMetricStreamerHandle, // hMetricStreamer [in] handle of the metric streamer - maxReportCount uint32, // maxReportCount [in] the maximum number of reports the application wants to receive. if `UINT32_MAX`, then function will retrieve all reports available - pRawDataSize *uintptr, // pRawDataSize [in,out] pointer to size in bytes of raw data requested to read. if size is zero, then the driver will update the value with the total size in bytes needed for all reports available. if size is non-zero, then driver will only retrieve the number of reports that fit into the buffer. if size is larger than size needed for all reports, then driver will update the value with the actual size needed. - pRawData *uint8, // pRawData [in,out][optional][range(0, *pRawDataSize)] buffer containing streamer reports in raw format + hMetricStreamer ZetMetricStreamerHandle, // hMetricStreamer [in] handle of the metric streamer + maxReportCount uint32, // maxReportCount [in] the maximum number of reports the application wants to receive. if `UINT32_MAX`, then function will retrieve all reports available + pRawDataSize *uintptr, // pRawDataSize [in,out] pointer to size in bytes of raw data requested to read. if size is zero, then the driver will update the value with the total size in bytes needed for all reports available. if size is non-zero, then driver will only retrieve the number of reports that fit into the buffer. if size is larger than size needed for all reports, then driver will update the value with the actual size needed. + pRawData *uint8, // pRawData [in,out][optional][range(0, *pRawDataSize)] buffer containing streamer reports in raw format ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricStreamerReadData", uintptr(hMetricStreamer), uintptr(maxReportCount), uintptr(unsafe.Pointer(pRawDataSize)), uintptr(unsafe.Pointer(pRawData))) } // ZetMetricQueryPoolType (zet_metric_query_pool_type_t) Metric query pool types type ZetMetricQueryPoolType uintptr + const ( - ZET_METRIC_QUERY_POOL_TYPE_PERFORMANCE ZetMetricQueryPoolType = 0 // ZET_METRIC_QUERY_POOL_TYPE_PERFORMANCE Performance metric query pool. - ZET_METRIC_QUERY_POOL_TYPE_EXECUTION ZetMetricQueryPoolType = 1 // ZET_METRIC_QUERY_POOL_TYPE_EXECUTION Skips workload execution between begin/end calls. - ZET_METRIC_QUERY_POOL_TYPE_FORCE_UINT32 ZetMetricQueryPoolType = 0x7fffffff // ZET_METRIC_QUERY_POOL_TYPE_FORCE_UINT32 Value marking end of ZET_METRIC_QUERY_POOL_TYPE_* ENUMs + ZET_METRIC_QUERY_POOL_TYPE_PERFORMANCE ZetMetricQueryPoolType = 0 // ZET_METRIC_QUERY_POOL_TYPE_PERFORMANCE Performance metric query pool. + ZET_METRIC_QUERY_POOL_TYPE_EXECUTION ZetMetricQueryPoolType = 1 // ZET_METRIC_QUERY_POOL_TYPE_EXECUTION Skips workload execution between begin/end calls. + ZET_METRIC_QUERY_POOL_TYPE_FORCE_UINT32 ZetMetricQueryPoolType = 0x7fffffff // ZET_METRIC_QUERY_POOL_TYPE_FORCE_UINT32 Value marking end of ZET_METRIC_QUERY_POOL_TYPE_* ENUMs ) // ZetMetricQueryPoolDesc (zet_metric_query_pool_desc_t) Metric query pool description type ZetMetricQueryPoolDesc struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZetMetricQueryPoolType // Type [in] Query pool type. - Count uint32 // Count [in] Internal slots count within query pool object. + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZetMetricQueryPoolType // Type [in] Query pool type. + Count uint32 // Count [in] Internal slots count within query pool object. } // ZetMetricQueryPoolCreate Creates a pool of metric queries on the context. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// + `nullptr == hMetricGroup` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == phMetricQueryPool` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZET_METRIC_QUERY_POOL_TYPE_EXECUTION < desc->type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / + `nullptr == hMetricGroup` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == phMetricQueryPool` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZET_METRIC_QUERY_POOL_TYPE_EXECUTION < desc->type` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZetMetricQueryPoolCreate( - hContext ZetContextHandle, // hContext [in] handle of the context object - hDevice ZetDeviceHandle, // hDevice [in] handle of the device - hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] metric group associated with the query object. - desc *ZetMetricQueryPoolDesc, // desc [in] metric query pool descriptor - phMetricQueryPool *ZetMetricQueryPoolHandle, // phMetricQueryPool [out] handle of metric query pool + hContext ZetContextHandle, // hContext [in] handle of the context object + hDevice ZetDeviceHandle, // hDevice [in] handle of the device + hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] metric group associated with the query object. + desc *ZetMetricQueryPoolDesc, // desc [in] metric query pool descriptor + phMetricQueryPool *ZetMetricQueryPoolHandle, // phMetricQueryPool [out] handle of metric query pool ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricQueryPoolCreate", uintptr(hContext), uintptr(hDevice), uintptr(hMetricGroup), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phMetricQueryPool))) } // ZetMetricQueryPoolDestroy Deletes a query pool object. -/// -/// @details -/// - The application must destroy all query handles created from the pool -/// before destroying the pool itself. -/// - The application must ensure the device is not currently referencing -/// the any query within the pool before it is deleted. -/// - The application must **not** call this function from simultaneous -/// threads with the same query pool handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricQueryPool` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must destroy all query handles created from the pool +// / before destroying the pool itself. +// / - The application must ensure the device is not currently referencing +// / the any query within the pool before it is deleted. +// / - The application must **not** call this function from simultaneous +// / threads with the same query pool handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricQueryPool` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZetMetricQueryPoolDestroy( - hMetricQueryPool ZetMetricQueryPoolHandle, // hMetricQueryPool [in][release] handle of the metric query pool + hMetricQueryPool ZetMetricQueryPoolHandle, // hMetricQueryPool [in][release] handle of the metric query pool ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricQueryPoolDestroy", uintptr(hMetricQueryPool)) } // ZetMetricQueryCreate Creates metric query from the pool. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricQueryPool` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phMetricQuery` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricQueryPool` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phMetricQuery` func ZetMetricQueryCreate( - hMetricQueryPool ZetMetricQueryPoolHandle, // hMetricQueryPool [in] handle of the metric query pool - index uint32, // index [in] index of the query within the pool - phMetricQuery *ZetMetricQueryHandle, // phMetricQuery [out] handle of metric query + hMetricQueryPool ZetMetricQueryPoolHandle, // hMetricQueryPool [in] handle of the metric query pool + index uint32, // index [in] index of the query within the pool + phMetricQuery *ZetMetricQueryHandle, // phMetricQuery [out] handle of metric query ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricQueryCreate", uintptr(hMetricQueryPool), uintptr(index), uintptr(unsafe.Pointer(phMetricQuery))) } // ZetMetricQueryDestroy Deletes a metric query object. -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the query before it is deleted. -/// - The application must **not** call this function from simultaneous -/// threads with the same query handle. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricQuery` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the query before it is deleted. +// / - The application must **not** call this function from simultaneous +// / threads with the same query handle. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricQuery` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZetMetricQueryDestroy( - hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in][release] handle of metric query + hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in][release] handle of metric query ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricQueryDestroy", uintptr(hMetricQuery)) } // ZetMetricQueryReset Resets a metric query object back to initial state. -/// -/// @details -/// - The application must ensure the device is not currently referencing -/// the query before it is reset -/// - The application must **not** call this function from simultaneous -/// threads with the same query handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricQuery` +// / +// / @details +// / - The application must ensure the device is not currently referencing +// / the query before it is reset +// / - The application must **not** call this function from simultaneous +// / threads with the same query handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricQuery` func ZetMetricQueryReset( - hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in] handle of metric query + hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in] handle of metric query ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricQueryReset", uintptr(hMetricQuery)) } // ZetCommandListAppendMetricQueryBegin Appends metric query begin into a command list. -/// -/// @details -/// - The application must ensure the metric query is accessible by the -/// device on which the command list was created. -/// - The application must ensure the command list and metric query were -/// created on the same context. -/// - This command blocks all following commands from beginning until the -/// execution of the query completes. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hMetricQuery` +// / +// / @details +// / - The application must ensure the metric query is accessible by the +// / device on which the command list was created. +// / - The application must ensure the command list and metric query were +// / created on the same context. +// / - This command blocks all following commands from beginning until the +// / execution of the query completes. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hMetricQuery` func ZetCommandListAppendMetricQueryBegin( - hCommandList ZetCommandListHandle, // hCommandList [in] handle of the command list - hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in] handle of the metric query + hCommandList ZetCommandListHandle, // hCommandList [in] handle of the command list + hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in] handle of the metric query ) (ZeResult, error) { return zecall.Call[ZeResult]("zetCommandListAppendMetricQueryBegin", uintptr(hCommandList), uintptr(hMetricQuery)) } // ZetCommandListAppendMetricQueryEnd Appends metric query end into a command list. -/// -/// @details -/// - The application must ensure the metric query and events are accessible -/// by the device on which the command list was created. -/// - The application must ensure the command list, events and metric query -/// were created on the same context. -/// - The duration of the signal event created from an event pool that was -/// created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag is undefined. -/// However, for consistency and orthogonality the event will report -/// correctly as signaled when used by other event API functionality. -/// - If numWaitEvents is zero, then all previous commands are completed -/// prior to the execution of the query. -/// - If numWaitEvents is non-zero, then all phWaitEvents must be signaled -/// prior to the execution of the query. -/// - This command blocks all following commands from beginning until the -/// execution of the query completes. -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hMetricQuery` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT -/// - ::ZE_RESULT_ERROR_INVALID_SIZE -/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` +// / +// / @details +// / - The application must ensure the metric query and events are accessible +// / by the device on which the command list was created. +// / - The application must ensure the command list, events and metric query +// / were created on the same context. +// / - The duration of the signal event created from an event pool that was +// / created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag is undefined. +// / However, for consistency and orthogonality the event will report +// / correctly as signaled when used by other event API functionality. +// / - If numWaitEvents is zero, then all previous commands are completed +// / prior to the execution of the query. +// / - If numWaitEvents is non-zero, then all phWaitEvents must be signaled +// / prior to the execution of the query. +// / - This command blocks all following commands from beginning until the +// / execution of the query completes. +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hMetricQuery` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / - ::ZE_RESULT_ERROR_INVALID_SIZE +// / + `(nullptr == phWaitEvents) && (0 < numWaitEvents)` func ZetCommandListAppendMetricQueryEnd( - hCommandList ZetCommandListHandle, // hCommandList [in] handle of the command list - hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in] handle of the metric query - hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion - numWaitEvents uint32, // numWaitEvents [in] must be zero - phWaitEvents *ZeEventHandle, // phWaitEvents [in][mbz] must be nullptr + hCommandList ZetCommandListHandle, // hCommandList [in] handle of the command list + hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in] handle of the metric query + hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion + numWaitEvents uint32, // numWaitEvents [in] must be zero + phWaitEvents *ZeEventHandle, // phWaitEvents [in][mbz] must be nullptr ) (ZeResult, error) { return zecall.Call[ZeResult]("zetCommandListAppendMetricQueryEnd", uintptr(hCommandList), uintptr(hMetricQuery), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents))) } // ZetCommandListAppendMetricMemoryBarrier Appends metric query commands to flush all caches. -/// -/// @details -/// - The application must **not** call this function from simultaneous -/// threads with the same command list handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` +// / +// / @details +// / - The application must **not** call this function from simultaneous +// / threads with the same command list handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` func ZetCommandListAppendMetricMemoryBarrier( - hCommandList ZetCommandListHandle, // hCommandList [in] handle of the command list + hCommandList ZetCommandListHandle, // hCommandList [in] handle of the command list ) (ZeResult, error) { return zecall.Call[ZeResult]("zetCommandListAppendMetricMemoryBarrier", uintptr(hCommandList)) } // ZetMetricQueryGetData Retrieves raw data for a given metric query. -/// -/// @details -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricQuery` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pRawDataSize` +// / +// / @details +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricQuery` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pRawDataSize` func ZetMetricQueryGetData( - hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in] handle of the metric query - pRawDataSize *uintptr, // pRawDataSize [in,out] pointer to size in bytes of raw data requested to read. if size is zero, then the driver will update the value with the total size in bytes needed for all reports available. if size is non-zero, then driver will only retrieve the number of reports that fit into the buffer. if size is larger than size needed for all reports, then driver will update the value with the actual size needed. - pRawData *uint8, // pRawData [in,out][optional][range(0, *pRawDataSize)] buffer containing query reports in raw format + hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in] handle of the metric query + pRawDataSize *uintptr, // pRawDataSize [in,out] pointer to size in bytes of raw data requested to read. if size is zero, then the driver will update the value with the total size in bytes needed for all reports available. if size is non-zero, then driver will only retrieve the number of reports that fit into the buffer. if size is larger than size needed for all reports, then driver will update the value with the actual size needed. + pRawData *uint8, // pRawData [in,out][optional][range(0, *pRawDataSize)] buffer containing query reports in raw format ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricQueryGetData", uintptr(hMetricQuery), uintptr(unsafe.Pointer(pRawDataSize)), uintptr(unsafe.Pointer(pRawData))) } - diff --git a/tols_metricExportData.go b/tols_metricExportData.go index 7697147..35e583a 100644 --- a/tols_metricExportData.go +++ b/tols_metricExportData.go @@ -24,10 +24,11 @@ const ZET_EXPORT_METRICS_DATA_EXP_NAME = "ZET_experimental_metric_export_data" // ZetExportMetricDataExpVersion (zet_export_metric_data_exp_version_t) Exporting Metrics Data Experimental Extension Version(s) type ZetExportMetricDataExpVersion uintptr + const ( - ZET_EXPORT_METRIC_DATA_EXP_VERSION_1_0 ZetExportMetricDataExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZET_EXPORT_METRIC_DATA_EXP_VERSION_1_0 version 1.0 - ZET_EXPORT_METRIC_DATA_EXP_VERSION_CURRENT ZetExportMetricDataExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZET_EXPORT_METRIC_DATA_EXP_VERSION_CURRENT latest known version - ZET_EXPORT_METRIC_DATA_EXP_VERSION_FORCE_UINT32 ZetExportMetricDataExpVersion = 0x7fffffff // ZET_EXPORT_METRIC_DATA_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_EXPORT_METRIC_DATA_EXP_VERSION_* ENUMs + ZET_EXPORT_METRIC_DATA_EXP_VERSION_1_0 ZetExportMetricDataExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZET_EXPORT_METRIC_DATA_EXP_VERSION_1_0 version 1.0 + ZET_EXPORT_METRIC_DATA_EXP_VERSION_CURRENT ZetExportMetricDataExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZET_EXPORT_METRIC_DATA_EXP_VERSION_CURRENT latest known version + ZET_EXPORT_METRIC_DATA_EXP_VERSION_FORCE_UINT32 ZetExportMetricDataExpVersion = 0x7fffffff // ZET_EXPORT_METRIC_DATA_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_EXPORT_METRIC_DATA_EXP_VERSION_* ENUMs ) @@ -39,99 +40,98 @@ const ZET_MAX_METRIC_EXPORT_DATA_ELEMENT_DESCRIPTION_EXP = 256 // ZetMetricCalculateExpDesc (zet_metric_calculate_exp_desc_t) Metrics calculation descriptor type ZetMetricCalculateExpDesc struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Rawreportskipcount uint32 // Rawreportskipcount [in] number of reports to skip during calculation + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Rawreportskipcount uint32 // Rawreportskipcount [in] number of reports to skip during calculation } // ZetMetricGroupGetExportDataExp Export Metrics Data for system independent calculation. -/// -/// @details -/// - This function exports raw data and necessary information to perform -/// metrics calculation of collected data in a different system than where -/// data was collected, which may or may not have accelerators. -/// - Implementations can choose to describe the data arrangement of the -/// exported data, using any mechanism which allows users to read and -/// process them. -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricGroup` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pRawData` -/// + `nullptr == pExportDataSize` +// / +// / @details +// / - This function exports raw data and necessary information to perform +// / metrics calculation of collected data in a different system than where +// / data was collected, which may or may not have accelerators. +// / - Implementations can choose to describe the data arrangement of the +// / exported data, using any mechanism which allows users to read and +// / process them. +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricGroup` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pRawData` +// / + `nullptr == pExportDataSize` func ZetMetricGroupGetExportDataExp( - hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group - pRawData *uint8, // pRawData [in] buffer of raw data - rawDataSize uintptr, // rawDataSize [in] size in bytes of raw data buffer - pExportDataSize *uintptr, // pExportDataSize [in,out] size in bytes of export data buffer if size is zero, then the driver shall update the value with the number of bytes necessary to store the exported data. if size is greater than required, then the driver shall update the value with the actual number of bytes necessary to store the exported data. - pExportData *uint8, // pExportData [in,out][optional][range(0, *pExportDataSize)] buffer of exported data. + hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group + pRawData *uint8, // pRawData [in] buffer of raw data + rawDataSize uintptr, // rawDataSize [in] size in bytes of raw data buffer + pExportDataSize *uintptr, // pExportDataSize [in,out] size in bytes of export data buffer if size is zero, then the driver shall update the value with the number of bytes necessary to store the exported data. if size is greater than required, then the driver shall update the value with the actual number of bytes necessary to store the exported data. + pExportData *uint8, // pExportData [in,out][optional][range(0, *pExportDataSize)] buffer of exported data. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGroupGetExportDataExp", uintptr(hMetricGroup), uintptr(unsafe.Pointer(pRawData)), uintptr(rawDataSize), uintptr(unsafe.Pointer(pExportDataSize)), uintptr(unsafe.Pointer(pExportData))) } // ZetMetricGroupCalculateMetricExportDataExp Calculate one or more sets of metric values from exported raw data. -/// -/// @details -/// - Calculate metrics values using exported data returned by -/// ::zetMetricGroupGetExportDataExp. -/// - This function is similar to -/// ::zetMetricGroupCalculateMultipleMetricValuesExp except it would -/// calculate from exported metric data. -/// - This function could be used to calculate metrics on a system different -/// from where the metric raw data was collected. -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDriver` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pExportData` -/// + `nullptr == pCalculateDescriptor` -/// + `nullptr == pSetCount` -/// + `nullptr == pTotalMetricValueCount` +// / +// / @details +// / - Calculate metrics values using exported data returned by +// / ::zetMetricGroupGetExportDataExp. +// / - This function is similar to +// / ::zetMetricGroupCalculateMultipleMetricValuesExp except it would +// / calculate from exported metric data. +// / - This function could be used to calculate metrics on a system different +// / from where the metric raw data was collected. +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDriver` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pExportData` +// / + `nullptr == pCalculateDescriptor` +// / + `nullptr == pSetCount` +// / + `nullptr == pTotalMetricValueCount` func ZetMetricGroupCalculateMetricExportDataExp( - hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance - typ ZetMetricGroupCalculationType, // typ [in] calculation type to be applied on raw data - exportDataSize uintptr, // exportDataSize [in] size in bytes of exported data buffer - pExportData *uint8, // pExportData [in][range(0, exportDataSize)] buffer of exported data to calculate - pCalculateDescriptor *ZetMetricCalculateExpDesc, // pCalculateDescriptor [in] descriptor specifying calculation specific parameters - pSetCount *uint32, // pSetCount [in,out] pointer to number of metric sets. if count is zero, then the driver shall update the value with the total number of metric sets to be calculated. if count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of metric sets to be calculated. - pTotalMetricValueCount *uint32, // pTotalMetricValueCount [in,out] pointer to number of the total number of metric values calculated, for all metric sets. if count is zero, then the driver shall update the value with the total number of metric values to be calculated. if count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of metric values to be calculated. - pMetricCounts *uint32, // pMetricCounts [in,out][optional][range(0, *pSetCount)] buffer of metric counts per metric set. - pMetricValues *ZetTypedValue, // pMetricValues [in,out][optional][range(0, *pTotalMetricValueCount)] buffer of calculated metrics. if count is less than the number available in the raw data buffer, then driver shall only calculate that number of metric values. + hDriver ZeDriverHandle, // hDriver [in] handle of the driver instance + typ ZetMetricGroupCalculationType, // typ [in] calculation type to be applied on raw data + exportDataSize uintptr, // exportDataSize [in] size in bytes of exported data buffer + pExportData *uint8, // pExportData [in][range(0, exportDataSize)] buffer of exported data to calculate + pCalculateDescriptor *ZetMetricCalculateExpDesc, // pCalculateDescriptor [in] descriptor specifying calculation specific parameters + pSetCount *uint32, // pSetCount [in,out] pointer to number of metric sets. if count is zero, then the driver shall update the value with the total number of metric sets to be calculated. if count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of metric sets to be calculated. + pTotalMetricValueCount *uint32, // pTotalMetricValueCount [in,out] pointer to number of the total number of metric values calculated, for all metric sets. if count is zero, then the driver shall update the value with the total number of metric values to be calculated. if count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of metric values to be calculated. + pMetricCounts *uint32, // pMetricCounts [in,out][optional][range(0, *pSetCount)] buffer of metric counts per metric set. + pMetricValues *ZetTypedValue, // pMetricValues [in,out][optional][range(0, *pTotalMetricValueCount)] buffer of calculated metrics. if count is less than the number available in the raw data buffer, then driver shall only calculate that number of metric values. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGroupCalculateMetricExportDataExp", uintptr(hDriver), uintptr(typ), uintptr(exportDataSize), uintptr(unsafe.Pointer(pExportData)), uintptr(unsafe.Pointer(pCalculateDescriptor)), uintptr(unsafe.Pointer(pSetCount)), uintptr(unsafe.Pointer(pTotalMetricValueCount)), uintptr(unsafe.Pointer(pMetricCounts)), uintptr(unsafe.Pointer(pMetricValues))) } - diff --git a/tols_metricExportMemory.go b/tols_metricExportMemory.go index cbc8d18..cb75953 100644 --- a/tols_metricExportMemory.go +++ b/tols_metricExportMemory.go @@ -19,35 +19,35 @@ import ( // ZetMetricGroupTypeExpFlags (zet_metric_group_type_exp_flags_t) Metric group type type ZetMetricGroupTypeExpFlags uint32 + const ( - ZET_METRIC_GROUP_TYPE_EXP_FLAG_EXPORT_DMA_BUF ZetMetricGroupTypeExpFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZET_METRIC_GROUP_TYPE_EXP_FLAG_EXPORT_DMA_BUF Metric group and metrics exports memory using linux dma-buf, which + ZET_METRIC_GROUP_TYPE_EXP_FLAG_EXPORT_DMA_BUF ZetMetricGroupTypeExpFlags = /* ZE_BIT(0) */ (1 << 0) // ZET_METRIC_GROUP_TYPE_EXP_FLAG_EXPORT_DMA_BUF Metric group and metrics exports memory using linux dma-buf, which ///< could be imported/mapped to the host process. Properties of the ///< dma_buf could be queried using ::zet_export_dma_buf_exp_properties_t. - ZET_METRIC_GROUP_TYPE_EXP_FLAG_USER_CREATED ZetMetricGroupTypeExpFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZET_METRIC_GROUP_TYPE_EXP_FLAG_USER_CREATED Metric group created using ::zetDeviceCreateMetricGroupsFromMetricsExp - ZET_METRIC_GROUP_TYPE_EXP_FLAG_OTHER ZetMetricGroupTypeExpFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZET_METRIC_GROUP_TYPE_EXP_FLAG_OTHER Metric group which has a collection of metrics - ZET_METRIC_GROUP_TYPE_EXP_FLAG_MARKER ZetMetricGroupTypeExpFlags = /* ZE_BIT(3) */(( 1 << 3 )) // ZET_METRIC_GROUP_TYPE_EXP_FLAG_MARKER Metric group is capable of generating Marker metric - ZET_METRIC_GROUP_TYPE_EXP_FLAG_FORCE_UINT32 ZetMetricGroupTypeExpFlags = 0x7fffffff // ZET_METRIC_GROUP_TYPE_EXP_FLAG_FORCE_UINT32 Value marking end of ZET_METRIC_GROUP_TYPE_EXP_FLAG_* ENUMs + ZET_METRIC_GROUP_TYPE_EXP_FLAG_USER_CREATED ZetMetricGroupTypeExpFlags = /* ZE_BIT(1) */ (1 << 1) // ZET_METRIC_GROUP_TYPE_EXP_FLAG_USER_CREATED Metric group created using ::zetDeviceCreateMetricGroupsFromMetricsExp + ZET_METRIC_GROUP_TYPE_EXP_FLAG_OTHER ZetMetricGroupTypeExpFlags = /* ZE_BIT(2) */ (1 << 2) // ZET_METRIC_GROUP_TYPE_EXP_FLAG_OTHER Metric group which has a collection of metrics + ZET_METRIC_GROUP_TYPE_EXP_FLAG_MARKER ZetMetricGroupTypeExpFlags = /* ZE_BIT(3) */ (1 << 3) // ZET_METRIC_GROUP_TYPE_EXP_FLAG_MARKER Metric group is capable of generating Marker metric + ZET_METRIC_GROUP_TYPE_EXP_FLAG_FORCE_UINT32 ZetMetricGroupTypeExpFlags = 0x7fffffff // ZET_METRIC_GROUP_TYPE_EXP_FLAG_FORCE_UINT32 Value marking end of ZET_METRIC_GROUP_TYPE_EXP_FLAG_* ENUMs ) // ZetMetricGroupTypeExp (zet_metric_group_type_exp_t) Query the metric group type using `pNext` of -/// ::zet_metric_group_properties_t +// / ::zet_metric_group_properties_t type ZetMetricGroupTypeExp struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZetMetricGroupTypeExpFlags // Type [out] metric group type. returns a combination of ::zet_metric_group_type_exp_flags_t. + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZetMetricGroupTypeExpFlags // Type [out] metric group type. returns a combination of ::zet_metric_group_type_exp_flags_t. } // ZetExportDmaBufExpProperties (zet_export_dma_buf_exp_properties_t) Exported dma_buf properties queried using `pNext` of -/// ::zet_metric_group_properties_t or ::zet_metric_properties_t +// / ::zet_metric_group_properties_t or ::zet_metric_properties_t type ZetExportDmaBufExpProperties struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Fd int32 // Fd [out] the file descriptor handle that could be used to import the memory by the host process. - Size uintptr // Size [out] size in bytes of the dma_buf + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Fd int32 // Fd [out] the file descriptor handle that could be used to import the memory by the host process. + Size uintptr // Size [out] size in bytes of the dma_buf } - diff --git a/tols_metricGroupMarker.go b/tols_metricGroupMarker.go index 1151576..c658459 100644 --- a/tols_metricGroupMarker.go +++ b/tols_metricGroupMarker.go @@ -24,51 +24,51 @@ const ZET_METRIC_GROUP_MARKER_EXP_NAME = "ZET_experimental_metric_group_marker" // ZetMetricGroupMarkerExpVersion (zet_metric_group_marker_exp_version_t) Marker Support Using MetricGroup Experimental Extension Version(s) type ZetMetricGroupMarkerExpVersion uintptr + const ( - ZET_METRIC_GROUP_MARKER_EXP_VERSION_1_0 ZetMetricGroupMarkerExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZET_METRIC_GROUP_MARKER_EXP_VERSION_1_0 version 1.0 - ZET_METRIC_GROUP_MARKER_EXP_VERSION_CURRENT ZetMetricGroupMarkerExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZET_METRIC_GROUP_MARKER_EXP_VERSION_CURRENT latest known version - ZET_METRIC_GROUP_MARKER_EXP_VERSION_FORCE_UINT32 ZetMetricGroupMarkerExpVersion = 0x7fffffff // ZET_METRIC_GROUP_MARKER_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_METRIC_GROUP_MARKER_EXP_VERSION_* ENUMs + ZET_METRIC_GROUP_MARKER_EXP_VERSION_1_0 ZetMetricGroupMarkerExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZET_METRIC_GROUP_MARKER_EXP_VERSION_1_0 version 1.0 + ZET_METRIC_GROUP_MARKER_EXP_VERSION_CURRENT ZetMetricGroupMarkerExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZET_METRIC_GROUP_MARKER_EXP_VERSION_CURRENT latest known version + ZET_METRIC_GROUP_MARKER_EXP_VERSION_FORCE_UINT32 ZetMetricGroupMarkerExpVersion = 0x7fffffff // ZET_METRIC_GROUP_MARKER_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_METRIC_GROUP_MARKER_EXP_VERSION_* ENUMs ) // ZetMetricSourceIdExp (zet_metric_source_id_exp_t) Query the metric source unique identifier using `pNext` of -/// ::zet_metric_group_properties_t +// / ::zet_metric_group_properties_t type ZetMetricSourceIdExp struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Sourceid uint32 // Sourceid [out] unique number representing the Metric Source. + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Sourceid uint32 // Sourceid [out] unique number representing the Metric Source. } // ZetCommandListAppendMarkerExp Append a Marker based on the Metric source of the Metric Group, to a -/// Command List. -/// -/// @details -/// - This function appends a Marker based on the Metric source of the -/// Metric Group, to Command List. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hCommandList` -/// + `nullptr == hMetricGroup` +// / Command List. +// / +// / @details +// / - This function appends a Marker based on the Metric source of the +// / Metric Group, to Command List. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hCommandList` +// / + `nullptr == hMetricGroup` func ZetCommandListAppendMarkerExp( - hCommandList ZetCommandListHandle, // hCommandList [in] handle to the command list - hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle to the marker metric group. ::zet_metric_group_type_exp_flags_t could be used to check whether marker is supoported by the metric group. - value uint32, // value [in] marker value + hCommandList ZetCommandListHandle, // hCommandList [in] handle to the command list + hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle to the marker metric group. ::zet_metric_group_type_exp_flags_t could be used to check whether marker is supoported by the metric group. + value uint32, // value [in] marker value ) (ZeResult, error) { return zecall.Call[ZeResult]("zetCommandListAppendMarkerExp", uintptr(hCommandList), uintptr(hMetricGroup), uintptr(value)) } - diff --git a/tols_metricProgrammable.go b/tols_metricProgrammable.go index b3c3c40..2e7fd23 100644 --- a/tols_metricProgrammable.go +++ b/tols_metricProgrammable.go @@ -24,10 +24,11 @@ const ZET_PROGRAMMABLE_METRICS_EXP_NAME = "ZET_experimental_programmable_metrics // ZetMetricProgrammableExpVersion (zet_metric_programmable_exp_version_t) Programmable Metrics Experimental Extension Version(s) type ZetMetricProgrammableExpVersion uintptr + const ( - ZET_METRIC_PROGRAMMABLE_EXP_VERSION_1_1 ZetMetricProgrammableExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */((( 1 << 16 )|( 1 & 0x0000ffff))) // ZET_METRIC_PROGRAMMABLE_EXP_VERSION_1_1 version 1.1 - ZET_METRIC_PROGRAMMABLE_EXP_VERSION_CURRENT ZetMetricProgrammableExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */((( 1 << 16 )|( 1 & 0x0000ffff))) // ZET_METRIC_PROGRAMMABLE_EXP_VERSION_CURRENT latest known version - ZET_METRIC_PROGRAMMABLE_EXP_VERSION_FORCE_UINT32 ZetMetricProgrammableExpVersion = 0x7fffffff // ZET_METRIC_PROGRAMMABLE_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_METRIC_PROGRAMMABLE_EXP_VERSION_* ENUMs + ZET_METRIC_PROGRAMMABLE_EXP_VERSION_1_1 ZetMetricProgrammableExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */ ((1 << 16) | (1 & 0x0000ffff)) // ZET_METRIC_PROGRAMMABLE_EXP_VERSION_1_1 version 1.1 + ZET_METRIC_PROGRAMMABLE_EXP_VERSION_CURRENT ZetMetricProgrammableExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */ ((1 << 16) | (1 & 0x0000ffff)) // ZET_METRIC_PROGRAMMABLE_EXP_VERSION_CURRENT latest known version + ZET_METRIC_PROGRAMMABLE_EXP_VERSION_FORCE_UINT32 ZetMetricProgrammableExpVersion = 0x7fffffff // ZET_METRIC_PROGRAMMABLE_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_METRIC_PROGRAMMABLE_EXP_VERSION_* ENUMs ) @@ -62,65 +63,67 @@ const ZE_MAX_METRIC_GROUP_NAME_PREFIX = 64 type ZetMetricProgrammableExpHandle uintptr // ZetMetricProgrammableExpProperties (zet_metric_programmable_exp_properties_t) Metric Programmable properties queried using -/// ::zetMetricProgrammableGetPropertiesExp +// / ::zetMetricProgrammableGetPropertiesExp type ZetMetricProgrammableExpProperties struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Name [ZET_MAX_METRIC_PROGRAMMABLE_NAME_EXP]byte // Name [out] metric programmable name - Description [ZET_MAX_METRIC_PROGRAMMABLE_DESCRIPTION_EXP]byte // Description [out] metric programmable description - Component [ZET_MAX_METRIC_PROGRAMMABLE_COMPONENT_EXP]byte // Component [out] metric programmable component - Tiernumber uint32 // Tiernumber [out] tier number - Domain uint32 // Domain [out] metric domain number. - Parametercount uint32 // Parametercount [out] number of parameters in the programmable - Samplingtype ZetMetricGroupSamplingTypeFlags // Samplingtype [out] metric sampling type. returns a combination of ::zet_metric_group_sampling_type_flag_t. - Sourceid uint32 // Sourceid [out] unique metric source identifier(within platform)to identify the HW block where the metric is collected. + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Name [ZET_MAX_METRIC_PROGRAMMABLE_NAME_EXP]byte // Name [out] metric programmable name + Description [ZET_MAX_METRIC_PROGRAMMABLE_DESCRIPTION_EXP]byte // Description [out] metric programmable description + Component [ZET_MAX_METRIC_PROGRAMMABLE_COMPONENT_EXP]byte // Component [out] metric programmable component + Tiernumber uint32 // Tiernumber [out] tier number + Domain uint32 // Domain [out] metric domain number. + Parametercount uint32 // Parametercount [out] number of parameters in the programmable + Samplingtype ZetMetricGroupSamplingTypeFlags // Samplingtype [out] metric sampling type. returns a combination of ::zet_metric_group_sampling_type_flag_t. + Sourceid uint32 // Sourceid [out] unique metric source identifier(within platform)to identify the HW block where the metric is collected. } // ZetMetricProgrammableParamTypeExp (zet_metric_programmable_param_type_exp_t) Metric Programmable Parameter types type ZetMetricProgrammableParamTypeExp uintptr + const ( - ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_DISAGGREGATION ZetMetricProgrammableParamTypeExp = 0 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_DISAGGREGATION Metric is disaggregated. - ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_LATENCY ZetMetricProgrammableParamTypeExp = 1 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_LATENCY Metric for latency measurement. - ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_UTILIZATION ZetMetricProgrammableParamTypeExp = 2 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_UTILIZATION Produces normalization in percent using raw_metric * 100 / cycles / HW + ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_DISAGGREGATION ZetMetricProgrammableParamTypeExp = 0 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_DISAGGREGATION Metric is disaggregated. + ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_LATENCY ZetMetricProgrammableParamTypeExp = 1 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_LATENCY Metric for latency measurement. + ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_UTILIZATION ZetMetricProgrammableParamTypeExp = 2 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_UTILIZATION Produces normalization in percent using raw_metric * 100 / cycles / HW ///< instance_count. - ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_AVERAGE ZetMetricProgrammableParamTypeExp = 3 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_AVERAGE Produces normalization using raw_metric / HW instance_count. - ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_RATE ZetMetricProgrammableParamTypeExp = 4 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_RATE Produces normalization average using raw_metric / timestamp. - ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_BYTES ZetMetricProgrammableParamTypeExp = 5 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_BYTES Produces normalization average using raw_metric * n bytes. - ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_GENERIC ZetMetricProgrammableParamTypeExp = 6 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_GENERIC Generic Parameter type. Please refer the parameter's description. - ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_FORCE_UINT32 ZetMetricProgrammableParamTypeExp = 0x7fffffff // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_FORCE_UINT32 Value marking end of ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_* ENUMs + ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_AVERAGE ZetMetricProgrammableParamTypeExp = 3 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_AVERAGE Produces normalization using raw_metric / HW instance_count. + ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_RATE ZetMetricProgrammableParamTypeExp = 4 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_RATE Produces normalization average using raw_metric / timestamp. + ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_BYTES ZetMetricProgrammableParamTypeExp = 5 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_BYTES Produces normalization average using raw_metric * n bytes. + ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_GENERIC ZetMetricProgrammableParamTypeExp = 6 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_GENERIC Generic Parameter type. Please refer the parameter's description. + ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_FORCE_UINT32 ZetMetricProgrammableParamTypeExp = 0x7fffffff // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_FORCE_UINT32 Value marking end of ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_* ENUMs ) // ZetValueInfoTypeExp (zet_value_info_type_exp_t) Supported value info types type ZetValueInfoTypeExp uintptr + const ( - ZET_VALUE_INFO_TYPE_EXP_UINT32 ZetValueInfoTypeExp = 0 // ZET_VALUE_INFO_TYPE_EXP_UINT32 32-bit unsigned-integer - ZET_VALUE_INFO_TYPE_EXP_UINT64 ZetValueInfoTypeExp = 1 // ZET_VALUE_INFO_TYPE_EXP_UINT64 64-bit unsigned-integer - ZET_VALUE_INFO_TYPE_EXP_FLOAT32 ZetValueInfoTypeExp = 2 // ZET_VALUE_INFO_TYPE_EXP_FLOAT32 32-bit floating-point - ZET_VALUE_INFO_TYPE_EXP_FLOAT64 ZetValueInfoTypeExp = 3 // ZET_VALUE_INFO_TYPE_EXP_FLOAT64 64-bit floating-point - ZET_VALUE_INFO_TYPE_EXP_BOOL8 ZetValueInfoTypeExp = 4 // ZET_VALUE_INFO_TYPE_EXP_BOOL8 8-bit boolean - ZET_VALUE_INFO_TYPE_EXP_UINT8 ZetValueInfoTypeExp = 5 // ZET_VALUE_INFO_TYPE_EXP_UINT8 8-bit unsigned-integer - ZET_VALUE_INFO_TYPE_EXP_UINT16 ZetValueInfoTypeExp = 6 // ZET_VALUE_INFO_TYPE_EXP_UINT16 16-bit unsigned-integer - ZET_VALUE_INFO_TYPE_EXP_UINT64_RANGE ZetValueInfoTypeExp = 7 // ZET_VALUE_INFO_TYPE_EXP_UINT64_RANGE 64-bit unsigned-integer range (minimum and maximum) - ZET_VALUE_INFO_TYPE_EXP_FLOAT64_RANGE ZetValueInfoTypeExp = 8 // ZET_VALUE_INFO_TYPE_EXP_FLOAT64_RANGE 64-bit floating point range (minimum and maximum) - ZET_VALUE_INFO_TYPE_EXP_FORCE_UINT32 ZetValueInfoTypeExp = 0x7fffffff // ZET_VALUE_INFO_TYPE_EXP_FORCE_UINT32 Value marking end of ZET_VALUE_INFO_TYPE_EXP_* ENUMs + ZET_VALUE_INFO_TYPE_EXP_UINT32 ZetValueInfoTypeExp = 0 // ZET_VALUE_INFO_TYPE_EXP_UINT32 32-bit unsigned-integer + ZET_VALUE_INFO_TYPE_EXP_UINT64 ZetValueInfoTypeExp = 1 // ZET_VALUE_INFO_TYPE_EXP_UINT64 64-bit unsigned-integer + ZET_VALUE_INFO_TYPE_EXP_FLOAT32 ZetValueInfoTypeExp = 2 // ZET_VALUE_INFO_TYPE_EXP_FLOAT32 32-bit floating-point + ZET_VALUE_INFO_TYPE_EXP_FLOAT64 ZetValueInfoTypeExp = 3 // ZET_VALUE_INFO_TYPE_EXP_FLOAT64 64-bit floating-point + ZET_VALUE_INFO_TYPE_EXP_BOOL8 ZetValueInfoTypeExp = 4 // ZET_VALUE_INFO_TYPE_EXP_BOOL8 8-bit boolean + ZET_VALUE_INFO_TYPE_EXP_UINT8 ZetValueInfoTypeExp = 5 // ZET_VALUE_INFO_TYPE_EXP_UINT8 8-bit unsigned-integer + ZET_VALUE_INFO_TYPE_EXP_UINT16 ZetValueInfoTypeExp = 6 // ZET_VALUE_INFO_TYPE_EXP_UINT16 16-bit unsigned-integer + ZET_VALUE_INFO_TYPE_EXP_UINT64_RANGE ZetValueInfoTypeExp = 7 // ZET_VALUE_INFO_TYPE_EXP_UINT64_RANGE 64-bit unsigned-integer range (minimum and maximum) + ZET_VALUE_INFO_TYPE_EXP_FLOAT64_RANGE ZetValueInfoTypeExp = 8 // ZET_VALUE_INFO_TYPE_EXP_FLOAT64_RANGE 64-bit floating point range (minimum and maximum) + ZET_VALUE_INFO_TYPE_EXP_FORCE_UINT32 ZetValueInfoTypeExp = 0x7fffffff // ZET_VALUE_INFO_TYPE_EXP_FORCE_UINT32 Value marking end of ZET_VALUE_INFO_TYPE_EXP_* ENUMs ) // ZetValueUint64RangeExp (zet_value_uint64_range_exp_t) Value info of type uint64_t range type ZetValueUint64RangeExp struct { - Ui64min uint64 // Ui64min [out] minimum value of the range - Ui64max uint64 // Ui64max [out] maximum value of the range + Ui64min uint64 // Ui64min [out] minimum value of the range + Ui64max uint64 // Ui64max [out] maximum value of the range } // ZetValueFp64RangeExp (zet_value_fp64_range_exp_t) Value info of type float64 range type ZetValueFp64RangeExp struct { - Fp64min float64 // Fp64min [out] minimum value of the range - Fp64max float64 // Fp64max [out] maximum value of the range + Fp64min float64 // Fp64min [out] minimum value of the range + Fp64max float64 // Fp64max [out] maximum value of the range } @@ -129,513 +132,512 @@ type ZetValueInfoExp [16]byte // ZetMetricProgrammableParamInfoExp (zet_metric_programmable_param_info_exp_t) Metric Programmable parameter information type ZetMetricProgrammableParamInfoExp struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Type ZetMetricProgrammableParamTypeExp // Type [out] programmable parameter type - Name [ZET_MAX_METRIC_PROGRAMMABLE_PARAMETER_NAME_EXP]byte // Name [out] metric programmable parameter name - Valueinfotype ZetValueInfoTypeExp // Valueinfotype [out] value info type - Defaultvalue ZetValue // Defaultvalue [out] default value for the parameter - Valueinfocount uint32 // Valueinfocount [out] count of ::zet_metric_programmable_param_value_info_exp_t + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Type ZetMetricProgrammableParamTypeExp // Type [out] programmable parameter type + Name [ZET_MAX_METRIC_PROGRAMMABLE_PARAMETER_NAME_EXP]byte // Name [out] metric programmable parameter name + Valueinfotype ZetValueInfoTypeExp // Valueinfotype [out] value info type + Defaultvalue ZetValue // Defaultvalue [out] default value for the parameter + Valueinfocount uint32 // Valueinfocount [out] count of ::zet_metric_programmable_param_value_info_exp_t } // ZetMetricProgrammableParamValueInfoExp (zet_metric_programmable_param_value_info_exp_t) Metric Programmable parameter value information type ZetMetricProgrammableParamValueInfoExp struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Valueinfo ZetValueInfoExp // Valueinfo [out] information about the parameter value - Description [ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP]byte // Description [out] description about the value + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Valueinfo ZetValueInfoExp // Valueinfo [out] information about the parameter value + Description [ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP]byte // Description [out] description about the value } // ZetMetricProgrammableParamValueExp (zet_metric_programmable_param_value_exp_t) Metric Programmable parameter value type ZetMetricProgrammableParamValueExp struct { - Value ZetValue // Value [in] parameter value + Value ZetValue // Value [in] parameter value } // ZetMetricProgrammableGetExp Query and get the available metric programmable handles. -/// -/// @details -/// - Query the available programmable handles using *pCount = 0. -/// - Returns all programmable metric handles available in the device. -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` +// / +// / @details +// / - Query the available programmable handles using *pCount = 0. +// / - Returns all programmable metric handles available in the device. +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` func ZetMetricProgrammableGetExp( - hDevice ZetDeviceHandle, // hDevice [in] handle of the device - pCount *uint32, // pCount [in,out] pointer to the number of metric programmable handles. if count is zero, then the driver shall update the value with the total number of metric programmable handles available. if count is greater than the number of metric programmable handles available, then the driver shall update the value with the correct number of metric programmable handles available. - phMetricProgrammables *ZetMetricProgrammableExpHandle, // phMetricProgrammables [in,out][optional][range(0, *pCount)] array of handle of metric programmables. if count is less than the number of metric programmables available, then driver shall only retrieve that number of metric programmables. + hDevice ZetDeviceHandle, // hDevice [in] handle of the device + pCount *uint32, // pCount [in,out] pointer to the number of metric programmable handles. if count is zero, then the driver shall update the value with the total number of metric programmable handles available. if count is greater than the number of metric programmable handles available, then the driver shall update the value with the correct number of metric programmable handles available. + phMetricProgrammables *ZetMetricProgrammableExpHandle, // phMetricProgrammables [in,out][optional][range(0, *pCount)] array of handle of metric programmables. if count is less than the number of metric programmables available, then driver shall only retrieve that number of metric programmables. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricProgrammableGetExp", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phMetricProgrammables))) } // ZetMetricProgrammableGetPropertiesExp Get the properties of the metric programmable. -/// -/// @details -/// - Returns the properties of the metric programmable. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricProgrammable` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProperties` +// / +// / @details +// / - Returns the properties of the metric programmable. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricProgrammable` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProperties` func ZetMetricProgrammableGetPropertiesExp( - hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable - pProperties *ZetMetricProgrammableExpProperties, // pProperties [in,out] properties of the metric programmable + hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable + pProperties *ZetMetricProgrammableExpProperties, // pProperties [in,out] properties of the metric programmable ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricProgrammableGetPropertiesExp", uintptr(hMetricProgrammable), uintptr(unsafe.Pointer(pProperties))) } // ZetMetricProgrammableGetParamInfoExp Get the information about the parameters of the metric programmable. -/// -/// @details -/// - Returns information about the parameters of the metric programmable -/// handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricProgrammable` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pParameterCount` -/// + `nullptr == pParameterInfo` +// / +// / @details +// / - Returns information about the parameters of the metric programmable +// / handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricProgrammable` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pParameterCount` +// / + `nullptr == pParameterInfo` func ZetMetricProgrammableGetParamInfoExp( - hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable - pParameterCount *uint32, // pParameterCount [in,out] count of the parameters to retrieve parameter info. if value pParameterCount is greater than count of parameters available, then pParameterCount will be updated with count of parameters available. The count of parameters available can be queried using ::zetMetricProgrammableGetPropertiesExp. - pParameterInfo *ZetMetricProgrammableParamInfoExp, // pParameterInfo [in,out][range(1, *pParameterCount)] array of parameter info. if parameterCount is less than the number of parameters available, then driver shall only retrieve that number of parameter info. + hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable + pParameterCount *uint32, // pParameterCount [in,out] count of the parameters to retrieve parameter info. if value pParameterCount is greater than count of parameters available, then pParameterCount will be updated with count of parameters available. The count of parameters available can be queried using ::zetMetricProgrammableGetPropertiesExp. + pParameterInfo *ZetMetricProgrammableParamInfoExp, // pParameterInfo [in,out][range(1, *pParameterCount)] array of parameter info. if parameterCount is less than the number of parameters available, then driver shall only retrieve that number of parameter info. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricProgrammableGetParamInfoExp", uintptr(hMetricProgrammable), uintptr(unsafe.Pointer(pParameterCount)), uintptr(unsafe.Pointer(pParameterInfo))) } // ZetMetricProgrammableGetParamValueInfoExp Get the information about the parameter value of the metric -/// programmable. -/// -/// @details -/// - Returns the value-information about the parameter at the specific -/// ordinal of the metric programmable handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricProgrammable` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pValueInfoCount` -/// + `nullptr == pValueInfo` +// / programmable. +// / +// / @details +// / - Returns the value-information about the parameter at the specific +// / ordinal of the metric programmable handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricProgrammable` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pValueInfoCount` +// / + `nullptr == pValueInfo` func ZetMetricProgrammableGetParamValueInfoExp( - hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable - parameterOrdinal uint32, // parameterOrdinal [in] ordinal of the parameter in the metric programmable - pValueInfoCount *uint32, // pValueInfoCount [in,out] count of parameter value information to retrieve. if value at pValueInfoCount is greater than count of value info available, then pValueInfoCount will be updated with count of value info available. The count of parameter value info available can be queried using ::zetMetricProgrammableGetParamInfoExp. - pValueInfo *ZetMetricProgrammableParamValueInfoExp, // pValueInfo [in,out][range(1, *pValueInfoCount)] array of parameter value info. if pValueInfoCount is less than the number of value info available, then driver shall only retrieve that number of value info. + hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable + parameterOrdinal uint32, // parameterOrdinal [in] ordinal of the parameter in the metric programmable + pValueInfoCount *uint32, // pValueInfoCount [in,out] count of parameter value information to retrieve. if value at pValueInfoCount is greater than count of value info available, then pValueInfoCount will be updated with count of value info available. The count of parameter value info available can be queried using ::zetMetricProgrammableGetParamInfoExp. + pValueInfo *ZetMetricProgrammableParamValueInfoExp, // pValueInfo [in,out][range(1, *pValueInfoCount)] array of parameter value info. if pValueInfoCount is less than the number of value info available, then driver shall only retrieve that number of value info. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricProgrammableGetParamValueInfoExp", uintptr(hMetricProgrammable), uintptr(parameterOrdinal), uintptr(unsafe.Pointer(pValueInfoCount)), uintptr(unsafe.Pointer(pValueInfo))) } // ZetMetricCreateFromProgrammableExp2 Create metric handles by applying parameter values on the metric -/// programmable handle. -/// -/// @details -/// - Multiple parameter values could be used to prepare a metric. -/// - If parameterCount = 0, the default value of the metric programmable -/// would be used for all parameters. -/// - The implementation can post-fix a C string to the metric name and -/// description, based on the parameter values chosen. -/// - ::zetMetricProgrammableGetParamInfoExp() returns a list of parameters -/// in a defined order. -/// - Therefore, the list of values passed in to the API should respect the -/// same order such that the desired parameter is set with expected value -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricProgrammable` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pParameterValues` -/// + `nullptr == pName` -/// + `nullptr == pDescription` -/// + `nullptr == pMetricHandleCount` +// / programmable handle. +// / +// / @details +// / - Multiple parameter values could be used to prepare a metric. +// / - If parameterCount = 0, the default value of the metric programmable +// / would be used for all parameters. +// / - The implementation can post-fix a C string to the metric name and +// / description, based on the parameter values chosen. +// / - ::zetMetricProgrammableGetParamInfoExp() returns a list of parameters +// / in a defined order. +// / - Therefore, the list of values passed in to the API should respect the +// / same order such that the desired parameter is set with expected value +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricProgrammable` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pParameterValues` +// / + `nullptr == pName` +// / + `nullptr == pDescription` +// / + `nullptr == pMetricHandleCount` func ZetMetricCreateFromProgrammableExp2( - hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable - parameterCount uint32, // parameterCount [in] Count of parameters to set. - pParameterValues *ZetMetricProgrammableParamValueExp, // pParameterValues [in] list of parameter values to be set. - pName *byte, // pName [in] pointer to metric name to be used. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_NAME. - pDescription *byte, // pDescription [in] pointer to metric description to be used. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_DESCRIPTION. - pMetricHandleCount *uint32, // pMetricHandleCount [in,out] Pointer to the number of metric handles. if count is zero, then the driver shall update the value with the number of metric handles available for this programmable. if count is greater than the number of metric handles available, then the driver shall update the value with the correct number of metric handles available. - phMetricHandles *ZetMetricHandle, // phMetricHandles [in,out][optional][range(0,*pMetricHandleCount)] array of handle of metrics. if count is less than the number of metrics available, then driver shall only retrieve that number of metric handles. + hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable + parameterCount uint32, // parameterCount [in] Count of parameters to set. + pParameterValues *ZetMetricProgrammableParamValueExp, // pParameterValues [in] list of parameter values to be set. + pName *byte, // pName [in] pointer to metric name to be used. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_NAME. + pDescription *byte, // pDescription [in] pointer to metric description to be used. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_DESCRIPTION. + pMetricHandleCount *uint32, // pMetricHandleCount [in,out] Pointer to the number of metric handles. if count is zero, then the driver shall update the value with the number of metric handles available for this programmable. if count is greater than the number of metric handles available, then the driver shall update the value with the correct number of metric handles available. + phMetricHandles *ZetMetricHandle, // phMetricHandles [in,out][optional][range(0,*pMetricHandleCount)] array of handle of metrics. if count is less than the number of metrics available, then driver shall only retrieve that number of metric handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricCreateFromProgrammableExp2", uintptr(hMetricProgrammable), uintptr(parameterCount), uintptr(unsafe.Pointer(pParameterValues)), uintptr(unsafe.Pointer(pName)), uintptr(unsafe.Pointer(pDescription)), uintptr(unsafe.Pointer(pMetricHandleCount)), uintptr(unsafe.Pointer(phMetricHandles))) } // ZetMetricCreateFromProgrammableExp Create metric handles by applying parameter values on the metric -/// programmable handle. -/// -/// @details -/// - This API is deprecated. Please use -/// ::zetMetricCreateFromProgrammableExp2() -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricProgrammable` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pParameterValues` -/// + `nullptr == pName` -/// + `nullptr == pDescription` -/// + `nullptr == pMetricHandleCount` +// / programmable handle. +// / +// / @details +// / - This API is deprecated. Please use +// / ::zetMetricCreateFromProgrammableExp2() +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricProgrammable` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pParameterValues` +// / + `nullptr == pName` +// / + `nullptr == pDescription` +// / + `nullptr == pMetricHandleCount` func ZetMetricCreateFromProgrammableExp( - hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable - pParameterValues *ZetMetricProgrammableParamValueExp, // pParameterValues [in] list of parameter values to be set. - parameterCount uint32, // parameterCount [in] Count of parameters to set. - pName *byte, // pName [in] pointer to metric name to be used. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_NAME. - pDescription *byte, // pDescription [in] pointer to metric description to be used. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_DESCRIPTION. - pMetricHandleCount *uint32, // pMetricHandleCount [in,out] Pointer to the number of metric handles. if count is zero, then the driver shall update the value with the number of metric handles available for this programmable. if count is greater than the number of metric handles available, then the driver shall update the value with the correct number of metric handles available. - phMetricHandles *ZetMetricHandle, // phMetricHandles [in,out][optional][range(0,*pMetricHandleCount)] array of handle of metrics. if count is less than the number of metrics available, then driver shall only retrieve that number of metric handles. + hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable + pParameterValues *ZetMetricProgrammableParamValueExp, // pParameterValues [in] list of parameter values to be set. + parameterCount uint32, // parameterCount [in] Count of parameters to set. + pName *byte, // pName [in] pointer to metric name to be used. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_NAME. + pDescription *byte, // pDescription [in] pointer to metric description to be used. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_DESCRIPTION. + pMetricHandleCount *uint32, // pMetricHandleCount [in,out] Pointer to the number of metric handles. if count is zero, then the driver shall update the value with the number of metric handles available for this programmable. if count is greater than the number of metric handles available, then the driver shall update the value with the correct number of metric handles available. + phMetricHandles *ZetMetricHandle, // phMetricHandles [in,out][optional][range(0,*pMetricHandleCount)] array of handle of metrics. if count is less than the number of metrics available, then driver shall only retrieve that number of metric handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricCreateFromProgrammableExp", uintptr(hMetricProgrammable), uintptr(unsafe.Pointer(pParameterValues)), uintptr(parameterCount), uintptr(unsafe.Pointer(pName)), uintptr(unsafe.Pointer(pDescription)), uintptr(unsafe.Pointer(pMetricHandleCount)), uintptr(unsafe.Pointer(phMetricHandles))) } // ZetDeviceCreateMetricGroupsFromMetricsExp Create multiple metric group handles from metric handles. -/// -/// @details -/// - Creates multiple metric groups from metrics which were created using -/// ::zetMetricCreateFromProgrammableExp2(). -/// - Metrics whose Hardware resources do not overlap are added to same -/// metric group. -/// - The metric groups created using this API are managed by the -/// application and cannot be retrieved using ::zetMetricGroupGet(). -/// - The created metric groups are ready for activation and collection. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + metricGroupCount is lesser than the number of metric group handles that could be created. +// / +// / @details +// / - Creates multiple metric groups from metrics which were created using +// / ::zetMetricCreateFromProgrammableExp2(). +// / - Metrics whose Hardware resources do not overlap are added to same +// / metric group. +// / - The metric groups created using this API are managed by the +// / application and cannot be retrieved using ::zetMetricGroupGet(). +// / - The created metric groups are ready for activation and collection. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + metricGroupCount is lesser than the number of metric group handles that could be created. func ZetDeviceCreateMetricGroupsFromMetricsExp( - hDevice ZetDeviceHandle, // hDevice [in] handle of the device. - metricCount uint32, // metricCount [in] number of metric handles. - phMetrics *ZetMetricHandle, // phMetrics [in] metric handles to be added to the metric groups. - pMetricGroupNamePrefix *byte, // pMetricGroupNamePrefix [in] prefix to the name created for the metric groups. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_GROUP_NAME_PREFIX_EXP. - pDescription *byte, // pDescription [in] pointer to description of the metric groups. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_GROUP_DESCRIPTION. - pMetricGroupCount *uint32, // pMetricGroupCount [in,out] pointer to the number of metric group handles to be created. if pMetricGroupCount is zero, then the driver shall update the value with the maximum possible number of metric group handles that could be created. if pMetricGroupCount is greater than the number of metric group handles that could be created, then the driver shall update the value with the correct number of metric group handles generated. if pMetricGroupCount is lesser than the number of metric group handles that could be created, then ::ZE_RESULT_ERROR_INVALID_ARGUMENT is returned. - phMetricGroup *ZetMetricGroupHandle, // phMetricGroup [in,out][optional][range(0, *pMetricGroupCount)] array of handle of metric group handles. Created Metric group handles. + hDevice ZetDeviceHandle, // hDevice [in] handle of the device. + metricCount uint32, // metricCount [in] number of metric handles. + phMetrics *ZetMetricHandle, // phMetrics [in] metric handles to be added to the metric groups. + pMetricGroupNamePrefix *byte, // pMetricGroupNamePrefix [in] prefix to the name created for the metric groups. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_GROUP_NAME_PREFIX_EXP. + pDescription *byte, // pDescription [in] pointer to description of the metric groups. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_GROUP_DESCRIPTION. + pMetricGroupCount *uint32, // pMetricGroupCount [in,out] pointer to the number of metric group handles to be created. if pMetricGroupCount is zero, then the driver shall update the value with the maximum possible number of metric group handles that could be created. if pMetricGroupCount is greater than the number of metric group handles that could be created, then the driver shall update the value with the correct number of metric group handles generated. if pMetricGroupCount is lesser than the number of metric group handles that could be created, then ::ZE_RESULT_ERROR_INVALID_ARGUMENT is returned. + phMetricGroup *ZetMetricGroupHandle, // phMetricGroup [in,out][optional][range(0, *pMetricGroupCount)] array of handle of metric group handles. Created Metric group handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDeviceCreateMetricGroupsFromMetricsExp", uintptr(hDevice), uintptr(metricCount), uintptr(unsafe.Pointer(phMetrics)), uintptr(unsafe.Pointer(pMetricGroupNamePrefix)), uintptr(unsafe.Pointer(pDescription)), uintptr(unsafe.Pointer(pMetricGroupCount)), uintptr(unsafe.Pointer(phMetricGroup))) } // ZetMetricGroupCreateExp Create metric group handle. -/// -/// @details -/// - This API is deprecated. Please use -/// ::zetDeviceCreateMetricGroupsFromMetricsExp -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pName` -/// + `nullptr == pDescription` -/// + `nullptr == phMetricGroup` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `0x7 < samplingType` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / +// / @details +// / - This API is deprecated. Please use +// / ::zetDeviceCreateMetricGroupsFromMetricsExp +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pName` +// / + `nullptr == pDescription` +// / + `nullptr == phMetricGroup` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `0x7 < samplingType` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION func ZetMetricGroupCreateExp( - hDevice ZetDeviceHandle, // hDevice [in] handle of the device - pName *byte, // pName [in] pointer to metric group name. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_GROUP_NAME. - pDescription *byte, // pDescription [in] pointer to metric group description. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_GROUP_DESCRIPTION. - samplingType ZetMetricGroupSamplingTypeFlags, // samplingType [in] Sampling type for the metric group. - phMetricGroup *ZetMetricGroupHandle, // phMetricGroup [in,out] Created Metric group handle + hDevice ZetDeviceHandle, // hDevice [in] handle of the device + pName *byte, // pName [in] pointer to metric group name. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_GROUP_NAME. + pDescription *byte, // pDescription [in] pointer to metric group description. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_GROUP_DESCRIPTION. + samplingType ZetMetricGroupSamplingTypeFlags, // samplingType [in] Sampling type for the metric group. + phMetricGroup *ZetMetricGroupHandle, // phMetricGroup [in,out] Created Metric group handle ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGroupCreateExp", uintptr(hDevice), uintptr(unsafe.Pointer(pName)), uintptr(unsafe.Pointer(pDescription)), uintptr(samplingType), uintptr(unsafe.Pointer(phMetricGroup))) } // ZetMetricGroupAddMetricExp Add a metric handle to the metric group handle created using -/// ::zetDeviceCreateMetricGroupsFromMetricsExp. -/// -/// @details -/// - Reasons for failing to add the metric could be queried using -/// pErrorString -/// - Multiple additions of same metric would add the metric only once to -/// the hMetricGroup -/// - Metric handles from multiple domains may be used in a single metric -/// group. -/// - Metric handles from different sourceIds (refer -/// ::zet_metric_programmable_exp_properties_t) are not allowed in a -/// single metric group. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricGroup` -/// + `nullptr == hMetric` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + If a Metric handle from a pre-defined metric group is requested to be added. -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE -/// + If the metric group is currently activated. +// / ::zetDeviceCreateMetricGroupsFromMetricsExp. +// / +// / @details +// / - Reasons for failing to add the metric could be queried using +// / pErrorString +// / - Multiple additions of same metric would add the metric only once to +// / the hMetricGroup +// / - Metric handles from multiple domains may be used in a single metric +// / group. +// / - Metric handles from different sourceIds (refer +// / ::zet_metric_programmable_exp_properties_t) are not allowed in a +// / single metric group. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricGroup` +// / + `nullptr == hMetric` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + If a Metric handle from a pre-defined metric group is requested to be added. +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / + If the metric group is currently activated. func ZetMetricGroupAddMetricExp( - hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] Handle of the metric group - hMetric ZetMetricHandle, // hMetric [in] Metric to be added to the group. - pErrorStringSize *uintptr, // pErrorStringSize [in,out][optional] Size of the error string to query, if an error was reported during adding the metric handle. if *pErrorStringSize is zero, then the driver shall update the value with the size of the error string in bytes. - pErrorString *byte, // pErrorString [in,out][optional][range(0, *pErrorStringSize)] Error string. if *pErrorStringSize is less than the length of the error string available, then driver shall only retrieve that length of error string. + hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] Handle of the metric group + hMetric ZetMetricHandle, // hMetric [in] Metric to be added to the group. + pErrorStringSize *uintptr, // pErrorStringSize [in,out][optional] Size of the error string to query, if an error was reported during adding the metric handle. if *pErrorStringSize is zero, then the driver shall update the value with the size of the error string in bytes. + pErrorString *byte, // pErrorString [in,out][optional][range(0, *pErrorStringSize)] Error string. if *pErrorStringSize is less than the length of the error string available, then driver shall only retrieve that length of error string. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGroupAddMetricExp", uintptr(hMetricGroup), uintptr(hMetric), uintptr(unsafe.Pointer(pErrorStringSize)), uintptr(unsafe.Pointer(pErrorString))) } // ZetMetricGroupRemoveMetricExp Remove a metric from the metric group handle created using -/// ::zetDeviceCreateMetricGroupsFromMetricsExp. -/// -/// @details -/// - Remove an already added metric handle from the metric group. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricGroup` -/// + `nullptr == hMetric` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + If trying to remove a metric not previously added to the metric group -/// + If the input metric group is a pre-defined metric group -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE -/// + If the metric group is currently activated +// / ::zetDeviceCreateMetricGroupsFromMetricsExp. +// / +// / @details +// / - Remove an already added metric handle from the metric group. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricGroup` +// / + `nullptr == hMetric` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + If trying to remove a metric not previously added to the metric group +// / + If the input metric group is a pre-defined metric group +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / + If the metric group is currently activated func ZetMetricGroupRemoveMetricExp( - hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] Handle of the metric group - hMetric ZetMetricHandle, // hMetric [in] Metric handle to be removed from the metric group. + hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] Handle of the metric group + hMetric ZetMetricHandle, // hMetric [in] Metric handle to be removed from the metric group. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGroupRemoveMetricExp", uintptr(hMetricGroup), uintptr(hMetric)) } // ZetMetricGroupCloseExp Closes a created metric group using -/// ::zetDeviceCreateMetricGroupsFromMetricsExp, so that it can be -/// activated. -/// -/// @details -/// - Finalizes the ::zetMetricGroupAddMetricExp and -/// ::zetMetricGroupRemoveMetricExp operations on the metric group. -/// - This is a necessary step before activation of the created metric -/// group. -/// - Add / Remove of metrics is possible after ::zetMetricGroupCloseExp. -/// However, a call to ::zetMetricGroupCloseExp is necessary after -/// modifying the metric group. -/// - Implementations could choose to add new metrics to the group during -/// ::zetMetricGroupCloseExp, which are related and might add value to the -/// metrics already added by the application -/// - Applications can query the list of metrics in the metric group using -/// ::zetMetricGet -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricGroup` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + If the input metric group is a pre-defined metric group -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE -/// + If the metric group is currently activated +// / ::zetDeviceCreateMetricGroupsFromMetricsExp, so that it can be +// / activated. +// / +// / @details +// / - Finalizes the ::zetMetricGroupAddMetricExp and +// / ::zetMetricGroupRemoveMetricExp operations on the metric group. +// / - This is a necessary step before activation of the created metric +// / group. +// / - Add / Remove of metrics is possible after ::zetMetricGroupCloseExp. +// / However, a call to ::zetMetricGroupCloseExp is necessary after +// / modifying the metric group. +// / - Implementations could choose to add new metrics to the group during +// / ::zetMetricGroupCloseExp, which are related and might add value to the +// / metrics already added by the application +// / - Applications can query the list of metrics in the metric group using +// / ::zetMetricGet +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricGroup` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + If the input metric group is a pre-defined metric group +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / + If the metric group is currently activated func ZetMetricGroupCloseExp( - hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] Handle of the metric group + hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] Handle of the metric group ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGroupCloseExp", uintptr(hMetricGroup)) } // ZetMetricGroupDestroyExp Destroy a metric group created using -/// ::zetDeviceCreateMetricGroupsFromMetricsExp. -/// -/// @details -/// - Metric handles created using ::zetMetricCreateFromProgrammableExp2 and -/// are part of the metricGroup are not destroyed. -/// - It is necessary to call ::zetMetricDestroyExp for each of the metric -/// handles (created from ::zetMetricCreateFromProgrammableExp2) to -/// destroy them. -/// - It is not necessary to remove the metrics in the metricGroup before -/// destroying it. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricGroup` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + If trying to destroy a pre-defined metric group -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE -/// + If trying to destroy an activated metric group +// / ::zetDeviceCreateMetricGroupsFromMetricsExp. +// / +// / @details +// / - Metric handles created using ::zetMetricCreateFromProgrammableExp2 and +// / are part of the metricGroup are not destroyed. +// / - It is necessary to call ::zetMetricDestroyExp for each of the metric +// / handles (created from ::zetMetricCreateFromProgrammableExp2) to +// / destroy them. +// / - It is not necessary to remove the metrics in the metricGroup before +// / destroying it. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricGroup` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + If trying to destroy a pre-defined metric group +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / + If trying to destroy an activated metric group func ZetMetricGroupDestroyExp( - hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] Handle of the metric group to destroy + hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] Handle of the metric group to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGroupDestroyExp", uintptr(hMetricGroup)) } // ZetMetricDestroyExp Destroy a metric created using ::zetMetricCreateFromProgrammableExp2. -/// -/// @details -/// - If a metric is added to a metric group, the metric has to be removed -/// using ::zetMetricGroupRemoveMetricExp before it can be destroyed. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetric` -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// + If trying to destroy a metric from pre-defined metric group -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE -/// + If trying to destroy a metric currently added to a metric group +// / +// / @details +// / - If a metric is added to a metric group, the metric has to be removed +// / using ::zetMetricGroupRemoveMetricExp before it can be destroyed. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetric` +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / + If trying to destroy a metric from pre-defined metric group +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / + If trying to destroy a metric currently added to a metric group func ZetMetricDestroyExp( - hMetric ZetMetricHandle, // hMetric [in] Handle of the metric to destroy + hMetric ZetMetricHandle, // hMetric [in] Handle of the metric to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricDestroyExp", uintptr(hMetric)) } - diff --git a/tols_metricRuntimeEnableDisable.go b/tols_metricRuntimeEnableDisable.go index d123e41..c5f28de 100644 --- a/tols_metricRuntimeEnableDisable.go +++ b/tols_metricRuntimeEnableDisable.go @@ -22,81 +22,81 @@ const ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_NAME = "ZET_experimental_metrics_ru // ZetMetricsRuntimeEnableDisableExpVersion (zet_metrics_runtime_enable_disable_exp_version_t) Runtime Enabling and Disabling Metrics Extension Version(s) type ZetMetricsRuntimeEnableDisableExpVersion uintptr + const ( - ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_1_0 ZetMetricsRuntimeEnableDisableExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_1_0 version 1.0 - ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_CURRENT ZetMetricsRuntimeEnableDisableExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_CURRENT latest known version - ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_FORCE_UINT32 ZetMetricsRuntimeEnableDisableExpVersion = 0x7fffffff // ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_* ENUMs + ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_1_0 ZetMetricsRuntimeEnableDisableExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_1_0 version 1.0 + ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_CURRENT ZetMetricsRuntimeEnableDisableExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_CURRENT latest known version + ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_FORCE_UINT32 ZetMetricsRuntimeEnableDisableExpVersion = 0x7fffffff // ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_METRICS_RUNTIME_ENABLE_DISABLE_EXP_VERSION_* ENUMs ) // ZetDeviceEnableMetricsExp Enable Metrics collection during runtime. -/// -/// @details -/// - This API enables metric collection for a device/sub-device if not -/// already enabled. -/// - if ZET_ENABLE_METRICS=1 was already set, then calling this api would -/// be a NOP. -/// - This api should be called after calling zeInit(). -/// - If device is a root-device handle, then its sub-devices are also -/// enabled. -/// - ::zetDeviceDisableMetricsExp need not be called if if this api returns -/// error. -/// - This API can be used as runtime alternative to setting -/// ZET_ENABLE_METRICS=1. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` +// / +// / @details +// / - This API enables metric collection for a device/sub-device if not +// / already enabled. +// / - if ZET_ENABLE_METRICS=1 was already set, then calling this api would +// / be a NOP. +// / - This api should be called after calling zeInit(). +// / - If device is a root-device handle, then its sub-devices are also +// / enabled. +// / - ::zetDeviceDisableMetricsExp need not be called if if this api returns +// / error. +// / - This API can be used as runtime alternative to setting +// / ZET_ENABLE_METRICS=1. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` func ZetDeviceEnableMetricsExp( - hDevice ZetDeviceHandle, // hDevice [in] handle of the device where metrics collection has to be enabled. + hDevice ZetDeviceHandle, // hDevice [in] handle of the device where metrics collection has to be enabled. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDeviceEnableMetricsExp", uintptr(hDevice)) } // ZetDeviceDisableMetricsExp Disable Metrics collection during runtime, if it was already enabled. -/// -/// @details -/// - This API disables metrics collection for a device/sub-device, if it -/// was previously enabled. -/// - If device is a root-device handle, then its sub-devices are also -/// disabled. -/// - The application has to ensure that all metric operations are complete -/// and all metric resources are released before this API is called. -/// - If there are metric operations in progress or metric resources are not -/// released, then ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE is returned. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hDevice` +// / +// / @details +// / - This API disables metrics collection for a device/sub-device, if it +// / was previously enabled. +// / - If device is a root-device handle, then its sub-devices are also +// / disabled. +// / - The application has to ensure that all metric operations are complete +// / and all metric resources are released before this API is called. +// / - If there are metric operations in progress or metric resources are not +// / released, then ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE is returned. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hDevice` func ZetDeviceDisableMetricsExp( - hDevice ZetDeviceHandle, // hDevice [in] handle of the device where metrics collection has to be disabled + hDevice ZetDeviceHandle, // hDevice [in] handle of the device where metrics collection has to be disabled ) (ZeResult, error) { return zecall.Call[ZeResult]("zetDeviceDisableMetricsExp", uintptr(hDevice)) } - diff --git a/tols_metricTracer.go b/tols_metricTracer.go index 9b44f62..f9c2d1e 100644 --- a/tols_metricTracer.go +++ b/tols_metricTracer.go @@ -24,10 +24,11 @@ const ZET_METRICS_TRACER_EXP_NAME = "ZET_experimental_metric_tracer" // ZetMetricTracerExpVersion (zet_metric_tracer_exp_version_t) Metric Tracer Experimental Extension Version(s) type ZetMetricTracerExpVersion uintptr + const ( - ZET_METRIC_TRACER_EXP_VERSION_1_0 ZetMetricTracerExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZET_METRIC_TRACER_EXP_VERSION_1_0 version 1.0 - ZET_METRIC_TRACER_EXP_VERSION_CURRENT ZetMetricTracerExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZET_METRIC_TRACER_EXP_VERSION_CURRENT latest known version - ZET_METRIC_TRACER_EXP_VERSION_FORCE_UINT32 ZetMetricTracerExpVersion = 0x7fffffff // ZET_METRIC_TRACER_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_METRIC_TRACER_EXP_VERSION_* ENUMs + ZET_METRIC_TRACER_EXP_VERSION_1_0 ZetMetricTracerExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZET_METRIC_TRACER_EXP_VERSION_1_0 version 1.0 + ZET_METRIC_TRACER_EXP_VERSION_CURRENT ZetMetricTracerExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZET_METRIC_TRACER_EXP_VERSION_CURRENT latest known version + ZET_METRIC_TRACER_EXP_VERSION_FORCE_UINT32 ZetMetricTracerExpVersion = 0x7fffffff // ZET_METRIC_TRACER_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_METRIC_TRACER_EXP_VERSION_* ENUMs ) @@ -39,324 +40,323 @@ type ZetMetricDecoderExpHandle uintptr // ZetMetricTracerExpDesc (zet_metric_tracer_exp_desc_t) Metric tracer descriptor type ZetMetricTracerExpDesc struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Notifyeverynbytes uint32 // Notifyeverynbytes [in,out] number of collected bytes after which notification event will be signaled. If the requested value is not supported exactly, then the driver may use a value that is the closest supported approximation and shall update this member during ::zetMetricTracerCreateExp. + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Notifyeverynbytes uint32 // Notifyeverynbytes [in,out] number of collected bytes after which notification event will be signaled. If the requested value is not supported exactly, then the driver may use a value that is the closest supported approximation and shall update this member during ::zetMetricTracerCreateExp. } // ZetMetricEntryExp (zet_metric_entry_exp_t) Decoded metric entry type ZetMetricEntryExp struct { - Value ZetValue // Value [out] value of the decodable metric entry or event. Number is meaningful based on the metric type. - Timestamp uint64 // Timestamp [out] timestamp at which the event happened. - Metricindex uint32 // Metricindex [out] index to the decodable metric handle in the input array (phMetric) in ::zetMetricTracerDecodeExp(). - Onsubdevice ZeBool // Onsubdevice [out] True if the event occurred on a sub-device; false means the device on which the metric tracer was opened does not have sub-devices. - Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device. + Value ZetValue // Value [out] value of the decodable metric entry or event. Number is meaningful based on the metric type. + Timestamp uint64 // Timestamp [out] timestamp at which the event happened. + Metricindex uint32 // Metricindex [out] index to the decodable metric handle in the input array (phMetric) in ::zetMetricTracerDecodeExp(). + Onsubdevice ZeBool // Onsubdevice [out] True if the event occurred on a sub-device; false means the device on which the metric tracer was opened does not have sub-devices. + Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device. } // ZetMetricTracerCreateExp Create a metric tracer for a device. -/// -/// @details -/// - The notification event must have been created from an event pool that -/// was created using ::ZE_EVENT_POOL_FLAG_HOST_VISIBLE flag. -/// - The duration of the signal event created from an event pool that was -/// created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag is undefined. -/// However, for consistency and orthogonality the event will report -/// correctly as signaled when used by other event API functionality. -/// - The application must **not** call this function from simultaneous -/// threads with the same device handle. -/// - The metric tracer is created in disabled state -/// - Metric groups must support sampling type -/// ZET_METRIC_SAMPLING_TYPE_EXP_FLAG_TRACER_BASED -/// - All metric groups must be first activated -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// + `nullptr == hDevice` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phMetricGroups` -/// + `nullptr == desc` -/// + `nullptr == phMetricTracer` -/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT +// / +// / @details +// / - The notification event must have been created from an event pool that +// / was created using ::ZE_EVENT_POOL_FLAG_HOST_VISIBLE flag. +// / - The duration of the signal event created from an event pool that was +// / created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag is undefined. +// / However, for consistency and orthogonality the event will report +// / correctly as signaled when used by other event API functionality. +// / - The application must **not** call this function from simultaneous +// / threads with the same device handle. +// / - The metric tracer is created in disabled state +// / - Metric groups must support sampling type +// / ZET_METRIC_SAMPLING_TYPE_EXP_FLAG_TRACER_BASED +// / - All metric groups must be first activated +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / + `nullptr == hDevice` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phMetricGroups` +// / + `nullptr == desc` +// / + `nullptr == phMetricTracer` +// / - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT func ZetMetricTracerCreateExp( - hContext ZetContextHandle, // hContext [in] handle of the context object - hDevice ZetDeviceHandle, // hDevice [in] handle of the device - metricGroupCount uint32, // metricGroupCount [in] metric group count - phMetricGroups *ZetMetricGroupHandle, // phMetricGroups [in][range(0, metricGroupCount )] handles of the metric groups to trace - desc *ZetMetricTracerExpDesc, // desc [in,out] metric tracer descriptor - hNotificationEvent ZeEventHandle, // hNotificationEvent [in][optional] event used for report availability notification. Note: If buffer is not drained when the event it flagged, there is a risk of HW event buffer being overrun - phMetricTracer *ZetMetricTracerExpHandle, // phMetricTracer [out] handle of the metric tracer + hContext ZetContextHandle, // hContext [in] handle of the context object + hDevice ZetDeviceHandle, // hDevice [in] handle of the device + metricGroupCount uint32, // metricGroupCount [in] metric group count + phMetricGroups *ZetMetricGroupHandle, // phMetricGroups [in][range(0, metricGroupCount )] handles of the metric groups to trace + desc *ZetMetricTracerExpDesc, // desc [in,out] metric tracer descriptor + hNotificationEvent ZeEventHandle, // hNotificationEvent [in][optional] event used for report availability notification. Note: If buffer is not drained when the event it flagged, there is a risk of HW event buffer being overrun + phMetricTracer *ZetMetricTracerExpHandle, // phMetricTracer [out] handle of the metric tracer ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricTracerCreateExp", uintptr(hContext), uintptr(hDevice), uintptr(metricGroupCount), uintptr(unsafe.Pointer(phMetricGroups)), uintptr(unsafe.Pointer(desc)), uintptr(hNotificationEvent), uintptr(unsafe.Pointer(phMetricTracer))) } // ZetMetricTracerDestroyExp Destroy a metric tracer. -/// -/// @details -/// - The application must **not** call this function from simultaneous -/// threads with the same metric tracer handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricTracer` +// / +// / @details +// / - The application must **not** call this function from simultaneous +// / threads with the same metric tracer handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricTracer` func ZetMetricTracerDestroyExp( - hMetricTracer ZetMetricTracerExpHandle, // hMetricTracer [in] handle of the metric tracer + hMetricTracer ZetMetricTracerExpHandle, // hMetricTracer [in] handle of the metric tracer ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricTracerDestroyExp", uintptr(hMetricTracer)) } // ZetMetricTracerEnableExp Start events collection -/// -/// @details -/// - Driver implementations must make this API call have as minimal -/// overhead as possible, to allow applications start/stop event -/// collection at any point during execution -/// - The application must **not** call this function from simultaneous -/// threads with the same metric tracer handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricTracer` +// / +// / @details +// / - Driver implementations must make this API call have as minimal +// / overhead as possible, to allow applications start/stop event +// / collection at any point during execution +// / - The application must **not** call this function from simultaneous +// / threads with the same metric tracer handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricTracer` func ZetMetricTracerEnableExp( - hMetricTracer ZetMetricTracerExpHandle, // hMetricTracer [in] handle of the metric tracer - synchronous ZeBool, // synchronous [in] request synchronous behavior. Confirmation of successful asynchronous operation is done by calling ::zetMetricTracerReadDataExp() and checking the return status: ::ZE_RESULT_NOT_READY will be returned when the tracer is inactive. ::ZE_RESULT_SUCCESS will be returned when the tracer is active. + hMetricTracer ZetMetricTracerExpHandle, // hMetricTracer [in] handle of the metric tracer + synchronous ZeBool, // synchronous [in] request synchronous behavior. Confirmation of successful asynchronous operation is done by calling ::zetMetricTracerReadDataExp() and checking the return status: ::ZE_RESULT_NOT_READY will be returned when the tracer is inactive. ::ZE_RESULT_SUCCESS will be returned when the tracer is active. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricTracerEnableExp", uintptr(hMetricTracer), uintptr(synchronous)) } // ZetMetricTracerDisableExp Stop events collection -/// -/// @details -/// - Driver implementations must make this API call have as minimal -/// overhead as possible, to allow applications start/stop event -/// collection at any point during execution -/// - The application must **not** call this function from simultaneous -/// threads with the same metric tracer handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricTracer` +// / +// / @details +// / - Driver implementations must make this API call have as minimal +// / overhead as possible, to allow applications start/stop event +// / collection at any point during execution +// / - The application must **not** call this function from simultaneous +// / threads with the same metric tracer handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricTracer` func ZetMetricTracerDisableExp( - hMetricTracer ZetMetricTracerExpHandle, // hMetricTracer [in] handle of the metric tracer - synchronous ZeBool, // synchronous [in] request synchronous behavior. Confirmation of successful asynchronous operation is done by calling ::zetMetricTracerReadDataExp() and checking the return status: ::ZE_RESULT_SUCCESS will be returned when the tracer is active or when it is inactive but still has data. ::ZE_RESULT_NOT_READY will be returned when the tracer is inactive and has no more data to be retrieved. + hMetricTracer ZetMetricTracerExpHandle, // hMetricTracer [in] handle of the metric tracer + synchronous ZeBool, // synchronous [in] request synchronous behavior. Confirmation of successful asynchronous operation is done by calling ::zetMetricTracerReadDataExp() and checking the return status: ::ZE_RESULT_SUCCESS will be returned when the tracer is active or when it is inactive but still has data. ::ZE_RESULT_NOT_READY will be returned when the tracer is inactive and has no more data to be retrieved. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricTracerDisableExp", uintptr(hMetricTracer), uintptr(synchronous)) } // ZetMetricTracerReadDataExp Read data from the metric tracer -/// -/// @details -/// - The application must **not** call this function from simultaneous -/// threads with the same metric tracer handle. -/// - Data can be retrieved after tracer is disabled. When buffers are -/// drained ::ZE_RESULT_NOT_READY will be returned -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricTracer` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pRawDataSize` -/// - ::ZE_RESULT_WARNING_DROPPED_DATA -/// + Metric tracer data may have been dropped. -/// - ::ZE_RESULT_NOT_READY -/// + Metric tracer is disabled and no data is available to read. +// / +// / @details +// / - The application must **not** call this function from simultaneous +// / threads with the same metric tracer handle. +// / - Data can be retrieved after tracer is disabled. When buffers are +// / drained ::ZE_RESULT_NOT_READY will be returned +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricTracer` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pRawDataSize` +// / - ::ZE_RESULT_WARNING_DROPPED_DATA +// / + Metric tracer data may have been dropped. +// / - ::ZE_RESULT_NOT_READY +// / + Metric tracer is disabled and no data is available to read. func ZetMetricTracerReadDataExp( - hMetricTracer ZetMetricTracerExpHandle, // hMetricTracer [in] handle of the metric tracer - pRawDataSize *uintptr, // pRawDataSize [in,out] pointer to size in bytes of raw data requested to read. if size is zero, then the driver will update the value with the total size in bytes needed for all data available. if size is non-zero, then driver will only retrieve that amount of data. if size is larger than size needed for all data, then driver will update the value with the actual size needed. - pRawData *uint8, // pRawData [in,out][optional][range(0, *pRawDataSize)] buffer containing tracer data in raw format + hMetricTracer ZetMetricTracerExpHandle, // hMetricTracer [in] handle of the metric tracer + pRawDataSize *uintptr, // pRawDataSize [in,out] pointer to size in bytes of raw data requested to read. if size is zero, then the driver will update the value with the total size in bytes needed for all data available. if size is non-zero, then driver will only retrieve that amount of data. if size is larger than size needed for all data, then driver will update the value with the actual size needed. + pRawData *uint8, // pRawData [in,out][optional][range(0, *pRawDataSize)] buffer containing tracer data in raw format ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricTracerReadDataExp", uintptr(hMetricTracer), uintptr(unsafe.Pointer(pRawDataSize)), uintptr(unsafe.Pointer(pRawData))) } // ZetMetricDecoderCreateExp Create a metric decoder for a given metric tracer. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricTracer` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == phMetricDecoder` +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricTracer` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == phMetricDecoder` func ZetMetricDecoderCreateExp( - hMetricTracer ZetMetricTracerExpHandle, // hMetricTracer [in] handle of the metric tracer - phMetricDecoder *ZetMetricDecoderExpHandle, // phMetricDecoder [out] handle of the metric decoder object + hMetricTracer ZetMetricTracerExpHandle, // hMetricTracer [in] handle of the metric tracer + phMetricDecoder *ZetMetricDecoderExpHandle, // phMetricDecoder [out] handle of the metric decoder object ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricDecoderCreateExp", uintptr(hMetricTracer), uintptr(unsafe.Pointer(phMetricDecoder))) } // ZetMetricDecoderDestroyExp Destroy a metric decoder. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == phMetricDecoder` +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == phMetricDecoder` func ZetMetricDecoderDestroyExp( - phMetricDecoder ZetMetricDecoderExpHandle, // phMetricDecoder [in] handle of the metric decoder object + phMetricDecoder ZetMetricDecoderExpHandle, // phMetricDecoder [in] handle of the metric decoder object ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricDecoderDestroyExp", uintptr(phMetricDecoder)) } // ZetMetricDecoderGetDecodableMetricsExp Return the list of the decodable metrics from the decoder. -/// -/// @details -/// - The decodable metrics handles returned by this API are defined by the -/// metric groups in the tracer on which the decoder was created. -/// - The decodable metrics handles returned by this API are only valid to -/// decode metrics raw data with ::zetMetricTracerDecodeExp(). Decodable -/// metric handles are not valid to compare with metrics handles included -/// in metric groups. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricDecoder` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCount` -/// + `nullptr == phMetrics` +// / +// / @details +// / - The decodable metrics handles returned by this API are defined by the +// / metric groups in the tracer on which the decoder was created. +// / - The decodable metrics handles returned by this API are only valid to +// / decode metrics raw data with ::zetMetricTracerDecodeExp(). Decodable +// / metric handles are not valid to compare with metrics handles included +// / in metric groups. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricDecoder` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCount` +// / + `nullptr == phMetrics` func ZetMetricDecoderGetDecodableMetricsExp( - hMetricDecoder ZetMetricDecoderExpHandle, // hMetricDecoder [in] handle of the metric decoder object - pCount *uint32, // pCount [in,out] pointer to number of decodable metric in the hMetricDecoder handle. If count is zero, then the driver shall update the value with the total number of decodable metrics available in the decoder. if count is greater than zero but less than the total number of decodable metrics available in the decoder, then only that number will be returned. if count is greater than the number of decodable metrics available in the decoder, then the driver shall update the value with the actual number of decodable metrics available. - phMetrics *ZetMetricHandle, // phMetrics [in,out] [range(0, *pCount)] array of handles of decodable metrics in the hMetricDecoder handle provided. + hMetricDecoder ZetMetricDecoderExpHandle, // hMetricDecoder [in] handle of the metric decoder object + pCount *uint32, // pCount [in,out] pointer to number of decodable metric in the hMetricDecoder handle. If count is zero, then the driver shall update the value with the total number of decodable metrics available in the decoder. if count is greater than zero but less than the total number of decodable metrics available in the decoder, then only that number will be returned. if count is greater than the number of decodable metrics available in the decoder, then the driver shall update the value with the actual number of decodable metrics available. + phMetrics *ZetMetricHandle, // phMetrics [in,out] [range(0, *pCount)] array of handles of decodable metrics in the hMetricDecoder handle provided. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricDecoderGetDecodableMetricsExp", uintptr(hMetricDecoder), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phMetrics))) } // ZetMetricTracerDecodeExp Decode raw events collected from a tracer. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == phMetricDecoder` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pRawDataSize` -/// + `nullptr == phMetrics` -/// + `nullptr == pSetCount` -/// + `nullptr == pMetricEntriesCount` +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == phMetricDecoder` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pRawDataSize` +// / + `nullptr == phMetrics` +// / + `nullptr == pSetCount` +// / + `nullptr == pMetricEntriesCount` func ZetMetricTracerDecodeExp( - phMetricDecoder ZetMetricDecoderExpHandle, // phMetricDecoder [in] handle of the metric decoder object - pRawDataSize *uintptr, // pRawDataSize [in,out] size in bytes of raw data buffer. If pMetricEntriesCount is greater than zero but less than total number of decodable metrics available in the raw data buffer, then driver shall update this value with actual number of raw data bytes processed. - pRawData *uint8, // pRawData [in,out][optional][range(0, *pRawDataSize)] buffer containing tracer data in raw format - metricsCount uint32, // metricsCount [in] number of decodable metrics in the tracer for which the hMetricDecoder handle was provided. See ::zetMetricDecoderGetDecodableMetricsExp(). If metricCount is greater than zero but less than the number decodable metrics available in the raw data buffer, then driver shall only decode those. - phMetrics *ZetMetricHandle, // phMetrics [in] [range(0, metricsCount)] array of handles of decodable metrics in the decoder for which the hMetricDecoder handle was provided. Metrics handles are expected to be for decodable metrics, see ::zetMetricDecoderGetDecodableMetricsExp() - pSetCount *uint32, // pSetCount [in,out] pointer to number of metric sets. If count is zero, then the driver shall update the value with the total number of metric sets to be decoded. If count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of metric sets to be decoded. There is a 1:1 relation between the number of sets and sub-devices returned in the decoded entries. - pMetricEntriesCountPerSet *uint32, // pMetricEntriesCountPerSet [in,out][optional][range(0, *pSetCount)] buffer of metric entries counts per metric set, one value per set. - pMetricEntriesCount *uint32, // pMetricEntriesCount [in,out] pointer to the total number of metric entries decoded, for all metric sets. If count is zero, then the driver shall update the value with the total number of metric entries to be decoded. If count is greater than zero but less than the total number of metric entries available in the raw data, then user provided number will be decoded. If count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of decodable metric entries decoded. If set to null, then driver will only update the value of pSetCount. - pMetricEntries *ZetMetricEntryExp, // pMetricEntries [in,out][optional][range(0, *pMetricEntriesCount)] buffer containing decoded metric entries + phMetricDecoder ZetMetricDecoderExpHandle, // phMetricDecoder [in] handle of the metric decoder object + pRawDataSize *uintptr, // pRawDataSize [in,out] size in bytes of raw data buffer. If pMetricEntriesCount is greater than zero but less than total number of decodable metrics available in the raw data buffer, then driver shall update this value with actual number of raw data bytes processed. + pRawData *uint8, // pRawData [in,out][optional][range(0, *pRawDataSize)] buffer containing tracer data in raw format + metricsCount uint32, // metricsCount [in] number of decodable metrics in the tracer for which the hMetricDecoder handle was provided. See ::zetMetricDecoderGetDecodableMetricsExp(). If metricCount is greater than zero but less than the number decodable metrics available in the raw data buffer, then driver shall only decode those. + phMetrics *ZetMetricHandle, // phMetrics [in] [range(0, metricsCount)] array of handles of decodable metrics in the decoder for which the hMetricDecoder handle was provided. Metrics handles are expected to be for decodable metrics, see ::zetMetricDecoderGetDecodableMetricsExp() + pSetCount *uint32, // pSetCount [in,out] pointer to number of metric sets. If count is zero, then the driver shall update the value with the total number of metric sets to be decoded. If count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of metric sets to be decoded. There is a 1:1 relation between the number of sets and sub-devices returned in the decoded entries. + pMetricEntriesCountPerSet *uint32, // pMetricEntriesCountPerSet [in,out][optional][range(0, *pSetCount)] buffer of metric entries counts per metric set, one value per set. + pMetricEntriesCount *uint32, // pMetricEntriesCount [in,out] pointer to the total number of metric entries decoded, for all metric sets. If count is zero, then the driver shall update the value with the total number of metric entries to be decoded. If count is greater than zero but less than the total number of metric entries available in the raw data, then user provided number will be decoded. If count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of decodable metric entries decoded. If set to null, then driver will only update the value of pSetCount. + pMetricEntries *ZetMetricEntryExp, // pMetricEntries [in,out][optional][range(0, *pMetricEntriesCount)] buffer containing decoded metric entries ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricTracerDecodeExp", uintptr(phMetricDecoder), uintptr(unsafe.Pointer(pRawDataSize)), uintptr(unsafe.Pointer(pRawData)), uintptr(metricsCount), uintptr(unsafe.Pointer(phMetrics)), uintptr(unsafe.Pointer(pSetCount)), uintptr(unsafe.Pointer(pMetricEntriesCountPerSet)), uintptr(unsafe.Pointer(pMetricEntriesCount)), uintptr(unsafe.Pointer(pMetricEntries))) } - diff --git a/tols_module.go b/tols_module.go index 67f9fc6..a6c1747 100644 --- a/tols_module.go +++ b/tols_module.go @@ -21,49 +21,49 @@ import ( // ZetModuleDebugInfoFormat (zet_module_debug_info_format_t) Supported module debug info formats. type ZetModuleDebugInfoFormat uintptr + const ( - ZET_MODULE_DEBUG_INFO_FORMAT_ELF_DWARF ZetModuleDebugInfoFormat = 0 // ZET_MODULE_DEBUG_INFO_FORMAT_ELF_DWARF Format is ELF/DWARF - ZET_MODULE_DEBUG_INFO_FORMAT_FORCE_UINT32 ZetModuleDebugInfoFormat = 0x7fffffff // ZET_MODULE_DEBUG_INFO_FORMAT_FORCE_UINT32 Value marking end of ZET_MODULE_DEBUG_INFO_FORMAT_* ENUMs + ZET_MODULE_DEBUG_INFO_FORMAT_ELF_DWARF ZetModuleDebugInfoFormat = 0 // ZET_MODULE_DEBUG_INFO_FORMAT_ELF_DWARF Format is ELF/DWARF + ZET_MODULE_DEBUG_INFO_FORMAT_FORCE_UINT32 ZetModuleDebugInfoFormat = 0x7fffffff // ZET_MODULE_DEBUG_INFO_FORMAT_FORCE_UINT32 Value marking end of ZET_MODULE_DEBUG_INFO_FORMAT_* ENUMs ) // ZetModuleGetDebugInfo Retrieve debug info from module. -/// -/// @details -/// - The caller can pass nullptr for pDebugInfo when querying only for -/// size. -/// - The implementation will copy the native binary into a buffer supplied -/// by the caller. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hModule` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZET_MODULE_DEBUG_INFO_FORMAT_ELF_DWARF < format` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pSize` +// / +// / @details +// / - The caller can pass nullptr for pDebugInfo when querying only for +// / size. +// / - The implementation will copy the native binary into a buffer supplied +// / by the caller. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hModule` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZET_MODULE_DEBUG_INFO_FORMAT_ELF_DWARF < format` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pSize` func ZetModuleGetDebugInfo( - hModule ZetModuleHandle, // hModule [in] handle of the module - format ZetModuleDebugInfoFormat, // format [in] debug info format requested - pSize *uintptr, // pSize [in,out] size of debug info in bytes - pDebugInfo *uint8, // pDebugInfo [in,out][optional] byte pointer to debug info + hModule ZetModuleHandle, // hModule [in] handle of the module + format ZetModuleDebugInfoFormat, // format [in] debug info format requested + pSize *uintptr, // pSize [in,out] size of debug info in bytes + pDebugInfo *uint8, // pDebugInfo [in,out][optional] byte pointer to debug info ) (ZeResult, error) { return zecall.Call[ZeResult]("zetModuleGetDebugInfo", uintptr(hModule), uintptr(format), uintptr(unsafe.Pointer(pSize)), uintptr(unsafe.Pointer(pDebugInfo))) } - diff --git a/tols_multiMetricValues.go b/tols_multiMetricValues.go index 93599cd..26e6c4d 100644 --- a/tols_multiMetricValues.go +++ b/tols_multiMetricValues.go @@ -24,59 +24,59 @@ const ZET_MULTI_METRICS_EXP_NAME = "ZET_experimental_calculate_multiple_metrics" // ZeCalculateMultipleMetricsExpVersion (ze_calculate_multiple_metrics_exp_version_t) Calculating Multiple Metrics Experimental Extension Version(s) type ZeCalculateMultipleMetricsExpVersion uintptr + const ( - ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_1_0 ZeCalculateMultipleMetricsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_1_0 version 1.0 - ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_CURRENT ZeCalculateMultipleMetricsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_CURRENT latest known version - ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_FORCE_UINT32 ZeCalculateMultipleMetricsExpVersion = 0x7fffffff // ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_* ENUMs + ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_1_0 ZeCalculateMultipleMetricsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_1_0 version 1.0 + ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_CURRENT ZeCalculateMultipleMetricsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_CURRENT latest known version + ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_FORCE_UINT32 ZeCalculateMultipleMetricsExpVersion = 0x7fffffff // ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_CALCULATE_MULTIPLE_METRICS_EXP_VERSION_* ENUMs ) // ZetMetricGroupCalculateMultipleMetricValuesExp Calculate one or more sets of metric values from raw data. -/// -/// @details -/// - This function is similar to ::zetMetricGroupCalculateMetricValues -/// except it may calculate more than one set of metric values from a -/// single data buffer. There may be one set of metric values for each -/// sub-device, for example. -/// - Each set of metric values may consist of a different number of metric -/// values, returned as the metric value count. -/// - All metric values are calculated into a single buffer; use the metric -/// counts to determine which metric values belong to which set. -/// - The application may call this function from simultaneous threads. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hMetricGroup` -/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION -/// + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type` -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pRawData` -/// + `nullptr == pSetCount` -/// + `nullptr == pTotalMetricValueCount` +// / +// / @details +// / - This function is similar to ::zetMetricGroupCalculateMetricValues +// / except it may calculate more than one set of metric values from a +// / single data buffer. There may be one set of metric values for each +// / sub-device, for example. +// / - Each set of metric values may consist of a different number of metric +// / values, returned as the metric value count. +// / - All metric values are calculated into a single buffer; use the metric +// / counts to determine which metric values belong to which set. +// / - The application may call this function from simultaneous threads. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hMetricGroup` +// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION +// / + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type` +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pRawData` +// / + `nullptr == pSetCount` +// / + `nullptr == pTotalMetricValueCount` func ZetMetricGroupCalculateMultipleMetricValuesExp( - hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group - typ ZetMetricGroupCalculationType, // typ [in] calculation type to be applied on raw data - rawDataSize uintptr, // rawDataSize [in] size in bytes of raw data buffer - pRawData *uint8, // pRawData [in][range(0, rawDataSize)] buffer of raw data to calculate - pSetCount *uint32, // pSetCount [in,out] pointer to number of metric sets. if count is zero, then the driver shall update the value with the total number of metric sets to be calculated. if count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of metric sets to be calculated. - pTotalMetricValueCount *uint32, // pTotalMetricValueCount [in,out] pointer to number of the total number of metric values calculated, for all metric sets. if count is zero, then the driver shall update the value with the total number of metric values to be calculated. if count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of metric values to be calculated. - pMetricCounts *uint32, // pMetricCounts [in,out][optional][range(0, *pSetCount)] buffer of metric counts per metric set. - pMetricValues *ZetTypedValue, // pMetricValues [in,out][optional][range(0, *pTotalMetricValueCount)] buffer of calculated metrics. if count is less than the number available in the raw data buffer, then driver shall only calculate that number of metric values. + hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group + typ ZetMetricGroupCalculationType, // typ [in] calculation type to be applied on raw data + rawDataSize uintptr, // rawDataSize [in] size in bytes of raw data buffer + pRawData *uint8, // pRawData [in][range(0, rawDataSize)] buffer of raw data to calculate + pSetCount *uint32, // pSetCount [in,out] pointer to number of metric sets. if count is zero, then the driver shall update the value with the total number of metric sets to be calculated. if count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of metric sets to be calculated. + pTotalMetricValueCount *uint32, // pTotalMetricValueCount [in,out] pointer to number of the total number of metric values calculated, for all metric sets. if count is zero, then the driver shall update the value with the total number of metric values to be calculated. if count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of metric values to be calculated. + pMetricCounts *uint32, // pMetricCounts [in,out][optional][range(0, *pSetCount)] buffer of metric counts per metric set. + pMetricValues *ZetTypedValue, // pMetricValues [in,out][optional][range(0, *pTotalMetricValueCount)] buffer of calculated metrics. if count is less than the number available in the raw data buffer, then driver shall only calculate that number of metric values. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGroupCalculateMultipleMetricValuesExp", uintptr(hMetricGroup), uintptr(typ), uintptr(rawDataSize), uintptr(unsafe.Pointer(pRawData)), uintptr(unsafe.Pointer(pSetCount)), uintptr(unsafe.Pointer(pTotalMetricValueCount)), uintptr(unsafe.Pointer(pMetricCounts)), uintptr(unsafe.Pointer(pMetricValues))) } - diff --git a/tols_pin.go b/tols_pin.go index 4216a2a..585d480 100644 --- a/tols_pin.go +++ b/tols_pin.go @@ -21,82 +21,83 @@ import ( // ZetProfileFlags (zet_profile_flags_t) Supportted profile features type ZetProfileFlags uint32 + const ( - ZET_PROFILE_FLAG_REGISTER_REALLOCATION ZetProfileFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZET_PROFILE_FLAG_REGISTER_REALLOCATION request the compiler attempt to minimize register usage as much as + ZET_PROFILE_FLAG_REGISTER_REALLOCATION ZetProfileFlags = /* ZE_BIT(0) */ (1 << 0) // ZET_PROFILE_FLAG_REGISTER_REALLOCATION request the compiler attempt to minimize register usage as much as ///< possible to allow for instrumentation - ZET_PROFILE_FLAG_FREE_REGISTER_INFO ZetProfileFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZET_PROFILE_FLAG_FREE_REGISTER_INFO request the compiler generate free register info - ZET_PROFILE_FLAG_FORCE_UINT32 ZetProfileFlags = 0x7fffffff // ZET_PROFILE_FLAG_FORCE_UINT32 Value marking end of ZET_PROFILE_FLAG_* ENUMs + ZET_PROFILE_FLAG_FREE_REGISTER_INFO ZetProfileFlags = /* ZE_BIT(1) */ (1 << 1) // ZET_PROFILE_FLAG_FREE_REGISTER_INFO request the compiler generate free register info + ZET_PROFILE_FLAG_FORCE_UINT32 ZetProfileFlags = 0x7fffffff // ZET_PROFILE_FLAG_FORCE_UINT32 Value marking end of ZET_PROFILE_FLAG_* ENUMs ) // ZetProfileProperties (zet_profile_properties_t) Profiling meta-data for instrumentation type ZetProfileProperties struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Flags ZetProfileFlags // Flags [out] indicates which flags were enabled during compilation. returns 0 (none) or a combination of ::zet_profile_flag_t - Numtokens uint32 // Numtokens [out] number of tokens immediately following this structure + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Flags ZetProfileFlags // Flags [out] indicates which flags were enabled during compilation. returns 0 (none) or a combination of ::zet_profile_flag_t + Numtokens uint32 // Numtokens [out] number of tokens immediately following this structure } // ZetProfileTokenType (zet_profile_token_type_t) Supported profile token types type ZetProfileTokenType uintptr + const ( - ZET_PROFILE_TOKEN_TYPE_FREE_REGISTER ZetProfileTokenType = 0 // ZET_PROFILE_TOKEN_TYPE_FREE_REGISTER GRF info - ZET_PROFILE_TOKEN_TYPE_FORCE_UINT32 ZetProfileTokenType = 0x7fffffff // ZET_PROFILE_TOKEN_TYPE_FORCE_UINT32 Value marking end of ZET_PROFILE_TOKEN_TYPE_* ENUMs + ZET_PROFILE_TOKEN_TYPE_FREE_REGISTER ZetProfileTokenType = 0 // ZET_PROFILE_TOKEN_TYPE_FREE_REGISTER GRF info + ZET_PROFILE_TOKEN_TYPE_FORCE_UINT32 ZetProfileTokenType = 0x7fffffff // ZET_PROFILE_TOKEN_TYPE_FORCE_UINT32 Value marking end of ZET_PROFILE_TOKEN_TYPE_* ENUMs ) // ZetProfileFreeRegisterToken (zet_profile_free_register_token_t) Profile free register token detailing unused registers in the current -/// function +// / function type ZetProfileFreeRegisterToken struct { - Type ZetProfileTokenType // Type [out] type of token - Size uint32 // Size [out] total size of the token, in bytes - Count uint32 // Count [out] number of register sequences immediately following this structure + Type ZetProfileTokenType // Type [out] type of token + Size uint32 // Size [out] total size of the token, in bytes + Count uint32 // Count [out] number of register sequences immediately following this structure } // ZetProfileRegisterSequence (zet_profile_register_sequence_t) Profile register sequence detailing consecutive bytes, all of which -/// are unused +// / are unused type ZetProfileRegisterSequence struct { - Start uint32 // Start [out] starting byte in the register table, representing the start of unused bytes in the current function - Count uint32 // Count [out] number of consecutive bytes in the sequence, starting from start + Start uint32 // Start [out] starting byte in the register table, representing the start of unused bytes in the current function + Count uint32 // Count [out] number of consecutive bytes in the sequence, starting from start } // ZetKernelGetProfileInfo Retrieve profiling information generated for the kernel. -/// -/// @details -/// - Module must be created using the following build option: -/// + "-zet-profile-flags " - enable generation of profile -/// information -/// + "" must be a combination of ::zet_profile_flag_t, in hex -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function should be lock-free. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hKernel` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pProfileProperties` +// / +// / @details +// / - Module must be created using the following build option: +// / + "-zet-profile-flags " - enable generation of profile +// / information +// / + "" must be a combination of ::zet_profile_flag_t, in hex +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function should be lock-free. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hKernel` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pProfileProperties` func ZetKernelGetProfileInfo( - hKernel ZetKernelHandle, // hKernel [in] handle to kernel - pProfileProperties *ZetProfileProperties, // pProfileProperties [out] pointer to profile properties + hKernel ZetKernelHandle, // hKernel [in] handle to kernel + pProfileProperties *ZetProfileProperties, // pProfileProperties [out] pointer to profile properties ) (ZeResult, error) { return zecall.Call[ZeResult]("zetKernelGetProfileInfo", uintptr(hKernel), uintptr(unsafe.Pointer(pProfileProperties))) } - diff --git a/tols_tracing.go b/tols_tracing.go index 469a178..2cd7b90 100644 --- a/tols_tracing.go +++ b/tols_tracing.go @@ -24,10 +24,11 @@ const ZET_API_TRACING_EXP_NAME = "ZET_experimental_api_tracing" // ZetApiTracingExpVersion (zet_api_tracing_exp_version_t) API Tracing Experimental Extension Version(s) type ZetApiTracingExpVersion uintptr + const ( - ZET_API_TRACING_EXP_VERSION_1_0 ZetApiTracingExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZET_API_TRACING_EXP_VERSION_1_0 version 1.0 - ZET_API_TRACING_EXP_VERSION_CURRENT ZetApiTracingExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZET_API_TRACING_EXP_VERSION_CURRENT latest known version - ZET_API_TRACING_EXP_VERSION_FORCE_UINT32 ZetApiTracingExpVersion = 0x7fffffff // ZET_API_TRACING_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_API_TRACING_EXP_VERSION_* ENUMs + ZET_API_TRACING_EXP_VERSION_1_0 ZetApiTracingExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZET_API_TRACING_EXP_VERSION_1_0 version 1.0 + ZET_API_TRACING_EXP_VERSION_CURRENT ZetApiTracingExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZET_API_TRACING_EXP_VERSION_CURRENT latest known version + ZET_API_TRACING_EXP_VERSION_FORCE_UINT32 ZetApiTracingExpVersion = 0x7fffffff // ZET_API_TRACING_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_API_TRACING_EXP_VERSION_* ENUMs ) @@ -36,195 +37,194 @@ type ZetCoreCallbacks ZeCallbacks // ZetTracerExpDesc (zet_tracer_exp_desc_t) Tracer descriptor type ZetTracerExpDesc struct { - Stype ZetStructureType // Stype [in] type of this structure - Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). - Puserdata unsafe.Pointer // Puserdata [in] pointer passed to every tracer's callbacks + Stype ZetStructureType // Stype [in] type of this structure + Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). + Puserdata unsafe.Pointer // Puserdata [in] pointer passed to every tracer's callbacks } // ZetTracerExpCreate Creates a tracer on the context. -/// -/// @details -/// - @deprecated This function is not supported in L0 drivers and has been -/// replaced by the Loader Tracing Layer. See the Loader Tracing -/// documentation for more details. -/// - The application must only use the tracer for the context which was -/// provided during creation. -/// - The tracer is created in the disabled state. -/// - The application may call this function from simultaneous threads. -/// - The implementation of this function must be thread-safe. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hContext` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == desc` -/// + `nullptr == desc->pUserData` -/// + `nullptr == phTracer` +// / +// / @details +// / - @deprecated This function is not supported in L0 drivers and has been +// / replaced by the Loader Tracing Layer. See the Loader Tracing +// / documentation for more details. +// / - The application must only use the tracer for the context which was +// / provided during creation. +// / - The tracer is created in the disabled state. +// / - The application may call this function from simultaneous threads. +// / - The implementation of this function must be thread-safe. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hContext` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == desc` +// / + `nullptr == desc->pUserData` +// / + `nullptr == phTracer` func ZetTracerExpCreate( - hContext ZetContextHandle, // hContext [in] handle of the context object - desc *ZetTracerExpDesc, // desc [in] pointer to tracer descriptor - phTracer *ZetTracerExpHandle, // phTracer [out] pointer to handle of tracer object created + hContext ZetContextHandle, // hContext [in] handle of the context object + desc *ZetTracerExpDesc, // desc [in] pointer to tracer descriptor + phTracer *ZetTracerExpHandle, // phTracer [out] pointer to handle of tracer object created ) (ZeResult, error) { return zecall.Call[ZeResult]("zetTracerExpCreate", uintptr(hContext), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phTracer))) } // ZetTracerExpDestroy Destroys a tracer. -/// -/// @details -/// - @deprecated This function is not supported in L0 drivers and has been -/// replaced by the Loader Tracing Layer. See the Loader Tracing -/// documentation for more details. -/// - The application must **not** call this function from simultaneous -/// threads with the same tracer handle. -/// - The implementation of this function must be thread-safe. -/// - The implementation of this function will stall and wait on any -/// outstanding threads executing callbacks before freeing any Host -/// allocations associated with this tracer. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hTracer` -/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE +// / +// / @details +// / - @deprecated This function is not supported in L0 drivers and has been +// / replaced by the Loader Tracing Layer. See the Loader Tracing +// / documentation for more details. +// / - The application must **not** call this function from simultaneous +// / threads with the same tracer handle. +// / - The implementation of this function must be thread-safe. +// / - The implementation of this function will stall and wait on any +// / outstanding threads executing callbacks before freeing any Host +// / allocations associated with this tracer. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hTracer` +// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE func ZetTracerExpDestroy( - hTracer ZetTracerExpHandle, // hTracer [in][release] handle of tracer object to destroy + hTracer ZetTracerExpHandle, // hTracer [in][release] handle of tracer object to destroy ) (ZeResult, error) { return zecall.Call[ZeResult]("zetTracerExpDestroy", uintptr(hTracer)) } // ZetTracerExpSetPrologues Sets the collection of callbacks to be executed **before** driver -/// execution. -/// -/// @details -/// - @deprecated This function is not supported in L0 drivers and has been -/// replaced by the Loader Tracing Layer. See the Loader Tracing -/// documentation for more details. -/// - The application only needs to set the function pointers it is -/// interested in receiving; all others should be 'nullptr' -/// - The application must ensure that no other threads are executing -/// functions for which the tracing functions are changing. -/// - The application must **not** call this function from simultaneous -/// threads with the same tracer handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hTracer` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCoreCbs` +// / execution. +// / +// / @details +// / - @deprecated This function is not supported in L0 drivers and has been +// / replaced by the Loader Tracing Layer. See the Loader Tracing +// / documentation for more details. +// / - The application only needs to set the function pointers it is +// / interested in receiving; all others should be 'nullptr' +// / - The application must ensure that no other threads are executing +// / functions for which the tracing functions are changing. +// / - The application must **not** call this function from simultaneous +// / threads with the same tracer handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hTracer` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCoreCbs` func ZetTracerExpSetPrologues( - hTracer ZetTracerExpHandle, // hTracer [in] handle of the tracer - pCoreCbs *ZetCoreCallbacks, // pCoreCbs [in] pointer to table of 'core' callback function pointers + hTracer ZetTracerExpHandle, // hTracer [in] handle of the tracer + pCoreCbs *ZetCoreCallbacks, // pCoreCbs [in] pointer to table of 'core' callback function pointers ) (ZeResult, error) { return zecall.Call[ZeResult]("zetTracerExpSetPrologues", uintptr(hTracer), uintptr(unsafe.Pointer(pCoreCbs))) } // ZetTracerExpSetEpilogues Sets the collection of callbacks to be executed **after** driver -/// execution. -/// -/// @details -/// - @deprecated This function is not supported in L0 drivers and has been -/// replaced by the Loader Tracing Layer. See the Loader Tracing -/// documentation for more details. -/// - The application only needs to set the function pointers it is -/// interested in receiving; all others should be 'nullptr' -/// - The application must ensure that no other threads are executing -/// functions for which the tracing functions are changing. -/// - The application must **not** call this function from simultaneous -/// threads with the same tracer handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hTracer` -/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER -/// + `nullptr == pCoreCbs` +// / execution. +// / +// / @details +// / - @deprecated This function is not supported in L0 drivers and has been +// / replaced by the Loader Tracing Layer. See the Loader Tracing +// / documentation for more details. +// / - The application only needs to set the function pointers it is +// / interested in receiving; all others should be 'nullptr' +// / - The application must ensure that no other threads are executing +// / functions for which the tracing functions are changing. +// / - The application must **not** call this function from simultaneous +// / threads with the same tracer handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hTracer` +// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER +// / + `nullptr == pCoreCbs` func ZetTracerExpSetEpilogues( - hTracer ZetTracerExpHandle, // hTracer [in] handle of the tracer - pCoreCbs *ZetCoreCallbacks, // pCoreCbs [in] pointer to table of 'core' callback function pointers + hTracer ZetTracerExpHandle, // hTracer [in] handle of the tracer + pCoreCbs *ZetCoreCallbacks, // pCoreCbs [in] pointer to table of 'core' callback function pointers ) (ZeResult, error) { return zecall.Call[ZeResult]("zetTracerExpSetEpilogues", uintptr(hTracer), uintptr(unsafe.Pointer(pCoreCbs))) } // ZetTracerExpSetEnabled Enables (or disables) the tracer -/// -/// @details -/// - @deprecated This function is not supported in L0 drivers and has been -/// replaced by the Loader Tracing Layer. See the Loader Tracing -/// documentation for more details. -/// - The application must **not** call this function from simultaneous -/// threads with the same tracer handle. -/// -/// @returns -/// - ::ZE_RESULT_SUCCESS -/// - ::ZE_RESULT_ERROR_UNINITIALIZED -/// - ::ZE_RESULT_ERROR_DEVICE_LOST -/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY -/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY -/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT -/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE -/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE -/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS -/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE -/// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET -/// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE -/// - ::ZE_RESULT_ERROR_UNKNOWN -/// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `nullptr == hTracer` +// / +// / @details +// / - @deprecated This function is not supported in L0 drivers and has been +// / replaced by the Loader Tracing Layer. See the Loader Tracing +// / documentation for more details. +// / - The application must **not** call this function from simultaneous +// / threads with the same tracer handle. +// / +// / @returns +// / - ::ZE_RESULT_SUCCESS +// / - ::ZE_RESULT_ERROR_UNINITIALIZED +// / - ::ZE_RESULT_ERROR_DEVICE_LOST +// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY +// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY +// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT +// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE +// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE +// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS +// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE +// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET +// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE +// / - ::ZE_RESULT_ERROR_UNKNOWN +// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE +// / + `nullptr == hTracer` func ZetTracerExpSetEnabled( - hTracer ZetTracerExpHandle, // hTracer [in] handle of the tracer - enable ZeBool, // enable [in] enable the tracer if true; disable if false + hTracer ZetTracerExpHandle, // hTracer [in] handle of the tracer + enable ZeBool, // enable [in] enable the tracer if true; disable if false ) (ZeResult, error) { return zecall.Call[ZeResult]("zetTracerExpSetEnabled", uintptr(hTracer), uintptr(enable)) } -