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<'_>
impl ReshapeView<'_>
Sourcepub fn info(&self) -> TensorInfo
pub fn info(&self) -> TensorInfo
Returns the borrowed tensor metadata.
Sourcepub fn as_f32_slice(&self) -> Result<&[f32]>
pub fn as_f32_slice(&self) -> Result<&[f32]>
Borrows contiguous FP32 storage without padding.
Sourcepub fn channel_f32(&self, channel: usize) -> Result<&[f32]>
pub fn channel_f32(&self, channel: usize) -> Result<&[f32]>
Borrows one channel, skipping inter-channel padding.
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more