Trait rai_core::Device

source ·
pub trait Device: Debug {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn clone_boxed(&self) -> Box<dyn Device>;
    fn eq(&self, rhs: &dyn Device) -> bool;
    fn primitive_to_device(&self) -> Box<dyn Primitive>;
}

Required Methods§

source

fn as_any(&self) -> &dyn Any

source

fn clone_boxed(&self) -> Box<dyn Device>

source

fn eq(&self, rhs: &dyn Device) -> bool

source

fn primitive_to_device(&self) -> Box<dyn Primitive>

Trait Implementations§

source§

impl Clone for Box<dyn Device>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Device for &'a dyn Device

source§

fn as_any(&self) -> &dyn Any

source§

fn clone_boxed(&self) -> Box<dyn Device>

source§

fn eq(&self, rhs: &dyn Device) -> bool

source§

fn primitive_to_device(&self) -> Box<dyn Primitive>

source§

impl<D, P, B> Eval<dyn Device, dyn Primitive> for BackendWrapper<D, P, B>
where D: Device + 'static + Sync + Send + Clone, P: Primitive + 'static + Sync + Send + Clone, B: Eval<D, P> + 'static + Clone,

source§

fn eval( &self, device: &dyn Device, primitive: &dyn Primitive, inputs: &[Tensor], output: &Tensor )

source§

impl<'a> PartialEq for &'a dyn Device

source§

fn eq(&self, rhs: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for Box<dyn Device>

source§

fn eq(&self, rhs: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Implementations on Foreign Types§

source§

impl<'a, T> Device for &'a T
where T: Device,

source§

fn as_any(&self) -> &dyn Any

source§

fn clone_boxed(&self) -> Box<dyn Device>

source§

fn eq(&self, rhs: &dyn Device) -> bool

source§

fn primitive_to_device(&self) -> Box<dyn Primitive>

Implementors§

source§

impl Device for Cpu

source§

impl Device for Cuda

source§

impl<'a> Device for &'a dyn Device