Improve barrier implementation

Este cometimento está contido em:
Wenkai Du cometeu 2021-09-08 16:14:32 -05:00
1 ascendente 31bd4236f1
cometimento adb8d63352
2 ficheiros modificados
+12 -8

Não existem ficheiros que correspondam à sua pesquisa

+2 -2
Ver ficheiro
@@ -18,8 +18,8 @@
// Convert volatile access to atomic
#if defined(__HIP_PLATFORM_HCC__) || defined(__HCC__) || defined(__HIPCC__)
#define LOAD(VAR) __atomic_load_n((VAR), __ATOMIC_SEQ_CST)
#define STORE(DST, SRC) __atomic_store_n((DST), (SRC), __ATOMIC_SEQ_CST)
#define LOAD(VAR) __atomic_load_n((VAR), __ATOMIC_ACQUIRE)
#define STORE(DST, SRC) __atomic_store_n((DST), (SRC), __ATOMIC_RELEASE)
#else
#define LOAD(VAR) *(VAR)
#define STORE(DST, SRC) *(DST) = (SRC)