pub struct Layout {
pub name: String,
pub signed: bool,
pub block: [u32; 3],
pub buffers: Vec<Decl>,
pub shared: Vec<Decl>,
pub spec_locals: Vec<(u32, String)>,
pub locals: usize,
pub local_elems: Vec<ElementKind>,
pub rte: Vec<u32>,
pub subgroup: bool,
}Expand description
Everything the prologue needs.
Fields§
§name: StringThe kernel’s name.
signed: booltrue for an I32 kernel, false for U32.
block: [u32; 3]The workgroup size.
buffers: Vec<Decl>The storage buffers, in parameter order.
The workgroup and per-thread arrays, in allocation order (Decl::private tells them apart).
spec_locals: Vec<(u32, String)>The (local, constant identifier) of each scalar parameter lowered as a specialization
constant; the local starts at its value instead of zero.
locals: usizeHow many locals the body declares (l0..).
local_elems: Vec<ElementKind>The element type of each local (the compute dtype, except in a float kernel).
rte: Vec<u32>The widths (16/32/64) at which the body does a rounding float conversion, so the module must declare the round-to-nearest-even mode there.
subgroup: boolWhether any statement is a subgroup barrier or fence (a GLSL extension line).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for Layout
impl Freeze for Layout
impl Move for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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