_thread_pool_find_work_2
Synopsis
#include <flint/thread_pool.h>Load balancing for work with two cost rates: if the first a items cost \alpha each and the next b items cost \beta each, returns the number x of items whose total cost is the fraction y_n/y_d of the whole, rounded down. Requires y_n \le y_d. The intermediate product y_n (a \alpha + b \beta) must not overflow a word.
Cite this page
The FLINT team, “_thread_pool_find_work_2 (thread_pool.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/thread_pool/_thread_pool_find_work_2.html (generated 2026-10-20).
@misc{flint-doc-thread-pool-thread-pool-find-work-2,
author = {{The FLINT team}},
title = {{\_thread\_pool\_find\_work\_2 (thread\_pool.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/thread_pool/_thread_pool_find_work_2.html},
note = {Generated 2026-10-20}
}