diff --git a/src/communication/gathered_vector.hpp b/src/communication/gathered_vector.hpp index cf48192f628b665713a25b2b1a53f0df3af86936..ceb5c16cde44a872e9ce08d3b4c65c58f9f73c1a 100644 --- a/src/communication/gathered_vector.hpp +++ b/src/communication/gathered_vector.hpp @@ -20,7 +20,7 @@ public: partition_(std::move(p)) { EXPECTS(std::is_sorted(partition_.begin(), partition_.end())); - EXPECTS(std::size_t(partition_.back()) == v.size()); + EXPECTS(std::size_t(partition_.back()) == values_.size()); } /// the partition of distribution diff --git a/src/communication/serial_global_policy.hpp b/src/communication/serial_global_policy.hpp index 73d7b96b378da6880ea337f702cc13995d2f05ec..486266cadcacde9b9db4c7393efad9540a5c74f8 100644 --- a/src/communication/serial_global_policy.hpp +++ b/src/communication/serial_global_policy.hpp @@ -15,7 +15,11 @@ struct serial_global_policy { template <typename Spike> static gathered_vector<Spike> gather_spikes(const std::vector<Spike>& local_spikes) { - return gathered_vector<Spike>(std::vector<Spike>(local_spikes), {0u, 1u}); + using count_type = typename gathered_vector<Spike>::count_type; + return gathered_vector<Spike>( + std::vector<Spike>(local_spikes), + {0u, static_cast<count_type>(local_spikes.size())} + ); } static int id() {