pub trait Device<'a>: Sized {
type Buffer<N: Num>: Buffer<'a, N>;
type Program<K: Kernel>: Program<'a, K>;
type LaunchConfig: LaunchConfig;
// Required methods
fn buffer<N: Num>(&self, count: usize) -> Result<Self::Buffer<N>>;
fn launch<K: Kernel>(
&self,
program: &Self::Program<K>,
cfg: &Self::LaunchConfig,
args: K::Args<'a>,
) -> Result<()>;
}Expand description
A device capable of allocating buffers and launching kernels.
Required Associated Types§
Sourcetype LaunchConfig: LaunchConfig
type LaunchConfig: LaunchConfig
This device’s launch configuration type.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.