101 std::span<const T, N> lhs,
102 std::span<const T, N> rhs) {
106 auto basemul = [](
const auto a,
const auto b,
const T zeta) -> std::tuple<T, T> {
111 auto Tq_elem_count = [](
auto p) {
return p.size() / 2; };
113 auto Tq_elem = [](
auto p,
size_t i) {
114 if constexpr(std::is_const_v<
typename decltype(p)::element_type>) {
115 return std::array<T, 2>{p[2 * i], p[2 * i + 1]};
117 return std::tuple<T&, T&>{p[2 * i], p[2 * i + 1]};
121 for(
size_t i = 0; i < Tq_elem_count(result) / 2; ++i) {
122 const auto zeta =
zetas[64 + i];
123 Tq_elem(result, 2 * i) = basemul(Tq_elem(lhs, 2 * i), Tq_elem(rhs, 2 * i), zeta);
124 Tq_elem(result, 2 * i + 1) = basemul(Tq_elem(lhs, 2 * i + 1), Tq_elem(rhs, 2 * i + 1), -zeta);