SNABSuite  0.x
Spiking Neural Architecture Benchmark Suite
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SNAB::OutputFrequencySingleNeuron2 Class Reference

#include <output_bench.hpp>

Inheritance diagram for SNAB::OutputFrequencySingleNeuron2:
SNAB::SNABBase

Public Member Functions

 OutputFrequencySingleNeuron2 (const std::string backend, size_t bench_index)
 
cypress::Network & build_netw (cypress::Network &netw) override
 Building the neural network for benchmarking. If you want to use an external network, you should use the first version of building (and the corresponding run function), for the member network use the second function. The implementation is contained in the first one. More...
 
void run_netw (cypress::Network &netw) override
 
std::vector< std::array< cypress::Real, 4 > > evaluate () override
 This should contain the evaluation process and return the result in order of those in names(), types() and measures(). The array contains in this order: result, standard deviation, minimal value, maximal value. If these are not provided, use NaN() as entry. More...
 
std::shared_ptr< SNABBaseclone () override
 Virtual method cloning the SNAB without knowing which SNAB it is. More...
 
cypress::Network & build ()
 Calls SNABBase::build_netw with the internal network. More...
 
void run ()
 Calls SNABBase::run_netw on the internal network. More...
 
const std::string snab_name () const
 Returns the name of the current benchmark. More...
 
const std::vector< std::string > & indicator_names () const
 Getter for SNABSSuite::m_indicator_names. More...
 
const std::vector< std::string > & indicator_types () const
 Getter for SNABSSuite::m_indicator_types. More...
 
const std::vector< std::string > & indicator_measures () const
 Getter for SNABSSuite::m_indicator_measures. More...
 
cypress::Json evaluate_json ()
 The result of evaluation() is converted into the format used by the HBP benchmark repository. More...
 
cypress::Json get_config () const
 Getter for the config file. More...
 
void set_config (cypress::Json json)
 Setting a new config file. Note that before building the new network you probably want to reset the network structure, because the old populations and results will not be deleted automatically. More...
 
void reset_network ()
 Reset the internal cypress network, therefore deleting all old populations. For example in several concurrent runs with different configurations. More...
 
bool valid () const
 Returns the state of the m_valid flag. Simulation should not be executed when valid() returns false. More...
 

Protected Member Functions

std::string _debug_filename (const std::string append=std::string()) const
 Beginning of the filename of all debug data (including directories) More...
 

Protected Attributes

cypress::Network m_netw
 Internal spiking network which should be used by the SNAB. More...
 
cypress::Json m_config_file
 Platform specific config file which is read in with the constructor. More...
 
std::string m_backend
 String which contains the name of the simulation backend. More...
 
bool m_valid = false
 Flag which tracks whether the SNAB can be executed on the backend This can be set in config file by setting the key "invalid" for the simulator. More...
 
const std::string m_snab_name
 The name of the Benchmark/SNAB. More...
 
const std::vector< std::string > m_indicator_names
 For formatting the output in the correct structure introduced in the SP9 Guidebook, the evaluation process needs the exact order of the names, types and measures of the results returned from the function SNABBase::evaluate(). indicator_names should be unique for the measurement and represent the idea behind the value. More...
 
const std::vector< std::string > m_indicator_types
 indicator_types can be e.g. "quality", "performance", "energy consumption". See also SNABBase::indicator_names. More...
 
const std::vector< std::string > m_indicator_measures
 indicator_measures should be the "type of the measurement", or what has been measures, e.g. norm, p-value, time. See also SNABBase::indicator_names. More...
 
const std::vector< std::string > m_indicator_units
 indicator_units should be the "unit of the measurement", therefore the unit of the value. More...
 
const size_t m_bench_index
 

Detailed Description

This SNAB will test the maximal frequency of a single neuron by simply setting the neuron membrane reset-potential above threshold. Although, spikes are only recorded for a single neuron, multiple neurons are simulated

Definition at line 54 of file output_bench.hpp.

Constructor & Destructor Documentation

SNAB::OutputFrequencySingleNeuron2::OutputFrequencySingleNeuron2 ( const std::string  backend,
size_t  bench_index 
)

Member Function Documentation

std::string SNAB::SNABBase::_debug_filename ( const std::string  append = std::string()) const
protectedinherited

Beginning of the filename of all debug data (including directories)

Returns
std::__cxx11::string "debug/[backend]/[snabname]_"
cypress::Network& SNAB::SNABBase::build ( )
inlineinherited

Calls SNABBase::build_netw with the internal network.

Returns
cypress::Network& Pointer to the constructed network

Definition at line 77 of file snab_base.hpp.

77 { return build_netw(m_netw); };
virtual cypress::Network & build_netw(cypress::Network &network)=0
Building the neural network for benchmarking. If you want to use an external network, you should use the first version of building (and the corresponding run function), for the member network use the second function. The implementation is contained in the first one.
cypress::Network m_netw
Internal spiking network which should be used by the SNAB.
Definition: snab_base.hpp:197
cypress::Network& SNAB::OutputFrequencySingleNeuron2::build_netw ( cypress::Network &  network)
overridevirtual

Building the neural network for benchmarking. If you want to use an external network, you should use the first version of building (and the corresponding run function), for the member network use the second function. The implementation is contained in the first one.

Parameters
networkExternal network SNAB/benchmark will be constructed in
Returns
cypress::Network& Pointer to the constructed network

Implements SNAB::SNABBase.

std::shared_ptr<SNABBase> SNAB::OutputFrequencySingleNeuron2::clone ( )
inlineoverridevirtual

Virtual method cloning the SNAB without knowing which SNAB it is.

Implements SNAB::SNABBase.

Definition at line 64 of file output_bench.hpp.

65  {
66  return std::make_shared<OutputFrequencySingleNeuron2>(m_backend,
68  }
std::string m_backend
String which contains the name of the simulation backend.
Definition: snab_base.hpp:210
const size_t m_bench_index
Definition: snab_base.hpp:260
std::vector<std::array<cypress::Real, 4> > SNAB::OutputFrequencySingleNeuron2::evaluate ( )
overridevirtual

This should contain the evaluation process and return the result in order of those in names(), types() and measures(). The array contains in this order: result, standard deviation, minimal value, maximal value. If these are not provided, use NaN() as entry.

Implements SNAB::SNABBase.

cypress::Json SNAB::SNABBase::evaluate_json ( )
inherited

The result of evaluation() is converted into the format used by the HBP benchmark repository.

Returns
cypress::Json Benchmark results
cypress::Json SNAB::SNABBase::get_config ( ) const
inlineinherited

Getter for the config file.

Returns
cypress::Json config file

Definition at line 154 of file snab_base.hpp.

154 { return m_config_file; }
cypress::Json m_config_file
Platform specific config file which is read in with the constructor.
Definition: snab_base.hpp:204
const std::vector<std::string>& SNAB::SNABBase::indicator_measures ( ) const
inlineinherited

Getter for SNABSSuite::m_indicator_measures.

Returns
const std::vector< std::__cxx11::string >& list of benchmark indicator measures (their unit)

Definition at line 128 of file snab_base.hpp.

129  {
130  return m_indicator_measures;
131  }
const std::vector< std::string > m_indicator_measures
indicator_measures should be the "type of the measurement", or what has been measures, e.g. norm, p-value, time. See also SNABBase::indicator_names.
Definition: snab_base.hpp:244
const std::vector<std::string>& SNAB::SNABBase::indicator_names ( ) const
inlineinherited

Getter for SNABSSuite::m_indicator_names.

Returns
const std::vector< std::__cxx11::string >& list of benchmark indicator names

Definition at line 106 of file snab_base.hpp.

107  {
108  return m_indicator_names;
109  }
const std::vector< std::string > m_indicator_names
For formatting the output in the correct structure introduced in the SP9 Guidebook, the evaluation process needs the exact order of the names, types and measures of the results returned from the function SNABBase::evaluate(). indicator_names should be unique for the measurement and represent the idea behind the value.
Definition: snab_base.hpp:231
const std::vector<std::string>& SNAB::SNABBase::indicator_types ( ) const
inlineinherited

Getter for SNABSSuite::m_indicator_types.

Returns
const std::vector< std::__cxx11::string >& list of benchmark indicator types

Definition at line 117 of file snab_base.hpp.

118  {
119  return m_indicator_types;
120  }
const std::vector< std::string > m_indicator_types
indicator_types can be e.g. "quality", "performance", "energy consumption". See also SNABBase::indica...
Definition: snab_base.hpp:237
void SNAB::SNABBase::reset_network ( )
inlineinherited

Reset the internal cypress network, therefore deleting all old populations. For example in several concurrent runs with different configurations.

Definition at line 170 of file snab_base.hpp.

170 { m_netw = cypress::Network(); }
cypress::Network m_netw
Internal spiking network which should be used by the SNAB.
Definition: snab_base.hpp:197
void SNAB::SNABBase::run ( )
inlineinherited

Calls SNABBase::run_netw on the internal network.

Definition at line 91 of file snab_base.hpp.

91 { run_netw(m_netw); };
cypress::Network m_netw
Internal spiking network which should be used by the SNAB.
Definition: snab_base.hpp:197
virtual void run_netw(cypress::Network &network)=0
void SNAB::OutputFrequencySingleNeuron2::run_netw ( cypress::Network &  network)
overridevirtual

Execution of the benchmark on the simulation platform. Similar to the build function, the first function contains the implementation, while the second simply uses the first with member networks.

Parameters
networkExternal network SNAB/benchmark will be constructed in

Implements SNAB::SNABBase.

void SNAB::SNABBase::set_config ( cypress::Json  json)
inlineinherited

Setting a new config file. Note that before building the new network you probably want to reset the network structure, because the old populations and results will not be deleted automatically.

Parameters
jsonnew config

Definition at line 163 of file snab_base.hpp.

163 { m_config_file = json; }
cypress::Json m_config_file
Platform specific config file which is read in with the constructor.
Definition: snab_base.hpp:204
const std::string SNAB::SNABBase::snab_name ( ) const
inlineinherited

Returns the name of the current benchmark.

Returns
const std::__cxx11::string Name of the current benchmark

Definition at line 98 of file snab_base.hpp.

98 { return m_snab_name; }
const std::string m_snab_name
The name of the Benchmark/SNAB.
Definition: snab_base.hpp:222
bool SNAB::SNABBase::valid ( ) const
inlineinherited

Returns the state of the m_valid flag. Simulation should not be executed when valid() returns false.

Returns
bool True when benchmark is valid for execution

Definition at line 179 of file snab_base.hpp.

179 { return m_valid; }
bool m_valid
Flag which tracks whether the SNAB can be executed on the backend This can be set in config file by s...
Definition: snab_base.hpp:217

Member Data Documentation

std::string SNAB::SNABBase::m_backend
protectedinherited

String which contains the name of the simulation backend.

Definition at line 210 of file snab_base.hpp.

const size_t SNAB::SNABBase::m_bench_index
protectedinherited

Definition at line 260 of file snab_base.hpp.

cypress::Json SNAB::SNABBase::m_config_file
protectedinherited

Platform specific config file which is read in with the constructor.

Definition at line 204 of file snab_base.hpp.

const std::vector<std::string> SNAB::SNABBase::m_indicator_measures
protectedinherited

indicator_measures should be the "type of the measurement", or what has been measures, e.g. norm, p-value, time. See also SNABBase::indicator_names.

Definition at line 244 of file snab_base.hpp.

const std::vector<std::string> SNAB::SNABBase::m_indicator_names
protectedinherited

For formatting the output in the correct structure introduced in the SP9 Guidebook, the evaluation process needs the exact order of the names, types and measures of the results returned from the function SNABBase::evaluate(). indicator_names should be unique for the measurement and represent the idea behind the value.

Definition at line 231 of file snab_base.hpp.

const std::vector<std::string> SNAB::SNABBase::m_indicator_types
protectedinherited

indicator_types can be e.g. "quality", "performance", "energy consumption". See also SNABBase::indicator_names.

Definition at line 237 of file snab_base.hpp.

const std::vector<std::string> SNAB::SNABBase::m_indicator_units
protectedinherited

indicator_units should be the "unit of the measurement", therefore the unit of the value.

Definition at line 250 of file snab_base.hpp.

cypress::Network SNAB::SNABBase::m_netw
protectedinherited

Internal spiking network which should be used by the SNAB.

Definition at line 197 of file snab_base.hpp.

const std::string SNAB::SNABBase::m_snab_name
protectedinherited

The name of the Benchmark/SNAB.

Definition at line 222 of file snab_base.hpp.

bool SNAB::SNABBase::m_valid = false
protectedinherited

Flag which tracks whether the SNAB can be executed on the backend This can be set in config file by setting the key "invalid" for the simulator.

Definition at line 217 of file snab_base.hpp.


The documentation for this class was generated from the following file: