@@ -4021,6 +4021,173 @@ __itt_collection_state __itt_get_collection_state(void);
40214021void __itt_release_resources (void );
40224022/** @endcond */
40234023
4024+ /**
4025+ * @brief Create a typed counter with given domain pointer, string name and counter type
4026+ */
4027+ #if ITT_PLATFORM == ITT_PLATFORM_WIN
4028+ __itt_counter ITTAPI __itt_counter_createA_v3 (const __itt_domain * domain , const char * name , __itt_metadata_type type );
4029+ __itt_counter ITTAPI __itt_counter_createW_v3 (const __itt_domain * domain , const wchar_t * name , __itt_metadata_type type );
4030+ #if defined(UNICODE ) || defined(_UNICODE )
4031+ # define __itt_counter_create_v3 __itt_counter_createW_v3
4032+ # define __itt_counter_create_v3_ptr __itt_counter_createW_v3_ptr
4033+ #else /* UNICODE */
4034+ # define __itt_counter_create_v3 __itt_counter_createA_v3
4035+ # define __itt_counter_create_v3_ptr __itt_counter_createA_v3_ptr
4036+ #endif /* UNICODE */
4037+ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
4038+ __itt_counter ITTAPI __itt_counter_create_v3 (const __itt_domain * domain , const char * name , __itt_metadata_type type );
4039+ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
4040+
4041+ #ifndef INTEL_NO_MACRO_BODY
4042+ #ifndef INTEL_NO_ITTNOTIFY_API
4043+ #if ITT_PLATFORM == ITT_PLATFORM_WIN
4044+ ITT_STUB (ITTAPI , __itt_counter , counter_createA_v3 , (const __itt_domain * domain , const char * name , __itt_metadata_type type ))
4045+ ITT_STUB (ITTAPI , __itt_counter , counter_createW_v3 , (const __itt_domain * domain , const wchar_t * name , __itt_metadata_type type ))
4046+ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
4047+ ITT_STUB (ITTAPI , __itt_counter , counter_create_v3 , (const __itt_domain * domain , const char * name , __itt_metadata_type type ))
4048+ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
4049+ #if ITT_PLATFORM == ITT_PLATFORM_WIN
4050+ #define __itt_counter_createA_v3 ITTNOTIFY_DATA(counter_createA_v3)
4051+ #define __itt_counter_createA_v3_ptr ITTNOTIFY_NAME(counter_createA_v3)
4052+ #define __itt_counter_createW_v3 ITTNOTIFY_DATA(counter_createW_v3)
4053+ #define __itt_counter_createW_v3_ptr ITTNOTIFY_NAME(counter_createW_v3)
4054+ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
4055+ #define __itt_counter_create_v3 ITTNOTIFY_DATA(counter_create_v3)
4056+ #define __itt_counter_create_v3_ptr ITTNOTIFY_NAME(counter_create_v3)
4057+ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
4058+ #else /* INTEL_NO_ITTNOTIFY_API */
4059+ #if ITT_PLATFORM == ITT_PLATFORM_WIN
4060+ #define __itt_counter_createA_v3 (domain , name , type ) (__itt_counter)0
4061+ #define __itt_counter_createA_v3_ptr 0
4062+ #define __itt_counter_createW_v3 (domain , name , type ) (__itt_counter)0
4063+ #define __itt_counter_create_typedW_ptr 0
4064+ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
4065+ #define __itt_counter_create_v3 (domain , name , type ) (__itt_counter)0
4066+ #define __itt_counter_create_v3_ptr 0
4067+ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
4068+ #endif /* INTEL_NO_ITTNOTIFY_API */
4069+ #else /* INTEL_NO_MACRO_BODY */
4070+ #if ITT_PLATFORM == ITT_PLATFORM_WIN
4071+ #define __itt_counter_createA_v3_ptr 0
4072+ #define __itt_counter_createW_v3_ptr 0
4073+ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */
4074+ #define __itt_counter_create_v3_ptr 0
4075+ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
4076+ #endif /* INTEL_NO_MACRO_BODY */
4077+ /** @endcond */
4078+
4079+ /**
4080+ * @brief Set the counter value api
4081+ */
4082+ void ITTAPI __itt_counter_set_value_v3 (__itt_counter counter , void * value_ptr );
4083+
4084+ #ifndef INTEL_NO_MACRO_BODY
4085+ #ifndef INTEL_NO_ITTNOTIFY_API
4086+ ITT_STUBV (ITTAPI , void , counter_set_value_v3 , (__itt_counter counter , void * value_ptr ))
4087+ #define __itt_counter_set_value_v3 ITTNOTIFY_VOID(counter_set_value_v3)
4088+ #define __itt_counter_set_value_v3_ptr ITTNOTIFY_NAME(counter_set_value_v3)
4089+ #else /* INTEL_NO_ITTNOTIFY_API */
4090+ #define __itt_counter_set_value_v3 (counter , value_ptr )
4091+ #define __itt_counter_set_value_v3_ptr 0
4092+ #endif /* INTEL_NO_ITTNOTIFY_API */
4093+ #else /* INTEL_NO_MACRO_BODY */
4094+ #define __itt_counter_set_value_v3_ptr 0
4095+ #endif /* INTEL_NO_MACRO_BODY */
4096+ /** @endcond */
4097+
4098+ /**
4099+ * @brief describes the type of context metadata
4100+ */
4101+ typedef enum {
4102+ __itt_context_unknown = 0 , /*!< Undefined type */
4103+ __itt_context_nameA , /*!< ASCII string char* type */
4104+ __itt_context_nameW , /*!< Unicode string wchar_t* type */
4105+ __itt_context_deviceA , /*!< ASCII string char* type */
4106+ __itt_context_deviceW , /*!< Unicode string wchar_t* type */
4107+ __itt_context_unitsA , /*!< ASCII string char* type */
4108+ __itt_context_unitsW , /*!< Unicode string wchar_t* type */
4109+ __itt_context_pci_addrA , /*!< ASCII string char* type */
4110+ __itt_context_pci_addrW , /*!< Unicode string wchar_t* type */
4111+ __itt_context_tid , /*!< Unsigned 64-bit integer type */
4112+ __itt_context_max_val , /*!< Unsigned 64-bit integer type */
4113+ __itt_context_bandwidth_flag , /*!< Unsigned 64-bit integer type */
4114+ __itt_context_latency_flag , /*!< Unsigned 64-bit integer type */
4115+ __itt_context_occupancy_flag , /*!< Unsigned 64-bit integer type */
4116+ __itt_context_on_thread_flag , /*!< Unsigned 64-bit integer type */
4117+ __itt_context_is_abs_val_flag , /*!< Unsigned 64-bit integer type */
4118+ __itt_context_cpu_instructions_flag , /*!< Unsigned 64-bit integer type */
4119+ __itt_context_cpu_cycles_flag /*!< Unsigned 64-bit integer type */
4120+ } __itt_context_type ;
4121+
4122+ #if defined(UNICODE ) || defined(_UNICODE )
4123+ # define __itt_context_name __itt_context_nameW
4124+ # define __itt_context_device __itt_context_deviceW
4125+ # define __itt_context_units __itt_context_unitsW
4126+ # define __itt_context_pci_addr __itt_context_pci_addrW
4127+ #else /* UNICODE || _UNICODE */
4128+ # define __itt_context_name __itt_context_nameA
4129+ # define __itt_context_device __itt_context_deviceA
4130+ # define __itt_context_units __itt_context_unitsA
4131+ # define __itt_context_pci_addr __itt_context_pci_addrA
4132+ #endif /* UNICODE || _UNICODE */
4133+
4134+ /** @cond exclude_from_documentation */
4135+ #pragma pack(push, 8)
4136+
4137+ typedef struct ___itt_context_metadata
4138+ {
4139+ __itt_context_type type ; /*!< Type of the context metadata value */
4140+ void * value ; /*!< Pointer to context metadata value itself */
4141+ } __itt_context_metadata ;
4142+
4143+ #pragma pack(pop)
4144+ /** @endcond */
4145+
4146+ /** @cond exclude_from_documentation */
4147+ #pragma pack(push, 8)
4148+
4149+ typedef struct ___itt_counter_metadata
4150+ {
4151+ __itt_counter counter ; /*!< Associated context metadata counter */
4152+ __itt_context_type type ; /*!< Type of the context metadata value */
4153+ const char * str_valueA ; /*!< String context metadata value */
4154+ #if defined(UNICODE ) || defined(_UNICODE )
4155+ const wchar_t * str_valueW ;
4156+ #else /* UNICODE || _UNICODE */
4157+ void * str_valueW ;
4158+ #endif /* UNICODE || _UNICODE */
4159+ unsigned long long value ; /*!< Numeric context metadata value */
4160+ int extra1 ; /*!< Reserved to the runtime */
4161+ void * extra2 ; /*!< Reserved to the runtime */
4162+ struct ___itt_counter_metadata * next ;
4163+ } __itt_counter_metadata ;
4164+
4165+ #pragma pack(pop)
4166+ /** @endcond */
4167+
4168+ /**
4169+ * @brief Bind context metadata to counter instance
4170+ * @param[in] counter Pointer to the counter instance to which the context metadata is to be associated.
4171+ * @param[in] length The number of elements in context metadata array.
4172+ * @param[in] metadata The context metadata itself.
4173+ */
4174+ void ITTAPI __itt_bind_context_metadata_to_counter (__itt_counter counter , size_t length , __itt_context_metadata * metadata );
4175+
4176+ /** @cond exclude_from_documentation */
4177+ #ifndef INTEL_NO_MACRO_BODY
4178+ #ifndef INTEL_NO_ITTNOTIFY_API
4179+ ITT_STUBV (ITTAPI , void , bind_context_metadata_to_counter , (__itt_counter counter , size_t length , __itt_context_metadata * metadata ))
4180+ #define __itt_bind_context_metadata_to_counter ITTNOTIFY_VOID(bind_context_metadata_to_counter)
4181+ #define __itt_bind_context_metadata_to_counter_ptr ITTNOTIFY_NAME(bind_context_metadata_to_counter)
4182+ #else /* INTEL_NO_ITTNOTIFY_API */
4183+ #define __itt_bind_context_metadata_to_counter (counter , length , metadata )
4184+ #define __itt_bind_context_metadata_to_counter_ptr 0
4185+ #endif /* INTEL_NO_ITTNOTIFY_API */
4186+ #else /* INTEL_NO_MACRO_BODY */
4187+ #define __itt_bind_context_metadata_to_counter_ptr 0
4188+ #endif /* INTEL_NO_MACRO_BODY */
4189+ /** @endcond */
4190+
40244191#ifdef __cplusplus
40254192}
40264193#endif /* __cplusplus */
0 commit comments