// 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" ) // 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 ///< 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 ///< 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 ///< that can process both 3D content and 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_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 ///< 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 ///< 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 ///< 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 ) // 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 } // 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. 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. } // 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` 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. ) (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` func ZesEngineGetProperties( 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` 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. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesEngineGetActivity", uintptr(hEngine), uintptr(unsafe.Pointer(pStats))) }