[−][src]Struct melange::tensor::static_heap_layout::StaticHeapLayout
Vec
-backed contiguous layout that does require a shape known
at compile time. This comes with no memory overhead since both
the shape and strides are encoded in the type and checked at compile time.
StaticHeapLayout
is the default static storage in Melange and should
be prefered unless you have specific needs.
Trait Implementations
impl<T: Clone, S: Clone> Clone for StaticHeapLayout<T, S>
[src]
fn clone(&self) -> StaticHeapLayout<T, S>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug, S: Debug> Debug for StaticHeapLayout<T, S>
[src]
impl<T, S> Default for StaticHeapLayout<T, S> where
T: Default + Clone,
S: StaticShape,
[src]
T: Default + Clone,
S: StaticShape,
impl<T, S> Deref for StaticHeapLayout<T, S>
[src]
impl<T, S> DerefMut for StaticHeapLayout<T, S>
[src]
impl<'a, T, S> Layout<'a, T> for StaticHeapLayout<T, S> where
T: 'static,
S: StaticShape,
[src]
T: 'static,
S: StaticShape,
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 StaticHeapLayout<T, S> where
T: 'a,
[src]
T: 'a,
impl<T: PartialEq, S: PartialEq> PartialEq<StaticHeapLayout<T, S>> for StaticHeapLayout<T, S>
[src]
fn eq(&self, other: &StaticHeapLayout<T, S>) -> bool
[src]
fn ne(&self, other: &StaticHeapLayout<T, S>) -> bool
[src]
impl<T, S> StaticFill<T> for StaticHeapLayout<T, S> where
T: Clone,
S: StaticShape,
[src]
T: Clone,
S: StaticShape,
impl<T, S> StructuralPartialEq for StaticHeapLayout<T, S>
[src]
Auto Trait Implementations
impl<T, S> RefUnwindSafe for StaticHeapLayout<T, S> where
S: RefUnwindSafe,
T: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for StaticHeapLayout<T, S> where
S: Send,
T: Send,
S: Send,
T: Send,
impl<T, S> Sync for StaticHeapLayout<T, S> where
S: Sync,
T: Sync,
S: Sync,
T: Sync,
impl<T, S> Unpin for StaticHeapLayout<T, S> where
S: Unpin,
T: Unpin,
S: Unpin,
T: Unpin,
impl<T, S> UnwindSafe for StaticHeapLayout<T, S> where
S: UnwindSafe,
T: UnwindSafe,
S: UnwindSafe,
T: 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>,