pub enum Op {
Show 23 variants
Const {
dst: String,
ty: TypeId,
value: i64,
},
GlobalId {
dst: String,
dim: u8,
},
LocalId {
dst: String,
dim: u8,
},
WorkgroupId {
dst: String,
dim: u8,
},
LaneId {
dst: String,
},
WaveId {
dst: String,
},
WaveSize {
dst: String,
},
Add {
dst: String,
lhs: String,
rhs: String,
ty: TypeId,
},
Sub {
dst: String,
lhs: String,
rhs: String,
ty: TypeId,
},
Mul {
dst: String,
lhs: String,
rhs: String,
ty: TypeId,
},
CmpEq {
dst: String,
lhs: String,
rhs: String,
ty: TypeId,
},
CmpNe {
dst: String,
lhs: String,
rhs: String,
ty: TypeId,
},
And {
dst: String,
lhs: String,
rhs: String,
ty: TypeId,
},
KernargLoad {
dst: String,
offset: u32,
ty: TypeId,
},
LoadGlobal {
dst: String,
addr: String,
ty: TypeId,
},
StoreGlobal {
addr: String,
src: String,
ty: TypeId,
},
LoadGroup {
dst: String,
addr: String,
ty: TypeId,
},
StoreGroup {
addr: String,
src: String,
ty: TypeId,
},
Barrier,
If {
cond: String,
then_body: Vec<Op>,
else_body: Vec<Op>,
},
While {
cond: String,
body: Vec<Op>,
},
AtomicAdd {
dst: String,
addr: String,
src: String,
space: AddrSpace,
scope: AtomicScope,
order: AtomicOrder,
},
Ret,
}Variants§
Const
GlobalId
LocalId
WorkgroupId
LaneId
SoftGPU software lane id within the wave (flat_local % wave_size).
WaveId
SoftGPU software wave id within the workgroup (flat_local / wave_size).
WaveSize
Add
Sub
Mul
CmpEq
CmpNe
And
Bitwise and (SoftGPU scalar; used for lane predication masks).
KernargLoad
LoadGlobal
StoreGlobal
LoadGroup
StoreGroup
Barrier
Workgroup barrier (SoftGPU generation sync). Illegal inside If/While.
If
Structured divergence: active lanes with cond != 0 run then_body,
others run else_body, then reconverge. SoftGPU SIMT, not gfx1201.
While
SoftGPU loop: while any active lane has cond != 0, those lanes run body.
AtomicAdd
dst = atomic_add(addr, src) returning the previous value (i32 only).
Ret
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Op
impl<'de> Deserialize<'de> for Op
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Op
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnsafeUnpin for Op
impl UnwindSafe for Op
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