org.amino.alg.parallelprefix
Class AbstractParallelPrefix<T>

java.lang.Object
  extended by org.amino.alg.parallelprefix.AbstractParallelPrefix<T>
Type Parameters:
T - data type
All Implemented Interfaces:
ParallelPrefix<T>
Direct Known Subclasses:
ThreadedParallelPrefix

public abstract class AbstractParallelPrefix<T>
extends java.lang.Object
implements ParallelPrefix<T>


Constructor Summary
AbstractParallelPrefix()
           
 
Method Summary
 void scan(byte[] array, byte[] outputArray, BinaryOp<T> op)
          Perform a parallel-prefix operation on input array 'array'.
 void scan(char[] array, char[] outputArray, BinaryOp<T> op)
          Perform a parallel-prefix operation on input array 'array'.
 void scan(double[] array, double[] outputArray, BinaryOp<T> op)
          Perform a parallel-prefix operation on input array 'array'.
 void scan(float[] array, float[] outputArray, BinaryOp<T> op)
          Perform a parallel-prefix operation on input array 'array'.
 void scan(int[] array, int[] outputArray, BinaryOp<T> op)
          Perform a parallel-prefix operation on input array 'array'.
 void scan(long[] array, long[] outputArray, BinaryOp<T> op)
          Perform a parallel-prefix operation on input array 'array'.
 void scan(short[] array, short[] outputArray, BinaryOp<T> op)
          Perform a parallel-prefix operation on input array 'array'.
 void scan(T[] array, T[] outputArray, BinaryOp<T> op)
          Perform a parallel-prefix operation on input array 'array'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractParallelPrefix

public AbstractParallelPrefix()
Method Detail

scan

public void scan(int[] array,
                 int[] outputArray,
                 BinaryOp<T> op)
Perform a parallel-prefix operation on input array 'array'. Input array is not modified. Result will be {a[0],op(a[0],a[1]),op(a[1],a[2]),...,op(a[n-1],a[n])}

Specified by:
scan in interface ParallelPrefix<T>
Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

public void scan(char[] array,
                 char[] outputArray,
                 BinaryOp<T> op)
Perform a parallel-prefix operation on input array 'array'. Input array is not modified. Result will be {a[0],op(a[0],a[1]),op(a[1],a[2]),...,op(a[n-1],a[n])}

Specified by:
scan in interface ParallelPrefix<T>
Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

public void scan(byte[] array,
                 byte[] outputArray,
                 BinaryOp<T> op)
Perform a parallel-prefix operation on input array 'array'. Input array is not modified. Result will be {a[0],op(a[0],a[1]),op(a[1],a[2]),...,op(a[n-1],a[n])}

Specified by:
scan in interface ParallelPrefix<T>
Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

public void scan(long[] array,
                 long[] outputArray,
                 BinaryOp<T> op)
Perform a parallel-prefix operation on input array 'array'. Input array is not modified. Result will be {a[0],op(a[0],a[1]),op(a[1],a[2]),...,op(a[n-1],a[n])}

Specified by:
scan in interface ParallelPrefix<T>
Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

public void scan(float[] array,
                 float[] outputArray,
                 BinaryOp<T> op)
Perform a parallel-prefix operation on input array 'array'. Input array is not modified. Result will be {a[0],op(a[0],a[1]),op(a[1],a[2]),...,op(a[n-1],a[n])}

Specified by:
scan in interface ParallelPrefix<T>
Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

public void scan(double[] array,
                 double[] outputArray,
                 BinaryOp<T> op)
Perform a parallel-prefix operation on input array 'array'. Input array is not modified. Result will be {a[0],op(a[0],a[1]),op(a[1],a[2]),...,op(a[n-1],a[n])}

Specified by:
scan in interface ParallelPrefix<T>
Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

public void scan(short[] array,
                 short[] outputArray,
                 BinaryOp<T> op)
Perform a parallel-prefix operation on input array 'array'. Input array is not modified. Result will be {a[0],op(a[0],a[1]),op(a[1],a[2]),...,op(a[n-1],a[n])}

Specified by:
scan in interface ParallelPrefix<T>
Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

public void scan(T[] array,
                 T[] outputArray,
                 BinaryOp<T> op)
Perform a parallel-prefix operation on input array 'array'. Input array is not modified. Result will be {a[0],op(a[0],a[1]),op(a[1],a[2]),...,op(a[n-1],a[n])}

Specified by:
scan in interface ParallelPrefix<T>
Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator


Copyright © 2008. All Rights Reserved.