Peterp

What exactly is Gather und Scatter

Discussion created by Peterp on Jul 15, 2009
Latest reply on Jul 16, 2009 by hagen

Hi,

i'm not sure about the difference between gather und scatter streams, is scatter only write operation to a specific address or also a read operation?In the kernel i write to a scatter outputstream

kernel void (double data<>, out double data1[][])

{

int2 index = instance().xy;

data1[index.y][index.x] = data;

}

Is reading from a specific adr. also a scatter operation?

kernel void (double data[][], out double data1<>

{

int2 index = instance().xy;

data1 = data[index.y][index.x];

}

Outcomes