org.amino.alg.parallelprefix
Interface ParallelPrefix<T>

Type Parameters:
T - Generic type for use if array is of non-primitives. Otherwise it is unused.
All Known Implementing Classes:
AbstractParallelPrefix, ThreadedParallelPrefix

public interface ParallelPrefix<T>

Interface for parallel prefix (scan) operation. Support for single dimension arrays of type byte, char, short, integer, long, float and double, plus generic arrays, using binary or unary operators.

Author:
donawa

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[] inputArray, 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'.
 

Method Detail

scan

void scan(int[] inputArray,
          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])}

Parameters:
inputArray - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

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])}

Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

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])}

Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

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])}

Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

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])}

Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

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])}

Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

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])}

Parameters:
array - Single dimension input array
outputArray - Single dimension destination array. Can be the same as inputArray
op - binary operator

scan

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])}

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.