Numba's OpenMP Integration: Key Directives and Runtime Functions

Numba leverages OpenMP as a threading layer for CPU parallelization, especially with `prange` loops. The PyOMP extension allows direct use of OpenMP directives like `parallel` and `for` within Numba-jitted Python functions, along with runtime functions such as `omp_get_thread_num()` and `omp_set_num_threads()`. It also extends to GPU offloading via OpenMP's `target` directive.

Sources

Open the full topic