sPyNNaker neural_modelling 7.3.1
Loading...
Searching...
No Matches
Data Structures | Functions
connection_generator_kernel.h File Reference

Kernel connection generator implementation. More...

#include <stdbool.h>
#include <synapse_expander/common_kernel.h>
#include <synapse_expander/common_mem.h>
#include <synapse_expander/generator_types.h>

Go to the source code of this file.

Data Structures

struct  kernel
 The parameters to be passed around for this connector. More...
 

Functions

static void * connection_generator_kernel_initialise (void **region)
 Initialise the convolution-kernel connection generator.
 
static void connection_generator_kernel_free (void *generator)
 Free the convolution-kernel connection generator.
 
static bool connection_generator_kernel_generate (void *generator, uint32_t pre_lo, uint32_t pre_hi, uint32_t post_lo, uint32_t post_hi, uint32_t post_index, uint32_t post_slice_start, uint32_t post_slice_count, unsigned long accum weight_scale, accum timestep_per_delay, param_generator_t weight_generator, param_generator_t delay_generator, matrix_generator_t matrix_generator)
 Generate connections with the convolution-kernel connection generator.
 

Detailed Description

Kernel connection generator implementation.

Definition in file connection_generator_kernel.h.


Data Structure Documentation

◆ kernel

struct kernel

The parameters to be passed around for this connector.

Definition at line 30 of file connection_generator_kernel.h.

Data Fields
uint16_t commonWidth
uint16_t commonHeight
uint16_t preWidth Prepopulation grid width.
uint16_t preHeight Prepopulation grid height.
uint16_t postWidth Postpopulation grid width.
uint16_t postHeight Postpopulation grid height.
uint16_t startPreWidth Prepopulation grid X offset.
uint16_t startPreHeight Prepopulation grid Y offset.
uint16_t startPostWidth Postpopulation grid X offset.
uint16_t startPostHeight Postpopulation grid Y offset.
uint16_t stepPreWidth Prepopulation grid X step.
uint16_t stepPreHeight Prepopulation grid Y step.
uint16_t stepPostWidth Postpopulation grid X step.
uint16_t stepPostHeight Postpopulation grid Y step.
uint16_t kernelWidth Convolution kernel grid width.
uint16_t kernelHeight Convolution kernel grid height.
uint16_t weightsPresent True if weights are present in the array below.
uint16_t delaysPresent True if delays are present in the array below.
accum kernelWeightsAndDelays[]

Kernel weights and delays This is an array of up to kernel width x height x 2 (one for each of weight and delay) depending on above flags

Function Documentation

◆ connection_generator_kernel_initialise()

static void * connection_generator_kernel_initialise ( void **  region)
static

Initialise the convolution-kernel connection generator.

Parameters
[in,out]regionRegion to read parameters from. Should be updated to position just after parameters after calling.
Returns
A data item to be passed in to other functions later on

Definition at line 84 of file connection_generator_kernel.h.

◆ connection_generator_kernel_free()

static void connection_generator_kernel_free ( void *  generator)
static

Free the convolution-kernel connection generator.

Parameters
[in]generatorThe generator to free

Definition at line 115 of file connection_generator_kernel.h.

◆ connection_generator_kernel_generate()

static bool connection_generator_kernel_generate ( void *  generator,
uint32_t  pre_lo,
uint32_t  pre_hi,
uint32_t  post_lo,
uint32_t  post_hi,
uint32_t  post_index,
uint32_t  post_slice_start,
uint32_t  post_slice_count,
unsigned long accum  weight_scale,
accum  timestep_per_delay,
param_generator_t  weight_generator,
param_generator_t  delay_generator,
matrix_generator_t  matrix_generator 
)
static

Generate connections with the convolution-kernel connection generator.

Parameters
[in]generatorThe generator to use to generate connections
[in]pre_slice_startThe start of the slice of the pre-population being generated
[in]pre_slice_countThe number of neurons in the slice of the pre-population being generated
[in]pre_neuron_indexThe index of the neuron in the pre-population being generated
[in]post_slice_startThe start of the slice of the post-population being generated
[in]post_slice_countThe number of neurons in the slice of the post-population being generated
[in]max_row_lengthThe maximum number of connections to generate
[in,out]indicesAn array into which the core-relative post-indices should be placed. This will be initialised to be max_row_length in size
Returns
The number of connections generated

Definition at line 138 of file connection_generator_kernel.h.