aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2021-08-08 17:43:14 +0200
committerAndrzej Janik <[email protected]>2021-08-08 17:43:14 +0200
commit9631a8d242510836730bb1f85d99b77c04017ca4 (patch)
treee6a4790182af258f3e78f9b9d880057069c73390
parente2432d0df15e626de6a2b2d9d7ae5295f0fac999 (diff)
downloadZLUDA-9631a8d242510836730bb1f85d99b77c04017ca4.tar.gz
ZLUDA-9631a8d242510836730bb1f85d99b77c04017ca4.zip
Don't wait on a blocking event
-rw-r--r--zluda/src/impl/memory.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/zluda/src/impl/memory.rs b/zluda/src/impl/memory.rs
index e4abeda..92cc4b2 100644
--- a/zluda/src/impl/memory.rs
+++ b/zluda/src/impl/memory.rs
@@ -48,7 +48,6 @@ pub fn copy_v2(dst: *mut c_void, src: *const c_void, bytesize: usize) -> Result<
GlobalState::lock_stream(stream::CU_STREAM_LEGACY, |stream_data| {
let dev = unsafe { &*(*stream_data.context).device };
let queue = stream_data.cmd_list.as_ref().unwrap();
- let mut event = ptr::null_mut();
let err = unsafe {
ocl_core::ffi::clEnqueueSVMMemcpy(
queue.as_ptr(),
@@ -58,12 +57,10 @@ pub fn copy_v2(dst: *mut c_void, src: *const c_void, bytesize: usize) -> Result<
bytesize,
0,
ptr::null(),
- &mut event,
+ ptr::null_mut(),
)
};
assert_eq!(err, 0);
- let err = unsafe { ocl_core::ffi::clWaitForEvents(1, &mut event) };
- assert_eq!(err, 0);
Ok(())
})?
}