DPCT1007:2: Migration of atomicDec is not supported. However, atomicInc() can be migrated.
I posted a feature request (intel/llvm#8220).
Could you please explain that the implementation of atomicDec() below does not work ? Thanks.
// atomicDec(&gpuData[8], 137)
auto ao8 = atomic_ref<T, memory_order::relaxed, memory_scope::device,
access::address_space::global_space>(gpuData[8]);
while (true) {
T old = ao8.load();
if (old == 0 || old > 137) {
if (ao8.compare_exchange_strong(old, 137)) break;
} else if (ao8.compare_exchange_strong(old, old - 1)) break;
}
DPCT1007:2: Migration of atomicDec is not supported. However, atomicInc() can be migrated.
I posted a feature request (intel/llvm#8220).
Could you please explain that the implementation of atomicDec() below does not work ? Thanks.