Skip to main content

ReshapeView

Struct ReshapeView 

Source
pub struct ReshapeView<'a> { /* private fields */ }
Expand description

A read-only reshape retaining its source and allocator provenance. It cannot be transferred into an extractor or exported as a native handle.

Implementations§

Source§

impl ReshapeView<'_>

Source

pub fn info(&self) -> TensorInfo

Returns the borrowed tensor metadata.

Source

pub fn to_f32(&self) -> Result<Vec<f32>>

Copies logical FP32 elements into a new vector.

Source

pub fn as_f32_slice(&self) -> Result<&[f32]>

Borrows contiguous FP32 storage without padding.

Source

pub fn channel_f32(&self, channel: usize) -> Result<&[f32]>

Borrows one channel, skipping inter-channel padding.

Source

pub fn to_f32_into(&self, buffer: &mut Vec<f32>) -> Result<()>

Replaces the vector contents with logical FP32 elements.

Auto Trait Implementations§

§

impl<'a> !Send for ReshapeView<'a>

§

impl<'a> !Sync for ReshapeView<'a>

§

impl<'a> Freeze for ReshapeView<'a>

§

impl<'a> RefUnwindSafe for ReshapeView<'a>

§

impl<'a> Unpin for ReshapeView<'a>

§

impl<'a> UnsafeUnpin for ReshapeView<'a>

§

impl<'a> UnwindSafe for ReshapeView<'a>

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.