What might cause “Undefined Behaviour” in this parallel GPU code?
问题 Lets assume core1 and core2 try writing their variables a and b to same memory location. How can UB be explained here? We dont know if a or b is written to that memory location(as a last action). We dont even know what is written there (a garbage) Even the target memory address can be miscalculated(segfault?). Some logical gates make wrong currents and CPU disables itself CPU's frequency information becomes corrupt and goes high overclock(and break itself) Can I assume only the first option