pub struct SubBufferPool<T: OclPrm> { /* private fields */ }
Expand description

A simple (linear search) sub-buffer allocator.

Implementations

Returns a new buffer pool.

Allocates space for and creates a new sub-buffer then returns the buffer id which can be used to ::get or ::free it.

Deallocates the buffer identified by buffer_id or returns it back in the event of a failure.

Returns a reference to the sub-buffer identified by buffer_id.

Returns a mutable reference to the sub-buffer identified by buffer_id.

Defragments the buffer. Be sure to ::finish() any and all command queues you may be using before doing this.

All kernels with a buffer argument set to any of the sub-buffers in this pool will need to be created anew or arguments refreshed (use Kernel::arg_..._named when initializing arguments in order to change them later).

Shrinks or grows and defragments the main buffer. Invalidates all kernels referencing sub-buffers in this pool. See ::defrag for more information.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.