![]() |
alpaka
Abstraction Library for Parallel Kernel Acceleration
|
Go to the source code of this file.
Macros | |
| #define | ALPAKA_FN_EXTERN |
| All functions marked with ALPAKA_FN_ACC or ALPAKA_FN_HOST_ACC that are exported to / imported from different translation units have to be attributed with ALPAKA_FN_EXTERN. Note that this needs to be applied to both the declaration and the definition. | |
| #define | ALPAKA_FN_INLINE [[gnu::always_inline]] inline |
| Macro defining the inline function attribute. | |
| #define | ALPAKA_FORWARD(instance) |
| Perfectly forward an instance as argument. | |
| #define | ALPAKA_NO_HOST_ACC_WARNING |
| Disable nvcc warning: 'calling a host function from host device function.' Usage: ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC function_declaration() WARNING: Only use this method if there is no other way. Most cases can be solved by #if ALPAKA_ARCH_PTX or #if ALPAKA_LANG_CUDA. | |
| #define | ALPAKA_STATIC_ACC_MEM_GLOBAL |
| This macro defines a variable lying in global accelerator device memory. | |
| #define | ALPAKA_TYPEOF(...) |
| Get the type of instance. | |
| #define | ALPAKA_FN_ACC |
| All functions that can be used on an accelerator have to be attributed with ALPAKA_FN_ACC or ALPAKA_FN_HOST_ACC. | |
| #define | ALPAKA_FN_HOST |
| All functions that can be used on an accelerator have to be attributed with ALPAKA_FN_ACC or ALPAKA_FN_HOST_ACC. | |
| #define | ALPAKA_FN_HOST_ACC |
| All functions that can be used on an accelerator have to be attributed with ALPAKA_FN_ACC or ALPAKA_FN_HOST_ACC. | |
| #define ALPAKA_FN_ACC |
All functions that can be used on an accelerator have to be attributed with ALPAKA_FN_ACC or ALPAKA_FN_HOST_ACC.
Definition at line 31 of file common.hpp.
| #define ALPAKA_FN_EXTERN |
All functions marked with ALPAKA_FN_ACC or ALPAKA_FN_HOST_ACC that are exported to / imported from different translation units have to be attributed with ALPAKA_FN_EXTERN. Note that this needs to be applied to both the declaration and the definition.
Usage: ALPAKA_FN_ACC ALPAKA_FN_EXTERN auto add(std::int32_t a, std::int32_t b) -> std::int32_t;
Warning: If this is used together with the SYCL back-end make sure that your SYCL runtime supports generic address spaces. Otherwise it is forbidden to use pointers as parameter or return type for functions marked with ALPAKA_FN_EXTERN.
Definition at line 58 of file common.hpp.
| #define ALPAKA_FN_HOST |
All functions that can be used on an accelerator have to be attributed with ALPAKA_FN_ACC or ALPAKA_FN_HOST_ACC.
Definition at line 33 of file common.hpp.
| #define ALPAKA_FN_HOST_ACC |
All functions that can be used on an accelerator have to be attributed with ALPAKA_FN_ACC or ALPAKA_FN_HOST_ACC.
Definition at line 32 of file common.hpp.
| #define ALPAKA_FN_INLINE [[gnu::always_inline]] inline |
Macro defining the inline function attribute.
The macro should stay on the left hand side of keywords, e.g. 'static', 'constexpr', 'explicit' or the return type.
Definition at line 88 of file common.hpp.
| #define ALPAKA_FORWARD | ( | instance | ) |
Perfectly forward an instance as argument.
Definition at line 148 of file common.hpp.
| #define ALPAKA_NO_HOST_ACC_WARNING |
Disable nvcc warning: 'calling a host function from host device function.' Usage: ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC function_declaration() WARNING: Only use this method if there is no other way. Most cases can be solved by #if ALPAKA_ARCH_PTX or #if ALPAKA_LANG_CUDA.
Definition at line 75 of file common.hpp.
| #define ALPAKA_STATIC_ACC_MEM_GLOBAL |
This macro defines a variable lying in global accelerator device memory.
Example: ALPAKA_STATIC_ACC_MEM_GLOBAL alpaka::DevGlobal<TAcc, int> variable;
Those variables behave like ordinary variables when used in file-scope, but inside kernels the get() method must be used to access the variable. They are declared inline to resolve to a single instance across multiple translation units. Like ordinary variables, only one definition is allowed (ODR) Failure to do so might lead to linker errors.
In contrast to ordinary variables, you can not define such variables as static compilation unit local variables with internal linkage because this is forbidden by CUDA.
Definition at line 142 of file common.hpp.
| #define ALPAKA_TYPEOF | ( | ... | ) |
Get the type of instance.
References will be removed which is often required because traits are mostly defined for the type only.
Definition at line 154 of file common.hpp.