Intel® oneAPI Math Kernel Library Developer Reference - Fortran
Creates and initializes an abstract random stream for integer arrays.
status = vslinewabstractstream( stream, n, ibuf, icallback )
Name |
Type |
Description |
---|---|---|
n |
INTEGER, INTENT(IN) |
Size of the array ibuf |
ibuf |
INTEGER(KIND=4), INTENT(IN) |
Array of n 32-bit integers |
icallback |
See Note below |
Address of the callback function used for ibuf update |
Format of the callback function in FORTRAN 77:
INTEGER FUNCTION IUPDATEFUNC( stream, n, ibuf, nmin, nmax, idx )
INTEGER*4 stream(2)
INTEGER n
INTEGER*4 ibuf(n)
INTEGER nmin
INTEGER nmax
INTEGER idx
Format of the callback function in Fortran 90:
INTEGER FUNCTION IUPDATEFUNC[C]( stream, n, ibuf, nmin, nmax, idx )
TYPE(VSL_STREAM_STATE),POINTER :: stream[reference]
INTEGER(KIND=4),INTENT(IN) :: n[reference]
INTEGER(KIND=4),INTENT(OUT) :: ibuf[reference](0:n-1)
INTEGER(KIND=4),INTENT(IN) :: nmin[reference]
INTEGER(KIND=4),INTENT(IN) :: nmax[reference]
INTEGER(KIND=4),INTENT(IN) :: idx[reference]
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 |
TYPE(VSL_STREAM_STATE), TINTENT(OUT) |
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.
Indicates no error, execution is successful.
Parameter n is not positive.
System cannot allocate memory for stream.
Either buffer or callback function parameter is a NULL pointer.