1/* -*- buffer-read-only: t -*- vi: set ro: */
2/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3#line 1
4/* Detect the number of processors.
5
6   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
7
8   This program is free software; you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation; either version 3, or (at your option)
11   any later version.
12
13   This program is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18   You should have received a copy of the GNU General Public License
19   along with this program; if not, write to the Free Software Foundation,
20   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
21
22/* Written by Glen Lenker and Bruno Haible.  */
23
24/* Allow the use in C++ code.  */
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29/* A "processor" in this context means a thread execution unit, that is either
30   - an execution core in a (possibly multi-core) chip, in a (possibly multi-
31     chip) module, in a single computer, or
32   - a thread execution unit inside a core
33     (hyper-threading, see <http://en.wikipedia.org/wiki/Hyper-threading>).
34   Which of the two definitions is used, is unspecified.  */
35
36enum nproc_query
37{
38  NPROC_ALL,                 /* total number of processors */
39  NPROC_CURRENT,             /* processors available to the current process */
40  NPROC_CURRENT_OVERRIDABLE  /* likewise, but overridable through the
41                                OMP_NUM_THREADS environment variable */
42};
43
44/* Return the total number of processors.  The result is guaranteed to
45   be at least 1.  */
46extern unsigned long int num_processors (enum nproc_query query);
47
48#ifdef __cplusplus
49}
50#endif /* C++ */
51