Struct ittapi::Task

source · []
pub struct Task<'a>(_);
Expand description

A task is a logical unit of work performed by a particular thread. See the Task API documentation for more information.

let _env_path = scoped_env::ScopedEnv::set("INTEL_LIBITTNOTIFY64", "<some path>");
let domain = Domain::new("domain");
let name = StringHandle::new("task");
// Measure a task using a pre-initialized string handle (most efficient).
{
    let task = Task::begin(&domain, name);
    let _ = 2 + 2;
    task.end(); // Task ended here.
    let _ = 3 + 3;
}
// Measure a task using a string reference (most convenient).
{
    let _task = Task::begin(&domain, "task");
    let _ = 2 + 2;
    // Task ended here, when dropped.
}

Implementations

Start a task on the current thread.

Finish the task.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.