|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsr166y.ForkJoinTask<java.lang.Void> jsr166y.RecursiveAction groovyx.gpars.extra166y.PAS.FJBase
abstract static class PAS.FJBase
Base for most divide-and-conquer tasks used for computing ParallelArray operations. Rather than pure recursion, it links right-hand-sides and then joins up the tree, exploiting cases where tasks aren't stolen. This generates and joins tasks with a bit less overhead than pure recursive style -- there are only as many tasks as leaves (no strictly internal nodes). Split control relies on pap.getThreshold(), which is expected to err on the side of generating too many tasks. To counterbalance, if a task pops off its own smallest subtask, it directly runs its leaf action rather than possibly resplitting. There are, with a few exceptions, three flavors of each FJBase subclass, prefixed FJO (object reference), FJD (double) and FJL (long).
Field Summary | |
---|---|
(package private) int |
hi
|
(package private) int |
lo
|
(package private) PAS.FJBase |
next
|
(package private) AbstractParallelAnyArray |
pap
|
Constructor Summary | |
---|---|
PAS.FJBase(AbstractParallelAnyArray pap,
int lo,
int hi,
PAS.FJBase next)
|
Method Summary | |
---|---|
(package private) abstract void |
atLeaf(int l,
int h)
Leaf computation |
void |
compute()
|
(package private) void |
internalCompute(int l,
int h,
int g)
|
(package private) abstract PAS.FJBase |
newSubtask(int l,
int h,
PAS.FJBase r)
Factory method to create new subtask, normally of current type |
(package private) void |
onReduce(PAS.FJBase right)
Operation performed after joining right subtask -- default noop |
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 |
---|
final AbstractParallelAnyArray pap
final int lo
final int hi
final PAS.FJBase next
Constructor Detail |
---|
PAS.FJBase(AbstractParallelAnyArray pap, int lo, int hi, PAS.FJBase next)
Method Detail |
---|
public final void compute()
compute
in class jsr166y.RecursiveAction
final void internalCompute(int l, int h, int g)
abstract void atLeaf(int l, int h)
void onReduce(PAS.FJBase right)
abstract PAS.FJBase newSubtask(int l, int h, PAS.FJBase r)
|
Copyright © 2008–2012 Václav Pech. All Rights Reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |