This chapter contains utilities for controlling the number of threads used for multi-threaded NAG functions.
These functions have been designed to be used with multi-threaded implementations of the NAG Toolbox. They enable you to change and interrogate the number of threads used for multi-threaded NAG functions.
The number of threads to use for multi-threaded NAG Toolbox functions can be set with
nag_omp_set_num_threads (x06aa), and can be changed at any time.
You can check how many threads will be used for subsequent NAG functions, regardless of whether it has been set with
nag_omp_set_num_threads (x06aa) or not, with a call to
nag_omp_get_max_threads (x06ac). See
Multi-threaded Functions for further information on setting the number of threads.
When using a serial implementation of the NAG Toolbox
nag_omp_set_num_threads (x06aa) has no effect as the number of threads that will be used for NAG functions will be
. This is reflected by
nag_omp_get_max_threads (x06ac) always returning
.