mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-08-01 05:48:37 +00:00
Implement stream-wide event reuse
This commit is contained in:
parent
ce25035051
commit
5b593ec185
3 changed files with 49 additions and 22 deletions
|
@ -1123,7 +1123,7 @@ impl<'a> Event<'a> {
|
|||
}
|
||||
|
||||
pub fn host_synchronize(&self, timeout_ns: u64) -> Result<()> {
|
||||
check!{ sys::zeEventHostSynchronize(self.as_ffi(), timeout_ns) };
|
||||
check! { sys::zeEventHostSynchronize(self.as_ffi(), timeout_ns) };
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -1136,6 +1136,11 @@ impl<'a> Event<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn host_reset(&self) -> Result<()> {
|
||||
check! { sys::zeEventHostReset(self.as_ffi()) };
|
||||
Ok(())
|
||||
}
|
||||
|
||||
unsafe fn with_raw_slice<'x, T>(
|
||||
events: &[&Event<'x>],
|
||||
f: impl FnOnce(u32, *mut sys::ze_event_handle_t) -> T,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue