Contents
use_threads - set the upper bound on the number of threads
that the calling thread wants used
SUBROUTINE USE_THREADS(NTHREADS)
INTEGER NTHREADS
SUBROUTINE USE_THREADS_64(NTHREADS)
INTEGER*8 NTHREADS
F95 INTERFACE
SUBROUTINE USE_THREADS(NTHREADS)
INTEGER :: NTHREADS
SUBROUTINE USE_THREADS_64(NTHREADS)
INTEGER(8) :: NTHREADS
C INTERFACE
#include <sunperf.h>
void use_threads(int nthreads);
void use_threads_64(long nthreads);
use_threads THREADS sets an upper bound on the number of
threads that the calling thread wants used. Subsequent
calls to this routine result in replacement of the previous
Use number for the calling thread. This counts all threads
working on the callers behalf, so if it passes 2 for
NTHREADS and then calls some subroutine, there will be at
most 1 additional thread started to do the computation.
There is no restriction that the sum of all NTHREADS from
USE_THREADS calls may not exceed the number of CPUs in a
system.