[−][src]Struct melange::tensor::stack_layout::StackLayout
array
-backed contiguous layout stored on the stack that requires
a shape known at compile time. This is just a wrapper for
the generic_array
crate.
StackLayout
comes with little runtime overhead and fast I/O
because it is entirely stored on the stack.
CAUTION: big StackLayout
can overflow the stack and cause a panic.
Trait Implementations
impl<T: Clone, S: Clone> Clone for StackLayout<T, S> where
S: NumElements<T>,
[src]
S: NumElements<T>,
fn clone(&self) -> StackLayout<T, S>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug, S: Debug> Debug for StackLayout<T, S> where
S: NumElements<T>,
[src]
S: NumElements<T>,
impl<T, S> Default for StackLayout<T, S> where
S: NumElements<T>,
T: Default,
[src]
S: NumElements<T>,
T: Default,
impl<T, S> Deref for StackLayout<T, S> where
S: NumElements<T>,
<S as NumElements<T>>::Output: 'static,
[src]
S: NumElements<T>,
<S as NumElements<T>>::Output: 'static,
impl<T, S> DerefMut for StackLayout<T, S> where
S: NumElements<T>,
<S as NumElements<T>>::Output: 'static,
[src]
S: NumElements<T>,
<S as NumElements<T>>::Output: 'static,
impl<'a, T, S> Layout<'a, T> for StackLayout<T, S> where
S: StaticShape + NumElements<T>,
<S as NumElements<T>>::Output: 'static,
T: 'static,
[src]
S: StaticShape + NumElements<T>,
<S as NumElements<T>>::Output: 'static,
T: 'static,
type Iter = Chunks<'a, T>
type View = SliceLayout<'a, T>
fn shape(&self) -> Vec<usize>
[src]
fn strides(&self) -> Vec<usize>
[src]
fn opt_chunk_size(&self) -> usize
[src]
fn num_elements(&self) -> usize
[src]
fn chunks(&'a self, chunk_size: usize) -> Self::Iter
[src]
fn as_view_unchecked(
&'a self,
shape: Vec<usize>,
strides: Vec<usize>,
num_elements: usize,
opt_chunk_size: usize
) -> Self::View
[src]
&'a self,
shape: Vec<usize>,
strides: Vec<usize>,
num_elements: usize,
opt_chunk_size: usize
) -> Self::View
impl<'a, T, S> LayoutMut<'a, T> for StackLayout<T, S> where
S: StaticShape + NumElements<T>,
<S as NumElements<T>>::Output: 'static,
T: 'a,
[src]
S: StaticShape + NumElements<T>,
<S as NumElements<T>>::Output: 'static,
T: 'a,
impl<T: PartialEq, S: PartialEq> PartialEq<StackLayout<T, S>> for StackLayout<T, S> where
S: NumElements<T>,
[src]
S: NumElements<T>,
fn eq(&self, other: &StackLayout<T, S>) -> bool
[src]
fn ne(&self, other: &StackLayout<T, S>) -> bool
[src]
impl<T, S> StructuralPartialEq for StackLayout<T, S> where
S: NumElements<T>,
[src]
S: NumElements<T>,
Auto Trait Implementations
impl<T, S> RefUnwindSafe for StackLayout<T, S> where
<<S as NumElements<T>>::Output as ArrayLength<T>>::ArrayType: RefUnwindSafe,
<<S as NumElements<T>>::Output as ArrayLength<T>>::ArrayType: RefUnwindSafe,
impl<T, S> Send for StackLayout<T, S> where
T: Send,
<S as NumElements<T>>::Output: ArrayLength<T>,
T: Send,
<S as NumElements<T>>::Output: ArrayLength<T>,
impl<T, S> Sync for StackLayout<T, S> where
T: Sync,
<S as NumElements<T>>::Output: ArrayLength<T>,
T: Sync,
<S as NumElements<T>>::Output: ArrayLength<T>,
impl<T, S> Unpin for StackLayout<T, S> where
<<S as NumElements<T>>::Output as ArrayLength<T>>::ArrayType: Unpin,
<<S as NumElements<T>>::Output as ArrayLength<T>>::ArrayType: Unpin,
impl<T, S> UnwindSafe for StackLayout<T, S> where
<<S as NumElements<T>>::Output as ArrayLength<T>>::ArrayType: UnwindSafe,
<<S as NumElements<T>>::Output as ArrayLength<T>>::ArrayType: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,