I did a small test on Firestream GPU in Brook+. The code is like this:
- kernel void sum2D(float a[][], float b[][], float out c<>

- {
- float2 idx = indexof(c);
- c = a[idx] + b[idx];
- }
- kernel void sum2D(float a[][], float b[][], float out c<>

- {
- float2 idx = indexof(c);
- c = a[idx] + b[idx];
- }