Loop Transformations: Cutting and Peeling
This MR introduces a number of loop transformations and their prequesites to the new backend.
- Add
CanonicalClone
pass: Clone an AST and duplicate all symbols declared inside it to retain canonicality - Add
ReshapeLoops
pass collection:-
cut_loop
reimplements loop cutting like available through the oldpystencils.transformations.cut_loop
-
peel_loop_front
implements loop peeling, often the better alternative tocut_loop
-
Changes on the side:
- Move canonical duplication of symbols to the
KernelCreationContext
- Add documentation for the
transformations
module - Extend documentation of
KernelCreationContext
- Improved
AstFactory
interface: introduceparse_index
and clarify type hints
To Do:
-
Test cases for loop cutting -
Test cases for loop peeling
Edited by Frederik Hennig