41 static void set(
const std::size_t n)
46 omp_set_num_threads(n);
49 throw std::invalid_argument(
"Number of threads must be positive");
58 static std::size_t
get() {
return num_threads; }
64 inline static std::size_t num_threads =
65 std::max(1, omp_get_max_threads() / 2);
68 inline static std::size_t num_threads = 1;
Manages OpenMP thread settings across qualpal.
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.
Qualitative color palette generation library.