cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

codeboycjy
Journeyman III

Is there a way of doing gather and scatter in one single kernel (IL , not brook+ or openCL)

Hi:
   i'm tring to make reduction work on CAL and check its performance.

  Is there a way of doing gather and scatter in the same kernel written in IL?
  There are samples of gather and scattering in the SDK. But both of them use g[] as parameter name, how to seperate them if i want to use both of them?

  thanks

0 Likes
3 Replies
the729
Journeyman III

On RV8xx I believe you can use UAVs to seperate input and output. However RV7xx supports only 1 UAV.

If you care about backward compatibility, you need to seperate the input and output area of the global buffer g[], like a ping-pong buffer.

You can also read data from g[], manipulate it and store the results back to g[], overriding the input.

0 Likes
the729
Journeyman III

Besides, you do not necessarily "gather" from g[], samplers can also access arbitrary locations.

0 Likes

the729,
You do not necessarily have to override the input when using g[] or uav's. They can both access 4G of memory, so you can place both data segments in the same memory buffer and just offset them. So you would read from offset 0 and write to offset 2M.
0 Likes