mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-08-01 21:59:11 +00:00
Don't wait on a blocking event
This commit is contained in:
parent
e2432d0df1
commit
9631a8d242
1 changed files with 1 additions and 4 deletions
|
@ -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| {
|
GlobalState::lock_stream(stream::CU_STREAM_LEGACY, |stream_data| {
|
||||||
let dev = unsafe { &*(*stream_data.context).device };
|
let dev = unsafe { &*(*stream_data.context).device };
|
||||||
let queue = stream_data.cmd_list.as_ref().unwrap();
|
let queue = stream_data.cmd_list.as_ref().unwrap();
|
||||||
let mut event = ptr::null_mut();
|
|
||||||
let err = unsafe {
|
let err = unsafe {
|
||||||
ocl_core::ffi::clEnqueueSVMMemcpy(
|
ocl_core::ffi::clEnqueueSVMMemcpy(
|
||||||
queue.as_ptr(),
|
queue.as_ptr(),
|
||||||
|
@ -58,12 +57,10 @@ pub fn copy_v2(dst: *mut c_void, src: *const c_void, bytesize: usize) -> Result<
|
||||||
bytesize,
|
bytesize,
|
||||||
0,
|
0,
|
||||||
ptr::null(),
|
ptr::null(),
|
||||||
&mut event,
|
ptr::null_mut(),
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
assert_eq!(err, 0);
|
assert_eq!(err, 0);
|
||||||
let err = unsafe { ocl_core::ffi::clWaitForEvents(1, &mut event) };
|
|
||||||
assert_eq!(err, 0);
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})?
|
})?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue