![]() |
alpaka
Abstraction Library for Parallel Kernel Acceleration
|
Go to the source code of this file.
Macros | |
| #define | ALPAKA_DEVICE_GLOBAL(attributes, dataType, name, ...) |
| Define a device global variable. | |
| #define | ALPAKA_DEVICE_GLOBAL_EXTERN(attributes, dataType, name) |
| Forward declare an external device global variable. | |
| #define ALPAKA_DEVICE_GLOBAL | ( | attributes, | |
| dataType, | |||
| name, | |||
| ... ) |
Define a device global variable.
Initialize the variable with the given values. A type 'name_t' is created as alias to the wrapper type. To get access to the data you should call name.get(). If the dataType is a multidimensional C array with compile time extents the return type of '.get()' is an alpaka::MdSpanArray.
| attributes | Attributes for the variable definition, can be empty or 'inline', 'static', 'const', 'constexpr', etc. If oneAPI with AMD backend is used attributes must be empty or 'inline' due to compiler limitations. |
| dataType | Type of the variable, if the type contains comma it must be wrapped in parentheses |
| name | Name of the variable you would use later to access the data. |
| ... | Initializer values for the variable, can be empty. The arguments will be forwarded to the constructor of dataType. If dataType is a C array the values must be provided in curly braces. |
Definition at line 40 of file globalMem.hpp.
| #define ALPAKA_DEVICE_GLOBAL_EXTERN | ( | attributes, | |
| dataType, | |||
| name ) |
Forward declare an external device global variable.
The variable is only forward declared as external symbol.
| attributes | The keyword 'extern' is automatically set and the attribute 'inline' is allowed. |
| dataType | Type of the variable, if the type contains comma it must be wrapped in parentheses |
| name | Name of the variable you would use later to access the data. |
Definition at line 21 of file globalMem.hpp.