I am working on debugging an unspecified launch failure that I have tracked down to the presence of an if statement within a nested for loop.
Will code of the form:
radsqr = SQR(radsum); steric += (dsq <= radsqr) * (radsqr - dsq);
be equivalent to
if (dsq <= radsqr) steric += radsqr - dsq;
in terms of causing thread divergence, or will using the logic operator in the assignment keep the various threads synched?