1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-08 18:10:26 +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

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