Relation API

The Relation API binds two named instances, like tasks, with a reasonable relation attribute. You can add relations before or after the actual instances are created. These relations exist independently outside the instances.

To group a bunch of tasks logically, you can use different types of relations:

void ITTAPI __itt_relation_add(const __itt_domain *domain, __itt_id head,
                               __itt_relation relation, __itt_id tail);

void ITTAPI __itt_relation_add_ex(const __itt_domain *domain, __itt_clock_domain* clock_domain,
                                  unsigned long long timestamp, __itt_id head,
                                  __itt_relation relation, __itt_id tail);

Parameters of the primitives:

Type

Parameter

Description

[in]

__itt_domain* domain

Relation domain

[in]

__itt_relation relation

User-defined logical relation between two named instances

[in]

__itt_id head

Metadata name

[in]

__itt_id tail

IDs of two named related instances size_t count

[in]

__itt_clock_domain* clock_domain

User-defined clock domain

[in]

unsigned long long timestamp

User-defined timestamp for the corresponding clock domain