[OpenMP][libomptarget] Flush intermediate values during team reduction

Summary: Ensure intermediate values of a team reduction are flushed to memory.

Reviewers: ABataev, caomhin

Reviewed By: ABataev

Subscribers: guansong, jfb, openmp-commits

Differential Revision: https://reviews.llvm.org/D55219

llvm-svn: 348148
This commit is contained in:
Gheorghe-Teodor Bercea 2018-12-03 15:21:49 +00:00
parent 1712bc7640
commit 10b2e60b7e
1 changed files with 1 additions and 0 deletions

View File

@ -444,6 +444,7 @@ EXTERN int32_t __kmpc_nvptx_teams_reduce_nowait_simple(kmp_Ident *loc,
EXTERN void EXTERN void
__kmpc_nvptx_teams_end_reduce_nowait_simple(kmp_Ident *loc, int32_t global_tid, __kmpc_nvptx_teams_end_reduce_nowait_simple(kmp_Ident *loc, int32_t global_tid,
kmp_CriticalName *crit) { kmp_CriticalName *crit) {
__threadfence_system();
(void)atomicExch((uint32_t *)crit, 0); (void)atomicExch((uint32_t *)crit, 0);
} }