|
clang 24.0.0git
|
Defines the generic atomic scope model. More...
#include "clang/Basic/SyncScope.h"
Public Types | |
| enum | ID { System = static_cast<unsigned>(llvm::AtomicScope::System) , Device = static_cast<unsigned>(llvm::AtomicScope::Device) , Workgroup = static_cast<unsigned>(llvm::AtomicScope::Workgroup) , Wavefront = static_cast<unsigned>(llvm::AtomicScope::Wavefront) , Single = static_cast<unsigned>(llvm::AtomicScope::Single) , Cluster = static_cast<unsigned>(llvm::AtomicScope::Cluster) , Count , Last = Count - 1 } |
| The enum values match predefined built-in macros __MEMORY_SCOPE_*. More... | |
Public Member Functions | |
| AtomicScopeGenericModel ()=default | |
| SyncScope | map (unsigned S) const override |
| Maps language specific sync scope values to internal SyncScope enum. | |
| bool | isValid (unsigned S) const override |
| Check if the compile-time constant sync scope value is valid. | |
| ArrayRef< unsigned > | getRuntimeValues () const override |
| Get all possible sync scope values that might be encountered at runtime for the current language. | |
| unsigned | getFallBackValue () const override |
| If atomic builtin function is called with invalid sync scope value at runtime, it will fall back to a valid sync scope value returned by this function. | |
| Public Member Functions inherited from clang::AtomicScopeModel | |
| virtual | ~AtomicScopeModel () |
Additional Inherited Members | |
| Static Public Member Functions inherited from clang::AtomicScopeModel | |
| static std::unique_ptr< AtomicScopeModel > | create (AtomicScopeModelKind K) |
| Create an atomic scope model by AtomicScopeModelKind. | |
Defines the generic atomic scope model.
Definition at line 241 of file SyncScope.h.
The enum values match predefined built-in macros __MEMORY_SCOPE_*.
These are ABI-sensitive (they may be present in pch files or bitcode) so existing values must be preserved.
| Enumerator | |
|---|---|
| System | |
| Device | |
| Workgroup | |
| Wavefront | |
| Single | |
| Cluster | |
| Count | |
| Last | |
Definition at line 246 of file SyncScope.h.
|
default |
|
inlineoverridevirtual |
If atomic builtin function is called with invalid sync scope value at runtime, it will fall back to a valid sync scope value returned by this function.
Implements clang::AtomicScopeModel.
Definition at line 293 of file SyncScope.h.
References System.
|
inlineoverridevirtual |
Get all possible sync scope values that might be encountered at runtime for the current language.
Implements clang::AtomicScopeModel.
Definition at line 283 of file SyncScope.h.
References Cluster, Count, Device, Single, System, Wavefront, and Workgroup.
Check if the compile-time constant sync scope value is valid.
Implements clang::AtomicScopeModel.
Definition at line 279 of file SyncScope.h.
References Last.
Referenced by getAMDGPUSyncScopeStr().
Maps language specific sync scope values to internal SyncScope enum.
Implements clang::AtomicScopeModel.
Definition at line 259 of file SyncScope.h.
References Cluster, clang::ClusterScope, Count, Device, clang::DeviceScope, Single, clang::SingleScope, System, clang::SystemScope, Wavefront, clang::WavefrontScope, Workgroup, and clang::WorkgroupScope.
Referenced by getAMDGPUSyncScopeStr().