diff options
author | Andrzej Janik <[email protected]> | 2020-11-21 01:53:07 +0100 |
---|---|---|
committer | Andrzej Janik <[email protected]> | 2020-11-21 01:53:07 +0100 |
commit | 6e39c4a90cd54dde7a174b9f5c4c5c62afb6a5ec (patch) | |
tree | 70e81f1f83d10ef0fda15f7c9ec601fbbbc901a9 /level_zero | |
parent | 84ac086146b710ed87de20c136b197fe204b2742 (diff) | |
download | ZLUDA-6e39c4a90cd54dde7a174b9f5c4c5c62afb6a5ec.tar.gz ZLUDA-6e39c4a90cd54dde7a174b9f5c4c5c62afb6a5ec.zip |
Fix linking with shl/shr, add memset on host and support __assertfail
Diffstat (limited to 'level_zero')
-rw-r--r-- | level_zero/src/ze.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/level_zero/src/ze.rs b/level_zero/src/ze.rs index 253ba4b..c56321a 100644 --- a/level_zero/src/ze.rs +++ b/level_zero/src/ze.rs @@ -569,6 +569,29 @@ impl<'a> CommandList<'a> { Ok(())
}
+ pub unsafe fn append_memory_fill_unsafe<T: Copy + Sized>(
+ &mut self,
+ dst: *mut c_void,
+ pattern: &T,
+ byte_size: usize,
+ signal: Option<&mut Event<'a>>,
+ wait: &mut [Event<'a>],
+ ) -> Result<()> {
+ let signal_event = signal.map(|e| e.0).unwrap_or(ptr::null_mut());
+ let (wait_len, wait_ptr) = Event::raw_slice(wait);
+ check!(sys::zeCommandListAppendMemoryFill(
+ self.0,
+ dst,
+ pattern as *const T as *const _,
+ mem::size_of::<T>(),
+ byte_size,
+ signal_event,
+ wait_len,
+ wait_ptr
+ ));
+ Ok(())
+ }
+
pub fn append_launch_kernel(
&mut self,
kernel: &'a Kernel,
|