Cypress
1.0
C++ Spiking Neural Network Simulation Framework
|
#include <transformation.hpp>
Static Public Member Functions | |
static std::vector< TransformationCtor > | construct_neuron_type_transformation_chain (const std::vector< const NeuronType * > &unsupported_types, const std::unordered_set< const NeuronType * > &supported_types, const std::vector< std::tuple< TransformationCtor, const NeuronType *, const NeuronType * >> &transformations, bool use_lossy) |
static void | run (const Backend &backend, NetworkBase network, const TransformationAuxData &aux, std::unordered_set< std::string > disabled_trafo_ids=std::unordered_set< std::string >(), bool use_lossy=true) |
static RegisteredTransformation | register_general_transformation (TransformationCtor ctor, TransformationTest test) |
static RegisteredTransformation | register_neuron_type_transformation (TransformationCtor ctor, const NeuronType &src, const NeuronType &tar) |
template<typename SourceType , typename TargetType > | |
static RegisteredTransformation | register_neuron_type_transformation (TransformationCtor ctor) |
The Transformations class is responsible for holding a list of currently supported transformations and to apply transformations in such a way that the network can be executed on the given backend.
|
static |
Function used to find a series of transfomations which unsupported neuron types into supported neuron types. Throws an exception if no path is found.
|
static |
Registers a general transformation which should be executed if an arbitrary test condition regarding the backend and the network is fulfilled.
ctor | is the constructor that should be called in order to create a new instance of the transformation in question. |
test | is a callback function which is called whenever the Transformations::execute() function is called. The test function must check whether it is relevant for the given backend and network in question. If yes, it should return true and false if the transformation should not be used. |
|
static |
Registers a new transformation which transforms from one neuron type to another neuron type.
ctor | is the constructor that should be called in order to create a new instance of the transformation in question. |
src | is the source neuron type the transformation allows to transform form. |
tar | is the target neuron type the transformation transforms to. |
|
inlinestatic |
|
static |
Method which transforms the given network in such a way, that it can be executed by the given backend.
network | is the network instance that is the subject of the transformation. |
backend | is the backend on which the network should be executed. |
aux | is auxiliary data that should be passed to the run() method of the backend, such as the network execution time. |
disabled_trafo_ids | is a set of transformation identifiers specifying transformations which should not be executed. |
use_lossy | if true allows the use of so called "lossy" transformations. These transformations may result in a network which is not equivalent to the network the user described. |