This content has been marked as final. Show 2 replies
Insert a memory fence instruction. This instruction tells the compiler not to move load/stores around the instruction.
'fence_lds' also makes sure lds writes are visible to other threads, which my code doesn't require. I guess I can use it for now but isn't it a bit of an overkill?