99use bytemuck:: Pod ;
1010use oneapi_rs_sys:: { queue:: ffi, types:: ffi:: EventPtr } ;
1111
12- use crate :: { buffer:: { Buffer , BufferInProgress } , device:: Device , event:: Event , usm:: { HostAllocator , SharedAllocator , UsmAlloc , UsmAllocator } } ;
12+ use crate :: { buffer:: { Buffer , EnqueuedBuffer } , device:: Device , event:: Event , usm:: { HostAllocator , SharedAllocator , UsmAlloc , UsmAllocator } } ;
1313
1414/// The `Queue` connects a host program to a single device. Programs submit tasks to a device via the
1515/// `Queue` and may monitor the `Queue` for completion. A program initiates the task by submitting
@@ -28,20 +28,20 @@ impl Queue {
2828 }
2929
3030 /// Allocates zeroed memory and creates a host-side [`Buffer`] that can store an array of T.
31- pub fn alloc_host < T : Pod > ( & mut self , len : usize ) -> BufferInProgress < T , UsmAllocator < HostAllocator > > {
31+ pub fn alloc_host < T : Pod > ( & mut self , len : usize ) -> EnqueuedBuffer < T , UsmAllocator < HostAllocator > > {
3232 unsafe {
3333 let mut buffer = self . alloc_uninit_host ( len) ;
3434 let event = self . memset ( & mut buffer, 0 ) ;
35- BufferInProgress :: new ( buffer, event)
35+ EnqueuedBuffer :: new ( buffer, event)
3636 }
3737 }
3838
3939 /// Allocates zeroed memory and creates a shared [`Buffer`] that can store an array of T.
40- pub fn alloc_shared < T : Pod > ( & mut self , len : usize ) -> BufferInProgress < T , UsmAllocator < SharedAllocator > > {
40+ pub fn alloc_shared < T : Pod > ( & mut self , len : usize ) -> EnqueuedBuffer < T , UsmAllocator < SharedAllocator > > {
4141 unsafe {
4242 let mut buffer = self . alloc_uninit_shared ( len) ;
4343 let event = self . memset ( & mut buffer, 0 ) ;
44- BufferInProgress :: new ( buffer, event)
44+ EnqueuedBuffer :: new ( buffer, event)
4545 }
4646 }
4747
0 commit comments