Skip to content

Commit

Permalink
More asserts.
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstenhater committed Nov 11, 2024
1 parent 9ba170a commit c48fff5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arbor/communication/communicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void communicator::update_connections(const recipe& rec,
// Also the count of presynaptic sources from each domain
// -> src_counts: array with one entry for each domain

// Record all the gid in a flat vector.
// Record all the gids in a flat vector.

PE(init:communicator:update:collect_gids);
std::vector<cell_gid_type> gids; gids.reserve(num_local_cells_);
Expand Down
8 changes: 6 additions & 2 deletions arbor/simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include "util/span.hpp"
#include "profile/profiler_macro.hpp"

#include <iostream>

namespace arb {

template <typename Seq, typename Value, typename Less = std::less<>>
Expand Down Expand Up @@ -81,8 +83,10 @@ ARB_ARBOR_API void merge_cell_events(time_type t_from,
// Merge (remaining) old and pending events.
PE(communication:enqueue:merge);
auto n = new_events.size();
new_events.resize(n+pending.size()+old_events.size());
std::merge(pending.begin(), pending.end(), old_events.begin(), old_events.end(), new_events.begin()+n);
new_events.resize(n + pending.size() + old_events.size());
std::merge(pending.begin(), pending.end(),
old_events.begin(), old_events.end(),
new_events.begin() + n);
PL();
}

Expand Down

0 comments on commit c48fff5

Please sign in to comment.