ndarray-linalg
ndarray-linalg copied to clipboard
Feature flags for backend multithreading
BLAS/LAPACK backends has multi-threading.
- openblas-src has
openmpflag to enable OpenMP - intel-mkl-src has
mkl-static-lp64-iompflag to link the multi-threaded static library
Problems
How to interact with Rust's multi-threading?
We often use multiple threads in Rust-hand to solve independent problems. In this case, LAPACK routines should run in sequential manner because multi-threading of a linear problem is less efficient than trivial parallel. Unfortunatelty, the LAPACK interface does not expose its threading option as argument, and we have to handle them using OpenMP interface e.g. omp_set_num_threads.