HOME
| OPENMP API Specification: "Version 5.2 -- GIT rev 95b2e3a44"

7.3  Matching and Scoring Context Selectors

A given context selector is compatible with a given OpenMP context if the following conditions are satisfied:

Some properties of the simd selector have special rules to match the properties of the simd trait:

Among compatible context selectors, a score is computed using the following algorithm:

1.
Each trait selector for which the corresponding trait appears in the construct trait set in the OpenMP context is given the value 2p1 where p is the position of the corresponding trait, cp, in the context construct trait set; if the traits that correspond to the construct selector set appear multiple times in the OpenMP context, the highest valued subset of context traits that contains all selectors in the same order are used;
2.
The kind, arch, and isa selectors, if specified, are given the values 2l, 2l+1 and 2l+2, respectively, where l is the number of traits in the construct set;
3.
Trait selectors for which a trait-score is specified are given the value specified by the trait-score score-expression;
4.
The values given to any additional selectors allowed by the implementation are implementation defined;
5.
Other selectors are given a value of zero; and
6.
A context selector that is a strict subset of another context selector has a score of zero. For other context selectors, the final score is the sum of the values of all specified selectors plus 1.