HOME
| OPENMP API Specification: Version 5.0 November 2018

2.3.2  Context Selectors

Context selectors are used to define the properties of an OpenMP context that a directive or clause can match. OpenMP defines different sets of selectors, each containing different selectors.

The syntax to define a context-selector-specification is the following:  

 
trait-set-selector[,trait-set-selector[,...]] 
 
trait-set-selector: 
   trait-set-selector-name={trait-selector[, trait-selector[, ...]]} 
 
trait-selector: 
   trait-selector-name[([trait-score: ] trait-property[, trait-property[, ...]])] 
 
trait-score: 
    score(score-expression)  

The construct selector set defines the construct traits that should be active in the OpenMP context. The following selectors can be defined in the construct set: target; teams; parallel; for (in C/C++); do (in Fortran); and simd. The properties of each selector are the same properties that are defined for the corresponding trait. The construct selector is an ordered list c1, …, cN.

The device and implementation selector sets define the traits that should be active in the corresponding trait set of the OpenMP context. The same traits defined in the corresponding traits sets can be used as selectors with the same properties. The kind selector of the device selector set can also be set to the value any, which is as if no kind selector was specified.

The user selector set defines the condition selector that provides additional user-defined conditions.

SVG-Viewer needed.

The condition(boolean-expr) selector defines a constant expression that must evaluate to true for the selector to be true.

SVG-Viewer needed.

SVG-Viewer needed.

The condition(boolean-expr) selector defines a constexpr expression that must evaluate to true for the selector to be true.

SVG-Viewer needed.

SVG-Viewer needed.

The condition(logical-expr) selector defines a constant expression that must evaluate to true for the selector to be true.

SVG-Viewer needed.

A score-expression must be an constant integer expression.

Implementations can allow further selectors to be specified. Implementations can ignore specified selectors that are not those described in this section.

Restrictions