1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-27 14:20:28 +08:00

chore: run go generate

This commit is contained in:
github-actions[bot]
2026-03-26 00:49:32 +08:00
committed by GitHub
parent bfda7d76f3
commit 32abd8ea7c
114 changed files with 18652 additions and 18535 deletions

View File

@@ -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.
}

View File

@@ -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
}

View File

@@ -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)))
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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.
}

View File

@@ -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
}

View File

@@ -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))
}

View File

@@ -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
)

View File

@@ -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.
}

View File

@@ -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))
}

File diff suppressed because it is too large Load Diff

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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
}

View File

@@ -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))
}

File diff suppressed because it is too large Load Diff

View File

@@ -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.
}

File diff suppressed because it is too large Load Diff

View File

@@ -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.
}

View File

@@ -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)))
}

View File

@@ -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.
}

View File

@@ -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.
}

View File

@@ -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))
}

View File

@@ -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
}

File diff suppressed because it is too large Load Diff

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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.
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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))
}

View File

@@ -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
}

View File

@@ -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))
}

View File

@@ -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
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))
}

View File

@@ -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)))
}

View File

@@ -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
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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
)

File diff suppressed because it is too large Load Diff

View File

@@ -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;
}

View File

@@ -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)))
}

View File

@@ -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
}

File diff suppressed because it is too large Load Diff

View File

@@ -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)))
}

View File

@@ -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.
}

View File

@@ -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.
}

View File

@@ -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.
}

View File

@@ -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;
}

View File

@@ -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))
}

View File

@@ -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))
}

View File

@@ -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.
}

View File

@@ -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
)

View File

@@ -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)))
}

View File

@@ -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"}

View File

@@ -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")
}

File diff suppressed because it is too large Load Diff

View File

@@ -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).
}

File diff suppressed because it is too large Load Diff

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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))
}

File diff suppressed because it is too large Load Diff

View File

@@ -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)))
}

View File

@@ -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
}

View File

@@ -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)))
}

View File

@@ -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
}

View File

@@ -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)))
}

View File

@@ -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))
}

View File

@@ -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))
}

View File

@@ -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.
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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))
}

View File

@@ -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)))
}

View File

@@ -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))
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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)))
}

View File

@@ -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)))
}

Some files were not shown because too many files have changed in this diff Show More