1 package edu.berkeley.fleet.dataflow;
3 import edu.berkeley.fleet.loops.*;
4 import edu.berkeley.fleet.api.*;
7 * Takes a count from "count" and an item from "val" and emits
8 * count-many copies of val at "out".
10 public class RepeatNode extends Node {
11 private final Ship ship = dfg.pool.allocateShip("Counter");
12 private final InPort inOp = new DockInPort("inOp", ship.getDock("inOp"), "REPEAT_C1_V2");
13 public final InPort count = new DockInPort("count", ship.getDock("in1"));
14 public final InPort val = new DockInPort("val", ship.getDock("in2"));
15 public final OutPort out = new DockOutPort("out", ship.getDock("out"));
17 public RepeatNode(DataFlowGraph dfg) { super(dfg); }