1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-05 00:10:24 +08:00
Files
gozel/tols_metric.go
2026-03-25 23:25:56 +08:00

803 lines
40 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"
)
// ZetMetricGroupGet Retrieves metric group for a device.
///
/// @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 == hDevice`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pCount`
func ZetMetricGroupGet(
hDevice ZetDeviceHandle, // hDevice [in] handle of the device
pCount *uint32, // pCount [in,out] pointer to the number of metric groups. if count is zero, then the driver shall update the value with the total number of metric groups available. if count is greater than the number of metric groups available, then the driver shall update the value with the correct number of metric groups available.
phMetricGroups *ZetMetricGroupHandle, // phMetricGroups [in,out][optional][range(0, *pCount)] array of handle of metric groups. if count is less than the number of metric groups available, then driver shall only retrieve that number of metric groups.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricGroupGet", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phMetricGroups)))
}
// ZET_MAX_METRIC_GROUP_NAME Maximum metric group name string size
const ZET_MAX_METRIC_GROUP_NAME = 256
// ZET_MAX_METRIC_GROUP_DESCRIPTION Maximum metric group description string size
const ZET_MAX_METRIC_GROUP_DESCRIPTION = 256
// ZetMetricGroupSamplingTypeFlags (zet_metric_group_sampling_type_flags_t) Metric group sampling type
type ZetMetricGroupSamplingTypeFlags uint32
const (
ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EVENT_BASED ZetMetricGroupSamplingTypeFlags = /* ZE_BIT(0) */(( 1 << 0 )) // ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EVENT_BASED Event based sampling
ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_TIME_BASED ZetMetricGroupSamplingTypeFlags = /* ZE_BIT(1) */(( 1 << 1 )) // ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_TIME_BASED Time based sampling
ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EXP_TRACER_BASED ZetMetricGroupSamplingTypeFlags = /* ZE_BIT(2) */(( 1 << 2 )) // ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_EXP_TRACER_BASED Experimental Tracer based sampling
ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_FORCE_UINT32 ZetMetricGroupSamplingTypeFlags = 0x7fffffff // ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_FORCE_UINT32 Value marking end of ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_* ENUMs
)
// ZetMetricGroupProperties (zet_metric_group_properties_t) Metric group properties queried using ::zetMetricGroupGetProperties
type ZetMetricGroupProperties 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_GROUP_NAME]byte // Name [out] metric group name
Description [ZET_MAX_METRIC_GROUP_DESCRIPTION]byte // Description [out] metric group description
Samplingtype ZetMetricGroupSamplingTypeFlags // Samplingtype [out] metric group sampling type. returns a combination of ::zet_metric_group_sampling_type_flag_t.
Domain uint32 // Domain [out] metric group domain number. Cannot use multiple, simultaneous metric groups from the same domain.
Metriccount uint32 // Metriccount [out] metric count belonging to this group
}
// ZetMetricGroupGetProperties Retrieves attributes of a metric group.
///
/// @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 == hMetricGroup`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pProperties`
func ZetMetricGroupGetProperties(
hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group
pProperties *ZetMetricGroupProperties, // pProperties [in,out] metric group properties
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricGroupGetProperties", uintptr(hMetricGroup), uintptr(unsafe.Pointer(pProperties)))
}
// ZetMetricType (zet_metric_type_t) Metric types
type ZetMetricType uintptr
const (
ZET_METRIC_TYPE_DURATION ZetMetricType = 0 // ZET_METRIC_TYPE_DURATION Metric type: duration
ZET_METRIC_TYPE_EVENT ZetMetricType = 1 // ZET_METRIC_TYPE_EVENT Metric type: event
ZET_METRIC_TYPE_EVENT_WITH_RANGE ZetMetricType = 2 // ZET_METRIC_TYPE_EVENT_WITH_RANGE Metric type: event with range
ZET_METRIC_TYPE_THROUGHPUT ZetMetricType = 3 // ZET_METRIC_TYPE_THROUGHPUT Metric type: throughput
ZET_METRIC_TYPE_TIMESTAMP ZetMetricType = 4 // ZET_METRIC_TYPE_TIMESTAMP Metric type: timestamp
ZET_METRIC_TYPE_FLAG ZetMetricType = 5 // ZET_METRIC_TYPE_FLAG Metric type: flag
ZET_METRIC_TYPE_RATIO ZetMetricType = 6 // ZET_METRIC_TYPE_RATIO Metric type: ratio
ZET_METRIC_TYPE_RAW ZetMetricType = 7 // ZET_METRIC_TYPE_RAW Metric type: raw
ZET_METRIC_TYPE_EVENT_EXP_TIMESTAMP ZetMetricType = 0x7ffffff9 // ZET_METRIC_TYPE_EVENT_EXP_TIMESTAMP Metric type: event with only timestamp and value has no meaning
ZET_METRIC_TYPE_EVENT_EXP_START ZetMetricType = 0x7ffffffa // ZET_METRIC_TYPE_EVENT_EXP_START Metric type: the first event of a start/end event pair
ZET_METRIC_TYPE_EVENT_EXP_END ZetMetricType = 0x7ffffffb // ZET_METRIC_TYPE_EVENT_EXP_END Metric type: the second event of a start/end event pair
ZET_METRIC_TYPE_EVENT_EXP_MONOTONIC_WRAPS_VALUE ZetMetricType = 0x7ffffffc // ZET_METRIC_TYPE_EVENT_EXP_MONOTONIC_WRAPS_VALUE Metric type: value of the event is a monotonically increasing value
///< that can wrap around
ZET_METRIC_TYPE_EXP_EXPORT_DMA_BUF ZetMetricType = 0x7ffffffd // ZET_METRIC_TYPE_EXP_EXPORT_DMA_BUF Metric which exports linux dma_buf, which could be imported/mapped to
///< the host process
ZET_METRIC_TYPE_IP_EXP ZetMetricType = 0x7ffffffe // ZET_METRIC_TYPE_IP_EXP Metric type: instruction pointer. Deprecated, use
///< ::ZET_METRIC_TYPE_IP.
ZET_METRIC_TYPE_IP ZetMetricType = 0x7ffffffe // ZET_METRIC_TYPE_IP Metric type: instruction pointer
ZET_METRIC_TYPE_FORCE_UINT32 ZetMetricType = 0x7fffffff // ZET_METRIC_TYPE_FORCE_UINT32 Value marking end of ZET_METRIC_TYPE_* ENUMs
)
// ZetMetricGroupCalculationType (zet_metric_group_calculation_type_t) Metric group calculation type
type ZetMetricGroupCalculationType uintptr
const (
ZET_METRIC_GROUP_CALCULATION_TYPE_METRIC_VALUES ZetMetricGroupCalculationType = 0 // ZET_METRIC_GROUP_CALCULATION_TYPE_METRIC_VALUES Calculated metric values from raw data.
ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES ZetMetricGroupCalculationType = 1 // ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES Maximum metric values.
ZET_METRIC_GROUP_CALCULATION_TYPE_FORCE_UINT32 ZetMetricGroupCalculationType = 0x7fffffff // ZET_METRIC_GROUP_CALCULATION_TYPE_FORCE_UINT32 Value marking end of ZET_METRIC_GROUP_CALCULATION_TYPE_* ENUMs
)
// ZetMetricGroupCalculateMetricValues Calculates metric values from raw data.
///
/// @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 == hMetricGroup`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `::ZET_METRIC_GROUP_CALCULATION_TYPE_MAX_METRIC_VALUES < type`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pRawData`
/// + `nullptr == pMetricValueCount`
func ZetMetricGroupCalculateMetricValues(
hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group
typ ZetMetricGroupCalculationType, // typ [in] calculation type to be applied on raw data
rawDataSize uintptr, // rawDataSize [in] size in bytes of raw data buffer
pRawData *uint8, // pRawData [in][range(0, rawDataSize)] buffer of raw data to calculate
pMetricValueCount *uint32, // pMetricValueCount [in,out] pointer to number of metric values calculated. if count is zero, then the driver shall update the value with the total number of metric values to be calculated. if count is greater than the number available in the raw data buffer, then the driver shall update the value with the actual number of metric values to be calculated.
pMetricValues *ZetTypedValue, // pMetricValues [in,out][optional][range(0, *pMetricValueCount)] buffer of calculated metrics. if count is less than the number available in the raw data buffer, then driver shall only calculate that number of metric values.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricGroupCalculateMetricValues", uintptr(hMetricGroup), uintptr(typ), uintptr(rawDataSize), uintptr(unsafe.Pointer(pRawData)), uintptr(unsafe.Pointer(pMetricValueCount)), uintptr(unsafe.Pointer(pMetricValues)))
}
// ZetMetricGet Retrieves metric from a metric group.
///
/// @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 == hMetricGroup`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pCount`
func ZetMetricGet(
hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group
pCount *uint32, // pCount [in,out] pointer to the number of metrics. if count is zero, then the driver shall update the value with the total number of metrics available. if count is greater than the number of metrics available, then the driver shall update the value with the correct number of metrics available.
phMetrics *ZetMetricHandle, // phMetrics [in,out][optional][range(0, *pCount)] array of handle of metrics. if count is less than the number of metrics available, then driver shall only retrieve that number of metrics.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricGet", uintptr(hMetricGroup), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phMetrics)))
}
// ZET_MAX_METRIC_NAME Maximum metric name string size
const ZET_MAX_METRIC_NAME = 256
// ZET_MAX_METRIC_DESCRIPTION Maximum metric description string size
const ZET_MAX_METRIC_DESCRIPTION = 256
// ZET_MAX_METRIC_COMPONENT Maximum metric component string size
const ZET_MAX_METRIC_COMPONENT = 256
// ZET_MAX_METRIC_RESULT_UNITS Maximum metric result units string size
const ZET_MAX_METRIC_RESULT_UNITS = 256
// ZetMetricProperties (zet_metric_properties_t) Metric properties queried using ::zetMetricGetProperties
type ZetMetricProperties 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_NAME]byte // Name [out] metric name
Description [ZET_MAX_METRIC_DESCRIPTION]byte // Description [out] metric description
Component [ZET_MAX_METRIC_COMPONENT]byte // Component [out] metric component
Tiernumber uint32 // Tiernumber [out] number of tier
Metrictype ZetMetricType // Metrictype [out] metric type
Resulttype ZetValueType // Resulttype [out] metric result type
Resultunits [ZET_MAX_METRIC_RESULT_UNITS]byte // Resultunits [out] metric result units
}
// ZetMetricGetProperties Retrieves attributes of a metric.
///
/// @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 == hMetric`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pProperties`
func ZetMetricGetProperties(
hMetric ZetMetricHandle, // hMetric [in] handle of the metric
pProperties *ZetMetricProperties, // pProperties [in,out] metric properties
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricGetProperties", uintptr(hMetric), uintptr(unsafe.Pointer(pProperties)))
}
// ZetContextActivateMetricGroups Activates metric groups.
///
/// @details
/// - Immediately reconfigures the device to activate only those metric
/// groups provided.
/// - Any metric groups previously activated but not provided will be
/// deactivated.
/// - Deactivating metric groups that are still in-use will result in
/// undefined behavior.
/// - All metric groups must have different domains, see
/// ::zet_metric_group_properties_t.
/// - The application must **not** call this function from simultaneous
/// threads with the same device 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_UNSUPPORTED_FEATURE
/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE
/// - ::ZE_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_SIZE
/// + `(nullptr == phMetricGroups) && (0 < count)`
/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
/// + Multiple metric groups share the same domain
func ZetContextActivateMetricGroups(
hContext ZetContextHandle, // hContext [in] handle of the context object
hDevice ZetDeviceHandle, // hDevice [in] handle of the device
count uint32, // count [in] metric group count to activate; must be 0 if `nullptr == phMetricGroups`
phMetricGroups *ZetMetricGroupHandle, // phMetricGroups [in][optional][range(0, count)] handles of the metric groups to activate. nullptr deactivates all previously used metric groups. all metrics groups must come from a different domains. metric query and metric stream must use activated metric groups.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetContextActivateMetricGroups", uintptr(hContext), uintptr(hDevice), uintptr(count), uintptr(unsafe.Pointer(phMetricGroups)))
}
// ZetMetricStreamerDesc (zet_metric_streamer_desc_t) Metric streamer descriptor
type ZetMetricStreamerDesc 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).
Notifyeverynreports uint32 // Notifyeverynreports [in,out] number of collected reports after which notification event will be signaled. If the requested value is not supported exactly, then the driver may use a value that is the closest supported approximation and shall update this member during ::zetMetricStreamerOpen.
Samplingperiod uint32 // Samplingperiod [in,out] streamer sampling period in nanoseconds. If the requested value is not supported exactly, then the driver may use a value that is the closest supported approximation and shall update this member during ::zetMetricStreamerOpen.
}
// ZetMetricStreamerOpen Opens metric streamer for a device.
///
/// @details
/// - The notification event must have been created from an event pool that
/// was created using ::ZE_EVENT_POOL_FLAG_HOST_VISIBLE flag.
/// - The duration of the signal event created from an event pool that was
/// created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag is undefined.
/// However, for consistency and orthogonality the event will report
/// correctly as signaled when used by other event API functionality.
/// - The application must **not** call this function from simultaneous
/// threads with the same device 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 == hContext`
/// + `nullptr == hDevice`
/// + `nullptr == hMetricGroup`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == desc`
/// + `nullptr == phMetricStreamer`
/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
func ZetMetricStreamerOpen(
hContext ZetContextHandle, // hContext [in] handle of the context object
hDevice ZetDeviceHandle, // hDevice [in] handle of the device
hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group
desc *ZetMetricStreamerDesc, // desc [in,out] metric streamer descriptor
hNotificationEvent ZeEventHandle, // hNotificationEvent [in][optional] event used for report availability notification
phMetricStreamer *ZetMetricStreamerHandle, // phMetricStreamer [out] handle of metric streamer
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricStreamerOpen", uintptr(hContext), uintptr(hDevice), uintptr(hMetricGroup), uintptr(unsafe.Pointer(desc)), uintptr(hNotificationEvent), uintptr(unsafe.Pointer(phMetricStreamer)))
}
// ZetCommandListAppendMetricStreamerMarker Append metric streamer marker into a command list.
///
/// @details
/// - The application must ensure the metric streamer is accessible by the
/// device on which the command list was created.
/// - The application must ensure the command list and metric streamer were
/// created on the same context.
/// - The application must **not** call this function from simultaneous
/// threads with the same command list handle.
/// - Allow to associate metric stream time based metrics with executed
/// workload.
///
/// @returns
/// - ::ZE_RESULT_SUCCESS
/// - ::ZE_RESULT_ERROR_UNINITIALIZED
/// - ::ZE_RESULT_ERROR_DEVICE_LOST
/// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
/// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
/// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
/// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
/// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
/// - ::ZE_RESULT_ERROR_NOT_AVAILABLE
/// - ::ZE_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 == hMetricStreamer`
func ZetCommandListAppendMetricStreamerMarker(
hCommandList ZetCommandListHandle, // hCommandList [in] handle of the command list
hMetricStreamer ZetMetricStreamerHandle, // hMetricStreamer [in] handle of the metric streamer
value uint32, // value [in] streamer marker value
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetCommandListAppendMetricStreamerMarker", uintptr(hCommandList), uintptr(hMetricStreamer), uintptr(value))
}
// ZetMetricStreamerClose Closes metric streamer.
///
/// @details
/// - The application must **not** call this function from simultaneous
/// threads with the same metric streamer 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 == hMetricStreamer`
func ZetMetricStreamerClose(
hMetricStreamer ZetMetricStreamerHandle, // hMetricStreamer [in][release] handle of the metric streamer
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricStreamerClose", uintptr(hMetricStreamer))
}
// ZetMetricStreamerReadData Reads data from metric streamer.
///
/// @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 == hMetricStreamer`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pRawDataSize`
/// - ::ZE_RESULT_WARNING_DROPPED_DATA
/// + Metric streamer data may have been dropped. Reduce sampling period.
func ZetMetricStreamerReadData(
hMetricStreamer ZetMetricStreamerHandle, // hMetricStreamer [in] handle of the metric streamer
maxReportCount uint32, // maxReportCount [in] the maximum number of reports the application wants to receive. if `UINT32_MAX`, then function will retrieve all reports available
pRawDataSize *uintptr, // pRawDataSize [in,out] pointer to size in bytes of raw data requested to read. if size is zero, then the driver will update the value with the total size in bytes needed for all reports available. if size is non-zero, then driver will only retrieve the number of reports that fit into the buffer. if size is larger than size needed for all reports, then driver will update the value with the actual size needed.
pRawData *uint8, // pRawData [in,out][optional][range(0, *pRawDataSize)] buffer containing streamer reports in raw format
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricStreamerReadData", uintptr(hMetricStreamer), uintptr(maxReportCount), uintptr(unsafe.Pointer(pRawDataSize)), uintptr(unsafe.Pointer(pRawData)))
}
// ZetMetricQueryPoolType (zet_metric_query_pool_type_t) Metric query pool types
type ZetMetricQueryPoolType uintptr
const (
ZET_METRIC_QUERY_POOL_TYPE_PERFORMANCE ZetMetricQueryPoolType = 0 // ZET_METRIC_QUERY_POOL_TYPE_PERFORMANCE Performance metric query pool.
ZET_METRIC_QUERY_POOL_TYPE_EXECUTION ZetMetricQueryPoolType = 1 // ZET_METRIC_QUERY_POOL_TYPE_EXECUTION Skips workload execution between begin/end calls.
ZET_METRIC_QUERY_POOL_TYPE_FORCE_UINT32 ZetMetricQueryPoolType = 0x7fffffff // ZET_METRIC_QUERY_POOL_TYPE_FORCE_UINT32 Value marking end of ZET_METRIC_QUERY_POOL_TYPE_* ENUMs
)
// ZetMetricQueryPoolDesc (zet_metric_query_pool_desc_t) Metric query pool description
type ZetMetricQueryPoolDesc 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).
Type ZetMetricQueryPoolType // Type [in] Query pool type.
Count uint32 // Count [in] Internal slots count within query pool object.
}
// ZetMetricQueryPoolCreate Creates a pool of metric queries on the context.
///
/// @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`
/// + `nullptr == hMetricGroup`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == desc`
/// + `nullptr == phMetricQueryPool`
/// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION
/// + `::ZET_METRIC_QUERY_POOL_TYPE_EXECUTION < desc->type`
/// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION
func ZetMetricQueryPoolCreate(
hContext ZetContextHandle, // hContext [in] handle of the context object
hDevice ZetDeviceHandle, // hDevice [in] handle of the device
hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] metric group associated with the query object.
desc *ZetMetricQueryPoolDesc, // desc [in] metric query pool descriptor
phMetricQueryPool *ZetMetricQueryPoolHandle, // phMetricQueryPool [out] handle of metric query pool
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricQueryPoolCreate", uintptr(hContext), uintptr(hDevice), uintptr(hMetricGroup), uintptr(unsafe.Pointer(desc)), uintptr(unsafe.Pointer(phMetricQueryPool)))
}
// ZetMetricQueryPoolDestroy Deletes a query pool object.
///
/// @details
/// - The application must destroy all query handles created from the pool
/// before destroying the pool itself.
/// - The application must ensure the device is not currently referencing
/// the any query within the pool before it is deleted.
/// - The application must **not** call this function from simultaneous
/// threads with the same query pool 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 == hMetricQueryPool`
/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
func ZetMetricQueryPoolDestroy(
hMetricQueryPool ZetMetricQueryPoolHandle, // hMetricQueryPool [in][release] handle of the metric query pool
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricQueryPoolDestroy", uintptr(hMetricQueryPool))
}
// ZetMetricQueryCreate Creates metric query from the pool.
///
/// @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 == hMetricQueryPool`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == phMetricQuery`
func ZetMetricQueryCreate(
hMetricQueryPool ZetMetricQueryPoolHandle, // hMetricQueryPool [in] handle of the metric query pool
index uint32, // index [in] index of the query within the pool
phMetricQuery *ZetMetricQueryHandle, // phMetricQuery [out] handle of metric query
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricQueryCreate", uintptr(hMetricQueryPool), uintptr(index), uintptr(unsafe.Pointer(phMetricQuery)))
}
// ZetMetricQueryDestroy Deletes a metric query object.
///
/// @details
/// - The application must ensure the device is not currently referencing
/// the query before it is deleted.
/// - The application must **not** call this function from simultaneous
/// threads with the same query 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 == hMetricQuery`
/// - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE
func ZetMetricQueryDestroy(
hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in][release] handle of metric query
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricQueryDestroy", uintptr(hMetricQuery))
}
// ZetMetricQueryReset Resets a metric query object back to initial state.
///
/// @details
/// - The application must ensure the device is not currently referencing
/// the query before it is reset
/// - The application must **not** call this function from simultaneous
/// threads with the same query 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 == hMetricQuery`
func ZetMetricQueryReset(
hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in] handle of metric query
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricQueryReset", uintptr(hMetricQuery))
}
// ZetCommandListAppendMetricQueryBegin Appends metric query begin into a command list.
///
/// @details
/// - The application must ensure the metric query is accessible by the
/// device on which the command list was created.
/// - The application must ensure the command list and metric query were
/// created on the same context.
/// - This command blocks all following commands from beginning until the
/// execution of the query completes.
/// - The application must **not** call this function from simultaneous
/// threads with the same command list 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 == hCommandList`
/// + `nullptr == hMetricQuery`
func ZetCommandListAppendMetricQueryBegin(
hCommandList ZetCommandListHandle, // hCommandList [in] handle of the command list
hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in] handle of the metric query
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetCommandListAppendMetricQueryBegin", uintptr(hCommandList), uintptr(hMetricQuery))
}
// ZetCommandListAppendMetricQueryEnd Appends metric query end into a command list.
///
/// @details
/// - The application must ensure the metric query and events are accessible
/// by the device on which the command list was created.
/// - The application must ensure the command list, events and metric query
/// were created on the same context.
/// - The duration of the signal event created from an event pool that was
/// created using ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag is undefined.
/// However, for consistency and orthogonality the event will report
/// correctly as signaled when used by other event API functionality.
/// - If numWaitEvents is zero, then all previous commands are completed
/// prior to the execution of the query.
/// - If numWaitEvents is non-zero, then all phWaitEvents must be signaled
/// prior to the execution of the query.
/// - This command blocks all following commands from beginning until the
/// execution of the query completes.
/// - The application must **not** call this function from simultaneous
/// threads with the same command list 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 == hCommandList`
/// + `nullptr == hMetricQuery`
/// - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT
/// - ::ZE_RESULT_ERROR_INVALID_SIZE
/// + `(nullptr == phWaitEvents) && (0 < numWaitEvents)`
func ZetCommandListAppendMetricQueryEnd(
hCommandList ZetCommandListHandle, // hCommandList [in] handle of the command list
hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in] handle of the metric query
hSignalEvent ZeEventHandle, // hSignalEvent [in][optional] handle of the event to signal on completion
numWaitEvents uint32, // numWaitEvents [in] must be zero
phWaitEvents *ZeEventHandle, // phWaitEvents [in][mbz] must be nullptr
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetCommandListAppendMetricQueryEnd", uintptr(hCommandList), uintptr(hMetricQuery), uintptr(hSignalEvent), uintptr(numWaitEvents), uintptr(unsafe.Pointer(phWaitEvents)))
}
// ZetCommandListAppendMetricMemoryBarrier Appends metric query commands to flush all caches.
///
/// @details
/// - The application must **not** call this function from simultaneous
/// threads with the same command list 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 == hCommandList`
func ZetCommandListAppendMetricMemoryBarrier(
hCommandList ZetCommandListHandle, // hCommandList [in] handle of the command list
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetCommandListAppendMetricMemoryBarrier", uintptr(hCommandList))
}
// ZetMetricQueryGetData Retrieves raw data for a given metric query.
///
/// @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 == hMetricQuery`
/// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
/// + `nullptr == pRawDataSize`
func ZetMetricQueryGetData(
hMetricQuery ZetMetricQueryHandle, // hMetricQuery [in] handle of the metric query
pRawDataSize *uintptr, // pRawDataSize [in,out] pointer to size in bytes of raw data requested to read. if size is zero, then the driver will update the value with the total size in bytes needed for all reports available. if size is non-zero, then driver will only retrieve the number of reports that fit into the buffer. if size is larger than size needed for all reports, then driver will update the value with the actual size needed.
pRawData *uint8, // pRawData [in,out][optional][range(0, *pRawDataSize)] buffer containing query reports in raw format
) (ZeResult, error) {
return zecall.Call[ZeResult]("zetMetricQueryGetData", uintptr(hMetricQuery), uintptr(unsafe.Pointer(pRawDataSize)), uintptr(unsafe.Pointer(pRawData)))
}