groovyx.gpars.extra166y
Class PAS.FJOMerger

java.lang.Object
  extended by jsr166y.ForkJoinTask<java.lang.Void>
      extended by jsr166y.RecursiveAction
          extended by groovyx.gpars.extra166y.PAS.FJOMerger
All Implemented Interfaces:
java.io.Serializable, java.util.concurrent.Future<java.lang.Void>
Enclosing class:
PAS

static final class PAS.FJOMerger
extends jsr166y.RecursiveAction

Performs merging for FJSorter. If big enough, splits Left partition in half; finds the greatest point in Right partition less than the beginning of the second half of Left via binary search; and then, in parallel, merges left half of Left with elements of Right up to split point, and merges right half of Left with elements of R past split point. At leaf, it just sequentially merges. This is all messy to code; sadly we need six versions.


Field Summary
(package private)  java.lang.Object[] a
           
(package private)  java.util.Comparator cmp
           
(package private)  int gran
           
(package private)  int ln
           
(package private)  int lo
           
(package private)  PAS.FJOMerger next
           
(package private)  int rn
           
(package private)  int ro
           
(package private)  java.lang.Object[] w
           
(package private)  int wo
           
 
Constructor Summary
PAS.FJOMerger(java.util.Comparator cmp, java.lang.Object[] a, java.lang.Object[] w, int lo, int ln, int ro, int rn, int wo, int gran, PAS.FJOMerger next)
           
 
Method Summary
 void compute()
           
 
Methods inherited from class jsr166y.RecursiveAction
exec, getRawResult, setRawResult
 
Methods inherited from class jsr166y.ForkJoinTask
adapt, adapt, adapt, cancel, complete, completeExceptionally, fork, get, get, getException, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollTask, quietlyInvoke, quietlyJoin, reinitialize, tryUnfork
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cmp

final java.util.Comparator cmp

a

final java.lang.Object[] a

w

final java.lang.Object[] w

lo

final int lo

ln

final int ln

ro

final int ro

rn

final int rn

wo

final int wo

gran

final int gran

next

final PAS.FJOMerger next
Constructor Detail

PAS.FJOMerger

PAS.FJOMerger(java.util.Comparator cmp,
              java.lang.Object[] a,
              java.lang.Object[] w,
              int lo,
              int ln,
              int ro,
              int rn,
              int wo,
              int gran,
              PAS.FJOMerger next)
Method Detail

compute

public void compute()
Specified by:
compute in class jsr166y.RecursiveAction

Copyright © 2008–2012 Václav Pech. All Rights Reserved.