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

644 lines
38 KiB
Go

// Code generated by cmd/gen. DO NOT EDIT.
/*
*
* Copyright (C) 2019-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
* @file zet_api.h
* @version v1.15-r1.15.31
*
*/
package gozel
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZET_PROGRAMMABLE_METRICS_EXP_NAME Programmable Metrics Experimental Extension Name
const ZET_PROGRAMMABLE_METRICS_EXP_NAME = "ZET_experimental_programmable_metrics"
// ZetMetricProgrammableExpVersion (zet_metric_programmable_exp_version_t) Programmable Metrics Experimental Extension Version(s)
type ZetMetricProgrammableExpVersion uintptr
const (
ZET_METRIC_PROGRAMMABLE_EXP_VERSION_1_1 ZetMetricProgrammableExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */ ((1 << 16) | (1 & 0x0000ffff)) // ZET_METRIC_PROGRAMMABLE_EXP_VERSION_1_1 version 1.1
ZET_METRIC_PROGRAMMABLE_EXP_VERSION_CURRENT ZetMetricProgrammableExpVersion = /* ZE_MAKE_VERSION( 1, 1 ) */ ((1 << 16) | (1 & 0x0000ffff)) // ZET_METRIC_PROGRAMMABLE_EXP_VERSION_CURRENT latest known version
ZET_METRIC_PROGRAMMABLE_EXP_VERSION_FORCE_UINT32 ZetMetricProgrammableExpVersion = 0x7fffffff // ZET_METRIC_PROGRAMMABLE_EXP_VERSION_FORCE_UINT32 Value marking end of ZET_METRIC_PROGRAMMABLE_EXP_VERSION_* ENUMs
)
// ZET_MAX_PROGRAMMABLE_METRICS_ELEMENT_NAME_EXP Maximum count of characters in export data element name
const ZET_MAX_PROGRAMMABLE_METRICS_ELEMENT_NAME_EXP = 256
// ZET_MAX_PROGRAMMABLE_METRICS_ELEMENT_DESCRIPTION_EXP Maximum export data element description string size
const ZET_MAX_PROGRAMMABLE_METRICS_ELEMENT_DESCRIPTION_EXP = 256
// ZET_MAX_METRIC_GROUP_NAME_PREFIX_EXP Maximum count of characters in metric group name prefix
const ZET_MAX_METRIC_GROUP_NAME_PREFIX_EXP = 64
// ZET_MAX_METRIC_PROGRAMMABLE_NAME_EXP Maximum metric programmable name string size
const ZET_MAX_METRIC_PROGRAMMABLE_NAME_EXP = 128
// ZET_MAX_METRIC_PROGRAMMABLE_DESCRIPTION_EXP Maximum metric programmable description string size
const ZET_MAX_METRIC_PROGRAMMABLE_DESCRIPTION_EXP = 128
// ZET_MAX_METRIC_PROGRAMMABLE_COMPONENT_EXP Maximum metric programmable component string size
const ZET_MAX_METRIC_PROGRAMMABLE_COMPONENT_EXP = 128
// ZET_MAX_METRIC_PROGRAMMABLE_PARAMETER_NAME_EXP Maximum metric programmable parameter string size
const ZET_MAX_METRIC_PROGRAMMABLE_PARAMETER_NAME_EXP = 128
// ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP Maximum value for programmable value description
const ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP = 128
// ZE_MAX_METRIC_GROUP_NAME_PREFIX Maximum value metric group name prefix
const ZE_MAX_METRIC_GROUP_NAME_PREFIX = 64
// ZetMetricProgrammableExpHandle (zet_metric_programmable_exp_handle_t) Handle of metric programmable's object
type ZetMetricProgrammableExpHandle uintptr
// ZetMetricProgrammableExpProperties (zet_metric_programmable_exp_properties_t) Metric Programmable properties queried using
// / ::zetMetricProgrammableGetPropertiesExp
type ZetMetricProgrammableExpProperties struct {
Stype ZetStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Name [ZET_MAX_METRIC_PROGRAMMABLE_NAME_EXP]byte // Name [out] metric programmable name
Description [ZET_MAX_METRIC_PROGRAMMABLE_DESCRIPTION_EXP]byte // Description [out] metric programmable description
Component [ZET_MAX_METRIC_PROGRAMMABLE_COMPONENT_EXP]byte // Component [out] metric programmable component
Tiernumber uint32 // Tiernumber [out] tier number
Domain uint32 // Domain [out] metric domain number.
Parametercount uint32 // Parametercount [out] number of parameters in the programmable
Samplingtype ZetMetricGroupSamplingTypeFlags // Samplingtype [out] metric sampling type. returns a combination of ::zet_metric_group_sampling_type_flag_t.
Sourceid uint32 // Sourceid [out] unique metric source identifier(within platform)to identify the HW block where the metric is collected.
}
// ZetMetricProgrammableParamTypeExp (zet_metric_programmable_param_type_exp_t) Metric Programmable Parameter types
type ZetMetricProgrammableParamTypeExp uintptr
const (
ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_DISAGGREGATION ZetMetricProgrammableParamTypeExp = 0 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_DISAGGREGATION Metric is disaggregated.
ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_LATENCY ZetMetricProgrammableParamTypeExp = 1 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_LATENCY Metric for latency measurement.
ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_UTILIZATION ZetMetricProgrammableParamTypeExp = 2 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_UTILIZATION Produces normalization in percent using raw_metric * 100 / cycles / HW
///< instance_count.
ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_AVERAGE ZetMetricProgrammableParamTypeExp = 3 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_AVERAGE Produces normalization using raw_metric / HW instance_count.
ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_RATE ZetMetricProgrammableParamTypeExp = 4 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_RATE Produces normalization average using raw_metric / timestamp.
ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_BYTES ZetMetricProgrammableParamTypeExp = 5 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_NORMALIZATION_BYTES Produces normalization average using raw_metric * n bytes.
ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_GENERIC ZetMetricProgrammableParamTypeExp = 6 // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_GENERIC Generic Parameter type. Please refer the parameter's description.
ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_FORCE_UINT32 ZetMetricProgrammableParamTypeExp = 0x7fffffff // ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_FORCE_UINT32 Value marking end of ZET_METRIC_PROGRAMMABLE_PARAM_TYPE_EXP_* ENUMs
)
// ZetValueInfoTypeExp (zet_value_info_type_exp_t) Supported value info types
type ZetValueInfoTypeExp uintptr
const (
ZET_VALUE_INFO_TYPE_EXP_UINT32 ZetValueInfoTypeExp = 0 // ZET_VALUE_INFO_TYPE_EXP_UINT32 32-bit unsigned-integer
ZET_VALUE_INFO_TYPE_EXP_UINT64 ZetValueInfoTypeExp = 1 // ZET_VALUE_INFO_TYPE_EXP_UINT64 64-bit unsigned-integer
ZET_VALUE_INFO_TYPE_EXP_FLOAT32 ZetValueInfoTypeExp = 2 // ZET_VALUE_INFO_TYPE_EXP_FLOAT32 32-bit floating-point
ZET_VALUE_INFO_TYPE_EXP_FLOAT64 ZetValueInfoTypeExp = 3 // ZET_VALUE_INFO_TYPE_EXP_FLOAT64 64-bit floating-point
ZET_VALUE_INFO_TYPE_EXP_BOOL8 ZetValueInfoTypeExp = 4 // ZET_VALUE_INFO_TYPE_EXP_BOOL8 8-bit boolean
ZET_VALUE_INFO_TYPE_EXP_UINT8 ZetValueInfoTypeExp = 5 // ZET_VALUE_INFO_TYPE_EXP_UINT8 8-bit unsigned-integer
ZET_VALUE_INFO_TYPE_EXP_UINT16 ZetValueInfoTypeExp = 6 // ZET_VALUE_INFO_TYPE_EXP_UINT16 16-bit unsigned-integer
ZET_VALUE_INFO_TYPE_EXP_UINT64_RANGE ZetValueInfoTypeExp = 7 // ZET_VALUE_INFO_TYPE_EXP_UINT64_RANGE 64-bit unsigned-integer range (minimum and maximum)
ZET_VALUE_INFO_TYPE_EXP_FLOAT64_RANGE ZetValueInfoTypeExp = 8 // ZET_VALUE_INFO_TYPE_EXP_FLOAT64_RANGE 64-bit floating point range (minimum and maximum)
ZET_VALUE_INFO_TYPE_EXP_FORCE_UINT32 ZetValueInfoTypeExp = 0x7fffffff // ZET_VALUE_INFO_TYPE_EXP_FORCE_UINT32 Value marking end of ZET_VALUE_INFO_TYPE_EXP_* ENUMs
)
// ZetValueUint64RangeExp (zet_value_uint64_range_exp_t) Value info of type uint64_t range
type ZetValueUint64RangeExp struct {
Ui64min uint64 // Ui64min [out] minimum value of the range
Ui64max uint64 // Ui64max [out] maximum value of the range
}
// ZetValueFp64RangeExp (zet_value_fp64_range_exp_t) Value info of type float64 range
type ZetValueFp64RangeExp struct {
Fp64min float64 // Fp64min [out] minimum value of the range
Fp64max float64 // Fp64max [out] maximum value of the range
}
// ZetValueInfoExp (zet_value_info_exp_t) Union of value information
type ZetValueInfoExp [16]byte
// ZetMetricProgrammableParamInfoExp (zet_metric_programmable_param_info_exp_t) Metric Programmable parameter information
type ZetMetricProgrammableParamInfoExp struct {
Stype ZetStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Type ZetMetricProgrammableParamTypeExp // Type [out] programmable parameter type
Name [ZET_MAX_METRIC_PROGRAMMABLE_PARAMETER_NAME_EXP]byte // Name [out] metric programmable parameter name
Valueinfotype ZetValueInfoTypeExp // Valueinfotype [out] value info type
Defaultvalue ZetValue // Defaultvalue [out] default value for the parameter
Valueinfocount uint32 // Valueinfocount [out] count of ::zet_metric_programmable_param_value_info_exp_t
}
// ZetMetricProgrammableParamValueInfoExp (zet_metric_programmable_param_value_info_exp_t) Metric Programmable parameter value information
type ZetMetricProgrammableParamValueInfoExp struct {
Stype ZetStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Valueinfo ZetValueInfoExp // Valueinfo [out] information about the parameter value
Description [ZET_MAX_METRIC_PROGRAMMABLE_VALUE_DESCRIPTION_EXP]byte // Description [out] description about the value
}
// ZetMetricProgrammableParamValueExp (zet_metric_programmable_param_value_exp_t) Metric Programmable parameter value
type ZetMetricProgrammableParamValueExp struct {
Value ZetValue // Value [in] parameter value
}
// ZetMetricProgrammableGetExp Query and get the available metric programmable handles.
// /
// / @details
// / - Query the available programmable handles using *pCount = 0.
// / - Returns all programmable metric handles available in the device.
// / - The application may call this function from simultaneous threads.
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hDevice`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == pCount`
func ZetMetricProgrammableGetExp(
hDevice ZetDeviceHandle, // hDevice [in] handle of the device
pCount *uint32, // pCount [in,out] pointer to the number of metric programmable handles. if count is zero, then the driver shall update the value with the total number of metric programmable handles available. if count is greater than the number of metric programmable handles available, then the driver shall update the value with the correct number of metric programmable handles available.
phMetricProgrammables *ZetMetricProgrammableExpHandle, // phMetricProgrammables [in,out][optional][range(0, *pCount)] array of handle of metric programmables. if count is less than the number of metric programmables available, then driver shall only retrieve that number of metric programmables.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricProgrammableGetExp", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phMetricProgrammables)))
}
// ZetMetricProgrammableGetPropertiesExp Get the properties of the metric programmable.
// /
// / @details
// / - Returns the properties of the metric programmable.
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hMetricProgrammable`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == pProperties`
func ZetMetricProgrammableGetPropertiesExp(
hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable
pProperties *ZetMetricProgrammableExpProperties, // pProperties [in,out] properties of the metric programmable
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricProgrammableGetPropertiesExp", uintptr(hMetricProgrammable), uintptr(unsafe.Pointer(pProperties)))
}
// ZetMetricProgrammableGetParamInfoExp Get the information about the parameters of the metric programmable.
// /
// / @details
// / - Returns information about the parameters of the metric programmable
// / handle.
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hMetricProgrammable`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == pParameterCount`
// / + `nullptr == pParameterInfo`
func ZetMetricProgrammableGetParamInfoExp(
hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable
pParameterCount *uint32, // pParameterCount [in,out] count of the parameters to retrieve parameter info. if value pParameterCount is greater than count of parameters available, then pParameterCount will be updated with count of parameters available. The count of parameters available can be queried using ::zetMetricProgrammableGetPropertiesExp.
pParameterInfo *ZetMetricProgrammableParamInfoExp, // pParameterInfo [in,out][range(1, *pParameterCount)] array of parameter info. if parameterCount is less than the number of parameters available, then driver shall only retrieve that number of parameter info.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricProgrammableGetParamInfoExp", uintptr(hMetricProgrammable), uintptr(unsafe.Pointer(pParameterCount)), uintptr(unsafe.Pointer(pParameterInfo)))
}
// ZetMetricProgrammableGetParamValueInfoExp Get the information about the parameter value of the metric
// / programmable.
// /
// / @details
// / - Returns the value-information about the parameter at the specific
// / ordinal of the metric programmable handle.
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hMetricProgrammable`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == pValueInfoCount`
// / + `nullptr == pValueInfo`
func ZetMetricProgrammableGetParamValueInfoExp(
hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable
parameterOrdinal uint32, // parameterOrdinal [in] ordinal of the parameter in the metric programmable
pValueInfoCount *uint32, // pValueInfoCount [in,out] count of parameter value information to retrieve. if value at pValueInfoCount is greater than count of value info available, then pValueInfoCount will be updated with count of value info available. The count of parameter value info available can be queried using ::zetMetricProgrammableGetParamInfoExp.
pValueInfo *ZetMetricProgrammableParamValueInfoExp, // pValueInfo [in,out][range(1, *pValueInfoCount)] array of parameter value info. if pValueInfoCount is less than the number of value info available, then driver shall only retrieve that number of value info.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricProgrammableGetParamValueInfoExp", uintptr(hMetricProgrammable), uintptr(parameterOrdinal), uintptr(unsafe.Pointer(pValueInfoCount)), uintptr(unsafe.Pointer(pValueInfo)))
}
// ZetMetricCreateFromProgrammableExp2 Create metric handles by applying parameter values on the metric
// / programmable handle.
// /
// / @details
// / - Multiple parameter values could be used to prepare a metric.
// / - If parameterCount = 0, the default value of the metric programmable
// / would be used for all parameters.
// / - The implementation can post-fix a C string to the metric name and
// / description, based on the parameter values chosen.
// / - ::zetMetricProgrammableGetParamInfoExp() returns a list of parameters
// / in a defined order.
// / - Therefore, the list of values passed in to the API should respect the
// / same order such that the desired parameter is set with expected value
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hMetricProgrammable`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == pParameterValues`
// / + `nullptr == pName`
// / + `nullptr == pDescription`
// / + `nullptr == pMetricHandleCount`
func ZetMetricCreateFromProgrammableExp2(
hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable
parameterCount uint32, // parameterCount [in] Count of parameters to set.
pParameterValues *ZetMetricProgrammableParamValueExp, // pParameterValues [in] list of parameter values to be set.
pName *byte, // pName [in] pointer to metric name to be used. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_NAME.
pDescription *byte, // pDescription [in] pointer to metric description to be used. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_DESCRIPTION.
pMetricHandleCount *uint32, // pMetricHandleCount [in,out] Pointer to the number of metric handles. if count is zero, then the driver shall update the value with the number of metric handles available for this programmable. if count is greater than the number of metric handles available, then the driver shall update the value with the correct number of metric handles available.
phMetricHandles *ZetMetricHandle, // phMetricHandles [in,out][optional][range(0,*pMetricHandleCount)] array of handle of metrics. if count is less than the number of metrics available, then driver shall only retrieve that number of metric handles.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricCreateFromProgrammableExp2", uintptr(hMetricProgrammable), uintptr(parameterCount), uintptr(unsafe.Pointer(pParameterValues)), uintptr(unsafe.Pointer(pName)), uintptr(unsafe.Pointer(pDescription)), uintptr(unsafe.Pointer(pMetricHandleCount)), uintptr(unsafe.Pointer(phMetricHandles)))
}
// ZetMetricCreateFromProgrammableExp Create metric handles by applying parameter values on the metric
// / programmable handle.
// /
// / @details
// / - This API is deprecated. Please use
// / ::zetMetricCreateFromProgrammableExp2()
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hMetricProgrammable`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == pParameterValues`
// / + `nullptr == pName`
// / + `nullptr == pDescription`
// / + `nullptr == pMetricHandleCount`
func ZetMetricCreateFromProgrammableExp(
hMetricProgrammable ZetMetricProgrammableExpHandle, // hMetricProgrammable [in] handle of the metric programmable
pParameterValues *ZetMetricProgrammableParamValueExp, // pParameterValues [in] list of parameter values to be set.
parameterCount uint32, // parameterCount [in] Count of parameters to set.
pName *byte, // pName [in] pointer to metric name to be used. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_NAME.
pDescription *byte, // pDescription [in] pointer to metric description to be used. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_DESCRIPTION.
pMetricHandleCount *uint32, // pMetricHandleCount [in,out] Pointer to the number of metric handles. if count is zero, then the driver shall update the value with the number of metric handles available for this programmable. if count is greater than the number of metric handles available, then the driver shall update the value with the correct number of metric handles available.
phMetricHandles *ZetMetricHandle, // phMetricHandles [in,out][optional][range(0,*pMetricHandleCount)] array of handle of metrics. if count is less than the number of metrics available, then driver shall only retrieve that number of metric handles.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricCreateFromProgrammableExp", uintptr(hMetricProgrammable), uintptr(unsafe.Pointer(pParameterValues)), uintptr(parameterCount), uintptr(unsafe.Pointer(pName)), uintptr(unsafe.Pointer(pDescription)), uintptr(unsafe.Pointer(pMetricHandleCount)), uintptr(unsafe.Pointer(phMetricHandles)))
}
// ZetDeviceCreateMetricGroupsFromMetricsExp Create multiple metric group handles from metric handles.
// /
// / @details
// / - Creates multiple metric groups from metrics which were created using
// / ::zetMetricCreateFromProgrammableExp2().
// / - Metrics whose Hardware resources do not overlap are added to same
// / metric group.
// / - The metric groups created using this API are managed by the
// / application and cannot be retrieved using ::zetMetricGroupGet().
// / - The created metric groups are ready for activation and collection.
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hDevice`
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / + metricGroupCount is lesser than the number of metric group handles that could be created.
func ZetDeviceCreateMetricGroupsFromMetricsExp(
hDevice ZetDeviceHandle, // hDevice [in] handle of the device.
metricCount uint32, // metricCount [in] number of metric handles.
phMetrics *ZetMetricHandle, // phMetrics [in] metric handles to be added to the metric groups.
pMetricGroupNamePrefix *byte, // pMetricGroupNamePrefix [in] prefix to the name created for the metric groups. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_GROUP_NAME_PREFIX_EXP.
pDescription *byte, // pDescription [in] pointer to description of the metric groups. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_GROUP_DESCRIPTION.
pMetricGroupCount *uint32, // pMetricGroupCount [in,out] pointer to the number of metric group handles to be created. if pMetricGroupCount is zero, then the driver shall update the value with the maximum possible number of metric group handles that could be created. if pMetricGroupCount is greater than the number of metric group handles that could be created, then the driver shall update the value with the correct number of metric group handles generated. if pMetricGroupCount is lesser than the number of metric group handles that could be created, then ::ZE_RESULT_ERROR_INVALID_ARGUMENT is returned.
phMetricGroup *ZetMetricGroupHandle, // phMetricGroup [in,out][optional][range(0, *pMetricGroupCount)] array of handle of metric group handles. Created Metric group handles.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetDeviceCreateMetricGroupsFromMetricsExp", uintptr(hDevice), uintptr(metricCount), uintptr(unsafe.Pointer(phMetrics)), uintptr(unsafe.Pointer(pMetricGroupNamePrefix)), uintptr(unsafe.Pointer(pDescription)), uintptr(unsafe.Pointer(pMetricGroupCount)), uintptr(unsafe.Pointer(phMetricGroup)))
}
// ZetMetricGroupCreateExp Create metric group handle.
// /
// / @details
// / - This API is deprecated. Please use
// / ::zetDeviceCreateMetricGroupsFromMetricsExp
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hDevice`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == pName`
// / + `nullptr == pDescription`
// / + `nullptr == phMetricGroup`
// / - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
// / + `0x7 < samplingType`
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZetMetricGroupCreateExp(
hDevice ZetDeviceHandle, // hDevice [in] handle of the device
pName *byte, // pName [in] pointer to metric group name. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_GROUP_NAME.
pDescription *byte, // pDescription [in] pointer to metric group description. Must point to a null-terminated character array no longer than ::ZET_MAX_METRIC_GROUP_DESCRIPTION.
samplingType ZetMetricGroupSamplingTypeFlags, // samplingType [in] Sampling type for the metric group.
phMetricGroup *ZetMetricGroupHandle, // phMetricGroup [in,out] Created Metric group handle
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricGroupCreateExp", uintptr(hDevice), uintptr(unsafe.Pointer(pName)), uintptr(unsafe.Pointer(pDescription)), uintptr(samplingType), uintptr(unsafe.Pointer(phMetricGroup)))
}
// ZetMetricGroupAddMetricExp Add a metric handle to the metric group handle created using
// / ::zetDeviceCreateMetricGroupsFromMetricsExp.
// /
// / @details
// / - Reasons for failing to add the metric could be queried using
// / pErrorString
// / - Multiple additions of same metric would add the metric only once to
// / the hMetricGroup
// / - Metric handles from multiple domains may be used in a single metric
// / group.
// / - Metric handles from different sourceIds (refer
// / ::zet_metric_programmable_exp_properties_t) are not allowed in a
// / single metric group.
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hMetricGroup`
// / + `nullptr == hMetric`
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / + If a Metric handle from a pre-defined metric group is requested to be added.
// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
// / + If the metric group is currently activated.
func ZetMetricGroupAddMetricExp(
hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] Handle of the metric group
hMetric ZetMetricHandle, // hMetric [in] Metric to be added to the group.
pErrorStringSize *uintptr, // pErrorStringSize [in,out][optional] Size of the error string to query, if an error was reported during adding the metric handle. if *pErrorStringSize is zero, then the driver shall update the value with the size of the error string in bytes.
pErrorString *byte, // pErrorString [in,out][optional][range(0, *pErrorStringSize)] Error string. if *pErrorStringSize is less than the length of the error string available, then driver shall only retrieve that length of error string.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricGroupAddMetricExp", uintptr(hMetricGroup), uintptr(hMetric), uintptr(unsafe.Pointer(pErrorStringSize)), uintptr(unsafe.Pointer(pErrorString)))
}
// ZetMetricGroupRemoveMetricExp Remove a metric from the metric group handle created using
// / ::zetDeviceCreateMetricGroupsFromMetricsExp.
// /
// / @details
// / - Remove an already added metric handle from the metric group.
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hMetricGroup`
// / + `nullptr == hMetric`
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / + If trying to remove a metric not previously added to the metric group
// / + If the input metric group is a pre-defined metric group
// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
// / + If the metric group is currently activated
func ZetMetricGroupRemoveMetricExp(
hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] Handle of the metric group
hMetric ZetMetricHandle, // hMetric [in] Metric handle to be removed from the metric group.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricGroupRemoveMetricExp", uintptr(hMetricGroup), uintptr(hMetric))
}
// ZetMetricGroupCloseExp Closes a created metric group using
// / ::zetDeviceCreateMetricGroupsFromMetricsExp, so that it can be
// / activated.
// /
// / @details
// / - Finalizes the ::zetMetricGroupAddMetricExp and
// / ::zetMetricGroupRemoveMetricExp operations on the metric group.
// / - This is a necessary step before activation of the created metric
// / group.
// / - Add / Remove of metrics is possible after ::zetMetricGroupCloseExp.
// / However, a call to ::zetMetricGroupCloseExp is necessary after
// / modifying the metric group.
// / - Implementations could choose to add new metrics to the group during
// / ::zetMetricGroupCloseExp, which are related and might add value to the
// / metrics already added by the application
// / - Applications can query the list of metrics in the metric group using
// / ::zetMetricGet
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hMetricGroup`
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / + If the input metric group is a pre-defined metric group
// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
// / + If the metric group is currently activated
func ZetMetricGroupCloseExp(
hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] Handle of the metric group
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricGroupCloseExp", uintptr(hMetricGroup))
}
// ZetMetricGroupDestroyExp Destroy a metric group created using
// / ::zetDeviceCreateMetricGroupsFromMetricsExp.
// /
// / @details
// / - Metric handles created using ::zetMetricCreateFromProgrammableExp2 and
// / are part of the metricGroup are not destroyed.
// / - It is necessary to call ::zetMetricDestroyExp for each of the metric
// / handles (created from ::zetMetricCreateFromProgrammableExp2) to
// / destroy them.
// / - It is not necessary to remove the metrics in the metricGroup before
// / destroying it.
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hMetricGroup`
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / + If trying to destroy a pre-defined metric group
// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
// / + If trying to destroy an activated metric group
func ZetMetricGroupDestroyExp(
hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] Handle of the metric group to destroy
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricGroupDestroyExp", uintptr(hMetricGroup))
}
// ZetMetricDestroyExp Destroy a metric created using ::zetMetricCreateFromProgrammableExp2.
// /
// / @details
// / - If a metric is added to a metric group, the metric has to be removed
// / using ::zetMetricGroupRemoveMetricExp before it can be destroyed.
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hMetric`
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / + If trying to destroy a metric from pre-defined metric group
// / - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
// / + If trying to destroy a metric currently added to a metric group
func ZetMetricDestroyExp(
hMetric ZetMetricHandle, // hMetric [in] Handle of the metric to destroy
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricDestroyExp", uintptr(hMetric))
}