Cypress  1.0
C++ Spiking Neural Network Simulation Framework
backend.hpp
Go to the documentation of this file.
1 /*
2  * Cypress -- C++ Spiking Neural Network Simulation Framework
3  * Copyright (C) 2016 Andreas Stöckel
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
28 #pragma once
29 
30 #ifndef CYPRESS_BACKEND_HPP
31 #define CYPRESS_BACKEND_HPP
32 
33 #include <string>
34 #include <unordered_set>
35 
36 #include <cypress/core/types.hpp>
37 
38 namespace cypress {
39 
40 /*
41  * Forward declarations
42  */
43 class NetworkBase;
44 class NeuronType;
45 
50 class Backend {
51 protected:
55  virtual void do_run(NetworkBase &network, Real duration) const = 0;
56 
57 public:
66  void run(NetworkBase &network, Real duration = 0.0) const;
67 
76  virtual std::unordered_set<const NeuronType *> supported_neuron_types()
77  const = 0;
78 
82  virtual std::string name() const = 0;
83 
87  virtual ~Backend();
88 };
89 }
90 
91 #endif /* CYPRESS_BACKEND_HPP */
Definition: backend.hpp:50
double Real
Definition: types.hpp:56
virtual std::unordered_set< const NeuronType * > supported_neuron_types() const =0
void run(NetworkBase &network, Real duration=0.0) const
virtual std::string name() const =0
Definition: network_base.hpp:116
Definition: brainscales_lib.hpp:39
virtual void do_run(NetworkBase &network, Real duration) const =0
virtual ~Backend()