GeNN  3.3.0
GPU enhanced Neuronal Networks (GeNN)
sparseUtils.cc File Reference
#include "sparseUtils.h"
#include <numeric>
#include <vector>
#include <cassert>
#include "utils.h"

Functions

void createPosttoPreArray (unsigned int preN, unsigned int postN, SparseProjection *C)
 Utility to generate the SPARSE array structure with post-to-pre arrangement from the original pre-to-post arrangement where postsynaptic feedback is necessary (learning etc) More...
 
void createPreIndices (unsigned int preN, unsigned int, SparseProjection *C)
 Function to create the mapping from the normal index array "ind" to the "reverse" array revInd, i.e. the inverse mapping of remap. This is needed if SynapseDynamics accesses pre-synaptic variables. More...
 
void initializeSparseArray (const SparseProjection &C, unsigned int *dInd, unsigned int *dIndInG, unsigned int preN)
 Function for initializing conductance array indices for sparse matrices on the GPU (by copying the values from the host) More...
 
void initializeSparseArrayRev (const SparseProjection &C, unsigned int *dRevInd, unsigned int *dRevIndInG, unsigned int *dRemap, unsigned int postN)
 Function for initializing reversed conductance array indices for sparse matrices on the GPU (by copying the values from the host) More...
 
void initializeSparseArrayPreInd (const SparseProjection &C, unsigned int *dPreInd)
 Function for initializing reversed conductance arrays presynaptic indices for sparse matrices on the GPU (by copying the values from the host) More...
 

Function Documentation

◆ createPosttoPreArray()

void createPosttoPreArray ( unsigned int  preN,
unsigned int  postN,
SparseProjection C 
)

Utility to generate the SPARSE array structure with post-to-pre arrangement from the original pre-to-post arrangement where postsynaptic feedback is necessary (learning etc)

Utility to generate the YALE array structure with post-to-pre arrangement from the original pre-to-post arrangement where postsynaptic feedback is necessary (learning etc)

◆ createPreIndices()

void createPreIndices ( unsigned int  preN,
unsigned int  ,
SparseProjection C 
)

Function to create the mapping from the normal index array "ind" to the "reverse" array revInd, i.e. the inverse mapping of remap. This is needed if SynapseDynamics accesses pre-synaptic variables.

◆ initializeSparseArray()

void initializeSparseArray ( const SparseProjection C,
unsigned int *  dInd,
unsigned int *  dIndInG,
unsigned int  preN 
)

Function for initializing conductance array indices for sparse matrices on the GPU (by copying the values from the host)

◆ initializeSparseArrayPreInd()

void initializeSparseArrayPreInd ( const SparseProjection C,
unsigned int *  dPreInd 
)

Function for initializing reversed conductance arrays presynaptic indices for sparse matrices on the GPU (by copying the values from the host)

◆ initializeSparseArrayRev()

void initializeSparseArrayRev ( const SparseProjection C,
unsigned int *  dRevInd,
unsigned int *  dRevIndInG,
unsigned int *  dRemap,
unsigned int  postN 
)

Function for initializing reversed conductance array indices for sparse matrices on the GPU (by copying the values from the host)