Skip to main content

TensorData

Trait TensorData 

Source
pub trait TensorData:
    Default
    + Clone
    + Copy
    + 'static {
    // Required method
    fn dtype() -> DataType;
}
Expand description

Trait for types that can be stored in a tensor.

This trait is implemented for primitive numeric types that MNN supports.

Required Methods§

Source

fn dtype() -> DataType

Get the MNN data type for this Rust type.

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§

Source§

impl TensorData for f32

Source§

impl TensorData for f64

Source§

impl TensorData for i16

Source§

impl TensorData for i32

Source§

impl TensorData for u8

Implementors§