Trait TensorMetadata

Source
pub trait TensorMetadata:
    Clone
    + Send
    + Sync
    + Debug {
    // Required methods
    fn dtype(&self) -> DType;
    fn shape(&self) -> Shape;
}
Expand description

Tensor metadata trait for tensor primitive.

Required Methods§

Source

fn dtype(&self) -> DType

The dtype of the tensor.

Source

fn shape(&self) -> Shape

The shape of the tensor.

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 TensorMetadata for NdArrayTensorFloat

Source§

fn dtype(&self) -> DType

Source§

fn shape(&self) -> Shape

Source§

impl TensorMetadata for CandleQTensor

Source§

fn dtype(&self) -> DType

Source§

fn shape(&self) -> Shape

Source§

impl TensorMetadata for CandleTensor

Source§

fn dtype(&self) -> DType

Source§

fn shape(&self) -> Shape

Source§

impl TensorMetadata for TchQTensor

Source§

fn dtype(&self) -> DType

Source§

fn shape(&self) -> Shape

Source§

impl TensorMetadata for TchTensor

Source§

fn dtype(&self) -> DType

Source§

fn shape(&self) -> Shape

Source§

impl<C> TensorMetadata for RouterTensor<C>
where C: RunnerClient,

Source§

fn dtype(&self) -> DType

Source§

fn shape(&self) -> Shape

Source§

impl<E> TensorMetadata for NdArrayTensor<E>
where E: Element,

Source§

fn dtype(&self) -> DType

Source§

fn shape(&self) -> Shape

Source§

impl<Q> TensorMetadata for NdArrayQTensor<Q>
where Q: QuantElement,

Source§

fn dtype(&self) -> DType

Source§

fn shape(&self) -> Shape

Source§

impl<R> TensorMetadata for FusionTensor<R>
where R: FusionRuntime,

Source§

fn dtype(&self) -> DType

Source§

fn shape(&self) -> Shape

Source§

impl<R> TensorMetadata for JitTensor<R>
where R: JitRuntime,

Source§

fn dtype(&self) -> DType

Source§

fn shape(&self) -> Shape

Implementors§