| Title: | Control Number of OpenMP Threads Dynamically |
|---|---|
| Description: | The OpenMPController package provides a function omp_set_num_threads() to set the number of OpenMP threads to be used. This may be useful, for example, when linking against a vendor optimised BLAS/LAPACK library (e.g. the AMD Core Math Library), since the defaults used by those libraries may not be highly performant. Compatibility updates by Renova. |
| Authors: | Simon Guest [aut, cre] |
| Maintainer: | Simon Guest <[email protected]> |
| License: | GPL-2 |
| Version: | 0.2.5.9001 |
| Built: | 2026-11-16 17:57:22 UTC |
| Source: | https://github.com/renova-r/OpenMPController |
Sets the number of OpenMP threads to be used. This may be useful, for example, when linking against a vendor optimised BLAS/LAPACK library (e.g. the AMD Core Math Library), since the defaults used by those libraries may not be highly performant.
omp_set_num_threads(n)omp_set_num_threads(n)
n |
Integer, number of threads |
The R interface was written by Simon Guest.
omp_set_num_threads(2) # do something requiring 2 OMP threads omp_set_num_threads(4) # do something else requiring 4 OMP threadsomp_set_num_threads(2) # do something requiring 2 OMP threads omp_set_num_threads(4) # do something else requiring 4 OMP threads