qualpal 2.3.0
|
Manages OpenMP thread settings across qualpal. More...
#include <threads.h>
Static Public Member Functions | |
static void | set (const std::size_t n) |
Set the number of threads to use for parallel computations. | |
static std::size_t | get () |
Get the current number of threads. | |
Manages OpenMP thread settings across qualpal.
This class provides a centralized way to control thread settings for parallel computations. It handles both OpenMP and non-OpenMP builds, defaulting to sequential execution when OpenMP is not available.
Thread count defaults to half of the available threads (typically the number of physical CPU cores) to avoid performance degradation from hyperthreading when using Eigen.
Usage:
|
inlinestatic |
|
inlinestatic |