org.codehaus.gpars

groovyx.gpars.extra166y
[Java] Class PAS.FJBase

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)

void onReduce(FJBase right)

 

Field Detail

hi

final int hi


lo

final int lo


next

final FJBase next


pap

final AbstractParallelAnyArray pap


 
Constructor Detail

PAS.FJBase

PAS.FJBase(AbstractParallelAnyArray pap, int lo, int hi, FJBase next)


 
Method Detail

atLeaf

void atLeaf(int l, int h)
Leaf computation


compute

public final void compute()


internalCompute

final void internalCompute(int l, int h, int g)


newSubtask

FJBase newSubtask(int l, int h, FJBase r)


onReduce

void onReduce(FJBase right)


 

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