pub struct Rearranging(/* private fields */);Expand description
存储重排任务对象。
Implementations§
Source§impl Rearranging
impl Rearranging
Sourcepub fn new<const M: usize, const N: usize>(
dst: &ArrayLayout<M>,
src: &ArrayLayout<N>,
unit: usize,
) -> Result<Self, SchemeError>
pub fn new<const M: usize, const N: usize>( dst: &ArrayLayout<M>, src: &ArrayLayout<N>, unit: usize, ) -> Result<Self, SchemeError>
从输出布局、输入布局和单元规模构造重排方案。
单元规模 unit 是数组中单个元素的字节数。
Sourcepub fn distribute_unit(
&self,
candidates: impl IntoIterator<Item = usize>,
) -> Option<Self>
pub fn distribute_unit( &self, candidates: impl IntoIterator<Item = usize>, ) -> Option<Self>
从候选值中选择一个能整除当前单元规模的值作为新的单元规模
Sourcepub fn dst_offset(&self) -> isize
pub fn dst_offset(&self) -> isize
输出基址偏移。
Sourcepub fn src_offset(&self) -> isize
pub fn src_offset(&self) -> isize
输入基址偏移。
Sourcepub fn idx_strides(&self) -> &[isize]
pub fn idx_strides(&self) -> &[isize]
索引步长。
Sourcepub fn dst_strides(&self) -> &[isize]
pub fn dst_strides(&self) -> &[isize]
输出数据步长。
Sourcepub fn src_strides(&self) -> &[isize]
pub fn src_strides(&self) -> &[isize]
输入数据步长。
Trait Implementations§
Source§impl Clone for Rearranging
impl Clone for Rearranging
Source§fn clone(&self) -> Rearranging
fn clone(&self) -> Rearranging
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Rearranging
impl RefUnwindSafe for Rearranging
impl Send for Rearranging
impl Sync for Rearranging
impl Unpin for Rearranging
impl UnwindSafe for Rearranging
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> 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