add commented-out version of UnPunctuatorNode2 to UnPunctuatorNode until I have time...
[fleet.git] / src / edu / berkeley / fleet / dataflow / RepeatNode.java
1 package edu.berkeley.fleet.dataflow;
2 import java.util.*;
3 import edu.berkeley.fleet.loops.*;
4 import edu.berkeley.fleet.api.*;
5
6 /**
7  *  Takes a count from "count" and an item from "val" and emits
8  *  count-many copies of val at "out".
9  */
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"));
16
17     public RepeatNode(DataFlowGraph dfg) { super(dfg); }
18 }