Cypress
1.0
C++ Spiking Neural Network Simulation Framework
|
Namespaces | |
filesystem | |
internal | |
nef | |
sli | |
spikes | |
transformations | |
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) |
Json & | join (Json &tar, const Json &src) |
Logger & | global_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... | |
íle brainscales_wrap.hpp
Defines a Singleton for dynamically loading the brainscales backend
íle genn.hpp
This is the backend implementation for GeNN, allowing simulations on GPUs.
íle genn_lib.hpp
Defines a Singleton for dynamically loading the genn backend
íle rng.hpp
Defines a Singleton for the random number generator
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
using cypress::AdEx = typedef EifCondExpIsfaIsta |
using cypress::AdExParameters = typedef EifCondExpIsfaIstaParameters |
using cypress::AdExSignals = typedef EifCondExpIsfaIstaSignals |
using cypress::Json = typedef nlohmann::json |
using cypress::LIF = typedef IfCondExp |
using cypress::LIFParameters = typedef IfCondExpParameters |
using cypress::LIFSignals = typedef IfCondExpSignals |
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.
enum cypress::LogSeverity : int32_t |
|
strong |
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.
netw | network instance |
graph_label | label of the graph, Defaults to "Network Architecture". |
filename | filename to store dot file Defaults to "graph.dot". |
call_dot | call dot? output will be filename".pdf" Defaults to true. |
With the method you can just use Network netw = json.get<Network>() as you can do with STL containers.
j | source json object |
netw | target 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;.
json | source json |
runtime | target runtime. |
Conversion from json to internal matrix type. Use json.get<Matrix<T>> as you would do with a STL container.
T | matrix type |
j | source json |
mat | target 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.
descrs | is a list of connection descriptors which should be turned into a list of connections. |
bool cypress::instantiate_connections_to_file | ( | std::string | filename, |
const std::vector< ConnectionDescriptor > & | descrs | ||
) |
Recursively joins one JSON object into another, overriding already existing keys in the target.
tar | is the target JSON object. Keys in this object may be overriden. |
src | is the source JSON object. All keys from this object will be available in tar. |
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 | ||
) |
IterableRange<Iterator> cypress::make_iterable_range | ( | Iterator | begin, |
Iterator | end | ||
) |
Allows to create an instance of IterableRange while automatically deducing the iterator type.
begin | is an iterator pointing at the first element. |
end | is an iterator pointing at the last-plus-one element. |
Matrix<T> cypress::make_matrix | ( | const std::array< std::array< T, Cols >, Rows > & | init | ) |
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 | ||
) |
std::vector<T> cypress::read_check | ( | std::map< std::string, T > & | input, |
const std::vector< std::string > & | names, | ||
const std::vector< T > & | defaults | ||
) |
Automatic conversion of a Network object to JSON. Now you can uses Json(network) as you would do with STL containers.
j | target JSon object |
netw | source network object |
void cypress::to_json | ( | Json & | json, |
const NetworkRuntime & | runtime | ||
) |
NetworkRuntime to json conversion: json["sim"] == runtime.sim;.
json | target json object |
runtime | source NetworkRuntime object |