KOKKOS_INLINE_FUNCTION void team_broadcast(ValueType& value, const int& thread_id) const { #if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST ) { } #else // Make sure there is enough scratch space: typedef typename if_c< sizeof(ValueType) < TEAM_REDUCE_SIZE , ValueType , void >::type type ; type * const local_value = ((type*) m_exec.scratch_thread()); if(team_rank() == thread_id) *local_value = value; memory_fence(); team_barrier(); value = *local_value; #endif }
KOKKOS_INLINE_FUNCTION const execution_space::scratch_memory_space& thread_scratch(int) const { return m_team_shared.set_team_thread_mode(0,team_size(),team_rank()) ; }