@Override public void onCompletion(CountedCompleter<?> caller) { if (!isLeaf()) setLocalResult(concFactory.apply(leftChild.getLocalResult(), rightChild.getLocalResult())); super.onCompletion(caller); }
@Override public void onCompletion(CountedCompleter<?> caller) { if (!isLeaf()) { S leftResult = leftChild.getLocalResult(); leftResult.combine(rightChild.getLocalResult()); setLocalResult(leftResult); } // GC spliterator, left and right child super.onCompletion(caller); } }
@Override public void onCompletion(CountedCompleter<?> caller) { if (!isLeaf()) setLocalResult(concFactory.apply(leftChild.getLocalResult(), rightChild.getLocalResult())); super.onCompletion(caller); }
@Override public void onCompletion(CountedCompleter<?> caller) { if (!isLeaf()) { S leftResult = leftChild.getLocalResult(); leftResult.combine(rightChild.getLocalResult()); setLocalResult(leftResult); } // GC spliterator, left and right child super.onCompletion(caller); } }
@Override public final void onCompletion(CountedCompleter<?> caller) { if (!isLeaf()) { if (isOrdered) { index = leftChild.index; // If a contiguous sequence of dropped elements // include those of the right node, if any if (index == leftChild.thisNodeSize) index += rightChild.index; } thisNodeSize = leftChild.thisNodeSize + rightChild.thisNodeSize; Node<P_OUT> result = merge(); setLocalResult(isRoot() ? doTruncate(result) : result); } super.onCompletion(caller); }
@Override public final void onCompletion(CountedCompleter<?> caller) { if (!isLeaf()) { if (isOrdered) { index = leftChild.index; // If a contiguous sequence of dropped elements // include those of the right node, if any if (index == leftChild.thisNodeSize) index += rightChild.index; } thisNodeSize = leftChild.thisNodeSize + rightChild.thisNodeSize; Node<P_OUT> result = merge(); setLocalResult(isRoot() ? doTruncate(result) : result); } super.onCompletion(caller); }