clang 10.0.0git

Public Types | Public Member Functions | List of all members
clang::AtomicScopeOpenCLModel Class Reference

Defines the synch scope model for OpenCL. More...

`#include "clang/Basic/SyncScope.h"`

Inheritance diagram for clang::AtomicScopeOpenCLModel:
[legend]
Collaboration diagram for clang::AtomicScopeOpenCLModel:
[legend]

## Public Types
enum | ID { WorkGroup = 1, Device = 2, AllSVMDevices = 3, SubGroup = 4, Last = SubGroup }
| The enum values match the pre-defined macros __OPENCL_MEMORY_SCOPE_*, which are used to define memory_scope_* enums in opencl-c-base.h. More...

## Public Member Functions
| AtomicScopeOpenCLModel ()
SyncScope | map (unsigned S) const override
| Maps language specific synch scope values to internal SyncScope enum. More...
bool | isValid (unsigned S) const override
| Check if the compile-time constant synch scope value is valid. More...
ArrayRef< unsigned > | getRuntimeValues () const override
| Get all possible synch scope values that might be encountered at runtime for the current language. More...
unsigned | getFallBackValue () const override
| If atomic builtin function is called with invalid synch scope value at runtime, it will fall back to a valid synch scope value returned by this function. More...
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. More...

## Detailed Description

Defines the synch scope model for OpenCL.

Definition at line 94 of file SyncScope.h.

## Member Enumeration Documentation

## ◆ ID

enum clang::AtomicScopeOpenCLModel::ID

The enum values match the pre-defined macros __OPENCL_MEMORY_SCOPE_*, which are used to define memory_scope_* enums in opencl-c-base.h.

Enumerator
WorkGroup |
Device |
AllSVMDevices |
SubGroup |
Last |

Definition at line 99 of file SyncScope.h.

## Constructor & Destructor Documentation

## ◆ AtomicScopeOpenCLModel()

clang::AtomicScopeOpenCLModel::AtomicScopeOpenCLModel | ( |  | ) |
| inline

Definition at line 107 of file SyncScope.h.

## Member Function Documentation

## ◆ getFallBackValue()

unsigned clang::AtomicScopeOpenCLModel::getFallBackValue | ( |  | ) | const
| inline override virtual

If atomic builtin function is called with invalid synch scope value at runtime, it will fall back to a valid synch scope value returned by this function.

Implements clang::AtomicScopeModel.

Definition at line 136 of file SyncScope.h.

## ◆ getRuntimeValues()

ArrayRef<unsigned> clang::AtomicScopeOpenCLModel::getRuntimeValues | ( |  | ) | const
| inline override virtual

Get all possible synch scope values that might be encountered at runtime for the current language.

Implements clang::AtomicScopeModel.

Definition at line 128 of file SyncScope.h.

References clang::Last.

## ◆ isValid()

bool clang::AtomicScopeOpenCLModel::isValid | ( | unsigned | S | ) | const
| inline override virtual

Check if the compile-time constant synch scope value is valid.

Implements clang::AtomicScopeModel.

Definition at line 123 of file SyncScope.h.

## ◆ map()

SyncScope clang::AtomicScopeOpenCLModel::map | ( | unsigned | S | ) | const
| inline override virtual

Maps language specific synch scope values to internal SyncScope enum.

Implements clang::AtomicScopeModel.

Definition at line 109 of file SyncScope.h.

The documentation for this class was generated from the following file:

- include/clang/Basic/SyncScope.h