![]() |
alpaka
Abstraction Library for Parallel Kernel Acceleration
|
Generate a linearized scalar index. More...
#include <LinearizedIdxGenerator.hpp>
Public Types | |
| using | index_type = value_type |
| using | value_type = T_IndexType |
Public Member Functions | |
| constexpr | LinearizedIdxGenerator (alpaka::concepts::VectorOrScalar auto const &size) |
| constexpr auto | getExtents () const |
| supported index range | |
| constexpr auto | getPitches () const |
| constexpr | operator bool () const noexcept |
| constexpr value_type | operator[] (alpaka::concepts::IndexVec< T_IndexType, T_dim > auto const &idx) |
| Get value at the given index. | |
| constexpr value_type | operator[] (alpaka::concepts::IndexVec< T_IndexType, T_dim > auto const &idx) const |
| Get value at the given index. | |
| constexpr value_type | operator[] (std::integral auto const &idx) |
| Get value at the given index. | |
| constexpr value_type | operator[] (std::integral auto const &idx) const |
| Get value at the given index. | |
Static Public Member Functions | |
| static consteval uint32_t | dim () |
| static constexpr auto | getAlignment () |
| Get alignment of the generators value_type. | |
Generate a linearized scalar index.
The generator behaves like an n-dimensional data container, but it is not pointing to any memory. The index to access the generator is linearized based on the provided extents.
Definition at line 20 of file LinearizedIdxGenerator.hpp.
| using alpaka::LinearizedIdxGenerator< T_IndexType, T_dim >::index_type = value_type |
Definition at line 27 of file LinearizedIdxGenerator.hpp.
| using alpaka::LinearizedIdxGenerator< T_IndexType, T_dim >::value_type = T_IndexType |
Definition at line 26 of file LinearizedIdxGenerator.hpp.
|
inlineconstexpr |
Definition at line 22 of file LinearizedIdxGenerator.hpp.
|
inlinestaticconsteval |
Definition at line 29 of file LinearizedIdxGenerator.hpp.
|
inlinestaticconstexpr |
Get alignment of the generators value_type.
Definition at line 35 of file LinearizedIdxGenerator.hpp.
|
inlineconstexpr |
supported index range
Definition at line 84 of file LinearizedIdxGenerator.hpp.
|
inlineconstexpr |
Definition at line 89 of file LinearizedIdxGenerator.hpp.
|
inlineexplicitnodiscardconstexprnoexcept |
Definition at line 94 of file LinearizedIdxGenerator.hpp.
|
inlineconstexpr |
Get value at the given index.
| idx | n-dimensional offset, range [0, extents) |
Definition at line 55 of file LinearizedIdxGenerator.hpp.
|
inlineconstexpr |
Get value at the given index.
| idx | n-dimensional offset, range [0, extents) |
Definition at line 45 of file LinearizedIdxGenerator.hpp.
|
inlineconstexpr |
Get value at the given index.
| idx | n-dimensional offset, range [0, extents) |
Definition at line 75 of file LinearizedIdxGenerator.hpp.
|
inlineconstexpr |
Get value at the given index.
| idx | n-dimensional offset, range [0, extents) |
Definition at line 65 of file LinearizedIdxGenerator.hpp.