Visible to Intel only — GUID: GUID-FFE6147F-ECCE-4F27-A2C7-72AC31542736
Visible to Intel only — GUID: GUID-FFE6147F-ECCE-4F27-A2C7-72AC31542736
vsldNewAbstractStream
Creates and initializes an abstract random stream for double precision floating-point arrays.
Syntax
status = vsldnewabstractstream( stream, n, dbuf, a, b, dcallback )
Include Files
- mkl.fi, mkl_vsl.f90
Input Parameters
Name |
Type |
Description |
---|---|---|
n |
INTEGER, INTENT(IN) |
Size of the array dbuf |
dbuf |
REAL(KIND=8), INTENT(IN) |
Array of n double precision floating-point random numbers with uniform distribution over interval (a,b) |
a |
REAL(KIND=8), INTENT(IN) |
Left boundary a |
b |
REAL(KIND=8), INTENT(IN) |
Right boundary b |
dcallback |
See Note below |
Address of the callback function used for update of the array dbuf |
Output Parameters
Name |
Type |
Description |
---|---|---|
stream |
TYPE(VSL_STREAM_STATE), INTENT(OUT) |
Descriptor of the stream state structure |
Format of the callback function in FORTRAN 77:
INTEGER FUNCTION DUPDATEFUNC( stream, n, dbuf, nmin, nmax, idx ) INTEGER*4 stream(2) INTEGER n DOUBLE PRECISION dbuf(n) INTEGER nmin INTEGER nmax INTEGER idx
Format of the callback function in Fortran 90:
INTEGER FUNCTION DUPDATEFUNC[C]( stream, n, dbuf, nmin, nmax, idx ) TYPE(VSL_STREAM_STATE),POINTER :: stream[reference] INTEGER(KIND=4),INTENT(IN) :: n[reference] REAL(KIND=8),INTENT(OUT) :: dbuf[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 dcallback Callback Function Parameters gives the description of the callback function parameters.
Parameters |
Short Description |
---|---|
stream |
Abstract random stream descriptor |
n |
Size of dbuf |
dbuf |
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 dbuf to start update 0≤idx<n. |
Description
The vsldNewAbstractStream function creates a new abstract stream for double precision floating-point arrays with random numbers of the uniform distribution over interval (a,b). The function associates the stream with a double precision array dbuf and your callback function dcallback that is intended for updating of dbuf content.
Return Values
- 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.