sPyNNaker neural_modelling 7.3.1
Loading...
Searching...
No Matches
Functions
rng.c File Reference

An implementation of random number generation. More...

#include "rng.h"
#include <spin1_api.h>
#include <normal.h>
#include "common_mem.h"

Go to the source code of this file.

Functions

uint32_t rng_generator (rng_t *rng)
 Generate a uniformly-distributed random number.
 
accum rng_exponential (rng_t *rng)
 Generate an exponentially-distributed random number.
 
accum rng_normal (rng_t *rng)
 Generate an normally-distributed random number.
 

Detailed Description

An implementation of random number generation.

Definition in file rng.c.

Function Documentation

◆ rng_generator()

uint32_t rng_generator ( rng_t rng)

Generate a uniformly-distributed random number.

Parameters
[in]rngThe random number generator instance to generate from
Returns
The number generated between 0 and 0xFFFFFFFF

Definition at line 26 of file rng.c.

◆ rng_exponential()

accum rng_exponential ( rng_t rng)

Generate an exponentially-distributed random number.

Parameters
[in]rngThe random number generator instance to use
Returns
The number generated

Definition at line 30 of file rng.c.

◆ rng_normal()

accum rng_normal ( rng_t rng)

Generate an normally-distributed random number.

Parameters
[in]rngThe random number generator instance to use
Returns
The number generated

Definition at line 34 of file rng.c.