![]() |
alpaka
Abstraction Library for Parallel Kernel Acceleration
|
functionality which is usable on the accelerator compute device from within a kernel. More...
Namespaces | |
| namespace | atomic |
| namespace | concepts |
| namespace | cpu |
| namespace | layout |
| namespace | order |
| namespace | origin |
| Origin of index domains. | |
| namespace | range |
| namespace | scope |
| namespace | trait |
| namespace | traverse |
| namespace | unit |
| Unit of index domains. | |
| namespace | warp |
| namespace | worker |
Classes | |
| struct | Acc |
| class | AtomicAtomicRef |
| The atomic ops based on atomic_ref for CPU accelerators. More... | |
| struct | DomainSpec |
| class | FlatIdxContainer |
| struct | MultiDimensional |
| struct | SimdAlgo |
| Creates a functor operate on contiguous data concurrently. More... | |
| class | TiledIdxContainer |
| struct | WorkerGroup |
Functions | |
| template<typename T, typename T_Scope = scope::Device> | |
| constexpr auto | atomicAdd (auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T |
| Executes an atomic add operation. | |
| template<typename T, typename T_Scope = scope::Device> | |
| constexpr auto | atomicAnd (auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T |
| Executes an atomic and operation. | |
| template<typename T, typename T_Scope = scope::Device> | |
| constexpr auto | atomicCas (auto const &acc, T *const addr, T const &compare, T const &value, T_Scope const hier=T_Scope()) -> T |
| Executes an atomic compare-and-swap operation. | |
| template<typename T, typename T_Scope = scope::Device> | |
| constexpr auto | atomicDec (auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T |
| Executes an atomic decrement operation. | |
| template<typename T, typename T_Scope = scope::Device> | |
| constexpr auto | atomicExch (auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T |
| Executes an atomic exchange operation. | |
| template<typename T, typename T_Scope = scope::Device> | |
| constexpr auto | atomicInc (auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T |
| Executes an atomic increment operation. | |
| template<typename T, typename T_Scope = scope::Device> | |
| constexpr auto | atomicMax (auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T |
| Executes an atomic max operation. | |
| template<typename T, typename T_Scope = scope::Device> | |
| constexpr auto | atomicMin (auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T |
| Executes an atomic min operation. | |
| template<typename TOp, typename T, typename T_Scope = scope::Device> | |
| constexpr auto | atomicOp (auto const &acc, T *const addr, T const &compare, T const &value, T_Scope const scope=T_Scope()) -> T |
| Executes the given operation atomically. | |
| template<typename TOp, typename T, typename T_Scope = scope::Device> | |
| constexpr auto | atomicOp (auto const &acc, T *const addr, T const &value, T_Scope const scope=T_Scope()) -> T |
| Executes the given operation atomically. | |
| template<typename T, typename T_Scope = scope::Device> | |
| constexpr auto | atomicOr (auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T |
| Executes an atomic or operation. | |
| template<typename T, typename T_Scope = scope::Device> | |
| constexpr auto | atomicSub (auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T |
| Executes an atomic sub operation. | |
| template<typename T, typename T_Scope = scope::Device> | |
| constexpr auto | atomicXor (auto const &acc, T *const addr, T const &value, T_Scope const hier=T_Scope()) -> T |
| Executes an atomic xor operation. | |
| template<typename T, size_t T_uniqueId> | |
| constexpr decltype(auto) | declareSharedMdArray (concepts::Acc auto const &acc, alpaka::concepts::CVector auto const &extent) |
| creates an M-dimensional array | |
| template<typename T, size_t T_uniqueId> | |
| constexpr decltype(auto) | declareSharedVar (concepts::Acc auto const &acc) |
| Create a variable located in the thread blocks shared memory. | |
| template<typename T> | |
| constexpr auto | getDynSharedMem (concepts::Acc auto const &acc) -> T * |
| Get block shared dynamic memory. | |
| template<typename T> | |
| void | isSupportedByAtomicAtomicRef () |
| constexpr void | memFence (auto const &acc, concepts::Scope auto const scope, concepts::MemoryOrder auto const order) |
| template<alpaka::concepts::Layer T_Scope> | |
| constexpr void | sync (concepts::Acc auto const &acc, T_Scope scope) |
| Synchronize all threads within a given scope. | |
| constexpr void | syncBlockThreads (concepts::Acc auto const &acc) |
| Synchronize all threads within a thread block. | |
range-based loop indexable index container | |
| template<concepts::IdxTraversing T_Traverse = traverse::Flat, concepts::IdxMapping T_IdxLayout = layout::Optimized> | |
| ALPAKA_FN_HOST_ACC constexpr auto | makeIdxMap (auto const &acc, auto const workGroup, auto const range, T_Traverse traverse=T_Traverse{}, T_IdxLayout idxLayout=T_IdxLayout{}) |
| Creates an index container. | |
| template<concepts::IdxTraversing T_Traverse = traverse::Flat, concepts::IdxMapping T_IdxLayout = layout::Optimized> | |
| ALPAKA_FN_HOST_ACC constexpr auto | makeIdxMap (auto const &acc, auto const workGroup, auto const range, alpaka::concepts::BoundaryDirection auto const &bd, T_Traverse traverse=T_Traverse{}, T_IdxLayout idxLayout=T_IdxLayout{}) |
| Specialization for an index container with a given boundary direction of the volume described by the range. | |
| template<typename T_ScalarIdxType, concepts::IdxTraversing T_Traverse = traverse::Flat, concepts::IdxMapping T_IdxLayout = layout::Optimized> | |
| ALPAKA_FN_HOST_ACC constexpr auto | makeIdxMap (auto const &acc, auto const workGroup, auto const range, T_Traverse traverse=T_Traverse{}, T_IdxLayout idxLayout=T_IdxLayout{}) |
| Creates an index container. | |
Variables | |
| template<typename T> | |
| constexpr bool | isOrigin_v = trait::IsOrigin<T>::value |
| template<typename T> | |
| constexpr bool | isUnit_v = trait::IsUnit<T>::value |
| constexpr auto | linearized = MultiDimensional<false>{} |
functionality which is usable on the accelerator compute device from within a kernel.
Provides scopes for atomic and memory fence operations, analogous to NVIDIA CUDA's atomic and fence scopes.
This namespace defines the visibility scopes for atomic operations and memory fences, which control the visibility of memory operations across threads, blocks, and devices. The provided scopes are:
|
constexpr |
Executes an atomic add operation.
| T | The value type. |
| addr | The value to change atomically. |
| value | The value used in the atomic operation. |
Definition at line 66 of file atomic.hpp.
|
constexpr |
Executes an atomic and operation.
| T | The value type. |
| addr | The value to change atomically. |
| value | The value used in the atomic operation. |
Definition at line 143 of file atomic.hpp.
|
constexpr |
Executes an atomic compare-and-swap operation.
| T | The value type. |
| addr | The value to change atomically. |
| compare | The comparison value used in the atomic operation. |
| value | The value used in the atomic operation. |
Definition at line 177 of file atomic.hpp.
|
constexpr |
Executes an atomic decrement operation.
| T | The value type. |
| addr | The value to change atomically. |
| value | The value used in the atomic operation. |
Definition at line 132 of file atomic.hpp.
|
constexpr |
Executes an atomic exchange operation.
| T | The value type. |
| addr | The value to change atomically. |
| value | The value used in the atomic operation. |
Definition at line 110 of file atomic.hpp.
|
constexpr |
Executes an atomic increment operation.
| T | The value type. |
| addr | The value to change atomically. |
| value | The value used in the atomic operation. |
Definition at line 121 of file atomic.hpp.
|
constexpr |
Executes an atomic max operation.
| T | The value type. |
| addr | The value to change atomically. |
| value | The value used in the atomic operation. |
Definition at line 99 of file atomic.hpp.
|
constexpr |
Executes an atomic min operation.
| T | The value type. |
| addr | The value to change atomically. |
| value | The value used in the atomic operation. |
Definition at line 88 of file atomic.hpp.
|
constexpr |
Executes the given operation atomically.
| TOp | The operation type. |
| T | The value type. |
| addr | The value to change atomically. |
| compare | The comparison value used in the atomic operation. |
| value | The value used in the atomic operation. |
Definition at line 44 of file atomic.hpp.
|
constexpr |
Executes the given operation atomically.
| TOp | The operation type. |
| T | The value type. |
| addr | The value to change atomically. |
| value | The value used in the atomic operation. |
Definition at line 26 of file atomic.hpp.
|
constexpr |
Executes an atomic or operation.
| T | The value type. |
| addr | The value to change atomically. |
| value | The value used in the atomic operation. |
Definition at line 154 of file atomic.hpp.
|
constexpr |
Executes an atomic sub operation.
| T | The value type. |
| addr | The value to change atomically. |
| value | The value used in the atomic operation. |
Definition at line 77 of file atomic.hpp.
|
constexpr |
Executes an atomic xor operation.
| T | The value type. |
| addr | The value to change atomically. |
| value | The value used in the atomic operation. |
Definition at line 165 of file atomic.hpp.
|
constexpr |
creates an M-dimensional array
| T | type which should be created, the constructor is not called |
| T_uniqueId | id those is unique inside a kernel. Reusing the id will return the same memory declared before with the same id. |
| extent | M-dimensional extent in elements for each dimension, 1 - M dimensions are supported |
|
constexpr |
Create a variable located in the thread blocks shared memory.
| T | The type that should be created; the constructor is not called |
| T_uniqueId | ID that is unique inside a kernel. Reusing the id will return the same memory declared before with the same id. |
|
constexpr |
Get block shared dynamic memory.
The available size of the memory can be defined by specializing 'onHost::trait::GetDynSharedMemBytes' or adding a public member variable 'uint32_t dynSharedMemBytes' for a kernel. The Memory can be accessed by all threads within a block. Access to the memory is not thread safe.
| T | The element type. |
| void alpaka::onAcc::isSupportedByAtomicAtomicRef | ( | ) |
Definition at line 47 of file atomic.hpp.
|
constexpr |
Specialization for an index container with a given boundary direction of the volume described by the range.
Definition at line 75 of file interface.hpp.
|
constexpr |
Creates an index container.
The traversal policy (T_Traverse) defines how the next valid index is found for a worker and defaults to traverse::Flat. The mapping policy (T_IdxLayout) defines how the index is mapped to worker threads and defaults to layout::Optimized.
| T_ScalarIdxType | scalar index type sed for the indices inside the iterator |
| workGroup | Description of the participating thread group. More than one thread can have the same index within the group; all workers with the same id obtain the same index as result. |
| range | Index range description. |
| traverse | Policy describing how the next value can be found. |
| idxLayout | Policy describing how real worker threads will be mapped to the range. |
Definition at line 113 of file interface.hpp.
|
constexpr |
Creates an index container.
The index data type is deduced from the supplied range. The traversal policy (T_Traverse) defines how the next valid index is found for a worker and defaults to traverse::Flat. The mapping policy (T_IdxLayout) defines how the index is mapped to worker threads and defaults to layout::Optimized.
| workGroup | Description of the participating thread group. More than one thread can have the same index within the group; all workers with the same id obtain the same index as result. |
| range | Index range description. |
| traverse | Policy describing how the next value can be found. |
| idxLayout | Policy describing how real worker threads will be mapped to the range. |
Definition at line 57 of file interface.hpp.
|
constexpr |
Definition at line 18 of file memFence.hpp.
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
Definition at line 21 of file WorkerGroup.hpp.