Wait for an event to complete. Blocks thread execution until all work submitted before the event was recorded has completed. `EventFlags::BLOCKING_SYNC` controls the mode of blocking. If the flag is set on event creation, the thread will sleep. Otherwise, the thread will busy-wait. # Example ``` # use cust::quick_init; # use cust::stream::{Stream, StreamFlags}; # use std::error::Error; # fn mai
(&self)
| 207 | /// } |
| 208 | /// ``` |
| 209 | pub fn synchronize(&self) -> CudaResult<()> { |
| 210 | unsafe { |
| 211 | cuEventSynchronize(self.0).to_result()?; |
| 212 | Ok(()) |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | /// Return the duration between two events. |
| 217 | /// |