groovyx.gpars.extra166y
Class PAS.FJRemoveAllDriver

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

static final class PAS.FJRemoveAllDriver
extends jsr166y.RecursiveAction

Root node for FJRemoveAll. Spawns subtasks and shifts elements as indices become available, bypassing index array creation when offsets are known. This differs from SelectAll mainly in that data movement is all done by the driver rather than in a second parallel pass.


Field Summary
(package private)  int hi
           
(package private)  int[] indices
           
(package private)  int lo
           
(package private)  int offset
           
(package private)  AbstractParallelAnyArray pap
           
(package private)  int threshold
           
 
Constructor Summary
PAS.FJRemoveAllDriver(AbstractParallelAnyArray pap, int lo, int hi)
           
 
Method Summary
 void compute()
           
(package private) static int inorderMove(PAS.FJRemoveAll t, int index)
          Inorder traversal to move indexed elements across reachable nodes.
 
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

pap

final AbstractParallelAnyArray pap

lo

final int lo

hi

final int hi

indices

final int[] indices

offset

int offset

threshold

final int threshold
Constructor Detail

PAS.FJRemoveAllDriver

PAS.FJRemoveAllDriver(AbstractParallelAnyArray pap,
                      int lo,
                      int hi)
Method Detail

compute

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

inorderMove

static int inorderMove(PAS.FJRemoveAll t,
                       int index)
Inorder traversal to move indexed elements across reachable nodes. This guarantees that element shifts don't overwrite those still being used by active subtasks.


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