Esempio n. 1
0
 def build(self) -> VerticalLoop:
     return VerticalLoop(
         interval=self._interval,
         loop_order=self._loop_order,
         temporaries=self._temporaries,
         body=self._body,
     )
Esempio n. 2
0
def copy_v_loop(copy_assign, interval):
    yield VerticalLoop(
        loc=SourceLocation(line=2, column=1, source="copy_gtir"),
        loop_order=LoopOrder.FORWARD,
        interval=interval,
        body=[copy_assign],
        temporaries=[],
    )
Esempio n. 3
0
    def add_par_assign_stmt(self, par_assign_stmt: ParAssignStmt) -> "StencilBuilder":
        if len(self._vertical_loops) == 0:
            self._vertical_loops.append(  # TODO builder
                VerticalLoop(
                    interval=Interval(start=AxisBound.start(), end=AxisBound.end()),
                    loop_order=LoopOrder.FORWARD,
                    body=[],
                    temporaries=[],
                )
            )

        self._vertical_loops[-1].body.append(par_assign_stmt)
        return self