Pitch: Method to sum numeric arrays

To expand on this a bit, there are multiple related questions lurking here, which effect both floating-point and integer:

  • Is the accumulation order specified? Is vectorization (which implicitly re-associates) allowed? Is the re-association allowed to be different depending on platform or runtime?
  • Is the accumulator width required to be the same as the element type? Can the compiler or runtime use a wider accumulator to prevent overflow? Is the compiler or runtime required to use a wider accumulator to prevent overflow?
  • Is the runtime required to produce a result as though computed in a single operation without intermediate overflow or rounding?
21 Likes