For a particular class of applications, such as cellular automata simulations, it would be realy convenient to be able to shift streams. Actually to rotate them would be even better. I've seem a note somewhere (http://merrimac.stanford.edu/brook/quikspec.10-18-02.pdf) that mentions such functions as "coming soon". Any chance of having them in Brook+ ?
I'll add my voice to that one. There are a lot of financial applications that reduce to calculations like
a_0 x[ i ] + a_1 x[i-1] + a_2 x[i-2] ...
which might be more efficient to code into a Brook kernel using offset copies of the x[] vectors. x[] is are typically ~504 or ~756 in length (2 or 3 years of business-day data at 252 days/year).
Probably.
With a float4 assigned to x..x[i-3] that would cover a lot of cases. I'll have to test it out to see; I don't have a good feel for the relative efficiency of each approach.
So the .domain(a,b) is inclusive of b? I ask because the C++ convention would have b set to one past the upper element.