pub struct Patch {Show 16 fields
pub spec: PatchSpec,
pub pad_before: TVec<usize>,
pub pad_after: TVec<usize>,
pub padded: bool,
pub output_shape: TVec<usize>,
pub data_field: Array2<isize>,
pub data_field_min_max: TVec<(isize, isize)>,
pub standard_layout_data_field: Vec<isize>,
pub op_strides_times_input_storage_strides: TVec<isize>,
pub valid_output_zone: TVec<Range<usize>>,
pub invalid_output_zones: TVec<TVec<Range<usize>>>,
pub zones: Vec<Zone>,
pub valid_zone_id: Option<usize>,
pub zone_strides: TVec<isize>,
pub input_storage_strides: TVec<isize>,
pub output_storage_strides: TVec<isize>,
}
Fields
spec: PatchSpec
pad_before: TVec<usize>
pad_after: TVec<usize>
padded: bool
output_shape: TVec<usize>
data_field: Array2<isize>
data_field_min_max: TVec<(isize, isize)>
standard_layout_data_field: Vec<isize>
op_strides_times_input_storage_strides: TVec<isize>
valid_output_zone: TVec<Range<usize>>
invalid_output_zones: TVec<TVec<Range<usize>>>
zones: Vec<Zone>
valid_zone_id: Option<usize>
zone_strides: TVec<isize>
input_storage_strides: TVec<isize>
output_storage_strides: TVec<isize>
Implementations
sourceimpl Patch
impl Patch
pub fn rank(&self) -> usize
pub fn valid_zone(&self) -> Option<&Zone>
pub fn visit_output(&self, acceptor: impl FnMut(&Scanner<'_>))
pub fn centers_offsets(&self) -> Vec<isize>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
pub fn at<'p>(&'p self, coords: &[usize]) -> PatchIterator<'p>
pub fn at_hint<'p>(
&'p self,
coords: &[usize],
hint: Option<bool>
) -> PatchIterator<'p>
pub fn global_offset_for(&self, coords: &[usize], patch_index: usize) -> usize
Trait Implementations
impl Eq for Patch
impl StructuralEq for Patch
impl StructuralPartialEq for Patch
Auto Trait Implementations
impl RefUnwindSafe for Patch
impl Send for Patch
impl Sync for Patch
impl Unpin for Patch
impl UnwindSafe for Patch
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