Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

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.h

Input Parameters

Name

Type

Description

n

const MKL_INT

Size of the array dbuf

dbuf

const double

Array of n double precision floating-point random numbers with uniform distribution over interval (a,b)

a

const double

Left boundary a

b

const double

Right boundary b

dcallback

See Note below

Pointer to the callback function used for update of the array dbuf

Output Parameters

Name

Type

Description

stream

VSLStreamStatePtr*

Descriptor of the stream state structure

NOTE:

Format of the callback function:

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.

dcallback 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 0idx<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.