lu_threads

Function lu_threads 

Source
fn lu_threads(rows: usize, columns: usize, budget: usize) -> usize
Expand description

The faer workers of an LU factorization or solve with rows rows and columns right-hand sides, on a pool of budget threads.

Solves with fewer than 32 right-hand sides run on one worker. Recursive LU and triangular solves split the work into panels, one task each. A pool of up to four threads runs whole: the panels stay wide enough for four workers. Larger pools get one worker per 512 rows up to four, one per 2048 rows beyond that, and at most one per 16 right-hand sides, because narrower panels cost more in task overhead than they gain. The constants are tuned up to 8192 rows; benches/lu_scheduling.rs times a factorization and its solves for any worker count, to check them on other hardware.