Class openvino::itt::ScopedTask#
-
template<domain_t (*domain)()>
class ScopedTask# Used to annotate section of code which would be named at runtime.
Note
Uses ITT task begin/end. If a region is active on the current thread, tasks started within it are recorded as its children.
- Template Parameters:
The –
domainparameter is domain type which shoud be defined with OV_ITT_DOMAIN() macro.
Public Functions
-
inline ScopedTask(handle_t taskHandle) noexcept#
Construct ScopedTask with defined annotation handle.
-
inline ScopedTask(handle_t taskHandle, const char *key, uint64_t value) noexcept#
Constructs a scoped task with an associated key-value metadata pair.
Creates an ITT (Intel Tracing Technology) scoped task that will automatically begin upon construction and end when the object goes out of scope (RAII pattern). This overload allows attaching custom metadata to the task for enhanced profiling.
See also
ScopedTask(handle_t) for the basic constructor without metadata.
Note
The task begins immediately upon construction via internal::taskBegin.
Note
The key string must remain valid for the duration of the task scope.
Note
This constructor is noexcept, ensuring exception safety in profiling code.
- Parameters:
taskHandle – Handle identifying the task type for profiling tools.
key – String identifier for the metadata attribute (e.g., “InferenceID”).
value – Numeric value associated with the key (e.g., unique request ID).
-
inline ~ScopedTask() noexcept#
The ScopedTask destructor closes or ends the task scope.