Skip to main content

TensorMachine

Trait TensorMachine 

Source
pub trait TensorMachine: Sealed {
    // Required method
    fn device() -> bool;

    // Provided method
    fn host() -> bool { ... }
}
Expand description

A trait to represent the device type of a tensor

Required Methods§

Source

fn device() -> bool

Check if the tensor is owned by the device

Provided Methods§

Source

fn host() -> bool

Check if the tensor is owned by the host

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.

Implementors§