pub enum Instr {
Load(usize),
Monad(ScalarMonad),
Dyad(ScalarDyad),
Store(usize),
Let(usize),
Window(ScalarDyad, usize),
Scan(ScalarDyad),
}Expand description
One step of a kernel: postfix, so operands are already on the stack.
Variants§
Load(usize)
Push input k.
Monad(ScalarMonad)
Replace the top of the stack.
Dyad(ScalarDyad)
Replace the top two, left below right.
Store(usize)
Keep the top of the stack as let k, a value the rest of the
program reads more than once. It holds its block buffer until the
block is finished; nothing pops it.
Let(usize)
Push let k again.
Window(ScalarDyad, usize)
Fold every window of k consecutive items of the top of the stack
into one item. The operand stands on the wide axis and the result on
the kernel’s own, which is k - 1 items shorter.
Scan(ScalarDyad)
Replace the top of the stack with its running fold: item i becomes
the fold of items 0 .. i. Both stand on the same axis.
Trait Implementations§
impl Copy for Instr
impl Eq for Instr
impl StructuralPartialEq for Instr
Auto Trait Implementations§
impl Freeze for Instr
impl RefUnwindSafe for Instr
impl Send for Instr
impl Sync for Instr
impl Unpin for Instr
impl UnsafeUnpin for Instr
impl UnwindSafe for Instr
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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