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. More...
void ITTAPI | __itt_task_begin_fn (const __itt_domain *domain, __itt_id taskid, __itt_id parentid, void *fn)
| Begin a task instance. More...
void ITTAPI | __itt_task_end (const __itt_domain *domain)
| End the current task instance. More...
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. More...
void ITTAPI | __itt_task_end_overlapped (const __itt_domain *domain, __itt_id taskid)
| End an overlapped task instance. More...

## 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] | domain | The domain for this task
  [in] | taskid | The instance ID for this task instance, or __itt_null
  [in] | parentid | The parent instance to which this task instance belongs, or __itt_null
  [in] | name | The 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] | domain | The domain for this task
  [in] | taskid | The identifier for this task instance (may be 0)
  [in] | parentid | The parent of this task (may be 0)
  [in] | fn | The 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] | domain | The domain for this task.
  [in] | taskid | The identifier for this task instance, cannot be __itt_null.
  [in] | parentid | The parent of this task, or __itt_null.
  [in] | name | The name of this task.

## __itt_task_end()

void ITTAPI __itt_task_end | ( | const __itt_domain * | domain | ) |

End the current task instance.

Parameters

  [in] | domain | The 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] | domain | The domain for this task
  [in] | taskid | Explicit ID of finished task

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.