Skip to main content

recognize_elementwise

Function recognize_elementwise 

Source
pub fn recognize_elementwise(
    stmts: &[Stmt<'_>],
    _interner: &Interner,
) -> Result<ElementwiseSpec, ElementwiseReject>
Expand description

Recognize an elementwise idiom Push (item p of A) ⊕ (item p of B) to C inside a counted loop — the exact shape the plus/hadamard sugar desugars to — anywhere in the statement list (through Splice).