<< license Core namelengthmax >>

maxNumCompThreads


Set/Get maximum number of computional threads.


Syntax


T = maxNumCompThreads()
PREVIOUS_T = maxNumCompThreads(T)
PREVIOUS_T = maxNumCompThreads('automatic')

Input argument


T

an integer value: number of threads used by Nelson for computations.

Output argument


T

an integer value: number of threads used by Nelson for computations.

PREVIOUS_T

an integer value: previous number of threads used by Nelson for computations.

Description


maxNumCompThreads returns the number of threads used by Nelson for computations.

maxNumCompThreads(T) sets the maximum number of computational threads. This modification is only available for current session.

By default, maxNumCompThreads uses OMP_NUM_THREADS environment variable or numbers of detected physical cores on Windows and logical cores on others platforms.

Limitation: On Windows 32 bits, due to MKL and OpenMP, maxNumCompThreads returns 4 max even if there is more core.

Example


maxNumCompThreads

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< license Core namelengthmax >>