randskipahead() - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
void SRANDSKIPAHEAD(rng_int_t *n, rng_int_t *state, rng_int_t *info)#
void DRANDSKIPAHEAD(rng_int_t *n, rng_int_t *state, rng_int_t *info)#
void srandskipahead_(rng_int_t *n, rng_int_t *state, rng_int_t *info)#
void drandskipahead_(rng_int_t *n, rng_int_t *state, rng_int_t *info)#
void srandskipahead(rng_int_t n, rng_int_t *state, rng_int_t *info)#
void drandskipahead(rng_int_t n, rng_int_t *state, rng_int_t *info)#

Advance the generator defined by state so that the next call generates a number n- places after the previous number.

Allows multiple streams using the Skip Ahead method.

Parameters:
  • n[in] Number of places to skip ahead, n >= 0

  • state[inout]

    On Entry: state array generated by one of the initialisation routines

    On Exit : The entry stream, advanced n- places and set to return every Nth value

  • info[out]

    Error code:

    0 = Everything OK

    -1 to -2 = Error in parameter, abs(info) If the generator defined by state can not be multithreaded using the skipahead method then routine returns -2