This content has been marked as final. Show 3 replies
Yes, I believe iterator support was dropped.
Thanks for the bug reports! I'll forward those on to the engineering team!
Hi Ceq, sorry about letting this one go for so long...
One of the engineers pointed out that in your first case, you are trying to pass a stream into a normal function which isn't valid from a language point of view. Streams can only be passed to kernels and Brook+ assumes that and treats anything that has a stream as a parameter as a kernel.
Thanks Michael, I'm quite surprised because this was a standard feature in Stanford's Brook project, you can see in "prog/test" folder a few examples like "accumulate", "pack_vout" or "scan".
Even in Brook+ it is working correctly, you just have to use the workaround mentioned above.
I think this is a good feature and is a pity to remove it, for example:
It can be used to split work in several functions, calling kernels from each one of them and passing the results of the previous function as a parameter, this way you can avoid having huge functions that need to setup all the streams and launch all related kernels.
Using StreamWrite, passing it to another function as a pointer and then perform StreamRead again would be very slow.
I think it would be particulary useful in large works or in order to reuse certain functions.