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
Fields
stride: NonZeroU32
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).
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
source§impl PartialEq<QPtrOp> for QPtrOp
impl PartialEq<QPtrOp> for QPtrOp
impl Eq for QPtrOp
impl StructuralEq for QPtrOp
impl StructuralPartialEq for QPtrOp
Auto Trait Implementations§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.