Forum Discussion
Altera_Forum
Honored Contributor
8 years agoHi HRZ
I made the picture larger. It's not all case that write to global with more than 512 bits will this situation occur, e.g. without the if else branch. You can try to compile the code below and see the difference in the system viewer when line in question is marked out. Thank you.__kernel void test(global float2 *restrict dest, global float2
*restrict in, int i)
{
local float2 buf;
int where = get_local_id(0);
int N=64;
buf = in;
buf = in;
buf = in;
buf = in;
buf = in;
buf = in;
buf = in;
buf = in;
if (i){
dest = buf;
dest = buf;
dest = buf;
dest = buf;
dest = buf;
dest = buf;
dest = buf;
dest = buf;
dest = buf; // this line
}
else {
dest = buf;
dest = buf;
dest = buf;
dest = buf;
dest = buf;
dest = buf;
dest = buf;
dest = buf;
}
}