Overview
Parallel computation
FLINT uses a single process-wide pool of threads, created on demand. The sections below describe how the pool hands out threads, how the generic parallel helpers divide work among them, and how read-only data is shared between threads without locks.
In this section#
AlgorithmThe thread poolA fixed set of sleeping threads, handed out on request and woken with a function to run, with per-thread worker budgets that keep nested parallel code within the limit set by the user.AlgorithmParallel loops and binary splittingHow flint_parallel_do schedules independent calls over threads, why strided scheduling balances monotone costs to within one call, and how parallel binary splitting divides threads over a recursion tree.AlgorithmLock-free shared cachesRead-mostly tables shared by all threads, read with one acquire load and grown by publishing a new version under a lock; retired versions are kept, and geometric growth bounds the memory they use.
Referenced from#
- Threads (overview)
- thread_support.h (module)
Cite this page
The FLINT team, “Parallel computation,” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/algorithms/parallel/index.html (generated 2026-10-20).
@misc{flint-doc-algorithms-parallel-index,
author = {{The FLINT team}},
title = {{Parallel computation}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/algorithms/parallel/index.html},
note = {Generated 2026-10-20}
}