sPyNNaker neural_modelling 7.3.1
Loading...
Searching...
No Matches
Functions | Variables
random_util.h File Reference

Utility function for random number generation. More...

#include <random.h>

Go to the source code of this file.

Functions

static int32_t mars_kiss_fixed_point (void)
 

Variables

static mars_kiss64_seed_t seed = {123456789, 234567891, 345678912, 456789123}
 YUCK copy and pasted RNG to allow inlining and also to avoid horrific executable bloat.
 

Detailed Description

Utility function for random number generation.

Definition in file random_util.h.

Function Documentation

◆ mars_kiss_fixed_point()

static int32_t mars_kiss_fixed_point ( void  )
inlinestatic

Definition at line 33 of file random_util.h.

Variable Documentation

◆ seed

mars_kiss64_seed_t seed = {123456789, 234567891, 345678912, 456789123}
static

YUCK copy and pasted RNG to allow inlining and also to avoid horrific executable bloat.

Algorithm is the KISS algorithm due to Marsaglia and Zaman. (Fortunately, we don't do cryptography on SpiNNaker.)

Returns
random number, uniformly distributed over range 0 .. 2STDP_FIXED_POINT_ONE

Definition at line 31 of file random_util.h.