pub struct ProgramStats {
pub node_count: usize,
pub region_count: u32,
pub call_count: u32,
pub opaque_count: u32,
pub top_level_regions: u32,
pub static_storage_bytes: u64,
pub instruction_count: u64,
pub memory_op_count: u64,
pub atomic_op_count: u64,
pub control_flow_count: u64,
pub register_pressure_estimate: u32,
pub capability_bits: u32,
}Expand description
Aggregated statistics computed from a single walk of a Program.
This struct is cached inside Program via a std::sync::OnceLock
so that planning passes (execution plan, capability scan, provenance,
fusion) can read constant-time summaries instead of re-walking the IR.
Fields§
§node_count: usizeTotal statement-node count (includes nested children).
region_count: u32Number of Node::Region nodes in the full tree.
call_count: u32Number of Expr::Call expressions.
opaque_count: u32Number of Node::Opaque nodes and Expr::Opaque expressions.
top_level_regions: u32Number of top-level Node::Region wrappers in program.entry().
static_storage_bytes: u64Sum of statically-known buffer byte sizes.
instruction_count: u64Estimated scalar/vector IR instruction count.
memory_op_count: u64Number of explicit memory operations (loads, stores, async copies).
atomic_op_count: u64Number of atomic read-modify-write expressions.
control_flow_count: u64Number of control-flow operations.
register_pressure_estimate: u32Coarse register pressure estimate from simultaneously named SSA-ish values.
capability_bits: u32Bitmask of capability requirements (see CAP_* constants).
Implementations§
Source§impl ProgramStats
impl ProgramStats
Sourcepub fn subgroup_ops(&self) -> bool
pub fn subgroup_ops(&self) -> bool
True when the program uses subgroup operations.
Sourcepub fn async_dispatch(&self) -> bool
pub fn async_dispatch(&self) -> bool
True when the program requires async dispatch semantics.
Sourcepub fn indirect_dispatch(&self) -> bool
pub fn indirect_dispatch(&self) -> bool
True when the program requires indirect dispatch support.
Sourcepub fn tensor_ops(&self) -> bool
pub fn tensor_ops(&self) -> bool
True when the program uses tensor / tensor-core operand types.
Trait Implementations§
Source§impl Clone for ProgramStats
impl Clone for ProgramStats
Source§fn clone(&self) -> ProgramStats
fn clone(&self) -> ProgramStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProgramStats
impl Debug for ProgramStats
Source§impl Default for ProgramStats
impl Default for ProgramStats
Source§fn default() -> ProgramStats
fn default() -> ProgramStats
Source§impl PartialEq for ProgramStats
impl PartialEq for ProgramStats
impl Copy for ProgramStats
impl Eq for ProgramStats
impl StructuralPartialEq for ProgramStats
Auto Trait Implementations§
impl Freeze for ProgramStats
impl RefUnwindSafe for ProgramStats
impl Send for ProgramStats
impl Sync for ProgramStats
impl Unpin for ProgramStats
impl UnsafeUnpin for ProgramStats
impl UnwindSafe for ProgramStats
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.