pub struct IrModule {
pub name: String,
pub parameters: Vec<Parameter>,
pub entry_block: BlockId,
pub blocks: HashMap<BlockId, Block>,
pub values: HashMap<ValueId, Value>,
pub required_capabilities: Capabilities,
pub config: KernelConfig,
}Expand description
A complete IR module representing a GPU kernel.
Fields§
§name: StringModule name (kernel name).
parameters: Vec<Parameter>Function parameters.
entry_block: BlockIdEntry block.
blocks: HashMap<BlockId, Block>All blocks in the module.
values: HashMap<ValueId, Value>All values defined in the module.
required_capabilities: CapabilitiesRequired capabilities for this module.
config: KernelConfigKernel configuration.
Implementations§
Source§impl IrModule
impl IrModule
Sourcepub fn get_block_mut(&mut self, id: BlockId) -> Option<&mut Block>
pub fn get_block_mut(&mut self, id: BlockId) -> Option<&mut Block>
Get a mutable block by ID.
Sourcepub fn validate(&self, level: ValidationLevel) -> ValidationResult
pub fn validate(&self, level: ValidationLevel) -> ValidationResult
Validate the module.
Sourcepub fn pretty_print(&self) -> String
pub fn pretty_print(&self) -> String
Pretty-print the IR.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IrModule
impl RefUnwindSafe for IrModule
impl Send for IrModule
impl Sync for IrModule
impl Unpin for IrModule
impl UnwindSafe for IrModule
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