diff --git a/lib/kokkos/algorithms/src/Kokkos_Random.hpp b/lib/kokkos/algorithms/src/Kokkos_Random.hpp index d376173bf1..2fb6b553c2 100644 --- a/lib/kokkos/algorithms/src/Kokkos_Random.hpp +++ b/lib/kokkos/algorithms/src/Kokkos_Random.hpp @@ -1204,8 +1204,8 @@ Random_XorShift64 Random_XorShift64_Pool::get_state( template<> KOKKOS_INLINE_FUNCTION void Random_XorShift64_Pool::free_state(const Random_XorShift64 &state) const { -#ifdef __CUDA_ARCH__ state_(state.state_idx_) = state.state_; +#ifdef __CUDA_ARCH__ locks_(state.state_idx_) = 0; return; #endif @@ -1240,9 +1240,9 @@ Random_XorShift1024 Random_XorShift1024_Pool::get_st template<> KOKKOS_INLINE_FUNCTION void Random_XorShift1024_Pool::free_state(const Random_XorShift1024 &state) const { -#ifdef __CUDA_ARCH__ for(int i=0; i<16; i++) state_(state.state_idx_,i) = state.state_[i]; +#ifdef __CUDA_ARCH__ locks_(state.state_idx_) = 0; return; #endif