Developer Reference for Intel® oneAPI Math Kernel Library for C
A newer version of this document is available. Customers should click here to go to the newest version.
vslLoadStreamF
Creates new stream and reads stream descriptive data, including stream state, from binary file.
Syntax
errstatus = vslLoadStreamF( &stream, fname );
Include Files
- mkl.h
Input Parameters
Name |
Type |
Description |
---|---|---|
fname |
const char* |
File name specified as a null-terminated string |
Output Parameters
Name |
Type |
Description |
---|---|---|
stream |
VSLStreamStatePtr* |
Pointer to a new random stream |
errstatus |
int |
Error status of the operation |
Description
The vslLoadStreamF function creates a new stream and reads stream descriptive data, including the stream state, from the binary file. A new random stream is created using the stream descriptive data from the binary file with the name fname. If the stream cannot be read (for example, an I/O error occurs or the file format is invalid), errstatus has a non-zero value. To save random stream to the file, use vslSaveStreamF function.
Calling vslLoadStreamF 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 vslLoadStreamF, you should call the vslDeleteStream function first to deallocate the resources.
Product and Performance Information |
---|
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex. Notice revision #20201201 |
Return Values
- VSL_ERROR_OK, VSL_STATUS_OK
-
Indicates no error, execution is successful.
- VSL_ERROR_NULL_PTR
-
fname is a NULL pointer.
- VSL_RNG_ERROR_FILE_OPEN
-
Indicates an error in opening the file.
- VSL_RNG_ERROR_FILE_WRITE
-
Indicates an error in writing the file.
- VSL_RNG_ERROR_FILE_CLOSE
-
Indicates an error in closing the file.
- VSL_ERROR_MEM_FAILURE
-
System cannot allocate memory for internal needs.
- VSL_RNG_ERROR_BAD_FILE_FORMAT
-
Unknown file format.
- VSL_RNG_ERROR_UNSUPPORTED_FILE_VER
-
File format version is unsupported.
- VSL_RNG_ERROR_NONDETERMINISTIC_NOT_SUPPORTED
-
Non-deterministic random number generator is not supported.
- VSL_RNG_ERROR_ARS5_NOT_SUPPORTED
-
ARS-5 random number generator is not supported on the CPU running the application.