#[non_exhaustive]pub struct ProgramDescriptor {
pub buffer_count: usize,
pub workgroup_size: [u32; 3],
pub buffers: Vec<BufferDescriptor>,
pub rw_bytes_lower_bound: usize,
pub entry_node_count: usize,
}Expand description
Structural description of a Cat-A Program.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.buffer_count: usizeNumber of declared buffers.
workgroup_size: [u32; 3]Canonical workgroup dispatch size.
buffers: Vec<BufferDescriptor>Buffer summaries, one per declared buffer.
rw_bytes_lower_bound: usizeTotal element-bytes declared across ReadWrite buffers. Useful for rough memory-footprint estimates. Missing counts (runtime- determined buffer sizes) contribute zero.
entry_node_count: usizeNumber of top-level nodes in the entry body.
Implementations§
Source§impl ProgramDescriptor
impl ProgramDescriptor
Sourcepub fn new(
buffer_count: usize,
workgroup_size: [u32; 3],
buffers: Vec<BufferDescriptor>,
rw_bytes_lower_bound: usize,
entry_node_count: usize,
) -> Self
pub fn new( buffer_count: usize, workgroup_size: [u32; 3], buffers: Vec<BufferDescriptor>, rw_bytes_lower_bound: usize, entry_node_count: usize, ) -> Self
Construct a ProgramDescriptor directly from explicit fields.
External tooling that synthesizes descriptors without going
through from_program uses this constructor (V7-EXT-023).
Sourcepub fn from_program(program: &Program) -> Self
pub fn from_program(program: &Program) -> Self
Derive a descriptor from an already-built Program. Zero-allocation aside from the owned buffer-name strings (one per declared buffer); consumers that need every dispatch to stay cheap should cache the descriptor once and reuse it.
Trait Implementations§
Source§impl Clone for ProgramDescriptor
impl Clone for ProgramDescriptor
Source§fn clone(&self) -> ProgramDescriptor
fn clone(&self) -> ProgramDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ProgramDescriptor
impl RefUnwindSafe for ProgramDescriptor
impl Send for ProgramDescriptor
impl Sync for ProgramDescriptor
impl Unpin for ProgramDescriptor
impl UnsafeUnpin for ProgramDescriptor
impl UnwindSafe for ProgramDescriptor
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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