Skip to content
Snippets Groups Projects
Commit cb1591db authored by Sam Yates's avatar Sam Yates
Browse files

Bugfix: partition in serial gathered vector

parent e4ba9317
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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() {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment