I want to solve 10 linear systems (Ax = b) in each iteration of an algorithm.
The A of each system is about 10 x 11 (over-determined).
Cpu has 8 cores.
If I ask each CPU solve one of the 10 linear systems, 6 cpu has to wait for solving the last 2 systems.
If I solve each system one by one with multi-threaded solvers, would the performance be quite bad? I worry about false-sharing because the matrices A are small.
Does Eigen have a multi-threaded solver for this situation?
Thanks again.
Trying to leverage multi-threading within such tiny problems (10 x 11
) will only slow down things. If you want to do better than running the 10 solves in parallel, then try to find more parallel tasks within your pipeline.