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§
Source§impl 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>
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 StructuralPartialEq for Patch
Auto Trait Implementations§
impl Freeze for Patch
impl RefUnwindSafe for Patch
impl Send for Patch
impl Sync for Patch
impl Unpin for Patch
impl UnwindSafe for Patch
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn 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.Source§fn 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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more