num::kernel::dot¶
Defined in header <kernel/vector.hpp>
template <std::floating_point T>
T dot(const T *x, const T *y, idx n) noexcept; // (1)
template <std::floating_point T>
T dot(contract::ordered_t, const T *x, const T *y, idx n) noexcept; // (2)
template <std::floating_point T>
T dot(contract::throughput_t, const T *x, const T *y, idx n) noexcept; // (3)
(1) Compute the dot product: \(x^T y\).
(2) Compute the dot product, summing in index order: \(x^T y\).
(3) Compute the dot product: \(x^T y\); the same as the untagged overload.
Notes¶
Sums are reordered for speed; the contract::ordered overload is reproducible.