Simple loop unroller for demonstration
| 154 | |
| 155 | @tirx.functor.mutator |
| 156 | class ForLoopUnroller(PyStmtExprMutator): |
| 157 | """Simple loop unroller for demonstration""" |
| 158 | |
| 159 | def __init__(self, unroll_factor=2): |
| 160 | super().__init__() |
| 161 | self.unroll_factor = unroll_factor |
| 162 | |
| 163 | def visit_for_(self, op: For): |
| 164 | # For demonstration, just return the original for now |
| 165 | # In a real implementation, we would unroll small loops |
| 166 | return super().visit_for_(op) |
| 167 | |
| 168 | |
| 169 | @tirx.functor.visitor |
no outgoing calls
searching dependent graphs…