codeboycjy

What's the better way of modifying a sub-stream?

Discussion created by codeboycjy on Jun 16, 2009
Latest reply on Jun 17, 2009 by gaurav.garg

Hi:

   I'm a beginner on Brook+ stream computing.
   What's the better way of modifying a sub-stream.

    1.  Stream<float4> subStream = mainStream.domain( 1 , 100 );
         kernelModify( subStream );

    2.  kernelModify.domainOffset( uint4( 1 , 0 , 0 , 0  );
         kernelModify.domainSize( uint4( 99 , 1 , 1 , 1 ) );
         kernelModify( mainStream );

   Each of the above method is done 1000 times in order to scale the cost time, the former one turned out to be faster than the second one?
   Is that right? What's the reason??
   Or is there a better way ??

   Any help is really appreciated!!

Outcomes