At any point in a program, an OpenMP context exists that defines traits that describe the active OpenMP constructs, the execution devices, and functionality supported by the implementation. The traits are grouped into trait sets. The following trait sets exist: construct, device and implementation.
The construct set is composed of the directive names, each being a trait, of all enclosing constructs at that point in the program up to a target construct. Combined and composite constructs are added to the set as distinct constructs in the same nesting order specified by the original construct. The set is ordered by nesting level in ascending order. Specifically, the ordering of the set of constructs is c1, …, cN, where c1 is the construct at the outermost nesting level and cN is the construct at the innermost nesting level. In addition, if the point in the program is not enclosed by a target construct, the following rules are applied in order:
The simd trait can be further defined with properties that match the clauses accepted by the declare simd directive with the same name and semantics. The simd trait must define at least the simdlen property and one of the inbranch or notinbranch properties.
The device set includes traits that define the characteristics of the device being targeted by the compiler at that point in the program. At least the following traits must be defined:
The implementation set includes traits that describe the functionality supported by the OpenMP implementation at that point in the program. At least the following traits can be defined:
Implementations can define further traits in the device and implementation sets. All implementation defined
traits must follow the following syntax:
identifier[(context-element[, context-element[, ...]])]
context-element:
identifier[(context-element[, context-element[, ...]])]
or
context-value
context-value:
constant string
or
constant integer expression
where identifier is a base language identifier.