# GetStreamStateBrng

Returns index of a basic generator used for generation of a given random stream.

## Syntax

Fortran:

brng = vslgetstreamstatebrng( stream )

C:

brng = vslGetStreamStateBrng( stream );

## Description

This function retrieves the index of a basic generator used for generation of a given random stream.

## Input Parameters

Name | Type | Description
--- | --- | ---
stream | FORTRAN: TYPE(VSL_STREAM_STATE), TINTENT(IN) C: VSLStreamStatePtr | FORTRAN: Descriptor of the stream state C: Pointer to the stream state structure

## Output Parameters

Name | Type | Description
--- | --- | ---
brng | FORTRAN: INTEGER C: int | Index of the basic generator assigned for the generation of stream ; negative in case of an error

## Return Values

VSL_ERROR_NULL_PTR
  stream is a NULL pointer.
VSL_ERROR_BAD_STREAM
  stream is not a valid random stream.

Parent topic: Service Routines