Struct tract_core::ops::nn::BaseDataShape
source · [−]pub struct BaseDataShape<D, S>where
D: DimLike,
S: AsRef<[D]> + Debug,{
pub fmt: DataFormat,
pub shape: S,
pub strides: TVec<D>,
}
Fields
fmt: DataFormat
shape: S
strides: TVec<D>
Implementations
sourceimpl<D, S> BaseDataShape<D, S>where
D: DimLike,
S: AsRef<[D]> + Debug,
impl<D, S> BaseDataShape<D, S>where
D: DimLike,
S: AsRef<[D]> + Debug,
pub fn rank(&self) -> usize
pub fn hw_rank(&self) -> usize
pub fn n_axis(&self) -> Option<usize>
pub fn c_axis(&self) -> usize
pub fn h_axis(&self) -> usize
pub fn hw_axes(&self) -> Range<usize>ⓘNotable traits for Range<A>impl<A> Iterator for Range<A>where
A: Step, type Item = A;
A: Step, type Item = A;
pub fn n_dim(&self) -> Option<&D>
pub fn c_dim(&self) -> &D
pub fn hw_dims(&self) -> &[D]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
pub fn n(&self) -> Option<&D>
pub fn c(&self) -> &D
pub fn n_stride(&self) -> Option<&D>
pub fn h_stride(&self) -> &D
pub fn hw_strides(&self) -> &[D]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
pub fn w_stride(&self) -> &D
pub fn c_stride(&self) -> &D
Trait Implementations
sourceimpl<D: Clone, S: Clone> Clone for BaseDataShape<D, S>where
D: DimLike,
S: AsRef<[D]> + Debug,
impl<D: Clone, S: Clone> Clone for BaseDataShape<D, S>where
D: DimLike,
S: AsRef<[D]> + Debug,
sourcefn clone(&self) -> BaseDataShape<D, S>
fn clone(&self) -> BaseDataShape<D, S>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<D: PartialEq, S: PartialEq> PartialEq<BaseDataShape<D, S>> for BaseDataShape<D, S>where
D: DimLike,
S: AsRef<[D]> + Debug,
impl<D: PartialEq, S: PartialEq> PartialEq<BaseDataShape<D, S>> for BaseDataShape<D, S>where
D: DimLike,
S: AsRef<[D]> + Debug,
sourcefn eq(&self, other: &BaseDataShape<D, S>) -> bool
fn eq(&self, other: &BaseDataShape<D, S>) -> bool
impl<D: Eq, S: Eq> Eq for BaseDataShape<D, S>where
D: DimLike,
S: AsRef<[D]> + Debug,
impl<D, S> StructuralEq for BaseDataShape<D, S>where
D: DimLike,
S: AsRef<[D]> + Debug,
impl<D, S> StructuralPartialEq for BaseDataShape<D, S>where
D: DimLike,
S: AsRef<[D]> + Debug,
Auto Trait Implementations
impl<D, S> RefUnwindSafe for BaseDataShape<D, S>where
D: RefUnwindSafe,
S: RefUnwindSafe,
impl<D, S> Send for BaseDataShape<D, S>where
S: Send,
impl<D, S> Sync for BaseDataShape<D, S>where
S: Sync,
impl<D, S> Unpin for BaseDataShape<D, S>where
D: Unpin,
S: Unpin,
impl<D, S> UnwindSafe for BaseDataShape<D, S>where
D: UnwindSafe + RefUnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global>where
R: Read + ?Sized,impl<W> Write for Box<W, Global>where
W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global>where
R: Read + ?Sized,impl<W> Write for Box<W, Global>where
W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
R: Read + ?Sized,impl<W> Write for Box<W, Global>where
W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more