off_grid_conditionals
ExtractOffGridConditionals
Bases: ScheduleNodeTransformer
Push off-grid conditional outside of their cartesian block.
This is the inverse transform of InlineOffGridConditionals.
InlineOffGridConditionals
MergeConditionals
Bases: ScheduleNodeVisitor
Merge consecutive and equal conditionals.
Turning:
intoor merge nested conditionals
intoOutside of user code, combination of ExtractOffGridConditionals, InlineOffGridConditionals and CartesianMapMerge can lead to this pattern.
RevertSimplifyConditional
Bases: ScheduleNodeVisitor
Reverting the SimplifyConditional based on book-keeping done during SimplyConditional transform
visit_ScheduleTreeRoot(_node)
Restore original Else.
WARNING: no check if those still exists in the tree, if merging of conditionals or any other operation happened, this will create bad stree.
SimplifyConditional
Bases: ScheduleNodeVisitor
Turn Else and ElseIf into Ifs.
The original nodes can be restored with RevertSimplifyConditional.