cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Raistmer
Adept II

Why stream dimensions so intricate??

0 Likes
1 Reply
Ceq
Journeyman III

Hi Raistmer, certainly that can seem strange, however there is a reason:

When defining an array you specify first the slower changing dimension, that is the 'y' coordinate, and then the faster changing width coordinate 'x'.

When defining a stream you are creating a texture, which coordinates are 'x' and 'y' (or x, y, z, w if you use address translation). You can think that dimensions are the fields of a int4 type, so you have to write them in the opposite order. If you access a Brook+ stream (texture) in the wrong orther, out of bound index coordinates will be clamped.

Well, at least I think that is the reason.

0 Likes