LLVM OpenMP 20.0.0git
Functions
Tasks

A task instance represents a piece of work performed by a particular thread for a period of time. More...

Collaboration diagram for Tasks:

Functions

void ITTAPI __itt_task_begin (const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name)
 Begin a task instance.
 
void ITTAPI __itt_task_begin_fn (const __itt_domain *domain, __itt_id taskid, __itt_id parentid, void *fn)
 Begin a task instance.
 
void ITTAPI __itt_task_end (const __itt_domain *domain)
 End the current task instance.
 
void ITTAPI __itt_task_begin_overlapped (const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name)
 Begin an overlapped task instance.
 
void ITTAPI __itt_task_end_overlapped (const __itt_domain *domain, __itt_id taskid)
 End an overlapped task instance.
 

Detailed Description

A task instance represents a piece of work performed by a particular thread for a period of time.

A call to __itt_task_begin creates a task instance. This becomes the current instance for that task on that thread. A following call to __itt_task_end on the same thread ends the instance. There may be multiple simultaneous instances of tasks with the same name on different threads. If an ID is specified, the task instance receives that ID. Nested tasks are allowed.

Note: The task is defined by the bracketing of __itt_task_begin and __itt_task_end on the same thread. If some scheduling mechanism causes task switching (the thread executes a different user task) or task switching (the user task switches to a different thread) then this breaks the notion of current instance. Additional API calls are required to deal with that possibility.

Function Documentation

◆ __itt_task_begin()

void ITTAPI __itt_task_begin ( const __itt_domain *  domain,
__itt_id  taskid,
__itt_id  parentid,
__itt_string_handle *  name 
)

Begin a task instance.

Parameters
[in]domainThe domain for this task
[in]taskidThe instance ID for this task instance, or __itt_null
[in]parentidThe parent instance to which this task instance belongs, or __itt_null
[in]nameThe name of this task

◆ __itt_task_begin_fn()

void ITTAPI __itt_task_begin_fn ( const __itt_domain *  domain,
__itt_id  taskid,
__itt_id  parentid,
void fn 
)

Begin a task instance.

Parameters
[in]domainThe domain for this task
[in]taskidThe identifier for this task instance (may be 0)
[in]parentidThe parent of this task (may be 0)
[in]fnThe pointer to the function you are tracing

◆ __itt_task_begin_overlapped()

void ITTAPI __itt_task_begin_overlapped ( const __itt_domain *  domain,
__itt_id  taskid,
__itt_id  parentid,
__itt_string_handle *  name 
)

Begin an overlapped task instance.

Parameters
[in]domainThe domain for this task.
[in]taskidThe identifier for this task instance, cannot be __itt_null.
[in]parentidThe parent of this task, or __itt_null.
[in]nameThe name of this task.

◆ __itt_task_end()

void ITTAPI __itt_task_end ( const __itt_domain *  domain)

End the current task instance.

Parameters
[in]domainThe domain for this task

◆ __itt_task_end_overlapped()

void ITTAPI __itt_task_end_overlapped ( const __itt_domain *  domain,
__itt_id  taskid 
)

End an overlapped task instance.

Parameters
[in]domainThe domain for this task
[in]taskidExplicit ID of finished task