From 5f79eb9e2cc6f91a8b7c9d97bacb6f1c7bc0298e Mon Sep 17 00:00:00 2001 From: Juniper Tyree <50025784+juntyr@users.noreply.github.com> Date: Sun, 2 Feb 2025 11:55:03 +0200 Subject: [PATCH] Take an &Event in Stream::wait_event --- crates/cust/src/stream.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/cust/src/stream.rs b/crates/cust/src/stream.rs index 25a4178d..0432f311 100644 --- a/crates/cust/src/stream.rs +++ b/crates/cust/src/stream.rs @@ -237,11 +237,11 @@ impl Stream { /// event.record(&stream_0)?; /// /// // wait until the work on stream_0 is finished before continuing stream_1 - /// stream_1.wait_event(event, StreamWaitEventFlags::DEFAULT)?; + /// stream_1.wait_event(&event, StreamWaitEventFlags::DEFAULT)?; /// # Ok(()) /// } /// ``` - pub fn wait_event(&self, event: Event, flags: StreamWaitEventFlags) -> CudaResult<()> { + pub fn wait_event(&self, event: &Event, flags: StreamWaitEventFlags) -> CudaResult<()> { unsafe { cuda::cuStreamWaitEvent(self.inner, event.as_inner(), flags.bits()).to_result() } }