Struct TempLat::device_kokkos::KokkosNDLambdaWrapper
template <size_t NDim, typename FUN>
ClassList > TempLat > device_kokkos > KokkosNDLambdaWrapper
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.More...
#include <kokkos_internal.h>
Public Attributes
| Type | Name |
|---|---|
| FUN | fun |
Public Functions
| Type | Name |
|---|---|
| KokkosNDLambdaWrapper (const FUN & _fun) |
|
| DEVICE_INLINE_FUNCTION void | operator() (const Args &... args) const |
Detailed Description
Template parameters:
NDimNumber of arguments takenFUNThe lambda to which we forward the indices
Public Attributes Documentation
variable fun
Public Functions Documentation
function KokkosNDLambdaWrapper
function operator()
template<typename... Args>
inline DEVICE_INLINE_FUNCTION void TempLat::device_kokkos::KokkosNDLambdaWrapper::operator() (
const Args &... args
) const
The documentation for this class was generated from the following file cosmolatticeweb/tmp/code_source/templat/include/TempLat/parallel/devices/kokkos/kokkos_internal.h