vyre 0.4.0

GPU compute intermediate representation with a standard operation library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::CseCtx;
use crate::ir::Program;

/// Run local value-numbering CSE over pure expressions.
#[must_use]
#[inline]
pub fn cse(program: Program) -> Program {
    let mut ctx = CseCtx::default();
    Program::new(
        program.buffers().to_vec(),
        program.workgroup_size(),
        ctx.nodes(program.entry()),
    )
    .with_optional_entry_op_id(program.entry_op_id().map(str::to_string))
}