1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-05 16:30:24 +08:00
Files
gozel/sysm_virtualFunctionManagement.go
github-actions[bot] 32abd8ea7c chore: run go generate
2026-03-26 00:49:32 +08:00

505 lines
28 KiB
Go

// Code generated by cmd/gen. DO NOT EDIT.
/*
*
* Copyright (C) 2019-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
* @file zes_api.h
* @version v1.15-r1.15.31
*
*/
package gozel
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZES_VIRTUAL_FUNCTION_MANAGEMENT_EXP_NAME Virtual Function Management Extension Name
const ZES_VIRTUAL_FUNCTION_MANAGEMENT_EXP_NAME = "ZES_experimental_virtual_function_management"
// 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
)
// 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
)
// 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
)
// 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.
}
// 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.
}
// 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.
}
// 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
}
// 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
}
// 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.
}
// 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)
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
}
// 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`
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.
) (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`
func ZesVFManagementGetVFPropertiesExp(
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`
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.
) (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`
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.
) (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
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.
) (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
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.
) (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`
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.
) (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`
func ZesVFManagementGetVFCapabilitiesExp(
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`
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.
) (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`
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.
) (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`
func ZesVFManagementGetVFCapabilitiesExp2(
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)))
}