Ejemplo n.º 1
0
    def test_next_cellref(self) -> None:
        ca = StepCanvas([Step([4, 5, 6])])
        cr0 = CellRef(ca, 0)
        cr1 = CellRef(ca, 1)

        self.assertEqual(ca.next_addr(0), 1)
        self.assertEqual(ca.next_cellref(cr0), cr1)
        self.assertEqual(cr0.next_cellref(), cr1)
Ejemplo n.º 2
0
 def run(  # type: ignore[override]
         self, fm: FARGModel, operator: Operator, operands: Tuple[Value,
                                                                  ...],
         source: CellRef, result_in: str) -> CodeletResults:
     return dict([(result_in, operator.consume(source, operands)),
                  ('dest', source.next_cellref())])