Skip to content

Commit

Permalink
Size matters...
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstenhater committed Feb 15, 2024
1 parent dcb6672 commit f132f43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arbor/backends/gpu/event_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ class event_stream: public event_stream_base<Event> {
[this, &staged](size_type i) {
const auto beg = base::ev_spans_[i];
const auto end = base::ev_spans_[i + 1];
arb_assert(end >= beg);
const auto len = end - beg;
// host span
auto host_span = memory::make_view(base::ev_data_)(beg, end);

// make event data and copy
std::copy_n(util::transform_view(staged[i],
[](const auto& x) { return event_data(x); }).begin(),
size,
len,
host_span.begin());
// sort if necessary
if constexpr (has_event_index<Event>::value) {
Expand Down

0 comments on commit f132f43

Please sign in to comment.