Class XSum.SmallAccumulator

java.lang.Object
com.oracle.truffle.js.runtime.external.XSum.SmallAccumulator
Enclosing class:
XSum

public static class XSum.SmallAccumulator extends Object
  • Constructor Details

    • SmallAccumulator

      public SmallAccumulator()
  • Method Details

    • addArray

      public void addArray(double[] vec)
      Add an array of floating-point numbers to a small accumulator. Mixes calls of carryPropagate with calls of add1NoCarry.
    • add

      public void add(double value)
      Add one double to a small accumulator. This is equivalent to, but somewhat faster than, calling addArray() with a vector of one value.
    • round

      public double round()
      Return the result of rounding a small accumulator. The rounding mode is to nearest, with ties to even. The small accumulator may be modified by this operation (by carry propagation being done), but the value it represents should not change.