jbarrier

edu.bonn.cs.net.jbarrier.barrier
Class ReductionOperator.SumReduction

java.lang.Object
  extended by edu.bonn.cs.net.jbarrier.barrier.ReductionOperator
      extended by edu.bonn.cs.net.jbarrier.barrier.ReductionOperator.SumReduction
Enclosing class:
ReductionOperator

public static class ReductionOperator.SumReduction
extends ReductionOperator

Sum reduction operator.

Version:
1.0
Author:
Patrick Peschlow, Ivan Castilla Rodriguez

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.bonn.cs.net.jbarrier.barrier.ReductionOperator
ReductionOperator.MaximumReduction, ReductionOperator.MinimumReduction, ReductionOperator.SumReduction
 
Constructor Summary
ReductionOperator.SumReduction()
           
 
Method Summary
protected  double operator(double value1, double value2)
          Sum operator on operands of type double.
protected  float operator(float value1, float value2)
          Sum operator on operands of type float.
protected  int operator(int value1, int value2)
          Sum operator on operands of type int.
protected  long operator(long value1, long value2)
          Sum operator on operands of type long.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReductionOperator.SumReduction

public ReductionOperator.SumReduction()
Method Detail

operator

protected int operator(int value1,
                       int value2)
Sum operator on operands of type int.

Specified by:
operator in class ReductionOperator
Parameters:
value1 - the first operand
value2 - the second operand
Returns:
the sum of the two operands

operator

protected long operator(long value1,
                        long value2)
Sum operator on operands of type long.

Specified by:
operator in class ReductionOperator
Parameters:
value1 - the first operand
value2 - the second operand
Returns:
the sum of the two operands

operator

protected float operator(float value1,
                         float value2)
Sum operator on operands of type float.

Specified by:
operator in class ReductionOperator
Parameters:
value1 - the first operand
value2 - the second operand
Returns:
the sum of the two operands

operator

protected double operator(double value1,
                          double value2)
Sum operator on operands of type double.

Specified by:
operator in class ReductionOperator
Parameters:
value1 - the first operand
value2 - the second operand
Returns:
the sum of the two operands

jbarrier

Copyright 2010 Patrick Peschlow