#include <batch.hpp>
|
| static batch | load_aligned (const T *p) |
| static batch | load_unaligned (const T *p) |
| template<typename Src> |
| static batch | load_widen (const Src *p) |
| | Load one narrower value and widen to T (scalar fallback of the SIMD widening load; see the Highway variant).
|
template<typename I>
requires (std::is_same_v<T, float> && (std::is_same_v<I, std::int32_t> || std::is_same_v<I, std::uint32_t>)) |
| static batch | convert (batch< I > v) |
| | Integer -> float lane conversion – scalar fallback; see the Highway variant.
|
| template<typename Narrow> |
| static void | widen_dot_accumulate (const Narrow *a, const Narrow *b, batch &sum0, batch &sum1) |
| | Widening dot accumulate – scalar fallback of the SIMD primitive; see the Highway variant for the contract.
|
| template<typename NA, typename NB> |
| static void | quad_dot_accumulate (const NA *a, const NB *b, batch &sum) |
| | Quad-widening dot accumulate – scalar fallback; see the Highway variant.
|
| template<typename NA, typename NB> |
| static void | quad_dot_broadcast_accumulate (const NA *a4, const NB *b, batch &sum) |
| | Quad multiply-accumulate with a broadcast left operand – scalar fallback; see the Highway variant for the contract.
|
|
| static constexpr std::size_t | size = 1 |
| static constexpr std::size_t | widen_step = 2 |
| | Narrow values consumed per widen_dot_accumulate call.
|
| static constexpr std::size_t | quad_step = 4 |
| | Narrow values consumed per quad_dot_accumulate call – four, matching the instruction's four-products-per-lane shape rather than the lane count.
|
◆ value_type
◆ batch() [1/2]
◆ batch() [2/2]
◆ convert()
template<typename T>
template<typename I>
requires (std::is_same_v<T, float> && (std::is_same_v<I, std::int32_t> || std::is_same_v<I, std::uint32_t>))
Integer -> float lane conversion – scalar fallback; see the Highway variant.
static_cast rounds to nearest, as the SIMD instruction does.
◆ load_aligned()
◆ load_unaligned()
◆ load_widen()
template<typename T>
template<typename Src>
Load one narrower value and widen to T (scalar fallback of the SIMD widening load; see the Highway variant).
◆ quad_dot_accumulate()
template<typename T>
template<typename NA, typename NB>
Quad-widening dot accumulate – scalar fallback; see the Highway variant.
Four products into the single accumulator, which is exactly what the instruction does to one lane.
◆ quad_dot_broadcast_accumulate()
template<typename T>
template<typename NA, typename NB>
| void mtl::simd::batch< T >::quad_dot_broadcast_accumulate |
( |
const NA * | a4, |
|
|
const NB * | b, |
|
|
batch< T > & | sum ) |
|
inlinestatic |
Quad multiply-accumulate with a broadcast left operand – scalar fallback; see the Highway variant for the contract.
With one lane the broadcast is a no-op, so this is the same four products as quad_dot_accumulate – which is the definition the SIMD path has to reproduce lane by lane, and the reference the tests compare against.
◆ store_aligned()
◆ store_unaligned()
◆ widen_dot_accumulate()
template<typename T>
template<typename Narrow>
Widening dot accumulate – scalar fallback of the SIMD primitive; see the Highway variant for the contract.
Splitting the two products across the two accumulators reproduces the "unspecified lane assignment, defined
total" behaviour rather than papering over it.
◆ batch
template<typename T>
template<typename>
◆ detail::batch_access
◆ fma
Fused multiply-add: a*b + c (the single FMA decision point).
std::fma is a floating-point function, so the integer case is the plain wrapping multiply-add – which is exact mod 2^32 and therefore matches the Highway backend's MulAdd lane for lane.
◆ max
◆ min
Lane-wise minimum and maximum, as std::min and std::max; see the Highway variant.
◆ operator*
◆ operator+
◆ operator-
◆ operator/
Lane-wise division – floating lanes only; see the Highway variant for why.
◆ reduce_add
template<typename T>
| T reduce_add |
( |
batch< T > | a | ) |
|
|
friend |
◆ reduce_max
template<typename T>
| T reduce_max |
( |
batch< T > | a | ) |
|
|
friend |
◆ reduce_min
template<typename T>
| T reduce_min |
( |
batch< T > | a | ) |
|
|
friend |
◆ quad_step
Narrow values consumed per quad_dot_accumulate call – four, matching the instruction's four-products-per-lane shape rather than the lane count.
◆ size
◆ widen_step
Narrow values consumed per widen_dot_accumulate call.
Two rather than one, so the fallback drives BOTH accumulators and the loop in reduce_dot_widen is the same shape on either backend – which also means the fallback exercises the sum1 path that Highway may or may not use.
The documentation for this class was generated from the following file:
- /home/runner/work/mtl5/mtl5/include/mtl/simd/batch.hpp