Struct TensorMeta

Source
pub struct TensorMeta<T: CommonBounds, B: TensorCreator<T, Output = B> + Clone + TensorInfo<T>> {
    pub begin: usize,
    pub shape: Vec<i64>,
    pub strides: Vec<i64>,
    pub size: usize,
    pub dtype: String,
    pub compression_algo: CompressionAlgo,
    pub endian: Endian,
    pub indices: Vec<(usize, usize, usize, usize)>,
    pub phantom: PhantomData<(T, B)>,
}
Expand description

the meta data of the tensor

Fields§

§begin: usize§shape: Vec<i64>§strides: Vec<i64>§size: usize§dtype: String§compression_algo: CompressionAlgo§endian: Endian§indices: Vec<(usize, usize, usize, usize)>§phantom: PhantomData<(T, B)>

Trait Implementations§

Source§

impl<'de, T: CommonBounds, B: TensorCreator<T, Output = B> + Clone + TensorInfo<T>> Deserialize<'de> for TensorMeta<T, B>

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T: CommonBounds + FromBytes<Bytes = [u8; N]>, B: TensorCreator<T, Output = B> + Clone + TensorInfo<T> + Display, const N: usize> MetaLoad for TensorMeta<T, B>

Source§

type Output = B

Source§

fn load(&self, file: &mut File) -> Result<Self::Output>

Source§

impl<T: CommonBounds, B: TensorCreator<T, Output = B> + Clone + TensorInfo<T>> Serialize for TensorMeta<T, B>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<T, B> Freeze for TensorMeta<T, B>

§

impl<T, B> RefUnwindSafe for TensorMeta<T, B>

§

impl<T, B> Send for TensorMeta<T, B>
where B: Send,

§

impl<T, B> Sync for TensorMeta<T, B>
where B: Sync,

§

impl<T, B> Unpin for TensorMeta<T, B>
where T: Unpin, B: Unpin,

§

impl<T, B> UnwindSafe for TensorMeta<T, B>
where T: UnwindSafe, B: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,