|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsr166y.RecursiveAction groovyx.gpars.extra166y.PAS.FJBase
static abstract class PAS.FJBase extends RecursiveAction
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 | |
---|---|
int |
hi
|
int |
lo
|
FJBase |
next
|
AbstractParallelAnyArray |
pap
|
Constructor Summary | |
PAS.FJBase(AbstractParallelAnyArray pap, int lo, int hi, FJBase next)
|
Method Summary | |
---|---|
void
|
atLeaf(int l, int h)
Leaf computation |
void
|
compute()
|
void
|
internalCompute(int l, int h, int g)
|
FJBase
|
newSubtask(int l, int h, FJBase r)
Factory method to create new subtask, normally of current type |
void
|
onReduce(FJBase right)
Operation performed after joining right subtask -- default noop |
Field Detail |
---|
final int hi
final int lo
final FJBase next
final AbstractParallelAnyArray pap
Constructor Detail |
---|
PAS.FJBase(AbstractParallelAnyArray pap, int lo, int hi, FJBase next)
Method Detail |
---|
void atLeaf(int l, int h)
public final void compute()
final void internalCompute(int l, int h, int g)
FJBase newSubtask(int l, int h, FJBase r)
void onReduce(FJBase right)
Copyright © 2008–2012 Václav Pech. All Rights Reserved.