Skip to content

File kokkos.h

FileList > code_source > templat > include > TempLat > parallel > devices > kokkos > kokkos.h

Go to the source code of this file

  • #include "TempLat/util/log/puttostream.h"
  • #include <Kokkos_Core.hpp>
  • #include <Kokkos_Complex.hpp>
  • #include <array>
  • #include <tuple>
  • #include "TempLat/parallel/devices/kokkos/kokkos_internal.h"

Namespaces

Type Name
namespace TempLat
namespace device_kokkos

Macros

Type Name
define DEVICE_CLASS_LAMBDA KOKKOS\_CLASS\_LAMBDA
define DEVICE_FORCEINLINE_FUNCTION KOKKOS\_FORCEINLINE\_FUNCTION
define DEVICE_FUNCTION KOKKOS\_FUNCTION
define DEVICE_INLINE_FUNCTION KOKKOS\_INLINE\_FUNCTION
define DEVICE_LAMBDA KOKKOS\_LAMBDA
define TEMPLAT_ASSUME_INDEPENDENT
Assert to the vectorizer that the iterations of the following loop are independent.

Macro Definition Documentation

define DEVICE_CLASS_LAMBDA

#define DEVICE_CLASS_LAMBDA `KOKKOS_CLASS_LAMBDA`

define DEVICE_FORCEINLINE_FUNCTION

#define DEVICE_FORCEINLINE_FUNCTION `KOKKOS_FORCEINLINE_FUNCTION`

define DEVICE_FUNCTION

#define DEVICE_FUNCTION `KOKKOS_FUNCTION`

define DEVICE_INLINE_FUNCTION

#define DEVICE_INLINE_FUNCTION `KOKKOS_INLINE_FUNCTION`

define DEVICE_LAMBDA

#define DEVICE_LAMBDA `KOKKOS_LAMBDA`

define TEMPLAT_ASSUME_INDEPENDENT

Assert to the vectorizer that the iterations of the following loop are independent.

#define TEMPLAT_ASSUME_INDEPENDENT 

This is the promise device::iteration::foreach already makes to its callers: a functor dispatched over the lattice must be site-independent (Kokkos would race on it otherwise), and any kernel that genuinely accumulates across sites has to say so with atomics which no vectorizer touches. Without this assertion the compiler must assume the field being written may alias the fields being read, and it then emits purely scalar code for every kernel: the SU(2) kick, for example, is 2.5x slower with no packed FP instruction in it at all. Kokkos has the same escape hatch (KOKKOS_ENABLE_IVDEP_MDRANGE) but only ever defines it for the Intel compiler, so on GCC/Clang its MDRange tile loops get nothing.



The documentation for this class was generated from the following file cosmolatticeweb/tmp/code_source/templat/include/TempLat/parallel/devices/kokkos/kokkos.h