Skip to main content

CuPool

Trait CuPool 

Source
pub trait CuPool<T>: PoolMonitor
where T: ArrayLike,
{ // Required methods fn acquire(&self) -> Option<CuHandle<T>>; fn copy_from<O>(&self, from: &mut CuHandle<O>) -> CuHandle<T> where O: ArrayLike<Element = <T as ArrayLike>::Element>; }
Expand description

A CuPool is a pool of buffers that can be shared between different parts of the code. Handles can be stored locally in the tasks and shared between them.

Required Methods§

Source

fn acquire(&self) -> Option<CuHandle<T>>

Acquire a buffer from the pool.

Source

fn copy_from<O>(&self, from: &mut CuHandle<O>) -> CuHandle<T>
where O: ArrayLike<Element = <T as ArrayLike>::Element>,

Copy data from a handle to a new handle from the pool.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§