pub trait Device: Sized {
type Ptr<T: ?Sized>: DevicePtr<T>;
const IS_CPU: bool = false;
// Required methods
fn copy_from_host<T: Copy>(from: &[T], to: &mut Ref<[T], Self>);
fn copy_to_host<T: Copy>(from: &Ref<[T], Self>, to: &mut [T]);
fn copy<T: Copy>(from: &Ref<[T], Self>, to: &mut Ref<[T], Self>);
}Expand description
Represents a physical device that can host memory.
For example: cpu::Cpu, [cuda::Cuda]
Provided Associated Constants§
Required Associated Types§
Required Methods§
fn copy_from_host<T: Copy>(from: &[T], to: &mut Ref<[T], Self>)
fn copy_to_host<T: Copy>(from: &Ref<[T], Self>, to: &mut [T])
fn copy<T: Copy>(from: &Ref<[T], Self>, to: &mut Ref<[T], Self>)
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.