42#ifndef STOKHOS_CUDA_WARP_SHUFFLE_HPP
43#define STOKHOS_CUDA_WARP_SHUFFLE_HPP
45#include "Kokkos_Core.hpp"
48# if (__CUDA_ARCH__ >= 300)
49# define HAVE_CUDA_SHUFFLE 1
51# define HAVE_CUDA_SHUFFLE 0
54# define HAVE_CUDA_SHUFFLE 0
59template<
typename Scalar>
62 return Kokkos::shfl_down(
val, delta, width);
65template<
typename Scalar>
68 return Kokkos::shfl_up(
val, delta, width);
71template<
typename Scalar>
76 return __shfl_down_sync(mask,
val, delta, width);
85template<
typename Scalar>
90 return __shfl_up_sync(mask,
val, delta, width);
Top-level namespace for Stokhos classes and functions.
KOKKOS_INLINE_FUNCTION void sync_warp(const int &mask)
KOKKOS_INLINE_FUNCTION Scalar shfl_up(const Scalar &val, const int &delta, const int &width)
KOKKOS_INLINE_FUNCTION Scalar shfl_down(const Scalar &val, const int &delta, const int &width)