pub struct Superblock { /* private fields */ }Expand description
Superblock: A tile of related basic blocks (Kaizen: amortize scheduling)
Inspired by RenderMan’s bucket system - group spatially local work to reduce coordination overhead.
Implementations§
Source§impl Superblock
impl Superblock
Sourcepub fn new(id: SuperblockId, blocks: Vec<BlockId>, function: FunctionId) -> Self
pub fn new(id: SuperblockId, blocks: Vec<BlockId>, function: FunctionId) -> Self
Create a new superblock
Sourcepub fn id(&self) -> SuperblockId
pub fn id(&self) -> SuperblockId
Get the superblock ID
Sourcepub fn block_count(&self) -> usize
pub fn block_count(&self) -> usize
Get the number of blocks in this superblock
Sourcepub fn contains(&self, block: BlockId) -> bool
pub fn contains(&self, block: BlockId) -> bool
Check if this superblock contains a specific block
Sourcepub fn cost_estimate(&self) -> u64
pub fn cost_estimate(&self) -> u64
Get the estimated execution cost
Sourcepub fn set_cost_estimate(&mut self, cost: u64)
pub fn set_cost_estimate(&mut self, cost: u64)
Set a custom cost estimate (e.g., from profiling)
Sourcepub fn function(&self) -> FunctionId
pub fn function(&self) -> FunctionId
Get the parent function
Trait Implementations§
Source§impl Clone for Superblock
impl Clone for Superblock
Source§fn clone(&self) -> Superblock
fn clone(&self) -> Superblock
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Superblock
impl RefUnwindSafe for Superblock
impl Send for Superblock
impl Sync for Superblock
impl Unpin for Superblock
impl UnsafeUnpin for Superblock
impl UnwindSafe for Superblock
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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