pub enum Instruction {
}Expand description
The Bloqade Lanes instruction set, defined on the vihaco framework.
Device operands use only the scalar types vihaco implements byte traits for
(u32, u64, i64, f64); the legacy u8/u16 array operands are
widened to u32. CPU ops are reused from [vihaco_cpu] via the nested
Cpu variant (see module docs).
Variant order is significant. It is both the encoded opcode order and
the text parser’s try-order; a token that is a prefix of another must be
declared after the longer token (hence *_rz precedes *_r), and the
#[delegate] Cpu variant is declared last so
device-specific tokens (e.g. get_item <n>) win over any vihaco-cpu token
they would otherwise shadow.
Variants§
Pop
Swap
Return
ConstLoc(u64)
ConstLane(u64)
ConstZone(u32)
InitialFill(u32)
Fill(u32)
Move(u32)
LocalRz(u32)
LocalR(u32)
GlobalRz
GlobalR
Cz
Measure(u32)
AwaitMeasure
NewArray(u32, u32, u32)
GetItem(u32)
SetDetector
SetObservable
Cpu(Instruction)
Implementations§
Source§impl Instruction
impl Instruction
Sourcepub fn op_name(&self) -> &'static str
pub fn op_name(&self) -> &'static str
Canonical opcode name used for decode dispatch (the Python decoder
calls _visit_{op_name}) and introspection.
For lanes-native ops this equals the parser #[token] / Display
mnemonic. For nested vihaco-cpu ops it returns the decode-handler
name (const_float/const_int/dup/halt), which deliberately
differs from the vihaco-cpu text syntax (const.f64, …) because
decode handler method names cannot contain ..
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Instruction
impl Debug for Instruction
Source§impl Display for Instruction
impl Display for Instruction
Source§impl FromBytesWithOpcode for Instruction
impl FromBytesWithOpcode for Instruction
Source§impl<'src> Parse<'src> for Instruction
impl<'src> Parse<'src> for Instruction
Source§impl PartialEq for Instruction
impl PartialEq for Instruction
Source§fn eq(&self, other: &Instruction) -> bool
fn eq(&self, other: &Instruction) -> bool
self and other values to be equal, and is used by ==.Source§impl WriteBytes for Instruction
impl WriteBytes for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnsafeUnpin for Instruction
impl UnwindSafe for Instruction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FromBytes for Twhere
T: FromBytesWithOpcode,
impl<T> FromBytes for Twhere
T: FromBytesWithOpcode,
§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
MaybeRef].