From 61ee3f99cc1a12f36467206feef2a47df6b61c45 Mon Sep 17 00:00:00 2001 From: "w.klijn" <nonoice@gmail.com> Date: Fri, 12 Aug 2016 13:22:40 +0200 Subject: [PATCH] Move local spike exchange to model --- src/communication/communicator.hpp | 3 --- src/model.hpp | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/communication/communicator.hpp b/src/communication/communicator.hpp index d5a82b3d..72659352 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 35f332d1..87826e55 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); }; -- GitLab