Creating Random Stream Copy and Copying Stream State

VS provides an option of producing an exact copy of a generated stream by calling the vslCopyStream function:

vslCopyStream( newstream, srcstream )

A new stream newstream is created with parameters (stream descriptive information) that are exactly the same as those of the source stream srcstream at the moment of calling vslCopyStream. The stream state of newstream is exactly the same as that of srcstream, and both the streams generate random numbers using the same BRNG.

Another service function vslCopyStreamState copies the current state of the stream:

vslCopyStreamState( deststream, srcstream )

The streams srcstream and deststream are assumed to have been created by one of the above methods, both of the streams being related to the same BRNG. The function vslCopyStreamState copies the information about the current stream state from srcstream into deststream. Other stream-related information remains unchanged.

For more complete information about compiler optimizations, see our Optimization Notice.
Select sticky button color: 
Orange (only for download buttons)