Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve spike event merging #2425

Prev Previous commit
Next Next commit
Fix stubgen searching
thorstenhater committed Dec 4, 2024
commit c5a3421be7707b1b23e312df4fa2262198d511b1
13 changes: 7 additions & 6 deletions arbor/simulation.cpp
Original file line number Diff line number Diff line change
@@ -36,12 +36,13 @@ auto split_sorted_range(Seq&& seq, const Value& v, Less cmp = Less{}) {

// Create a new cell event_lane vector from sorted pending events, previous event_lane events,
// and events from event generators for the given interval.
ARB_ARBOR_API void merge_cell_events(time_type t_from,
time_type t_to,
event_span old_events,
event_span pending,
std::vector<event_generator>& generators,
pse_vector& new_events) {
ARB_ARBOR_API void
merge_cell_events(time_type t_from,
time_type t_to,
event_span old_events, // (spike_event*, spike_event*)
event_span pending, // (spike_event*, spike_event*)
std::vector<event_generator>& generators,
pse_vector& new_events) { // [spike_event] sorted by time
PE(communication:enqueue:setup);
new_events.clear();
constexpr auto event_time_less = [](auto const& l, auto const& r) noexcept {
6 changes: 5 additions & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -111,7 +111,11 @@ endif()

# generate type stubs and copy them to the expected places
if(ARB_BUILD_PYTHON_STUBS)
find_program(PB11_STUBGEN NAMES pybind11-stubgen REQUIRED)
find_program(PB11_STUBGEN
NAMES pybind11-stubgen
NO_DEFAULT_PATH # do not fall into CMake weirdness with paths
PATHS ENV PATH # but _do_ use $PATH
REQUIRED)
add_custom_command(TARGET pyarb POST_BUILD
COMMAND
PYTHONPATH=${CMAKE_BINARY_DIR}/python:$ENV{PYTHONPATH} ${PB11_STUBGEN} -o ${CMAKE_BINARY_DIR}/stubs arbor