|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.amino.alg.parallelprefix.ThreadedParallelPrefix.PartialReduction
public class ThreadedParallelPrefix.PartialReduction
Class for performing partial reductions for Parallel-prefix operations across a pool of threads.
ThreadedParallelPrefix,
BinaryOp| Constructor Summary | |
|---|---|
ThreadedParallelPrefix.PartialReduction(int n)
|
|
| Method Summary | |
|---|---|
void |
modify(float[] partialReduction,
float[] outputArray,
BinaryOp<T> op)
For every element in parallelReduction except the first one, spawn off a worker thread and with the value of that element, modify each element of outputArray with it using the op method. |
void |
modify(int[] partialReduction,
int[] outputArray,
BinaryOp<T> op)
For every element in parallelReduction except the first one, spawn off a worker thread and with the value of that element, modify each element of outputArray with it using the op method. |
float[] |
reduce(float[] inputArray,
float[] reducedArray,
BinaryOp<T> op)
Reduce across an array of float numbers. |
int[] |
reduce(int[] inputArray,
int[] reducedArray,
BinaryOp<T> op)
Reduce across an array of integers. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadedParallelPrefix.PartialReduction(int n)
n - number of worker threads to use in the reduction| Method Detail |
|---|
public int[] reduce(int[] inputArray,
int[] reducedArray,
BinaryOp<T> op)
inputArray - input arrayreducedArray - contains intermediate reduction resultsop - reduction operator
public void modify(int[] partialReduction,
int[] outputArray,
BinaryOp<T> op)
partialReduction - partial reductions from a previous scanoutputArray - destination array containing intermediate resultsop - modifying function
public float[] reduce(float[] inputArray,
float[] reducedArray,
BinaryOp<T> op)
inputArray - input arrayreducedArray - contains intermediate reduction resultsop - reduction operator
public void modify(float[] partialReduction,
float[] outputArray,
BinaryOp<T> op)
partialReduction - partial reductions from a previous scanoutputArray - destination array containing intermediate resultsop - modifying function
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||