Intel® C++ Compiler 16.0 User and Reference Guide

omp cancellation point

Defines a point at which implicit or explicit tasks check to see if cancellation has been requested for the innermost enclosing region of the type specified. This construct does not implement a synchronization between threads or tasks.

Syntax

#pragma omp cancellation point [construct-clause]

structured-block

Arguments

construct-clause

May be one of: parallel, sections, for, taskgroup

Description

A cancellation point region binds to the current task region. If clause is taskgroup, the cancellation point construct must be closely nested inside a task construct. Otherwise, the cancellation point construct must be closely nested inside an OpenMP* construct that matches the type specified by the construct-clause.

When an implicit or explicit task reaches a user-defined cancellation point, the task immediately checks for cancellation of the region specified in the clause and performs cancellation of this region if cancellation is observed.

If the clause specified is taskgroup then the current task region is canceled.

Restrictions

See Also