10 #ifndef STOKHOS_CUDA_WARP_SHUFFLE_HPP
11 #define STOKHOS_CUDA_WARP_SHUFFLE_HPP
13 #include "Kokkos_Core.hpp"
16 # if (__CUDA_ARCH__ >= 300)
17 # define HAVE_CUDA_SHUFFLE 1
19 # define HAVE_CUDA_SHUFFLE 0
22 # define HAVE_CUDA_SHUFFLE 0
27 template<
typename Scalar>
28 KOKKOS_INLINE_FUNCTION
33 template<
typename Scalar>
34 KOKKOS_INLINE_FUNCTION
39 template<
typename Scalar>
40 KOKKOS_INLINE_FUNCTION
44 return __shfl_down_sync(mask, val, delta, width);
53 template<
typename Scalar>
54 KOKKOS_INLINE_FUNCTION
58 return __shfl_up_sync(mask, val, delta, width);
67 KOKKOS_INLINE_FUNCTION
KOKKOS_INLINE_FUNCTION void sync_warp(const int &mask)
KOKKOS_INLINE_FUNCTION Scalar shfl_down(const Scalar &val, const int &delta, const int &width)
KOKKOS_INLINE_FUNCTION Scalar shfl_up(const Scalar &val, const int &delta, const int &width)