FLINT3.7.0-dev

padic_radix_dot_strided, padic_radix_dot_strided_naive, padic_radix_dot_strided_delayed

Synopsis#include <flint/padic_radix.h>
int padic_radix_dot_strided(padic_radix_t res, const padic_radix_t initial, int subtract, const padic_radix_struct * vec1, slong stride1, const padic_radix_struct * vec2, slong stride2, slong len, gr_ctx_t ctx)source
int padic_radix_dot_strided_naive(padic_radix_t res, const padic_radix_t initial, int subtract, const padic_radix_struct * vec1, slong stride1, const padic_radix_struct * vec2, slong stride2, slong len, gr_ctx_t ctx)source
int padic_radix_dot_strided_delayed(padic_radix_t res, const padic_radix_t initial, int subtract, const padic_radix_struct * vec1, slong stride1, const padic_radix_struct * vec2, slong stride2, slong len, gr_ctx_t ctx)source

Set res to s \pm \sum_{i < len} a_i b_i with a_i = vec1[i * stride1], b_i = vec2[i * stride2], s = initial (zero if initial is NULL) and the sign - if subtract is nonzero. The naive version calls padic_radix_mul and padic_radix_add in a loop. The delayed version finds the minimum valuation and the precision of the result first, then accumulates the limb products of all terms in three-word accumulators, grouped by the residue of the digit offset modulo e and by sign, and propagates carries, shifts and divisions by p^e once at the end. The default uses the naive version for len \le 7.

Cite this page

The FLINT team, “padic_radix_dot_strided, padic_radix_dot_strided_naive, padic_radix_dot_strided_delayed (padic_radix.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/padic_radix/padic_radix_dot_strided.html (generated 2026-10-20).