Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

OpenMP 6.0 Directives and Clauses

This catalogue is derived directly from the ROUP parser’s keyword registries and shows exactly which OpenMP 6.0 directive and clause tokens are recognised. The source of truth is OpenMpDirective::ALL and OpenMpClause::ALL in src/parser/openmp.rs. Every entry listed below is exercised by the automated support-matrix tests, so the tables always reflect parser reality.

For the normative meaning of each keyword, consult the OpenMP Application Programming Interface Version 6.0 specification.

Directive keywords (127 total)

allocatedistribute parallel loop simdparallel master tasklooptarget teams distribute parallel for simd
allocatorsdistribute simdparallel master taskloop simdtarget teams distribute parallel loop
assumedoparallel sectionstarget teams distribute parallel loop simd
assumesdo simdrequirestarget teams distribute simd
atomicend declare targetreversetarget teams loop
atomic captureerrorscantarget teams loop simd
atomic compare captureflushscopetarget update
atomic readforsectiontask
atomic updatefor simdsectionstask iteration
atomic writefusesimdtaskgraph
barriergroupprivatesingletaskgroup
begin assumesinterchangesplittaskloop
begin declare targetinteropstripetaskloop simd
begin declare variantlooptargettaskwait
begin metadirectivemaskedtarget datataskyield
cancelmasked tasklooptarget enter datateams
cancellation pointmasked taskloop simdtarget exit datateams distribute
criticalmastertarget loopteams distribute parallel do
declare inductionmetadirectivetarget loop simdteams distribute parallel do simd
declare mappernothingtarget parallelteams distribute parallel for
declare reductionorderedtarget parallel doteams distribute parallel for simd
declare simdparalleltarget parallel do simdteams distribute parallel loop
declare targetparallel dotarget parallel forteams distribute parallel loop simd
declare variantparallel do simdtarget parallel for simdteams distribute simd
depobjparallel fortarget parallel loopteams loop
dispatchparallel for simdtarget parallel loop simdteams loop simd
distributeparallel looptarget simdthreadprivate
distribute parallel doparallel loop simdtarget teamstile
distribute parallel do simdparallel maskedtarget teams distributeunroll
distribute parallel forparallel masked tasklooptarget teams distribute parallel doworkdistribute
distribute parallel for simdparallel masked taskloop simdtarget teams distribute parallel do simdworkshare
distribute parallel loopparallel mastertarget teams distribute parallel for

Clause keywords (132 total)

absentdoacrosslooprangereproducible
acq_reldynamic_allocatorsmapreverse
acquireentermatchreverse_offload
adjust_argsexclusivememscopesafelen
affinityfailmergeablesafesync
alignfiltermessageschedule
alignedfinalno_openmpself_maps
allocatefirstprivateno_openmp_constructsseq_cst
allocatorfromno_openmp_routinesseverity
append_argsfullno_parallelismshared
applygrainsizenocontextsimd
atgraph_idnogroupsimdlen
atomic_default_mem_ordergraph_resetnontemporalsizes
bindhas_device_addrnotinbranchtask_reduction
capturehintnovariantsthread_limit
collapseholdsnowaitthreads
collectorifnum_tasksthreadset
combinerin_reductionnum_teamstile
compareinbranchnum_threadsto
containsinclusiveordertransparent
copyinindirectorderedunified_address
copyprivateinductionotherwiseunified_shared_memory
countsinductorpartialuniform
defaultinitpermutationunroll
defaultmapinit_completepriorityuntied
dependinitializerprivateupdate
destroyinteropproc_binduse
detachis_device_ptrpublicuse_device_addr
devicelabelreaduse_device_ptr
device_residentlastprivatereductionuses_allocators
device_safesynclinearrelaxedweak
device_typelinkreleasewhen
dist_schedulelocalreplayablewrite

Keeping the list in sync

To regenerate the tables after changing src/parser/openmp.rs, run the helper script below and replace the output in this document:

python - <<'PY'
import math, pathlib, re
text = pathlib.Path('src/parser/openmp.rs').read_text()
block = re.search(r"openmp_directives!\s*{(.*?)}\s*\n\npub fn clause_registry", text, re.S).group(1)
directives = sorted({re.search(r'"([^"]+)"', line).group(1)
                      for line in block.splitlines() if '"' in line})
clauses_block = re.search(r"openmp_clauses!\s*{(.*?)}\s*\n\nmacro_rules!", text, re.S).group(1)
clauses = sorted({re.search(r'name: "([^"]+)"', line).group(1)
                   for line in clauses_block.splitlines() if 'name:' in line})

def make_table(items, columns=4):
    rows = math.ceil(len(items) / columns)
    table = ['| ' + ' | '.join([''] * columns) + ' |', '| ' + ' | '.join(['---'] * columns) + ' |']
    for r in range(rows):
        row = []
        for c in range(columns):
            idx = c * rows + r
            row.append(f"`{items[idx]}`" if idx < len(items) else '')
        table.append('| ' + ' | '.join(row) + ' |')
    return '\n'.join(table)

print(make_table(directives))
print('\n')
print(make_table(clauses))
PY

Keeping this document machine-derived guarantees it matches the parser at all times.