31#define MAX_REDRAWS 1000
63 params->params = *params_sdram;
64 *
region = ¶ms_sdram[1];
65 log_debug(
"exponential clipped beta = %k, low = %k, high = %k",
91 value = value * obj->params.beta;
93 }
while ((value < obj->
params.low || value > obj->params.high)
96 log_error(
"Maximum number of redraws (%u) exceeded on clipped exponential "
97 "distribution with beta=%k, low=%k, high=%k",
98 n_draws, obj->params.beta, obj->params.low, obj->params.high);
void log_error(const char *message,...)
void log_debug(const char *message,...)
General types associated with generators.
rng_t * core_rng
An RNG that is local to the current core.
#define MAX_REDRAWS
The maximum number of redraws performed before giving up.
static accum param_generator_exponential_clipped_generate(void *generator)
How to generate values with the exponential RNG parameter generator.
static void * param_generator_exponential_clipped_initialize(void **region)
How to initialise the exponential RNG parameter generator.
static void param_generator_exponential_clipped_free(void *generator)
How to free any data for the exponential RNG parameter generator.
The data structure to be passed around for this generator. This includes the parameters and an RNG.
The parameters that can be copied in from SDRAM.
accum rng_normal(rng_t *rng)
Generate an normally-distributed random number.
Random number generator interface.
void sark_free(void *ptr)
void rt_error(uint code,...)
region
spike source array region IDs in human readable form
static stdp_params params
Configuration parameters.