@Override final StreamShape getSourceShape() { @SuppressWarnings("rawtypes") AbstractPipeline p = AbstractPipeline.this; while (p.depth > 0) { p = p.previousStage; } return p.getOutputShape(); }
@Override final StreamShape getSourceShape() { @SuppressWarnings("rawtypes") AbstractPipeline p = AbstractPipeline.this; while (p.depth > 0) { p = p.previousStage; } return p.getOutputShape(); }
@Override protected final Node<P_OUT> getEmptyResult() { return Nodes.emptyNode(op.getOutputShape()); }
@Override protected final Node<P_OUT> getEmptyResult() { return Nodes.emptyNode(op.getOutputShape()); }
@Override protected final Node<P_OUT> getEmptyResult() { return Nodes.emptyNode(op.getOutputShape()); }
@Override protected final Node<P_OUT> getEmptyResult() { return Nodes.emptyNode(op.getOutputShape()); }
private Node<P_OUT> merge() { if (leftChild.thisNodeSize == 0) { // If the left node size is 0 then // use the right node result return rightChild.getLocalResult(); } else if (rightChild.thisNodeSize == 0) { // If the right node size is 0 then // use the left node result return leftChild.getLocalResult(); } else { // Combine the left and right nodes return Nodes.conc(op.getOutputShape(), leftChild.getLocalResult(), rightChild.getLocalResult()); } }
Node<P_OUT> merge() { if (leftChild.thisNodeSize == 0) { // If the left node size is 0 then // use the right node result return rightChild.getLocalResult(); } else if (rightChild.thisNodeSize == 0) { // If the right node size is 0 then // use the left node result return leftChild.getLocalResult(); } else { // Combine the left and right nodes return Nodes.conc(op.getOutputShape(), leftChild.getLocalResult(), rightChild.getLocalResult()); } }
Node<P_OUT> merge() { if (leftChild.thisNodeSize == 0) { // If the left node size is 0 then // use the right node result return rightChild.getLocalResult(); } else if (rightChild.thisNodeSize == 0) { // If the right node size is 0 then // use the left node result return leftChild.getLocalResult(); } else { // Combine the left and right nodes return Nodes.conc(op.getOutputShape(), leftChild.getLocalResult(), rightChild.getLocalResult()); } }
private Node<P_OUT> merge() { if (leftChild.thisNodeSize == 0) { // If the left node size is 0 then // use the right node result return rightChild.getLocalResult(); } else if (rightChild.thisNodeSize == 0) { // If the right node size is 0 then // use the left node result return leftChild.getLocalResult(); } else { // Combine the left and right nodes return Nodes.conc(op.getOutputShape(), leftChild.getLocalResult(), rightChild.getLocalResult()); } }
@Override public final void onCompletion(CountedCompleter<?> caller) { if (!isLeaf()) { Node<P_OUT> result; thisNodeSize = leftChild.thisNodeSize + rightChild.thisNodeSize; if (canceled) { thisNodeSize = 0; result = getEmptyResult(); } else if (thisNodeSize == 0) result = getEmptyResult(); else if (leftChild.thisNodeSize == 0) result = rightChild.getLocalResult(); else { result = Nodes.conc(op.getOutputShape(), leftChild.getLocalResult(), rightChild.getLocalResult()); } setLocalResult(isRoot() ? doTruncate(result) : result); completed = true; } if (targetSize >= 0 && !isRoot() && isLeftCompleted(targetOffset + targetSize)) cancelLaterNodes(); super.onCompletion(caller); }
@Override public final void onCompletion(CountedCompleter<?> caller) { if (!isLeaf()) { Node<P_OUT> result; thisNodeSize = leftChild.thisNodeSize + rightChild.thisNodeSize; if (canceled) { thisNodeSize = 0; result = getEmptyResult(); } else if (thisNodeSize == 0) result = getEmptyResult(); else if (leftChild.thisNodeSize == 0) result = rightChild.getLocalResult(); else { result = Nodes.conc(op.getOutputShape(), leftChild.getLocalResult(), rightChild.getLocalResult()); } setLocalResult(isRoot() ? doTruncate(result) : result); completed = true; } if (targetSize >= 0 && !isRoot() && isLeftCompleted(targetOffset + targetSize)) cancelLaterNodes(); super.onCompletion(caller); }