9 #include <cuda_runtime.h>
13 #include <rapidsmpf/error.hpp>
132 [[nodiscard]] cudaEvent_t const&
value() const noexcept;
139 operator cudaEvent_t const&() const noexcept {
144 cudaEvent_t event_{};
RAII wrapper for a CUDA event with convenience methods.
bool is_ready() const
Check if the CUDA event has been completed.
static std::shared_ptr< CudaEvent > make_shared_record(rmm::cuda_stream_view stream, unsigned flags=cudaEventDisableTiming)
Create and record a CUDA event on a given stream.
void record(rmm::cuda_stream_view stream)
Record the event on a CUDA stream.
~CudaEvent() noexcept
Destroy the CUDA event.
CudaEvent(unsigned flags=cudaEventDisableTiming)
Construct a CUDA event.
void stream_wait(rmm::cuda_stream_view stream) const
Make a CUDA stream wait on this event (non-blocking).
cudaEvent_t const & value() const noexcept
Access the underlying CUDA event handle.
void host_wait() const
Wait for the event to be completed (blocking).