wgbljl

why does computation on 2D stream is much better than on 1D or 3D problem?

Discussion created by wgbljl on Nov 24, 2008

I did a small test on Firestream GPU in Brook+. The code is like this:

  1. kernel void sum2D(float a[][], float b[][], float out c<>
  2. {
  3.       float2 idx = indexof(c);
  4.       c = a[idx] + b[idx];
  5. }
  6. kernel void sum2D(float a[][], float b[][], float out c<>
  7. {
  8.       float2 idx = indexof(c);
  9.       c = a[idx] + b[idx];
  10. }

Outcomes