FLINT3.7.0-dev

_gr_vec_sum_parallel, _gr_vec_product_parallel

Synopsis#include <flint/gr_vec.h>
int _gr_vec_sum_parallel(gr_ptr res, gr_srcptr vec, slong len, gr_ctx_t ctx)source
int _gr_vec_product_parallel(gr_ptr res, gr_srcptr vec, slong len, gr_ctx_t ctx)source

Split the array into one chunk per available thread, compute the chunks in parallel with _gr_vec_sum or _gr_vec_product, and combine the partial results. The number of threads is at most flint_get_num_threads() and at most \mathit{len}/2.

Cite this page

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