aboutsummaryrefslogtreecommitdiff
path: root/clang/test/ParserOpenACC/parse-wait-construct.c
diff options
context:
space:
mode:
authorJoseph Huber <huberjn@outlook.com>2023-12-07 13:40:25 -0600
committerGitHub <noreply@github.com>2023-12-07 13:40:25 -0600
commit4e80bc7d716b1f2344ffd7ad109413bfe5390879 (patch)
treea344f35cdad4477d309a168418a1e6e5dac8259d /clang/test/ParserOpenACC/parse-wait-construct.c
parent32d535195ec5d9b0caf03fee13f796fc8c66a79f (diff)
downloadllvm-4e80bc7d716b1f2344ffd7ad109413bfe5390879.zip
llvm-4e80bc7d716b1f2344ffd7ad109413bfe5390879.tar.gz
llvm-4e80bc7d716b1f2344ffd7ad109413bfe5390879.tar.bz2
[Clang] Introduce scoped variants of GNU atomic functions (#72280)
Summary: The standard GNU atomic operations are a very common way to target hardware atomics on the device. With more heterogenous devices being introduced, the concept of memory scopes has been in the LLVM language for awhile via the `syncscope` modifier. For targets, such as the GPU, this can change code generation depending on whether or not we only need to be consistent with the memory ordering with the entire system, the single GPU device, or lower. Previously these scopes were only exported via the `opencl` and `hip` variants of these functions. However, this made it difficult to use outside of those languages and the semantics were different from the standard GNU versions. This patch introduces a `__scoped_atomic` variant for the common functions. There was some discussion over whether or not these should be overloads of the existing ones, or simply new variants. I leant towards new variants to be less disruptive. The scope here can be one of the following ``` __MEMORY_SCOPE_SYSTEM // All devices and systems __MEMORY_SCOPE_DEVICE // Just this device __MEMORY_SCOPE_WRKGRP // A 'work-group' AKA CUDA block __MEMORY_SCOPE_WVFRNT // A 'wavefront' AKA CUDA warp __MEMORY_SCOPE_SINGLE // A single thread. ``` Naming consistency was attempted, but it is difficult to capture to full spectrum with no many names. Suggestions appreciated.
Diffstat (limited to 'clang/test/ParserOpenACC/parse-wait-construct.c')
0 files changed, 0 insertions, 0 deletions