Brook+ Question to anyone

Discussion created by ryta1203 on Feb 29, 2008
Latest reply on Mar 20, 2008 by michael.chu
I have a question:

Can iterators be declared within a kernel? Can iterators be declared dynamically. I had a problem where if I tried to declare an iterator inside a switch Brook+ wouldn't compile, but outside the switch (outside of everything) it compiled fine.

Essentially, I have a large 3D array that I want to initialize to some incremental value, for instance:

for (l.....)
for (j.....)
for (k....)
array[l][j][k] = k;

Is it possible to intialize the stream directly within a kernel?

The docs on Brook+ (and Brook in general) are not really that in depth and even the sample code seems to be either really generic (simple) or too specific. If someone can point me in the right direction that would be great. Thanks.