pub struct Decl {
pub name: String,
pub binding: u32,
pub role: BufferRole,
pub len: u32,
pub private: bool,
pub atomic: bool,
pub spec_local: Option<u32>,
pub len_spec: Option<String>,
}Expand description
A buffer or shared array the prologue declares.
Fields§
§name: StringThe identifier the body uses (b0, a0).
binding: u32The binding slot of a buffer; unused for a shared array.
role: BufferRoleThe access of a buffer; ReadWrite for a shared array.
len: u32The element count of a shared array; 0 for a buffer.
private: booltrue for a per-thread (Private) array, false for a buffer or a workgroup array.
atomic: booltrue when the dialect types atomics (Dialect::typed_atomics) and the kernel applies an
atomic to this buffer or array: every access to it is then an atomic one.
spec_local: Option<u32>For a scalar parameter lowered as a specialization constant (SpecId = binding): the local
that reads it. None for a buffer or an array.
len_spec: Option<String>For an array whose extent is a scalar parameter: the identifier of that specialization
constant (len is then 0).
Trait Implementations§
Auto Trait Implementations§
impl Forget for Decl
impl Freeze for Decl
impl Move for Decl
impl RefUnwindSafe for Decl
impl Send for Decl
impl Sync for Decl
impl Unpin for Decl
impl UnsafeUnpin for Decl
impl UnwindSafe for Decl
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