@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE; } SourceAndDamReport fromOutside = super.hasDamOnPathDownTo(source); if (fromOutside == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; } else if (fromOutside == FOUND_SOURCE) { // we always have a dam in the solution set index return FOUND_SOURCE_AND_DAM; } else { SourceAndDamReport fromNextWorkset = nextWorkSetPlanNode.hasDamOnPathDownTo(source); if (fromNextWorkset == FOUND_SOURCE_AND_DAM){ return FOUND_SOURCE_AND_DAM; } else if (fromNextWorkset == FOUND_SOURCE){ return FOUND_SOURCE_AND_DAM; } else { return this.solutionSetDeltaPlanNode.hasDamOnPathDownTo(source); } } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE_AND_DAM; } SourceAndDamReport res = this.initialInput.getSource().hasDamOnPathDownTo(source); if (res == FOUND_SOURCE_AND_DAM || res == FOUND_SOURCE) { return FOUND_SOURCE_AND_DAM; } else { return NOT_FOUND; } } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE; } SourceAndDamReport fromOutside = super.hasDamOnPathDownTo(source); if (fromOutside == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; } else if (fromOutside == FOUND_SOURCE) { // we always have a dam in the back channel return FOUND_SOURCE_AND_DAM; } else { // check the step function for dams return this.rootOfStepFunction.hasDamOnPathDownTo(source); } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE; } SourceAndDamReport res = this.input.getSource().hasDamOnPathDownTo(source); if (res == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; } else if (res == FOUND_SOURCE) { return (this.input.getLocalStrategy().dams() || this.input.getTempMode().breaksPipeline() || getDriverStrategy().firstDam() == DamBehavior.FULL_DAM) ? FOUND_SOURCE_AND_DAM : FOUND_SOURCE; } else { // NOT_FOUND // check the broadcast inputs for (NamedChannel nc : getBroadcastInputs()) { SourceAndDamReport bcRes = nc.getSource().hasDamOnPathDownTo(source); if (bcRes != NOT_FOUND) { // broadcast inputs are always dams return FOUND_SOURCE_AND_DAM; } } return NOT_FOUND; } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE; } SourceAndDamReport res = this.initialInput.getSource().hasDamOnPathDownTo(source); if (res == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; } else if (res == FOUND_SOURCE) { return (this.initialInput.getLocalStrategy().dams() || this.initialInput.getTempMode().breaksPipeline() || getDriverStrategy().firstDam() == DamBehavior.FULL_DAM) ? FOUND_SOURCE_AND_DAM : FOUND_SOURCE; } else { return NOT_FOUND; } } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE; } SourceAndDamReport res = this.initialInput.getSource().hasDamOnPathDownTo(source); if (res == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; } else if (res == FOUND_SOURCE) { return (this.initialInput.getLocalStrategy().dams() || this.initialInput.getTempMode().breaksPipeline() || getDriverStrategy().firstDam() == DamBehavior.FULL_DAM) ? FOUND_SOURCE_AND_DAM : FOUND_SOURCE; } else { return NOT_FOUND; } } }
SourceAndDamReport res1 = this.input1.getSource().hasDamOnPathDownTo(source); if (res1 == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; SourceAndDamReport res2 = this.input2.getSource().hasDamOnPathDownTo(source); if (res2 == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; SourceAndDamReport bcRes = nc.getSource().hasDamOnPathDownTo(source); if (bcRes != NOT_FOUND) {
SourceAndDamReport res = in.getSource().hasDamOnPathDownTo(candAtBrancher); if (res == NOT_FOUND) { throw new CompilerException("Bug: Tracing dams for deadlock detection is broken.");
SourceAndDamReport res = in1.getSource().hasDamOnPathDownTo(candAtBrancher); if (res == NOT_FOUND) { throw new CompilerException("Bug: Tracing dams for deadlock detection is broken."); SourceAndDamReport res = in2.getSource().hasDamOnPathDownTo(candAtBrancher); if (res == NOT_FOUND) { throw new CompilerException("Bug: Tracing dams for deadlock detection is broken.");
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE_AND_DAM; } SourceAndDamReport res = this.initialInput.getSource().hasDamOnPathDownTo(source); if (res == FOUND_SOURCE_AND_DAM || res == FOUND_SOURCE) { return FOUND_SOURCE_AND_DAM; } else { return NOT_FOUND; } } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE_AND_DAM; } SourceAndDamReport res = this.initialInput.getSource().hasDamOnPathDownTo(source); if (res == FOUND_SOURCE_AND_DAM || res == FOUND_SOURCE) { return FOUND_SOURCE_AND_DAM; } else { return NOT_FOUND; } } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE_AND_DAM; } SourceAndDamReport res = this.initialInput.getSource().hasDamOnPathDownTo(source); if (res == FOUND_SOURCE_AND_DAM || res == FOUND_SOURCE) { return FOUND_SOURCE_AND_DAM; } else { return NOT_FOUND; } } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE_AND_DAM; } SourceAndDamReport res = this.initialInput.getSource().hasDamOnPathDownTo(source); if (res == FOUND_SOURCE_AND_DAM || res == FOUND_SOURCE) { return FOUND_SOURCE_AND_DAM; } else { return NOT_FOUND; } } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE; } SourceAndDamReport fromOutside = super.hasDamOnPathDownTo(source); if (fromOutside == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; } else if (fromOutside == FOUND_SOURCE) { // we always have a dam in the back channel return FOUND_SOURCE_AND_DAM; } else { // check the step function for dams return this.rootOfStepFunction.hasDamOnPathDownTo(source); } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE; } SourceAndDamReport fromOutside = super.hasDamOnPathDownTo(source); if (fromOutside == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; } else if (fromOutside == FOUND_SOURCE) { // we always have a dam in the back channel return FOUND_SOURCE_AND_DAM; } else { // check the step function for dams return this.rootOfStepFunction.hasDamOnPathDownTo(source); } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE; } SourceAndDamReport fromOutside = super.hasDamOnPathDownTo(source); if (fromOutside == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; } else if (fromOutside == FOUND_SOURCE) { // we always have a dam in the back channel return FOUND_SOURCE_AND_DAM; } else { // check the step function for dams return this.rootOfStepFunction.hasDamOnPathDownTo(source); } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE; } SourceAndDamReport fromOutside = super.hasDamOnPathDownTo(source); if (fromOutside == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; } else if (fromOutside == FOUND_SOURCE) { // we always have a dam in the back channel return FOUND_SOURCE_AND_DAM; } else { // check the step function for dams return this.rootOfStepFunction.hasDamOnPathDownTo(source); } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE; } SourceAndDamReport res = this.initialInput.getSource().hasDamOnPathDownTo(source); if (res == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; } else if (res == FOUND_SOURCE) { return (this.initialInput.getLocalStrategy().dams() || this.initialInput.getTempMode().breaksPipeline() || getDriverStrategy().firstDam() == DamBehavior.FULL_DAM) ? FOUND_SOURCE_AND_DAM : FOUND_SOURCE; } else { return NOT_FOUND; } } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE; } SourceAndDamReport res = this.initialInput.getSource().hasDamOnPathDownTo(source); if (res == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; } else if (res == FOUND_SOURCE) { return (this.initialInput.getLocalStrategy().dams() || this.initialInput.getTempMode().breaksPipeline() || getDriverStrategy().firstDam() == DamBehavior.FULL_DAM) ? FOUND_SOURCE_AND_DAM : FOUND_SOURCE; } else { return NOT_FOUND; } } }
@Override public SourceAndDamReport hasDamOnPathDownTo(PlanNode source) { if (source == this) { return FOUND_SOURCE; } SourceAndDamReport res = this.initialInput.getSource().hasDamOnPathDownTo(source); if (res == FOUND_SOURCE_AND_DAM) { return FOUND_SOURCE_AND_DAM; } else if (res == FOUND_SOURCE) { return (this.initialInput.getLocalStrategy().dams() || this.initialInput.getTempMode().breaksPipeline() || getDriverStrategy().firstDam() == DamBehavior.FULL_DAM) ? FOUND_SOURCE_AND_DAM : FOUND_SOURCE; } else { return NOT_FOUND; } } }