Developer Reference

Contents

vslsNewAbstractStream

Creates and initializes an abstract random stream for single precision floating-point arrays.

Syntax

status
=
vslsNewAbstractStream
(
&stream
,
n
,
sbuf
,
a
,
b
,
scallback
);
Include Files
  • mkl.h
Input Parameters
Name
Type
Description
n
const MKL_INT
Size of the array
sbuf
sbuf
const float
Array of
n
single precision floating-point random numbers with uniform distribution over interval (
a
,
b
)
a
const float
Left boundary
a
b
const float
Right boundary
b
scallback
See
Note
below
Pointer to the callback function used for update of the array
sbuf
Output Parameters
Name
Type
Description
stream
VSLStreamStatePtr*
Descriptor of the stream state structure
Format of the callback function in C:
int sUpdateFunc( VSLStreamStatePtr
stream
, int*
n
, float
sbuf
[], int*
nmin
, int*
nmax
, int*
idx
);
The callback function returns the number of elements in the array actually updated by the function.
Table
scallback
Callback Function Parameters
gives the description of the callback function parameters.
scallback
Callback Function Parameters
Parameters
Short Description
stream
Abstract random stream descriptor
n
Size of
sbuf
sbuf
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
sbuf
to start update
0
idx
<
n
.
Description
The
vslsNewAbstractStream
function creates a new abstract stream for single precision floating-point arrays with random numbers of the uniform distribution over interval (
a
,
b
). The function associates the stream with a single precision array
sbuf
and your callback function
scallback
that is intended for updating of
sbuf
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.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804