brook+ allows reuse of stream objects?

Discussion created by rveldema on Mar 4, 2009
Latest reply on Mar 5, 2009 by ryta1203
stream reuse

Is it allowed to reuse stream objects as in:


kernel void work(input<>, out float[]) {...}

    brook::Stream<float> inputStream(rank, streamSize);

    unsigned int streamSizeScatter[] = {height, width};
    brook::Stream<float> outputStream1(2, streamSizeScatter);
    brook::Stream<float> outputStream2(2, streamSizeScatter);

   work(inputStream, outputStream1,  12345);

   // inputstream hasn't changed between these work() calls,

 // lets reuse it!

   work(inputStream, outputStream1, 6789);


The problem that I'm seeing in my application is lots of small arrays

being copied from host to GPU and back.

Reusing streams would help a lot!


Also, a stream output by one kernel and is used

as input to another kernel, is that data kept in GPU memory in the mean time

to reduce copying?