MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::widening_int_dot Concept Reference

Does dot<Accumulator, Result>(v1, v2) name the widening integer kernel? More...

#include <dot.hpp>

Concept definition

template<typename Accumulator, typename Result, typename V1, typename V2>
std::is_same_v<typename V1::value_type, typename V2::value_type> &&
std::is_same_v<Accumulator, simd::widen_accumulator_t<typename V1::value_type>> &&
std::is_same_v<Result, Accumulator>
Concept satisfied by dense vector types whose element type is not a lane but can be WIDENED into one ...
Definition dispatch_traits.hpp:180
Does dot<Accumulator, Result>(v1, v2) name the widening integer kernel?
Definition dot.hpp:77

Detailed Description

Does dot<Accumulator, Result>(v1, v2) name the widening integer kernel?

Both vectors contiguous over the SAME 16-bit type, and the requested accumulator exactly that type's widened counterpart (int16 -> int32, uint16 -> uint32) with no separate delivery type. Anything else – a wider accumulator, a mixed pair, a strided view – falls to the generic accumulator_traits loop, which is correct for all of them.