Namespace TempLat::device_kokkos
Namespace List > TempLat > device_kokkos
Namespaces
| Type | Name |
|---|---|
| namespace | iteration |
| namespace | memory |
Classes
| Type | Name |
|---|---|
| class | DeviceGuard A class to manage and initialize the Kokkos runtime environment and its dependencies. |
| struct | GetKokkosNDStarType <NDim, typename T> |
| struct | GetKokkosNDStarType< 1, T > <typename T> |
| struct | KokkosNDLambdaWrapper <NDim, typename FUN> This is a functor which wraps a lambda. Basically, this is necessary when one wants to call a variadic lambda on an NVIDIA GPU. CUDA seems to be unable to expand the variadic arguments - in contrast, a direct approach does indeed work for openMP or serial compilation. To get around this limitation, the KokkosNDLambdaWrapper packs the indices into an array. If you wonder, whether there's a difference when using tie and tuples:https://godbolt.org/z/M3bG39rsM No. Therefore, we spare the ourselves the hassle and simply use an array. |
| struct | KokkosNDLambdaWrapperInnerLoop <NDim, typename FUN> The CPU dispatch: a functor which wraps a lambda and walks the contiguous last dimension itself. |
| struct | KokkosNDLambdaWrapperReduction <NDim, typename FUN> This is a functor which wraps a lambda for reduction. Basically, this is necessary when one wants to call a variadic lambda on an NVIDIA GPU. CUDA seems to be unable to expand the variadic arguments - in contrast, a direct approach does indeed work for openMP or serial compilation. To get around this limitation, the KokkosNDLambdaWrapperReduction packs the indices into an array. If you wonder, whether there's a difference when using tie and tuples:https://godbolt.org/z/M3bG39rsM No. Therefore, we spare the ourselves the hassle and simply use an array. |
Public Types
| Type | Name |
|---|---|
| typedef Kokkos::DefaultExecutionSpace | DefaultExecutionSpace |
| typedef Kokkos::DefaultHostExecutionSpace | DefaultHostExecutionSpace |
| typedef Kokkos::LayoutRight | DefaultLayout |
| typedef int64_t | Idx |
| typedef std::array< Idx, NDim > | IdxArray |
| typedef std::array< T, N > | array |
| typedef Kokkos::complex< T > | complex |
Public Attributes
| Type | Name |
|---|---|
| constexpr bool | reverse_access_pattern = false |
Public Functions
| Type | Name |
|---|---|
| MakeException (KokkosDeviceGuardInstantiationException) |
|
| auto | getLocalKokkosOuterPolicy (const LayoutStruct< NDim > & layout) The CPU counterpart of getLocalKokkosPolicy: a policy over the OUTER NDim-1 dimensions only. The contiguous last dimension is left to KokkosNDLambdaWrapperInnerLoop , which walks it in a plain loop that the vectorizer can see. Never used on GPU, where the full-rank MDRange with the reversed access pattern is what gives coalesced access. |
| auto | getLocalKokkosPolicy (const LayoutStruct< NDim > & layout) |
| auto | getLocalKokkosPolicy (const device_kokkos::array< I, NDim > & starts, const device_kokkos::array< I, NDim > & stops) |
| DEVICE_INLINE_FUNCTION auto | reverse_array (const device_kokkos::array< Arg, N > & arr, std::index_sequence< Is... >) |
| DEVICE_INLINE_FUNCTION auto | reverse_array (const device_kokkos::array< Arg, N > & arr) |
| DEVICE_INLINE_FUNCTION auto | reverse_tuple (const device_kokkos::tuple< Args... > & tuple, std::index_sequence< Is... >) |
| DEVICE_INLINE_FUNCTION auto | reverse_tuple (const device_kokkos::tuple< Args... > & tuple) |
| DEVICE_INLINE_FUNCTION constexpr auto | tuple_first (const device_kokkos::tuple< Head, Tail... > & t) Returns the first i elements of the given tuple t. |
| DEVICE_INLINE_FUNCTION constexpr auto | tuple_last (const device_kokkos::tuple< Head, Tail... > & t) Returns the last i elements of the given tuple t. |
Public Types Documentation
typedef DefaultExecutionSpace
typedef DefaultHostExecutionSpace
using TempLat::device_kokkos::DefaultHostExecutionSpace = typedef Kokkos::DefaultHostExecutionSpace;
typedef DefaultLayout
typedef Idx
typedef IdxArray
typedef array
typedef complex
Public Attributes Documentation
variable reverse_access_pattern
Public Functions Documentation
function MakeException
function getLocalKokkosOuterPolicy
The CPU counterpart of getLocalKokkosPolicy: a policy over the OUTER NDim-1 dimensions only. The contiguous last dimension is left to KokkosNDLambdaWrapperInnerLoop , which walks it in a plain loop that the vectorizer can see. Never used on GPU, where the full-rank MDRange with the reversed access pattern is what gives coalesced access.
template<size_t NDim>
auto TempLat::device_kokkos::getLocalKokkosOuterPolicy (
const LayoutStruct < NDim > & layout
)
function getLocalKokkosPolicy
template<size_t NDim>
auto TempLat::device_kokkos::getLocalKokkosPolicy (
const LayoutStruct < NDim > & layout
)
function getLocalKokkosPolicy
template<size_t NDim, typename I>
auto TempLat::device_kokkos::getLocalKokkosPolicy (
const device_kokkos::array< I, NDim > & starts,
const device_kokkos::array< I, NDim > & stops
)
function reverse_array
template<typename Arg, size_t N, std::size_t... Is>
DEVICE_INLINE_FUNCTION auto TempLat::device_kokkos::reverse_array (
const device_kokkos::array< Arg, N > & arr,
std::index_sequence< Is... >
)
function reverse_array
template<typename Arg, size_t N>
DEVICE_INLINE_FUNCTION auto TempLat::device_kokkos::reverse_array (
const device_kokkos::array< Arg, N > & arr
)
function reverse_tuple
template<typename... Args, std::size_t... Is>
DEVICE_INLINE_FUNCTION auto TempLat::device_kokkos::reverse_tuple (
const device_kokkos::tuple< Args... > & tuple,
std::index_sequence< Is... >
)
function reverse_tuple
template<typename... Args>
DEVICE_INLINE_FUNCTION auto TempLat::device_kokkos::reverse_tuple (
const device_kokkos::tuple< Args... > & tuple
)
function tuple_first
Returns the first i elements of the given tuple t.
template<int i, typename Head, typename... Tail>
DEVICE_INLINE_FUNCTION constexpr auto TempLat::device_kokkos::tuple_first (
const device_kokkos::tuple< Head, Tail... > & t
)
Template parameters:
isize of the tuple to be returned
Parameters:
ttuple to be split
Returns:
auto a tied tuple of the first i elements
function tuple_last
Returns the last i elements of the given tuple t.
template<size_t i, typename Head, typename... Tail>
DEVICE_INLINE_FUNCTION constexpr auto TempLat::device_kokkos::tuple_last (
const device_kokkos::tuple< Head, Tail... > & t
)
Template parameters:
isize of the tuple to be returned
Parameters:
ttuple to be split
Returns:
auto a tied tuple of the last i elements
The documentation for this class was generated from the following file cosmolatticeweb/tmp/code_source/templat/include/TempLat/parallel/devices/kokkos/kokkos.h