pub enum QPtrOp {
FuncLocalVar(MemLayout),
HandleArrayIndex,
BufferData,
BufferDynLen {
fixed_base_size: u32,
dyn_unit_stride: NonZeroU32,
},
Offset(i32),
DynOffset {
stride: NonZeroU32,
index_bounds: Option<Range<i32>>,
},
Load,
Store,
}
Expand description
QPtr
-specific operations ([DataInstKind::QPtr
]).
Variants§
FuncLocalVar(MemLayout)
HandleArrayIndex
Adjust a handle array QPtr
(inputs[0]
), by selecting the handle
at the index (inputs[1]
) from the handle array (i.e. the resulting
QPtr
is limited to that one handle and can’t be further “moved around”).
BufferData
Get a memory QPtr
pointing at the contents of the buffer whose
handle is (implicitly) loaded from a handle QPtr
(inputs[0]
).
BufferDynLen
Get the length of the buffer whose handle is (implicitly) loaded from a
handle QPtr
(inputs[0]
), converted to a count of “dynamic units”
(as per shapes::MaybeDynMemLayout
) by subtracting fixed_base_size
,
then dividing by dyn_unit_stride
.
Offset(i32)
Adjust a memory QPtr
(inputs[0]
), by adding a (signed) immediate
amount of bytes to its “address” (whether physical or conceptual).
DynOffset
Adjust a memory QPtr
(inputs[0]
), by adding a (signed) dynamic
“index” (inputs[1]
), multiplied by stride
(bytes per element),
to its “address” (whether physical or conceptual).
Fields
stride: NonZeroU32
Load
Read a single value from a QPtr
(inputs[0]
).
Store
Write a single value (inputs[1]
) to a QPtr
(inputs[0]
).
Trait Implementations§
Source§impl From<QPtrOp> for DataInstKind
impl From<QPtrOp> for DataInstKind
Source§fn from(original: QPtrOp) -> DataInstKind
fn from(original: QPtrOp) -> DataInstKind
impl Eq for QPtrOp
impl StructuralPartialEq for QPtrOp
Auto Trait Implementations§
impl Freeze for QPtrOp
impl RefUnwindSafe for QPtrOp
impl Send for QPtrOp
impl Sync for QPtrOp
impl Unpin for QPtrOp
impl UnwindSafe for QPtrOp
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,
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
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>
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>
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