diff --git a/arbor/CMakeLists.txt b/arbor/CMakeLists.txt index f3ff1c4df79e5d9cfa86c264be340996f35399d4..b07fddd6ff9156c716abb64533dedc9ad44b4446 100644 --- a/arbor/CMakeLists.txt +++ b/arbor/CMakeLists.txt @@ -58,6 +58,7 @@ if(ARB_WITH_CUDA) backends/gpu/matrix_assemble.cu backends/gpu/matrix_interleave.cu backends/gpu/matrix_solve.cu + backends/gpu/multi_event_stream.cpp backends/gpu/multi_event_stream.cu backends/gpu/shared_state.cu backends/gpu/stimulus.cu diff --git a/arbor/backends/gpu/multi_event_stream.cpp b/arbor/backends/gpu/multi_event_stream.cpp new file mode 100644 index 0000000000000000000000000000000000000000..858c99789610102a6648b25e8ad04e3bebd4e0f7 --- /dev/null +++ b/arbor/backends/gpu/multi_event_stream.cpp @@ -0,0 +1,17 @@ +#include <arbor/common_types.hpp> + +#include "backends/gpu/multi_event_stream.hpp" +#include "memory/memory.hpp" + +namespace arb { +namespace gpu { + +void multi_event_stream_base::clear() { + memory::fill(span_begin_, 0u); + memory::fill(span_end_, 0u); + memory::fill(mark_, 0u); + n_nonempty_stream_[0] = 0; +} + +} // namespace gpu +} // namespace arb diff --git a/arbor/backends/gpu/multi_event_stream.cu b/arbor/backends/gpu/multi_event_stream.cu index 5e4e5cf936a98f8b7b19edc88f747efe384183eb..1ed5631bf927fbcdee45e5281e71da4bd8c9f46f 100644 --- a/arbor/backends/gpu/multi_event_stream.cu +++ b/arbor/backends/gpu/multi_event_stream.cu @@ -2,10 +2,6 @@ #include "backends/event.hpp" #include "backends/gpu/multi_event_stream.hpp" -#include "memory/array.hpp" -#include "memory/copy.hpp" -#include "util/rangeutil.hpp" - #include "cuda_common.hpp" namespace arb { @@ -90,17 +86,10 @@ namespace kernels { } } // namespace kernels -void multi_event_stream_base::clear() { - memory::fill(span_begin_, 0u); - memory::fill(span_end_, 0u); - memory::fill(mark_, 0u); - n_nonempty_stream_[0] = 0; -} - // Designate for processing events `ev` at head of each event stream `i` // until `event_time(ev)` > `t_until[i]`. void multi_event_stream_base::mark_until_after(const_view t_until) { - arb_assert(n_streams()==util::size(t_until)); + arb_assert(n_streams()==t_until.size()); constexpr int block_dim = 128; @@ -113,7 +102,7 @@ void multi_event_stream_base::mark_until_after(const_view t_until) { // Designate for processing events `ev` at head of each event stream `i` // while `t_until[i]` > `event_time(ev)`. void multi_event_stream_base::mark_until(const_view t_until) { - arb_assert(n_streams()==util::size(t_until)); + arb_assert(n_streams()==t_until.size()); constexpr int block_dim = 128; unsigned n = n_stream_; diff --git a/arbor/backends/gpu/multi_event_stream.hpp b/arbor/backends/gpu/multi_event_stream.hpp index 217c19920f434237b6b41476c8cb34c46b86671c..828425589e902b1c234ab55e76f3d3cfe9d4a44f 100644 --- a/arbor/backends/gpu/multi_event_stream.hpp +++ b/arbor/backends/gpu/multi_event_stream.hpp @@ -1,6 +1,6 @@ #pragma once -// Indexed collection of pop-only event queues --- multicore back-end implementation. +// Indexed collection of pop-only event queues --- CUDA back-end implementation. #include <arbor/arbexcept.hpp> #include <arbor/common_types.hpp>