Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
auryn_definitions.h File Reference
#include <iostream>
#include <iomanip>
#include <string>
#include <cmath>
#include <cstdlib>
#include <list>
#include <exception>
#include <limits>
#include <x86intrin.h>
#include <boost/mpi.hpp>
#include "Logger.h"
Include dependency graph for auryn_definitions.h:

Go to the source code of this file.

Classes

struct  auryn::neuron_pair
 Struct that defines a pair of neurons in SparseConnection. More...
 
struct  auryn::pattern_member
 Struct used to define neuronal assembly patterns in SparseConnection. More...
 
struct  auryn::SpikeEvent_type
 Auryn spike event for binary monitors. More...
 
struct  auryn::StateValue_type
 Auryn spike event for binary monitors. More...
 
class  auryn::AurynOpenFileException
 
class  auryn::AurynMMFileException
 
class  auryn::AurynMatrixDimensionalityException
 
class  auryn::AurynMatrixComplexStateException
 
class  auryn::AurynMatrixBufferException
 
class  auryn::AurynMatrixPushBackException
 
class  auryn::AurynConnectionAllocationException
 
class  auryn::AurynMemoryAlignmentException
 
class  auryn::AurynDelayTooSmallException
 
class  auryn::AurynTimeOverFlowException
 
class  auryn::AurynStateVectorException
 
class  auryn::AurynGenericException
 
class  auryn::AurynVectorDimensionalityException
 
class  auryn::AurynSpikeAttributeSizeException
 
class  auryn::AurynVector< T, IndexType >
 Default Auryn vector template. More...
 

Namespaces

 auryn
 

Macros

#define AURYN_CODE_USE_MPI
 Compiler flag that determines whether Auryn is built using MPI or not. More...
 
#define CODE_ALIGNED_SIMD_INSTRUCTIONS
 Toggles between memory alignment for SIMD code. More...
 
#define CODE_ACTIVATE_PREFETCHING_INTRINSICS
 Toggle prefetching in spike backpropagation. More...
 
#define CODE_USE_SIMD_INSTRUCTIONS_EXPLICITLY
 Toggle between explicit implementation for SIMD operations in AurynVector classes. More...
 
#define SIMD_NUM_OF_PARALLEL_FLOAT_OPERATIONS   4
 Use Intel Cilk Plus – only has an effect when CODE_USE_SIMD_INSTRUCTIONS_EXPLICITLY is enabled. More...
 
#define MINDELAY   8
 Switches collection of timing stats in some classes like SyncBuffer and system. More...
 
#define DEFAULT_MINDISTRIBUTEDSIZE   16
 Groups with an effective size smaller than this will not be distributed. More...
 
#define DEFAULT_TRACE_MODEL   Trace
 These precompiler directives are deprecated and should not be used any more. More...
 
#define PRE_TRACE_MODEL   Trace
 

Typedefs

typedef unsigned int auryn::NeuronID
 NeuronID is an unsigned integeger type used to index neurons in Auryn. More...
 
typedef NeuronID auryn::AurynInt
 
typedef unsigned int auryn::StateID
 StateID is an unsigned integeger type used to index synaptic states in Auryn. More...
 
typedef unsigned long auryn::AurynLong
 An unsigned long type used to count synapses or similar. More...
 
typedef NeuronID auryn::AurynTime
 Defines Auryns discrete time unit of the System clock. Change to AurynLong if 120h of simtime are not sufficient. More...
 
typedef std::string auryn::string
 Standard library string type which is imported into Auryn namespace. More...
 
typedef float auryn::AurynFloat
 Low precision floating point datatype. More...
 
typedef double auryn::AurynDouble
 Higher precision floating point datatype. More...
 
typedef AurynFloat auryn::AurynWeight
 Unit of synaptic weights. More...
 
typedef AurynFloat auryn::AurynState
 Type for Auryn state variables (default single precision since it needs to be compatible with auryn_vector_float). More...
 
typedef std::vector< NeuronID > auryn::SpikeContainer
 Spike container type. Used for storing spikes. More...
 
typedef std::vector< float > auryn::AttributeContainer
 Attribute container type. Used for storing spike attributes that are needed for efficient STP implementations. More...
 
typedef std::vector< pattern_member > auryn::type_pattern
 
typedef AurynVectorFloat auryn::AurynStateVector
 Defines AurynStateVector type as synonymous to AurynVectorFloat. More...
 
typedef AurynVector< AurynWeight, AurynLong > auryn::AurynSynStateVector
 Defines AurynSynStateVector for synaptic states. More...
 
typedef AurynStateVector auryn::auryn_vector_float
 Legacy definition of AurynStateVector. More...
 
typedef AurynVector< unsigned short, NeuronID > auryn::auryn_vector_ushort
 Legacy definition of AurynVector<unsigned short> More...
 

Enumerations

enum  auryn::TransmitterType {
  auryn::GLUT, auryn::GABA, auryn::AMPA, auryn::NMDA,
  auryn::MEM, auryn::CURSYN
}
 Specifies the different transmitter types that Auryn knows. More...
 
enum  auryn::StimulusGroupModeType {
  auryn::MANUAL, auryn::RANDOM, auryn::SEQUENTIAL, auryn::SEQUENTIAL_REV,
  auryn::STIMFILE
}
 Specifies stimulus order used in StimulusGroup. More...
 

Functions

int auryn::auryn_AlignOffset (const int N, const void *vp, const int inc, const int align)
 Determines memory alignment (adapted from ATLAS library) More...
 
NeuronID auryn::calculate_vector_size (NeuronID i)
 Rounds vector size to multiple of four to allow using the SSE optimizations. More...
 
auryn_vector_float * auryn::auryn_vector_float_alloc (const NeuronID n)
 
void auryn::auryn_vector_float_free (auryn_vector_float *v)
 
void auryn::auryn_vector_float_set_zero (auryn_vector_float *v)
 
void auryn::auryn_vector_float_set_all (auryn_vector_float *v, AurynFloat x)
 
void auryn::auryn_vector_float_copy (auryn_vector_float *src, auryn_vector_float *dst)
 Copies vector src to dst assuming they have the same size. More...
 
AurynFloat auryn::auryn_vector_float_get (auryn_vector_float *v, const NeuronID i)
 
void auryn::auryn_vector_float_set (auryn_vector_float *v, const NeuronID i, AurynFloat x)
 
AurynFloat * auryn::auryn_vector_float_ptr (auryn_vector_float *v, const NeuronID i)
 
void auryn::auryn_vector_float_mul (auryn_vector_float *a, auryn_vector_float *b)
 
void auryn::auryn_vector_float_add_constant (auryn_vector_float *a, float b)
 Computes a := a + b. More...
 
void auryn::auryn_vector_float_saxpy (const float a, auryn_vector_float *x, auryn_vector_float *y)
 
void auryn::auryn_vector_float_scale (const float a, auryn_vector_float *b)
 
void auryn::auryn_vector_float_clip (auryn_vector_float *v, const float a, const float b)
 
void auryn::auryn_vector_float_clip (auryn_vector_float *v, const float a)
 
void auryn::auryn_vector_float_add (auryn_vector_float *a, auryn_vector_float *b)
 Internal version of to add GSL vectors. More...
 
void auryn::auryn_vector_float_sub (auryn_vector_float *a, auryn_vector_float *b)
 Computes a := a-b. More...
 
void auryn::auryn_vector_float_sub (auryn_vector_float *a, auryn_vector_float *b, auryn_vector_float *r)
 Computes r := a-b. More...
 
auryn_vector_ushort * auryn::auryn_vector_ushort_alloc (const NeuronID n)
 
void auryn::auryn_vector_ushort_free (auryn_vector_ushort *v)
 
void auryn::auryn_vector_ushort_set_zero (auryn_vector_ushort *v)
 
void auryn::auryn_vector_ushort_set_all (auryn_vector_ushort *v, unsigned short x)
 
void auryn::auryn_vector_ushort_copy (auryn_vector_ushort *src, auryn_vector_ushort *dst)
 
unsigned short auryn::auryn_vector_ushort_get (auryn_vector_ushort *v, const NeuronID i)
 
void auryn::auryn_vector_ushort_set (auryn_vector_ushort *v, const NeuronID i, unsigned short x)
 
unsigned short * auryn::auryn_vector_ushort_ptr (auryn_vector_ushort *v, const NeuronID i)
 

Macro Definition Documentation

◆ AURYN_CODE_USE_MPI

#define AURYN_CODE_USE_MPI

Compiler flag that determines whether Auryn is built using MPI or not.

◆ CODE_ACTIVATE_PREFETCHING_INTRINSICS

#define CODE_ACTIVATE_PREFETCHING_INTRINSICS

Toggle prefetching in spike backpropagation.

Enables prefetching for spike backpropagation in some plastic connections.

◆ CODE_ALIGNED_SIMD_INSTRUCTIONS

#define CODE_ALIGNED_SIMD_INSTRUCTIONS

Toggles between memory alignment for SIMD code.

◆ CODE_USE_SIMD_INSTRUCTIONS_EXPLICITLY

#define CODE_USE_SIMD_INSTRUCTIONS_EXPLICITLY

Toggle between explicit implementation for SIMD operations in AurynVector classes.

Even if you do not enforce this here, the compiler might still choose to use them when mtune settings are set appropriately.

◆ DEFAULT_MINDISTRIBUTEDSIZE

#define DEFAULT_MINDISTRIBUTEDSIZE   16

Groups with an effective size smaller than this will not be distributed.

Furthermore groups that are distributed will not be cut up in chunks that are not smaller than this. This is done to reduce overhead

◆ DEFAULT_TRACE_MODEL

#define DEFAULT_TRACE_MODEL   Trace

These precompiler directives are deprecated and should not be used any more.

◆ MINDELAY

#define MINDELAY   8

Switches collection of timing stats in some classes like SyncBuffer and system.

This is for profiling and since it impairs simulation performance, it is disabled by default.

System wide minimum delay which determines the sync interval between nodes in units of auryn_timestep.

Per default this is set to 8 which corresponds to 0.8ms with Auryn standard auryn_timestep timestep of 0.1ms. The resaon for setting it to 8 is that the compiler can then implement certain operations using MINDELAY with va bitshift instead of regular division. However, the effect of this is presumably negligible, but I am keeping this for hystoric reasons.

◆ PRE_TRACE_MODEL

#define PRE_TRACE_MODEL   Trace

◆ SIMD_NUM_OF_PARALLEL_FLOAT_OPERATIONS

#define SIMD_NUM_OF_PARALLEL_FLOAT_OPERATIONS   4

Use Intel Cilk Plus – only has an effect when CODE_USE_SIMD_INSTRUCTIONS_EXPLICITLY is enabled.

Use this when using an Intel compiler and CPU. This is for instance what you want when running on Xeon Phi.

Sets the number of floats your CPU can handle in parallel using SIMD

Since Auryn currently only supports SSE and not the new AVX 512, this is typically 4.