Refactor main.rs to remove unused code

This commit is contained in:
shenjack 2024-10-18 00:58:57 +08:00
parent 7909a649e6
commit 9da498b57b
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -132,9 +132,6 @@ fn main() -> anyhow::Result<()> {
ptr::null_mut(), ptr::null_mut(),
)? )?
}; };
// let mut t_len = unsafe {
// Buffer::<cl_int>::create(&context, CL_MEM_READ_ONLY, work_count, ptr::null_mut())?
// };
let mut n_len = unsafe { let mut n_len = unsafe {
Buffer::<cl_int>::create(&context, CL_MEM_READ_ONLY, work_count, ptr::null_mut())? Buffer::<cl_int>::create(&context, CL_MEM_READ_ONLY, work_count, ptr::null_mut())?
}; };
@ -160,9 +157,6 @@ fn main() -> anyhow::Result<()> {
let _name_write_event = let _name_write_event =
unsafe { queue.enqueue_write_buffer(&mut name, CL_BLOCKING, 0, &name_data_vec, &[]) }?; unsafe { queue.enqueue_write_buffer(&mut name, CL_BLOCKING, 0, &name_data_vec, &[]) }?;
_name_write_event.wait()?; _name_write_event.wait()?;
// let _t_len_write_event =
// unsafe { queue.enqueue_write_buffer(&mut t_len, CL_BLOCKING, 0, &t_len_vec, &[]) }?;
// _t_len_write_event.wait()?;
let _n_len_write_event = let _n_len_write_event =
unsafe { queue.enqueue_write_buffer(&mut n_len, CL_BLOCKING, 0, &n_len_vec, &[]) }?; unsafe { queue.enqueue_write_buffer(&mut n_len, CL_BLOCKING, 0, &n_len_vec, &[]) }?;
_n_len_write_event.wait()?; _n_len_write_event.wait()?;