burn::tensor

Trait Element

pub trait Element:
    ToElement
    + ElementRandom
    + ElementConversion
    + ElementPrecision
    + ElementComparison
    + CheckedBitPattern
    + NoUninit
    + Debug
    + Display
    + Default
    + Send
    + Sync
    + Copy
    + 'static {
    // Required method
    fn dtype() -> DType;
}
Expand description

Element trait for tensor.

Required Methods§

fn dtype() -> DType

The dtype of the element.

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 Element for bool

§

fn dtype() -> DType

§

impl Element for f32

§

fn dtype() -> DType

§

impl Element for f64

§

fn dtype() -> DType

§

impl Element for i8

§

fn dtype() -> DType

§

impl Element for i16

§

fn dtype() -> DType

§

impl Element for i32

§

fn dtype() -> DType

§

impl Element for i64

§

fn dtype() -> DType

§

impl Element for u8

§

fn dtype() -> DType

§

impl Element for u16

§

fn dtype() -> DType

§

impl Element for u32

§

fn dtype() -> DType

§

impl Element for u64

§

fn dtype() -> DType

Implementors§

§

impl Element for flex32

§

impl Element for bf16

§

impl Element for f16