uforob

Conditional and synchronization instructions in kernel functions

Discussion created by uforob on Dec 29, 2010
Latest reply on Dec 29, 2010 by himanshu.gautam

I wrote a code that would be like the one attached but i obtain wrong results. The question are

- for some reason is it better or correct inverting blocks inserting do nothing in the "else" block?

- what's the effect of inlcuding sinchronization instructions inside a block of a conditional?

if(...) { //do nothing } else { //do something ... barrier(CLK_LOCAL_MEM_FENCE); .... barrier(CLK_LOCAL_MEM_FENCE); }

Outcomes