Creates a new stream and reads stream descriptive data, including stream state, from the memory buffer.
FORTRAN:
errstatus = vslloadstreamm( stream, memptr )
C:
errstatus = vslLoadStreamM( &stream, memptr );
Name |
Type |
Description |
---|---|---|
memptr |
FORTRAN 77: INTEGER*1 Fortran 90: INTEGER(KIND=1), DIMENSION(*), INTENT(IN) C: const char* |
Fortran: Memory buffer to load random stream descriptive data from C: Memory buffer to load random stream descriptive data from |
Name |
Type |
Description |
---|---|---|
stream |
FORTRAN 77: INTEGER*4 stream(2) Fortran 90: TYPE(VSL_STREAM_STATE), INTENT(OUT) C: VSLStreamStatePtr* |
Fortran: Descriptor of a new random stream C: Pointer to a new random stream |
errstatus |
Fortran: INTEGER C: int |
Error status of the operation |
The vslLoadStreamM function creates a new stream and reads stream descriptive data, including the stream state, from the memory buffer. A new random stream is created using the stream descriptive data from the memory pointer by memptr. If the stream cannot be read (for example, memptr is invalid), errstatus has a non-zero value. To save random stream to the memory, use vslSaveStreamM function. Use the service routine vslGetStreamSize to determine the amount of memory sufficient to hold the random stream.
Calling LoadStreamM with a previously initialized stream pointer can have unintended consequences such as a memory leak. To initialize a stream which has been in use until calling vslLoadStreamM, you should call the vslDeleteStream function first to deallocate the resources.