Skip to content

maxNumCompThreads

legacy · scripts/legacy/maxNumCompThreads.m

: n = maxNumCompThreads ()
: old = maxNumCompThreads (N)
: old = maxNumCompThreads ("automatic")

Query or set the maximum number of computational threads.

Called without arguments, return the current limit. With a positive integer N the limit becomes N, capped at the number of processors; with "automatic" it returns to the default, the number of processors. The previous limit is returned.