Cypress  1.0
C++ Spiking Neural Network Simulation Framework
Namespaces | Classes | Typedefs | Enumerations | Functions
cypress Namespace Reference

Namespaces

 filesystem
 
 internal
 
 nef
 
 sli
 
 spikes
 
 transformations
 

Classes

struct  Accessor
 
class  AllToAllConnector
 
class  Backend
 
class  BinnfDecodeException
 
class  BS_Lib
 Singleton class for runtime loading of the BrainScaleS Backend, which wraps all BrainScaleS libraries and will be provided pre-compiled. More...
 
struct  Comperator
 
class  ConnectableMixin
 
class  ConnectionDescriptor
 
class  Connector
 
class  ConstantSizeNeuronParametersBase
 
class  CypressException
 
class  DataMixin
 
class  EifCondExpIsfaIsta
 
class  EifCondExpIsfaIstaParameters
 
class  EifCondExpIsfaIstaSignals
 
class  energenie
 
class  ExecutionError
 
class  FixedFanConnectorBase
 
class  FixedFanInConnector
 
class  FixedFanOutConnector
 
class  FixedProbabilityConnector
 
class  FixedProbabilityConnectorBase
 
class  FromListConnector
 
class  FunctorConnector
 
class  FunctorConnectorBase
 
class  GeNN
 
class  GENN_Lib
 Singleton class for runtime loading of the GeNN Backend, which wraps all GeNN/GPU libraries. More...
 
class  HomogeneousPopulationRequiredException
 
class  IfCondExp
 
class  IfCondExpParameters
 
class  IfCondExpSignals
 
class  IfCurrExp
 
class  IfCurrExpParameters
 
class  IfCurrExpSignals
 
class  IfFacetsHardware1
 
class  IfFacetsHardware1Parameters
 
class  IfFacetsHardware1Signals
 
class  InvalidConnectionException
 
class  InvalidParameter
 
class  InvalidParameterArraySize
 
class  InvalidSignal
 
class  IterableMixin
 
struct  IterableRange
 
struct  LocalConnection
 
class  LogBackend
 
class  LogFileBackend
 
class  Logger
 
class  LogStreamBackend
 
class  Matrix
 
class  MissingColumnException
 
class  NEST
 
class  NetIO4
 
class  Network
 
class  NetworkBase
 
struct  NetworkRuntime
 
class  Neuron
 
class  NeuronBase
 
class  NeuronMixin
 
class  NeuronParameter
 
class  NeuronParameters
 
class  NeuronParametersBase
 
class  NeuronSignals
 
class  NeuronSignalsBase
 
class  NeuronType
 
class  NeuronTypeBase
 
class  NeuronTypeTransformation
 
class  NMPI
 
class  NoSuchPopulationException
 
class  NotSupportedException
 
class  NullNeuron
 
class  NullNeuronParameters
 
class  NullNeuronSignals
 
struct  NumericPolicy
 
class  OneToOneConnector
 
class  Optional
 
class  Population
 
class  PopulationBase
 
class  PopulationData
 
class  PopulationDataView
 
class  PopulationMixin
 
class  PopulationView
 
class  PopulationViewBase
 
class  PowerDevice
 
class  PowerManagementBackend
 
class  Process
 
class  PyNN
 
class  PythonInstance
 
class  RandomConnector
 
struct  Range
 
class  Resource
 
struct  Resources
 
class  RNG
 Singleton class for. More...
 
class  SignalNotRecordedException
 
class  Slurm
 
class  SpikePairRuleAdditive
 
class  SpikePairRuleMultiplicative
 
class  SpikeSourceArray
 
class  SpikeSourceArrayParameters
 
class  SpikeSourceArraySignals
 
class  SpikeSourceConstFreq
 
class  SpikeSourceConstFreqParameters
 
class  SpikeSourceConstFreqSignals
 
class  SpikeSourceConstInterval
 
class  SpikeSourceConstIntervalParameters
 
class  SpikeSourceConstIntervalSignals
 
class  SpikeSourcePoisson
 
class  SpikeSourcePoissonParameters
 
class  SpikeSourcePoissonSignals
 
class  SpikingUtils
 
class  StaticSynapse
 
struct  Synapse
 
class  SynapseBase
 
class  Terminal
 
class  ToJson
 
class  Transformation
 
struct  TransformationAuxData
 
class  TransformationException
 
struct  TransformationProperties
 
class  Transformations
 
class  TsodyksMarkramMechanism
 
class  UniformConnector
 
class  UniformFunctorConnector
 
class  UniformFunctorConnectorBase
 
class  Vector
 
class  ViewableMixin
 

Typedefs

using LIF = IfCondExp
 
using LIFParameters = IfCondExpParameters
 
using LIFSignals = IfCondExpSignals
 
using AdEx = EifCondExpIsfaIsta
 
using AdExParameters = EifCondExpIsfaIstaParameters
 
using AdExSignals = EifCondExpIsfaIstaSignals
 
using TransformationCtor = std::function< std::unique_ptr< Transformation >()>
 
using TransformationTest = std::function< bool(const Backend &, const NetworkBase &)>
 
using RegisteredTransformation = size_t
 
using sx_double_t = long double
 
using sx_int_t = unsigned long long int
 
using Real = double
 
using NeuronIndex = int32_t
 
using PopulationIndex = int32_t
 
using Json = nlohmann::json
 

Enumerations

enum  LogSeverity : int32_t {
  DEBUG = 10, INFO = 20, WARNING = 30, ERROR = 40,
  FATAL_ERROR = 50
}
 
enum  MatrixFlags { MatrixFlags::NONE = 0, MatrixFlags::ZEROS = 1 }
 

Functions

void to_json (Json &j, const Network &netw)
 Automatic conversion of a Network object to JSON. Now you can uses Json(network) as you would do with STL containers. More...
 
void from_json (const Json &j, Network &netw)
 With the method you can just use Network netw = json.get<Network>() as you can do with STL containers. More...
 
void from_json (const Json &json, NetworkRuntime &runtime)
 Read in NetworkRuntime from json: json["sim"] == runtime.sim;. More...
 
void to_json (Json &json, const NetworkRuntime &runtime)
 NetworkRuntime to json conversion: json["sim"] == runtime.sim;. More...
 
template<typename T >
void to_json (Json &j, const Matrix< T > &mat)
 Automatic conversion of the internal matrix type to json. Use Json(mat). More...
 
template<typename T >
void from_json (const Json &j, Matrix< T > &mat)
 Conversion from json to internal matrix type. Use json.get<Matrix<T>> as you would do with a STL container. More...
 
std::vector< std::vector< LocalConnection > > instantiate_connections (const std::vector< ConnectionDescriptor > &descrs)
 
bool instantiate_connections_to_file (std::string filename, const std::vector< ConnectionDescriptor > &descrs)
 
template<typename Iterator >
IterableRange< Iterator > make_iterable_range (Iterator begin, Iterator end)
 
Jsonjoin (Json &tar, const Json &src)
 
Loggerglobal_logger ()
 
template<typename T , size_t Rows, size_t Cols>
Matrix< T > make_matrix (const std::array< std::array< T, Cols >, Rows > &init)
 
template<typename T >
Matrix< T > make_matrix (std::initializer_list< T > list)
 
template<typename T >
std::map< std::string, T > json_to_map (const cypress::Json &obj)
 
template<typename T >
std::vector< T > read_check (std::map< std::string, T > &input, const std::vector< std::string > &names, const std::vector< T > &defaults)
 
constexpr Range< float > linspace (float x0, float x1, ptrdiff_t num)
 
constexpr Range< double > linspace (double x0, double x1, ptrdiff_t num)
 
constexpr Range< size_t > range (ptrdiff_t i)
 
constexpr Range< ptrdiff_t > range (ptrdiff_t i0, ptrdiff_t i1)
 
constexpr Range< float > range (float x0, float x1, float step)
 
constexpr Range< double > range (double x0, double x1, double step)
 
void create_dot (const NetworkBase &netw, const std::string graph_label="Network Architecture", const std::string filename="graph.dot", const bool call_dot=true)
 Generates a dot file for the given network. Calls "dot" to generate a pdf with a visualization of the network and list connectors. More...
 

Detailed Description

íle brainscales_wrap.hpp

Defines a Singleton for dynamically loading the brainscales backend

Author
Christoph Ostrau

íle genn.hpp

This is the backend implementation for GeNN, allowing simulations on GPUs.

Author
Christoph Ostrau

íle genn_lib.hpp

Defines a Singleton for dynamically loading the genn backend

Author
Christoph Ostrau

íle rng.hpp

Defines a Singleton for the random number generator

Author
Christoph Ostrau

Class Documentation

struct cypress::NetworkRuntime

Structure storing information about the network runtime.

Class Members
Real duration

biological runtime in ms

Real finalize

Finalization time. Time required to retrieve the results from the driver.

Real initialize

Initialization time. Time required to construct the network.

Real sim

Raw simulation time. This may include setup and finalization time required by the hardware timer.

Real sim_pure

Theoretical runtime, where direct measurement is not possible. E.g.: simulation time * time_scale_factor

Real total

Total runtime – sum of the three other times.

struct cypress::TransformationAuxData

Auxiliary data which may be affected by the transformation.

Class Members
Real duration

Contains the network simulation duration. Certain transformations may choose to extend the actual simulation duration.

struct cypress::TransformationProperties

Structure describing the

Class Members
size_t cost

A non-zero cost value which can be used to indicate the cost associated with executing this transformation.

bool lossy

If true indicates that the transformation cannot be transformed without loosing informatoion. Usage of these transformations can be disabled globally.

Typedef Documentation

using cypress::Json = typedef nlohmann::json
using cypress::LIF = typedef IfCondExp
using cypress::NeuronIndex = typedef int32_t
using cypress::PopulationIndex = typedef int32_t
using cypress::Real = typedef double

The Real type is a floating point type. Its width can be chosen by the user by setting the CYPRESS_REAL_WIDTH macro.

using cypress::RegisteredTransformation = typedef size_t

Stub type which is used to allow the registration of new transformations as part of a static value initialization.

using cypress::sx_double_t = typedef long double

Double type to be used in suffix declarations.

using cypress::sx_int_t = typedef unsigned long long int

Integer type to be used in suffix declarations.

using cypress::TransformationCtor = typedef std::function<std::unique_ptr<Transformation>()>

Constructor function type which constructs a new Transformation instance.

using cypress::TransformationTest = typedef std::function<bool(const Backend &, const NetworkBase &)>

Test function type which is used to test whether a certain transformation should be applied to a Network/Backend combination.

Enumeration Type Documentation

enum cypress::LogSeverity : int32_t

The LogSeverity enum holds the LogSeverity of a log message. Higher severities are associated with higher values.

Enumerator
DEBUG 
INFO 
WARNING 
ERROR 
FATAL_ERROR 
enum cypress::MatrixFlags
strong
Enumerator
NONE 
ZEROS 

Function Documentation

void cypress::create_dot ( const NetworkBase netw,
const std::string  graph_label = "Network Architecture",
const std::string  filename = "graph.dot",
const bool  call_dot = true 
)

Generates a dot file for the given network. Calls "dot" to generate a pdf with a visualization of the network and list connectors.

Parameters
netwnetwork instance
graph_labellabel of the graph, Defaults to "Network Architecture".
filenamefilename to store dot file Defaults to "graph.dot".
call_dotcall dot? output will be filename".pdf" Defaults to true.
void cypress::from_json ( const Json j,
Network netw 
)

With the method you can just use Network netw = json.get<Network>() as you can do with STL containers.

Parameters
jsource json object
netwtarget network, in which the network will be constructed. NOTE: network will not be deleted!
void cypress::from_json ( const Json json,
NetworkRuntime runtime 
)

Read in NetworkRuntime from json: json["sim"] == runtime.sim;.

Parameters
jsonsource json
runtimetarget runtime.
template<typename T >
void cypress::from_json ( const Json j,
Matrix< T > &  mat 
)

Conversion from json to internal matrix type. Use json.get<Matrix<T>> as you would do with a STL container.

Parameters
Tmatrix type
jsource json
mattarget matrix
Logger& cypress::global_logger ( )
std::vector<std::vector<LocalConnection> > cypress::instantiate_connections ( const std::vector< ConnectionDescriptor > &  descrs)

Instantiates the connection descriptors into a flat list of actual connections.

Parameters
descrsis a list of connection descriptors which should be turned into a list of connections.
Returns
a vector of vectors containing the instantiated connections for each Descriptor
bool cypress::instantiate_connections_to_file ( std::string  filename,
const std::vector< ConnectionDescriptor > &  descrs 
)
Json& cypress::join ( Json tar,
const Json src 
)

Recursively joins one JSON object into another, overriding already existing keys in the target.

Parameters
taris the target JSON object. Keys in this object may be overriden.
srcis the source JSON object. All keys from this object will be available in tar.
Returns
a reference at tar.
template<typename T >
std::map<std::string, T> cypress::json_to_map ( const cypress::Json obj)

Store input form json in a map to check everything!

constexpr Range<float> cypress::linspace ( float  x0,
float  x1,
ptrdiff_t  num 
)
constexpr Range<double> cypress::linspace ( double  x0,
double  x1,
ptrdiff_t  num 
)
template<typename Iterator >
IterableRange<Iterator> cypress::make_iterable_range ( Iterator  begin,
Iterator  end 
)

Allows to create an instance of IterableRange while automatically deducing the iterator type.

Parameters
beginis an iterator pointing at the first element.
endis an iterator pointing at the last-plus-one element.
template<typename T , size_t Rows, size_t Cols>
Matrix<T> cypress::make_matrix ( const std::array< std::array< T, Cols >, Rows > &  init)
template<typename T >
Matrix<T> cypress::make_matrix ( std::initializer_list< T >  list)
constexpr Range<size_t> cypress::range ( ptrdiff_t  i)
constexpr Range<ptrdiff_t> cypress::range ( ptrdiff_t  i0,
ptrdiff_t  i1 
)
constexpr Range<float> cypress::range ( float  x0,
float  x1,
float  step 
)
constexpr Range<double> cypress::range ( double  x0,
double  x1,
double  step 
)
template<typename T >
std::vector<T> cypress::read_check ( std::map< std::string, T > &  input,
const std::vector< std::string > &  names,
const std::vector< T > &  defaults 
)
void cypress::to_json ( Json j,
const Network netw 
)

Automatic conversion of a Network object to JSON. Now you can uses Json(network) as you would do with STL containers.

Parameters
jtarget JSon object
netwsource network object
void cypress::to_json ( Json json,
const NetworkRuntime runtime 
)

NetworkRuntime to json conversion: json["sim"] == runtime.sim;.

Parameters
jsontarget json object
runtimesource NetworkRuntime object
template<typename T >
void cypress::to_json ( Json j,
const Matrix< T > &  mat 
)

Automatic conversion of the internal matrix type to json. Use Json(mat).

Parameters
TTemplate parameter of the matrix
jtarget json
matsource matrix