sPyNNaker neural_modelling 7.3.1
|
The implementation of a parameter generator. More...
#include "param_generator.h"
#include <spin1_api.h>
#include <debug.h>
#include "generator_types.h"
#include "param_generators/param_generator_constant.h"
#include "param_generators/param_generator_uniform.h"
#include "param_generators/param_generator_normal.h"
#include "param_generators/param_generator_normal_clipped.h"
#include "param_generators/param_generator_normal_clipped_to_boundary.h"
#include "param_generators/param_generator_exponential.h"
#include "param_generators/param_generator_exponential_clipped.h"
Go to the source code of this file.
Data Structures | |
struct | param_generator_info |
A "class" for parameter generators. More... | |
struct | param_generator_t |
The data for a parameter generator. More... | |
Enumerations | |
enum | { CONSTANT , UNIFORM , NORMAL , NORMAL_CLIPPED , NORMAL_CLIPPED_BOUNDARY , EXPONENTIAL , EXPONENTIAL_CLIPPED , N_PARAM_GENERATORS } |
The "hashes" for parameter generators. More... | |
Functions | |
param_generator_t | param_generator_init (uint32_t hash, void **in_region) |
Initialise a specific parameter generator. | |
accum | param_generator_generate (param_generator_t generator) |
Generate value with a parameter generator. | |
void | param_generator_free (param_generator_t generator) |
Finish with a parameter generator. | |
Variables | |
static const struct param_generator_info | param_generators [] |
An Array of known generators. | |
The implementation of a parameter generator.
Definition in file param_generator.c.
struct param_generator_info |
Data Fields | ||
---|---|---|
generator_hash_t | hash |
The hash of the generator. For now, hash is just an index agreed between Python and here. |
initialize_param_func * | initialize | Initialise the generator. |
generate_param_func * | generate | Generate values with a parameter generator. |
free_func * | free | Free any data for the generator. |
struct param_generator |
The data for a parameter generator.
Parameter generator "object".
Definition at line 75 of file param_generator.c.
Data Fields | ||
---|---|---|
const param_generator_info * | type | |
void * | data |
anonymous enum |
The "hashes" for parameter generators.
Definition at line 35 of file param_generator.c.
param_generator_t param_generator_init | ( | uint32_t | hash, |
void ** | region | ||
) |
Initialise a specific parameter generator.
[in] | hash | The identifier of the generator to initialise |
[in,out] | region | The address to read data from; updated to position after data has been read |
Definition at line 114 of file param_generator.c.
accum param_generator_generate | ( | param_generator_t | generator | ) |
Generate value with a parameter generator.
[in] | generator | The generator to use to generate values |
Definition at line 141 of file param_generator.c.
void param_generator_free | ( | param_generator_t | generator | ) |
Finish with a parameter generator.
[in] | generator | The generator to free |
Definition at line 145 of file param_generator.c.
|
static |
An Array of known generators.
Definition at line 83 of file param_generator.c.