Metric Query#
oneAPI Level Zero Specification - Version 1.18.31
Metric Query Functions#
zetMetricQueryCreate#
Added in version 1.0
-
ZE_APIEXPORT ze_result_t ZE_APICALL zetMetricQueryCreate(zet_metric_query_pool_handle_t hMetricQueryPool, uint32_t index, zet_metric_query_handle_t *phMetricQuery)#
Creates metric query from the pool.
The application may call this function from simultaneous threads.
The implementation of this function must be thread-safe.
- Parameters:
hMetricQueryPool – [in] handle of the metric query pool
index – [in] index of the query within the pool
phMetricQuery – [out] handle of metric query
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hMetricQueryPool
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == phMetricQuery
zetMetricQueryDestroy#
Added in version 1.0
-
ZE_APIEXPORT ze_result_t ZE_APICALL zetMetricQueryDestroy(zet_metric_query_handle_t hMetricQuery)#
Deletes a metric query object.
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.
- Parameters:
hMetricQuery – [in][release] handle of metric query
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hMetricQuery
zetMetricQueryReset#
Added in version 1.0
-
ZE_APIEXPORT ze_result_t ZE_APICALL zetMetricQueryReset(zet_metric_query_handle_t hMetricQuery)#
Resets a metric query object back to initial state.
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.
- Parameters:
hMetricQuery – [in] handle of metric query
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hMetricQuery
zetMetricQueryGetData#
Added in version 1.0
-
ZE_APIEXPORT ze_result_t ZE_APICALL zetMetricQueryGetData(zet_metric_query_handle_t hMetricQuery, size_t *pRawDataSize, uint8_t *pRawData)#
Retrieves raw data for a given metric query.
The application may call this function from simultaneous threads.
- Parameters:
hMetricQuery – [in] handle of the metric query
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 – [in,out][optional][range(0, *pRawDataSize)] buffer containing query reports in raw format
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hMetricQuery
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == pRawDataSize