aboutsummaryrefslogtreecommitdiffhomepage
path: root/level_zero
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2021-07-04 19:06:37 +0200
committerAndrzej Janik <[email protected]>2021-07-04 19:06:37 +0200
commit5b593ec1854aa366a9b3bd103fdc9585b9f6d6df (patch)
tree0f923ce7e3dce509f2db1ae07a59bf03bb6b0399 /level_zero
parentce25035051bbe462bbabec7c446cd62c5f07f88f (diff)
downloadZLUDA-5b593ec1854aa366a9b3bd103fdc9585b9f6d6df.tar.gz
ZLUDA-5b593ec1854aa366a9b3bd103fdc9585b9f6d6df.zip
Implement stream-wide event reuse
Diffstat (limited to 'level_zero')
-rw-r--r--level_zero/src/ze.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/level_zero/src/ze.rs b/level_zero/src/ze.rs
index 27a61c8..91386cd 100644
--- a/level_zero/src/ze.rs
+++ b/level_zero/src/ze.rs
@@ -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,