Skip to main content

DLTensorExt

Trait DLTensorExt 

Source
pub trait DLTensorExt {
    // Required methods
    fn numel(&self) -> usize;
    fn item_size(&self) -> usize;
}
Expand description

DLTensorExt trait This trait provides methods to get the number of elements and the item size of a DLTensor

Required Methods§

Source

fn numel(&self) -> usize

Source

fn item_size(&self) -> usize

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl DLTensorExt for DLTensor

Source§

fn numel(&self) -> usize

Source§

fn item_size(&self) -> usize

Implementors§