Package com.asakusafw.compiler.flow

Examples of com.asakusafw.compiler.flow.FlowGraphGenerator.defineInput()


     * {@link StageBlock#compaction()}
     */
    @Test
    public void compaction_removeBlock() {
        FlowGraphGenerator gen = new FlowGraphGenerator();
        gen.defineInput("in1");
        gen.definePseud("id");
        gen.defineOutput("out1");
        gen.connect("in1", "id").connect("id", "out1");
        FlowBlock bin = FlowBlock.fromPorts(
                0,
View Full Code Here


     * {@link StageBlock#isEmpty()}
     */
    @Test
    public void isEmpty_hasMapper() {
        FlowGraphGenerator gen = new FlowGraphGenerator();
        gen.defineInput("in1");
        gen.defineOperator("op1", "in", "out");
        gen.defineOperator("op2", "in", "out");
        gen.defineOutput("out1");
        gen.connect("in1", "op1").connect("op1", "op2").connect("op2", "out1");
        FlowBlock bin = FlowBlock.fromPorts(
View Full Code Here

     * {@link StageBlock#isEmpty()}
     */
    @Test
    public void isEmpty_hasReducer() {
        FlowGraphGenerator gen = new FlowGraphGenerator();
        gen.defineInput("in1");
        gen.defineOperator("op1", "in", "out");
        gen.defineOperator("op2", "in", "out", FlowBoundary.SHUFFLE);
        gen.defineOutput("out1");
        gen.connect("in1", "op1").connect("op1", "op2").connect("op2", "out1");
        FlowBlock bin = FlowBlock.fromPorts(
View Full Code Here

     * {@link StageBlock#compaction()}
     */
    @Test
    public void compaction_stable() {
        FlowGraphGenerator gen = new FlowGraphGenerator();
        gen.defineInput("in1");
        gen.defineOperator("op1", "in", "out");
        gen.defineOutput("out1");
        gen.connect("in1", "op1").connect("op1", "out1");
        FlowBlock bin = FlowBlock.fromPorts(
                0,
View Full Code Here

     * {@link StageBlock#compaction()}
     */
    @Test
    public void compaction_hasReducer() {
        FlowGraphGenerator gen = new FlowGraphGenerator();
        gen.defineInput("in1");
        gen.definePseud("op1");
        gen.defineOperator("op2", "in", "out", FlowBoundary.SHUFFLE);
        gen.defineOutput("out1");
        gen.connect("in1", "op1").connect("op1", "op2").connect("op2", "out1");
        FlowBlock bin = FlowBlock.fromPorts(
View Full Code Here

     * {@link StageBlock#compaction()}
     */
    @Test
    public void compaction_bypass() {
        FlowGraphGenerator gen = new FlowGraphGenerator();
        gen.defineInput("in1");
        gen.definePseud("id");
        gen.defineOperator("op1", "in", "out");
        gen.defineOutput("out1");
        gen.connect("in1", "id").connect("id", "out1");
        gen.connect("in1", "op1").connect("op1", "out1");
View Full Code Here

     * {@link FlowPath#transposeIntersect(FlowPath)}
     */
    @Test
    public void transposeIntersect() {
        FlowGraphGenerator gen = new FlowGraphGenerator();
        gen.defineInput("in1");
        gen.defineInput("in2");
        gen.defineOutput("out1");
        gen.defineOutput("out2");
        gen.definePseud("a", FlowBoundary.STAGE);
        gen.definePseud("b", FlowBoundary.STAGE);
View Full Code Here

     */
    @Test
    public void transposeIntersect() {
        FlowGraphGenerator gen = new FlowGraphGenerator();
        gen.defineInput("in1");
        gen.defineInput("in2");
        gen.defineOutput("out1");
        gen.defineOutput("out2");
        gen.definePseud("a", FlowBoundary.STAGE);
        gen.definePseud("b", FlowBoundary.STAGE);
        gen.definePseud("c", FlowBoundary.STAGE);
View Full Code Here

     * {@link FlowPath#createBlock(FlowGraph, int, boolean, boolean)}
     */
    @Test
    public void createBlock_empty() {
        FlowGraphGenerator gen = graph();
        gen.defineInput("in");
        gen.defineOutput("out");
        gen.connect("in", "out");
        FlowPath path = FlowGraphUtil.getSucceedBoundaryPath(gen.get("in"));

        FlowBlock b0 = path.createBlock(gen.toGraph(), 0, true, true);
View Full Code Here

        }
    }

    private FlowGraphGenerator graph() {
        FlowGraphGenerator gen = new FlowGraphGenerator();
        gen.defineInput("in1");
        gen.defineInput("in2");
        gen.defineInput("in3");
        gen.defineOutput("out1");
        gen.defineOutput("out2");
        gen.defineOutput("out3");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.