pub struct Operand {
pub register: Register,
pub selection: Selection,
pub indices: Vec<Index>,
pub immediate: [u32; 4],
pub modifier: u8,
pub precision: u8,
pub non_uniform: bool,
}Expand description
An instruction’s or declaration’s operand.
Fields§
§register: RegisterThe kind of register it names.
selection: SelectionWhich components it selects.
indices: Vec<Index>Its index dimensions, outermost first: none for an immediate, one for r3, two for cb2[5].
immediate: [u32; 4]The values of an immediate operand (one lane repeated, or four); zero for other registers.
modifier: u80 none, 1 negate, 2 absolute, 3 negated absolute (float sources); 4 two’s-complement negate (an integer instruction’s negate; the encoding has no such value, so a caller that knows the instruction reads integers sets it).
precision: u8The minimum-precision annotation of the operand’s extended token (0 none; 1 float16, 2 float2_8, 4 sint16, 5 uint16).
non_uniform: boolThe operand’s extended token marks it as a non-uniform resource index.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Operand
impl RefUnwindSafe for Operand
impl Send for Operand
impl Sync for Operand
impl Unpin for Operand
impl UnsafeUnpin for Operand
impl UnwindSafe for Operand
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