Skip to content

Commit

Permalink
threadpools of #9 speeded up 25%
Browse files Browse the repository at this point in the history
  • Loading branch information
djanloo committed Jul 13, 2024
1 parent 8aa6553 commit c677419
Show file tree
Hide file tree
Showing 4 changed files with 326 additions and 44 deletions.
358 changes: 320 additions & 38 deletions bg_analysis/basal_ganglia.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion quilt/core/include/multiscale.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Transducer: public Oscillator{
private:
Population * population;
double initialization_rate;
static ThreadSafeFile outfile;
// static ThreadSafeFile outfile;

public:
InhomPoissonSpikeSource * injector;
Expand Down
8 changes: 4 additions & 4 deletions quilt/core/multiscale.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Transducer::~Transducer(){
delete injector;
}

ThreadSafeFile Transducer::outfile("td_incoming_rates.txt");
// ThreadSafeFile Transducer::outfile("td_incoming_rates.txt");

double Transducer::incoming_rate(double now){

Expand All @@ -62,9 +62,9 @@ double Transducer::incoming_rate(double now){
}
get_global_logger().log(DEBUG, "total input to transducer is " + to_string(rate) + " Hz");

stringstream ss;
ss << now << " " << rate;
outfile.write(ss.str());
// stringstream ss;
// ss << now << " " << rate;
// outfile.write(ss.str());

return rate;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_performances.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from quilt.builder import SpikingNetwork, NeuronCatalogue
from quilt.interface.base import set_verbosity

set_verbosity(3)
set_verbosity(2)

sn = SpikingNetwork.from_yaml("bg_analysis/ortone_network_dispersive.yaml", "bg_analysis/ortone_neurons.yaml")

Expand Down

0 comments on commit c677419

Please sign in to comment.