DeviceOps

Trait DeviceOps 

pub trait DeviceOps:
    Clone
    + Default
    + PartialEq
    + Send
    + Sync
    + Debug
    + Device {
    // Provided methods
    fn id(&self) -> DeviceId { ... }
    fn inner(&self) -> &Self { ... }
}
Expand description

Device trait for all burn backend devices.

Provided Methods§

fn id(&self) -> DeviceId

Returns the device id.

fn inner(&self) -> &Self

Returns the inner device without autodiff enabled.

For most devices this is a no-op that returns self. For autodiff-enabled devices, this returns the underlying inner device.

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.

Implementations on Foreign Types§

§

impl DeviceOps for AmdDevice

§

impl DeviceOps for CudaDevice

§

impl DeviceOps for FlexDevice

§

impl DeviceOps for WgpuDevice

Implementors§