using_threads man page on OpenIndiana

Man page or keyword search:  
man Server   20441 pages
apropos Keyword Search (all sections)
Output format
OpenIndiana logo
[printable version]

using_threads(3P)	    Sun Performance Library	     using_threads(3P)

NAME
       using_threads  -	 In  a	parallel  environment, if called from a serial
       region of the master thread it returns the number of threads  available
       for  execution  (determined by function OMP_GET_NUM_THREADS).  Else, if
       it is called from a thread in the team executing the parallel region it
       returns a 1.

       USING_THREADS subroutine

SYNOPSIS
       INTEGER FUNCTION USING_THREADS()

       INTEGER*8 FUNCTION USING_THREADS_64()

   F95 INTERFACE
       INTEGER FUNCTION USING_THREADS()

       INTEGER(8) FUNCTION USING_THREADS_64()

   C INTERFACE
       #include <sunperf.h>

       int using_threads();

       long using_threads_64();

PURPOSE
       In a parallel environment, if called from a serial region of the master
       thread USING_THREADS returns the number of threads available for execu‐
       tion.   This  number is determined by function call OMP_GET_NUM_THREADS
       (See the specifications for  the	 OpenMP	 Fortran  Application  Program
       Interface    at	  http://www.openmp.org	   for	  more	  details   on
       OMP_GET_NUM_THREADS).  Else, if it is called from a thread in the  team
       executing the parallel region, it returns a 1.  A user routine can call
       using_threads to determine if it is already in a parallel  region.   If
       this is the case, a 1 is returned and the routine can choose the serial
       path instead of going parallel, thus avoiding nested parallellism.

				  6 Mar 2009		     using_threads(3P)
[top]

List of man pages available for OpenIndiana

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net