Set Maximum Number of Threads for omp_alloc Allocator
Keywords: set maximum number threads omp_alloc allocator max_num_threads removed syntax purpose restrictions

| Prev | Next |  |  |  |  |  | old_max_num_threads |

Set Maximum Number of Threads for omp_alloc Allocator
Removed
This function has been removed from the CppAD API. Use the function thread_alloc::parallel_setup in its place.
Syntax
`# include <cppad/utility/omp_alloc.hpp>
` `omp_alloc::max_num_threads(number)`
Purpose
By default there is only one thread and all execution is in sequential mode (not parallel ).
number
The argument `number` has prototype `
size_t number
` It must be greater than zero and specifies the maximum number of OpenMP threads that will be active at one time.
Restrictions
This function must be called before the program enters parallel execution mode.

Input File: cppad/utility/omp_alloc.hpp