Skip to main content

TensorCell

Trait TensorCell 

Source
pub trait TensorCell:
    Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn dtype() -> Symbol;
    fn to_value(&self) -> Result<Value>;
}
Expand description

A scalar cell type that can be held in typed host tensor storage.

Required Methods§

Source

fn dtype() -> Symbol

The scalar number domain this cell encodes.

Source

fn to_value(&self) -> Result<Value>

Encodes the typed cell as a scalar runtime value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl TensorCell for (f64, f64)

Source§

impl TensorCell for (i64, i64)

Source§

impl TensorCell for bf16

Source§

impl TensorCell for bool

Source§

impl TensorCell for f16

Source§

impl TensorCell for f32

Source§

impl TensorCell for f64

Source§

impl TensorCell for i64

Implementors§