diff --git a/src/communication/communicator.hpp b/src/communication/communicator.hpp index d5a82b3d7ad64e450585c383480302605131aebf..72659352ca8f8140aa8f2fd70ce745cbbe6dde40 100644 --- a/src/communication/communicator.hpp +++ b/src/communication/communicator.hpp @@ -92,11 +92,8 @@ public: /// events in each queue are all events that must be delivered to targets in that cell /// group as a result of the global spike exchange. std::vector<event_queue> exchange(const std::vector<spike_type>& local_spikes, - std::function<void (const std::vector<spike_type>&)> local_export_callback, std::function<void(const std::vector<spike_type>&)> global_export_callback) { - local_export_callback(local_spikes); - // global all-to-all to gather a local copy of the global spike list on each node. auto global_spikes = communication_policy_.gather_spikes( local_spikes ); num_spikes_ += global_spikes.size(); diff --git a/src/model.hpp b/src/model.hpp index 35f332d1132dfe03b63e1d6595b433679a49a733..87826e5587ffea0f4fca3d9a12f8fa1cd8a3c23b 100644 --- a/src/model.hpp +++ b/src/model.hpp @@ -167,9 +167,9 @@ public: auto exchange = [&] () { PE("stepping", "exchange"); auto local_spikes = previous_spikes().gather(); + exporter_->local_export_callback(local_spikes); future_events() = communicator_.exchange(local_spikes, // send the exporter function as pointers to export - [&](const std::vector<spike_type>& spikes) { exporter_->local_export_callback(spikes); }, [&] (const std::vector<spike_type>& spikes){ exporter_->global_export_callback(spikes); }); PL(2); };