Visible to Intel only — GUID: GUID-DBD5A2AE-C38D-485F-BB9C-8DC08790B36A
Visible to Intel only — GUID: GUID-DBD5A2AE-C38D-485F-BB9C-8DC08790B36A
vsliNewAbstractStream
Creates and initializes an abstract random stream for integer arrays.
status = vsliNewAbstractStream( &stream, n, ibuf, icallback );
- mkl.h
Name |
Type |
Description |
---|---|---|
n |
const MKL_INT |
Size of the array ibuf |
ibuf |
const unsigned int |
Array of n 32-bit integers |
icallback |
Pointer to the callback function used for ibuf update |
Format of the callback function:
int iUpdateFunc( VSLStreamStatePtr stream, int* n, unsigned int ibuf[], int* nmin, int* nmax, int* idx );
The callback function returns the number of elements in the array actually updated by the function.Table icallback Callback Function Parameters gives the description of the callback function parameters.
Parameters |
Short Description |
---|---|
stream |
Abstract random stream descriptor |
n |
Size of ibuf |
ibuf |
Array of random numbers associated with the stream stream |
nmin |
Minimal quantity of numbers to update |
nmax |
Maximal quantity of numbers that can be updated |
idx |
Position in cyclic buffer ibuf to start update 0≤idx<n. |
Name |
Type |
Description |
---|---|---|
stream |
VSLStreamStatePtr* |
Descriptor of the stream state structure |
The vsliNewAbstractStream function creates a new abstract stream and associates it with an integer array ibuf and your callback function icallback that is intended for updating of ibuf content.
- VSL_ERROR_OK, VSL_STATUS_OK
-
Indicates no error, execution is successful.
- VSL_ERROR_BADARGS
-
Parameter n is not positive.
- VSL_ERROR_MEM_FAILURE
-
System cannot allocate memory for stream.
- VSL_ERROR_NULL_PTR
-
Either buffer or callback function parameter is a NULL pointer.