c11 atomic fence: relaxed requirements for an auxiliary atomic_store (#1603)

This commit is contained in:
Finlay
2023-01-31 17:47:47 +00:00
committed by GitHub
parent 68fcb5904f
commit 691a45d605

View File

@@ -2914,7 +2914,8 @@ public:
+ "-1);\n" + "-1);\n"
" if(hisAtomicValue != hisValue)\n" " if(hisAtomicValue != hisValue)\n"
" { // fail\n" " { // fail\n"
" atomic_store(&destMemory[myId], myValue-1);\n"; " atomic_store_explicit(&destMemory[myId], myValue-1,"
" memory_order_relaxed, memory_scope_work_group);\n";
if (LocalMemory()) if (LocalMemory())
program += " hisId = " program += " hisId = "
"(hisId+get_local_size(0)-1)%get_local_size(0);\n"; "(hisId+get_local_size(0)-1)%get_local_size(0);\n";