Creates and initializes an abstract random stream for double precision floating-point arrays.
Fortran:
status = vsldnewabstractstream( stream, n, dbuf, a, b, dcallback )
C:
status = vsldNewAbstractStream( &stream, n, dbuf, a, b, dcallback );
The FORTRAN 77 interfaces are specified in the mkl_vsl.f77 include file, the Fortran 90 interfaces are specified in the mkl_vsl.f90 include file, and the C interfaces are specified in the mkl_vsl_functions.h include file.
Name |
Type |
Description |
---|---|---|
n |
FORTRAN 77: INTEGER Fortran 90: INTEGER, INTENT(IN) C: const int |
Size of the array dbuf |
dbuf |
FORTRAN 77: DOUBLE PRECISION Fortran 90: DOUBLE PRECISION, INTENT(IN) C: const double |
Array of n double precision floating-point random numbers with uniform distribution over interval (a,b) |
a |
FORTRAN 77: DOUBLE PRECISION Fortran 90: DOUBLE PRECISION, INTENT(IN) C: const double |
Left boundary a |
b |
FORTRAN 77: DOUBLE PRECISION Fortran 90: DOUBLE PRECISION, INTENT(IN) C: const double |
Right boundary b |
dcallback |
See Note below |
Fortran: Address of the callback function used for update of the array dbuf C: Pointer to the callback function used for update of the array dbuf |
Name |
Type |
Description |
---|---|---|
stream |
FORTRAN 77: INTEGER*4 stream(2) Fortran 90: TYPE(VSL_STREAM_STATE), INTENT(OUT) C: VSLStreamStatePtr* |
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]
Format of the callback function in C: int dUpdateFunc( VSLStreamStatePtr stream, int* n, double dbuf[], int* nmin, int* nmax, int* idx );
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. |
The dNewAbstractStream 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.
Copyright © 1994 - 2011, Intel Corporation. All rights reserved.