mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 16:48:45 +08:00
refactor: change type of stype member in L0 tools driver extensions
use uint32_t-alias type to avoid casting out of zet_structure_type_t enum range Related-To: NEO-12901 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d28fcdb55b
commit
ef4ed582fa
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
using ze_structure_type_ext_t = uint32_t;
|
||||
using zet_structure_type_ext_t = uint32_t;
|
||||
|
||||
#define ZE_STRUCTURE_TYPE_SYNCHRONIZED_DISPATCH_EXP_DESC static_cast<ze_structure_type_ext_t>(0x00020020)
|
||||
#define ZE_STRUCTURE_TYPE_INTEL_MEDIA_COMMUNICATION_DESC static_cast<ze_structure_type_ext_t>(0x00020021)
|
||||
@@ -32,8 +33,9 @@ using ze_structure_type_ext_t = uint32_t;
|
||||
#define ZEX_STRUCTURE_COUNTER_BASED_EVENT_EXTERNAL_STORAGE_ALLOC_PROPERTIES static_cast<ze_structure_type_ext_t>(0x00030027)
|
||||
|
||||
// Metric structure types
|
||||
#define ZET_INTEL_STRUCTURE_TYPE_METRIC_SOURCE_ID_EXP (zet_structure_type_t)0x0001000a // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
|
||||
#define ZET_INTEL_STRUCTURE_TYPE_METRIC_CALCULATE_DESC_EXP (zet_structure_type_t)0x00010009 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
|
||||
#define ZET_INTEL_STRUCTURE_TYPE_METRIC_GROUP_CALCULATE_EXP_PROPERTIES (zet_structure_type_t)0x00010008 // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange), NEO-12901
|
||||
#define ZET_INTEL_STRUCTURE_TYPE_METRIC_GROUP_CALCULATE_EXP_PROPERTIES static_cast<zet_structure_type_ext_t>(0x00010008)
|
||||
#define ZET_INTEL_STRUCTURE_TYPE_METRIC_CALCULATE_DESC_EXP static_cast<zet_structure_type_ext_t>(0x00010009)
|
||||
#define ZET_INTEL_STRUCTURE_TYPE_METRIC_SOURCE_ID_EXP static_cast<zet_structure_type_ext_t>(0x0001000a)
|
||||
#define ZET_INTEL_STRUCTURE_TYPE_METRIC_DECODED_BUFFER_PROPERTIES_EXP static_cast<zet_structure_type_ext_t>(0x0001000b)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,10 +40,10 @@ typedef enum _zet_intel_metric_source_id_exp_version_t {
|
||||
/// @brief Query an unique identifier representing the source of a metric group
|
||||
/// This structure can be passed in the 'pNext' of zet_metric_group_properties_t
|
||||
typedef struct _zet_intel_metric_source_id_exp_t {
|
||||
zet_structure_type_t stype; ///< [in] type of this structure
|
||||
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
|
||||
///< structure (i.e. contains stype and pNext).
|
||||
uint32_t sourceId; ///< [out] Returns an unique source Id of the metric group
|
||||
zet_structure_type_ext_t stype; ///< [in] type of this structure
|
||||
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
|
||||
///< structure (i.e. contains stype and pNext).
|
||||
uint32_t sourceId; ///< [out] Returns an unique source Id of the metric group
|
||||
} zet_intel_metric_source_id_exp_t;
|
||||
|
||||
#ifndef ZET_INTEL_METRIC_APPEND_MARKER_EXP_NAME
|
||||
@@ -207,11 +207,11 @@ typedef enum _zet_intel_metric_calculate_exp_version_t {
|
||||
/// @brief Query an metric group calculate properties
|
||||
/// This structure can be passed in the 'pNext' of zet_metric_group_properties_t
|
||||
typedef struct _zet_intel_metric_group_calculate_properties_exp_t {
|
||||
zet_structure_type_t stype; ///< [in] type of this structure
|
||||
void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
|
||||
///< structure (i.e. contains stype and pNext).
|
||||
bool isTimeFilterSupported; ///< [out] Flag to indicate if the metric group supports time filtering for
|
||||
///< metrics calculation.
|
||||
zet_structure_type_ext_t stype; ///< [in] type of this structure
|
||||
void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
|
||||
///< structure (i.e. contains stype and pNext).
|
||||
bool isTimeFilterSupported; ///< [out] Flag to indicate if the metric group supports time filtering for
|
||||
///< metrics calculation.
|
||||
} zet_intel_metric_group_calculate_properties_exp_t;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -227,7 +227,7 @@ typedef struct _zet_intel_metric_calculate_time_window_exp_t {
|
||||
} zet_intel_metric_calculate_time_window_exp_t;
|
||||
|
||||
typedef struct _zet_intel_metric_calculate_exp_desc_t {
|
||||
zet_structure_type_t stype; ///< [in] type of this structure
|
||||
zet_structure_type_ext_t stype; ///< [in] type of this structure
|
||||
const void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
|
||||
///< structure (i.e. contains stype and pNext).
|
||||
uint32_t metricGroupCount; ///< [in] [in] count for metric group handles in metric hMetricGroups array.
|
||||
@@ -268,11 +268,11 @@ typedef struct _zet_intel_metric_result_exp_t {
|
||||
zet_intel_metric_calculate_result_status_exp_t resultStatus; ///< [out] type of the result for the filters applied to the calculation.
|
||||
} zet_intel_metric_result_exp_t;
|
||||
typedef struct _zet_intel_metric_decoded_buffer_exp_properties_t {
|
||||
zet_structure_type_t stype; ///< [in] type of this structure
|
||||
void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
|
||||
///< structure (i.e. contains stype and pNext).
|
||||
uint64_t minTimeStamp; ///< [out] minimum timestamp contained in the raw data buffer
|
||||
uint64_t maxTimeStamp; ///< [out] maximum timestamp contained in the raw data buffer
|
||||
zet_structure_type_ext_t stype; ///< [in] type of this structure
|
||||
void *pNext; ///< [in][optional] must be null or a pointer to an extension-specific
|
||||
///< structure (i.e. contains stype and pNext).
|
||||
uint64_t minTimeStamp; ///< [out] minimum timestamp contained in the raw data buffer
|
||||
uint64_t maxTimeStamp; ///< [out] maximum timestamp contained in the raw data buffer
|
||||
} zet_intel_metric_decoded_buffer_exp_properties_t;
|
||||
|
||||
ze_result_t ZE_APICALL
|
||||
|
||||
Reference in New Issue
Block a user