MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::simd::widen_accumulator< Narrow > Struct Template Reference

The accumulator a narrow type widens into: 16 bits doubles to 32, keeping signedness. More...

Detailed Description

template<typename Narrow>
struct mtl::simd::widen_accumulator< Narrow >

The accumulator a narrow type widens into: 16 bits doubles to 32, keeping signedness.

Products of two 16-bit values always fit the 32-bit accumulator EXACTLY (|-2^15 * -2^15| = 2^30 < 2^31); it is the running sum that can overflow, and does so quickly – see reduce_dot_widen in simd/algorithm.hpp for the headroom this actually buys.


The documentation for this struct was generated from the following file:
  • /home/runner/work/mtl5/mtl5/include/mtl/simd/batch.hpp