1
1
This commit was SVN r23042.
Этот коммит содержится в:
Jeff Squyres 2010-04-26 21:57:51 +00:00
родитель 13a7338289
Коммит 2fe1bc043d
130 изменённых файлов: 31904 добавлений и 31685 удалений

Просмотреть файл

@ -1,30 +1,29 @@
Introduction
hwloc provides command line tools and a C API to obtain the
hierarchical map of key computing elements, such as: NUMA memory nodes,
shared caches, processor sockets, processor cores, and processing units
(logical processors or "threads"). hwloc also gathers various
attributes such as cache and memory information, and is portable across
a variety of different operating systems and platforms.
hwloc provides command line tools and a C API to obtain the hierarchical map of
key computing elements, such as: NUMA memory nodes, shared caches, processor
sockets, processor cores, and processing units (logical processors or
"threads"). hwloc also gathers various attributes such as cache and memory
information, and is portable across a variety of different operating systems
and platforms.
hwloc primarily aims at helping high-performance computing (HPC)
applications, but is also applicable to any project seeking to exploit
code and/or data locality on modern computing platforms.
hwloc primarily aims at helping high-performance computing (HPC) applications,
but is also applicable to any project seeking to exploit code and/or data
locality on modern computing platforms.
Note that the hwloc project represents the merger of the libtopology
project from INRIA and the Portable Linux Processor Affinity (PLPA)
sub-project from Open MPI. Both of these prior projects are now
deprecated. The first hwloc release is essentially a "re-branding" of
the libtopology code base, but with both a few genuinely new features
and a few PLPA-like features added in. More new features and more
PLPA-like features will be added to hwloc over time. See Switching from
PLPA to hwloc for more details about converting your application from
PLPA to hwloc.
Note that the hwloc project represents the merger of the libtopology project
from INRIA and the Portable Linux Processor Affinity (PLPA) sub-project from
Open MPI. Both of these prior projects are now deprecated. The first hwloc
release is essentially a "re-branding" of the libtopology code base, but with
both a few genuinely new features and a few PLPA-like features added in. More
new features and more PLPA-like features will be added to hwloc over time. See
Switching from PLPA to hwloc for more details about converting your application
from PLPA to hwloc.
hwloc supports the following operating systems:
* Linux (including old kernels not having sysfs topology information,
with knowledge of cpusets, offline cpus, ScaleMP vSMP, and
Kerrighed support)
* Linux (including old kernels not having sysfs topology information, with
knowledge of cpusets, offline cpus, ScaleMP vSMP, and Kerrighed support)
* Solaris
* AIX
* Darwin / OS X
@ -33,66 +32,64 @@ hwloc supports the following operating systems:
* HP-UX
* Microsoft Windows
hwloc only reports the number of processors on unsupported operating
systems; no topology information is available.
hwloc only reports the number of processors on unsupported operating systems;
no topology information is available.
For development and debugging purposes, hwloc also offers the ability
to work on "fake" topologies:
* Symmetrical tree of resources generated from a list of level
arities
* Remote machine simulation through the gathering of Linux sysfs
topology files
For development and debugging purposes, hwloc also offers the ability to work
on "fake" topologies:
hwloc can display the topology in a human-readable format, either in
graphical mode (X11), or by exporting in one of several different
formats, including: plain text, PDF, PNG, and FIG (see Examples below).
Note that some of the export formats require additional support
libraries.
* Symmetrical tree of resources generated from a list of level arities
* Remote machine simulation through the gathering of Linux sysfs topology
files
hwloc offers a programming interface for manipulating topologies and
objects. It also brings a powerful CPU bitmap API that is used to
describe topology objects location on physical/logical processors. See
the Programming interface below. It may also be used to binding
applications onto certain cores or memory nodes. Several utility
programs are also provided to ease command-line manipulation of
topology objects, binding of processes, and so on.
hwloc can display the topology in a human-readable format, either in graphical
mode (X11), or by exporting in one of several different formats, including:
plain text, PDF, PNG, and FIG (see Examples below). Note that some of the
export formats require additional support libraries.
hwloc offers a programming interface for manipulating topologies and objects.
It also brings a powerful CPU bitmap API that is used to describe topology
objects location on physical/logical processors. See the Programming interface
below. It may also be used to binding applications onto certain cores or memory
nodes. Several utility programs are also provided to ease command-line
manipulation of topology objects, binding of processes, and so on.
Installation
hwloc (http://www.open-mpi.org/projects/hwloc/) is available under the
BSD license. It is hosted as a sub-project of the overall Open MPI
project (http://www.open-mpi.org/). Note that hwloc does not require
any functionality from Open MPI -- it is a wholly separate (and much
smaller!) project and code base. It just happens to be hosted as part
of the overall Open MPI project.
hwloc (http://www.open-mpi.org/projects/hwloc/) is available under the BSD
license. It is hosted as a sub-project of the overall Open MPI project (http://
www.open-mpi.org/). Note that hwloc does not require any functionality from
Open MPI -- it is a wholly separate (and much smaller!) project and code base.
It just happens to be hosted as part of the overall Open MPI project.
Nightly development snapshots are available on the web site. Additionally, the
code can be directly checked out of Subversion:
Nightly development snapshots are available on the web site.
Additionally, the code can be directly checked out of Subversion:
shell$ svn checkout http://svn.open-mpi.org/svn/hwloc/trunk hwloc-trunk
shell$ cd hwloc-trunk
shell$ ./autogen.sh
Note that GNU Autoconf >=2.63, Automake >=1.10 and Libtool >=2.2.6 are
required when building from a Subversion checkout.
Note that GNU Autoconf >=2.63, Automake >=1.10 and Libtool >=2.2.6 are required
when building from a Subversion checkout.
Installation by itself is the fairly common GNU-based process:
shell$ ./configure --prefix=...
shell$ make
shell$ make install
The hwloc command-line tool "lstopo" produces human-readable topology
maps, as mentioned above. It can also export maps to the "fig" file
format. Support for PDF, Postscript, and PNG exporting is provided if
the "Cairo" development package can be found when hwloc is configured
and build. Similarly, lstopo's XML support requires the libxml2
development package.
The hwloc command-line tool "lstopo" produces human-readable topology maps, as
mentioned above. It can also export maps to the "fig" file format. Support for
PDF, Postscript, and PNG exporting is provided if the "Cairo" development
package can be found when hwloc is configured and build. Similarly, lstopo's
XML support requires the libxml2 development package.
Examples
On a 4-socket 2-core machine with hyperthreading, the lstopo tool may
show the following outputs:
On a 4-socket 2-core machine with hyperthreading, the lstopo tool may show the
following outputs:
dudley.png
dudley.png
Machine (16GB)
Socket #0 + L3 #0 (4096KB)
@ -127,7 +124,7 @@ Machine (16GB)
On a 4-socket 2-core Opteron NUMA machine, the lstopo tool may show the
following outputs:
hagrid.png
hagrid.png
Machine (64GB)
NUMANode #0 (phys=0 8190MB) + Socket #0
@ -155,10 +152,10 @@ Machine (64GB)
L2 #14 (1024KB) + L1 #14 (64KB) + Core #14 + PU #14 (phys=14)
L2 #15 (1024KB) + L1 #15 (64KB) + Core #15 + PU #15 (phys=15)
On a 2-socket quad-core Xeon (pre-Nehalem, with 2 dual-core dies into
each socket):
On a 2-socket quad-core Xeon (pre-Nehalem, with 2 dual-core dies into each
socket):
emmett.png
emmett.png
Machine (16GB)
Socket #0
@ -178,48 +175,42 @@ Machine (16GB)
Programming interface
The basic interface is available in hwloc.h. It mostly offers low-level
routines for advanced programmers that want to manually manipulate
objects and follow links between them. Developers should look at
hwloc/helper.h, which provides good higher-level topology traversal
examples.
The basic interface is available in hwloc.h. It essentially offers low-level
routines for advanced programmers that want to manually manipulate objects and
follow links between them. Developers should also look at hwloc/helper.h, which
provides good higher-level topology traversal examples.
Each object contains a cpuset describing the list of processing units
that it contains. These cpusets may be used for Binding. hwloc offers
an extensive cpuset manipulation interface in hwloc/cpuset.h.
Each object contains a cpuset describing the list of processing units that it
contains. These cpusets may be used for Binding. hwloc offers an extensive
cpuset manipulation interface in hwloc/cpuset.h.
Moreover, hwloc also comes with additional helpers for interoperability
with several commonly used environments. For Linux, some specific
helpers are available in hwloc/linux.h, and hwloc/linux-libnuma.h if
using libnuma. On glibc-based systems, additional helpers are available
in hwloc/glibc-sched.h. For Linux systems with the OpenFabrics verbs
library, some dedicated helpers are provided in
hwloc/openfabrics-verbs.h (this helper file is not yet useful on
non-Linux systems with the OpenFabrics verbs library).
Moreover, hwloc also comes with additional helpers for interoperability with
several commonly used environments. See the Interoperability with other
software section for details.
To precisely define the vocabulary used by hwloc, a Terms and
Definitions section is available and should probably be read first.
To precisely define the vocabulary used by hwloc, a Terms and Definitions
section is available and should probably be read first.
Further documentation is available in a full set of HTML pages, man
pages, and self-contained PDF files (formatted for both both US letter
and A4 formats) in the source tarball in doc/doxygen-doc/. If you are
building from a Subversion checkout, you will need to have Doxygen and
pdflatex installed -- the documentation will be built during the normal
"make" process. The documentation is installed during "make install" to
$prefix/share/doc/hwloc/ and your systems default man page tree (under
$prefix, of course).
Further documentation is available in a full set of HTML pages, man pages, and
self-contained PDF files (formatted for both both US letter and A4 formats) in
the source tarball in doc/doxygen-doc/. If you are building from a Subversion
checkout, you will need to have Doxygen and pdflatex installed -- the
documentation will be built during the normal "make" process. The documentation
is installed during "make install" to $prefix/share/doc/hwloc/ and your systems
default man page tree (under $prefix, of course).
The following section presents an example of API usage.
API example
The following small C example (named ``hwloc-hello.c'') prints the
topology of the machine and bring the process to the first logical
processor of the second core of the machine.
The following small C example (named ``hwloc-hello.c'') prints the topology of
the machine and bring the process to the first logical processor of the second
core of the machine.
/* Example hwloc API program.
*
* Copyright й 2009 INRIA, Universitщ Bordeaux 1
* Copyright й 2009-2010 Cisco Systems, Inc. All rights reserved.
* Copyright ? 2009 INRIA, Universit? Bordeaux 1
* Copyright ? 2009-2010 Cisco Systems, Inc. All rights reserved.
*
* hwloc-hello.c
*/
@ -358,16 +349,18 @@ int main(void)
return 0;
}
hwloc provides a pkg-config executable to obtain relevant compiler and
linker flags. For example, it can be used thusly to compile
applications that utilize the hwloc library (assuming GNU Make):
hwloc provides a pkg-config executable to obtain relevant compiler and linker
flags. For example, it can be used thusly to compile applications that utilize
the hwloc library (assuming GNU Make):
CFLAGS += $(pkg-config --cflags hwloc)
LDLIBS += $(pkg-config --libs hwloc)
cc hwloc-hello.c $(CFLAGS) -o hwloc-hello $(LDLIBS)
On a machine with 4GB of RAM and 2 processor sockets -- each socket of
which has two processing cores -- the output from running hwloc-hello
could be something like the following:
On a machine with 4GB of RAM and 2 processor sockets -- each socket of which
has two processing cores -- the output from running hwloc-hello could be
something like the following:
shell$ ./hwloc-hello
*** Objects at level 0
Index 0: Machine(3938MB)
@ -401,25 +394,24 @@ shell$
Questions and bugs
Questions should be sent to the devel mailing list
(http://www.open-mpi.org/community/lists/hwloc.php). Bug reports should
be reported in the tracker (https://svn.open-mpi.org/trac/hwloc/).
Questions should be sent to the devel mailing list (http://www.open-mpi.org/
community/lists/hwloc.php). Bug reports should be reported in the tracker (
https://svn.open-mpi.org/trac/hwloc/).
History / credits
hwloc is the evolution and merger of the libtopology
(http://runtime.bordeaux.inria.fr/libtopology/) project and the
Portable Linux Processor Affinity (PLPA)
(http://www.open-mpi.org/projects/plpa/) project. Because of functional
and ideological overlap, these two code bases and ideas were merged and
released under the name "hwloc" as an Open MPI sub-project.
hwloc is the evolution and merger of the libtopology (http://
runtime.bordeaux.inria.fr/libtopology/) project and the Portable Linux
Processor Affinity (PLPA) (http://www.open-mpi.org/projects/plpa/) project.
Because of functional and ideological overlap, these two code bases and ideas
were merged and released under the name "hwloc" as an Open MPI sub-project.
libtopology was initially developed by the INRIA Runtime Team-Project
(http://runtime.bordeaux.inria.fr/) (headed by Raymond Namyst
(http://dept-info.labri.fr/~namyst/). PLPA was initially developed by
the Open MPI development team as a sub-project. Both are now deprecated
in favor of hwloc, which is distributed as an Open MPI sub-project.
__________________________________________________________________
libtopology was initially developed by the INRIA Runtime Team-Project (http://
runtime.bordeaux.inria.fr/) (headed by Raymond Namyst (http://
dept-info.labri.fr/~namyst/). PLPA was initially developed by the Open MPI
development team as a sub-project. Both are now deprecated in favor of hwloc,
which is distributed as an Open MPI sub-project.
-------------------------------------------------------------------------------
Generated by doxygen 1.6.2
Generated by doxygen 1.6.2

Просмотреть файл

@ -16,7 +16,7 @@ release=0
# requirement is that it must be entirely printable ASCII characters
# and have no white space.
greek=rc1
greek=rc2
# If want_svn=1, then the SVN r number will be included in the overall
# hwloc version number in some form.
@ -33,11 +33,11 @@ want_svn=0
# distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion".
svn_r=r1955
svn_r=r2008
# The date when this release was created
date="Apr 17, 2010"
date="Apr 26, 2010"
# The shared library version of hwloc's public library. This version
# is maintained in accordance with the "Library Interface Versions"

Просмотреть файл

@ -258,6 +258,23 @@ EOF])
#
_HWLOC_CHECK_ATTRIBUTES
_HWLOC_CHECK_VISIBILITY
HWLOC_CFLAGS="$HWLOC_FLAGS $HWLOC_VISIBILITY_CFLAGS"
AS_IF([test "$HWLOC_VISIBILITY_CFLAGS" != ""],
[AC_MSG_WARN(["$HWLOC_VISIBILITY_CFLAGS" has been added to hwloc's CFLAGS])])
#
# Check for inline compatibility support
#
AC_MSG_CHECKING([for inline compatibility keyword])
AC_TRY_COMPILE([static void __inline__ f(void) { }], [],
[__hwloc_inline=__inline__],
[AC_TRY_COMPILE([static void __inline f(void) {}], [],
[__hwloc_inline=__inline],
[__hwloc_inline=]
)]
)
AC_MSG_RESULT([$__hwloc_inline])
AC_DEFINE_UNQUOTED(__hwloc_inline, $__hwloc_inline, [Define this to a keyword that can safely replace inline in installed headers])
#
# Now detect support
@ -285,7 +302,7 @@ EOF])
LIBS=
AC_CHECK_HEADERS([curses.h], [
AC_CHECK_HEADERS([term.h], [
AC_SEARCH_LIBS([tparm], [termcap curses], [
AC_SEARCH_LIBS([tparm], [termcap ncursesw ncurses curses], [
AC_SUBST([HWLOC_TERMCAP_LIBS], ["$LIBS"])
AC_DEFINE([HWLOC_HAVE_LIBTERMCAP], [1],
[Define to 1 if you have a library providing the termcap interface])
@ -379,7 +396,10 @@ EOF])
AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])
)
])
], , [[
#define _GNU_SOURCE
#include <sched.h>
]])
AC_MSG_CHECKING([for working CPU_SET])
AC_LINK_IFELSE(

Просмотреть файл

@ -266,14 +266,14 @@ AC_DEFUN([_HWLOC_CHECK_ATTRIBUTES], [
[])
ATTRIBUTE_CFLAGS=
HWLOC_ATTRIBUTE_CFLAGS=
case "$hwloc_c_vendor" in
gnu)
ATTRIBUTE_CFLAGS="-Wall"
HWLOC_ATTRIBUTE_CFLAGS="-Wall"
;;
intel)
# we want specifically the warning on format string conversion
ATTRIBUTE_CFLAGS="-we181"
HWLOC_ATTRIBUTE_CFLAGS="-we181"
;;
esac
_HWLOC_CHECK_SPECIFIC_ATTRIBUTE([format],
@ -290,7 +290,7 @@ AC_DEFUN([_HWLOC_CHECK_ATTRIBUTES], [
/* The autoconf-generated main-function is int main(), which produces a warning by itself */
int main(void);
],
[$ATTRIBUTE_CFLAGS])
[$HWLOC_ATTRIBUTE_CFLAGS])
_HWLOC_CHECK_SPECIFIC_ATTRIBUTE([hot],
[
@ -334,14 +334,14 @@ AC_DEFUN([_HWLOC_CHECK_ATTRIBUTES], [
# Ignored by intel-compiler 9.1.045 -- recognized by cross-check
# Ignored by PGI-6.2.5 (pgCC) -- recognized by cross-check
#
ATTRIBUTE_CFLAGS=
HWLOC_ATTRIBUTE_CFLAGS=
case "$hwloc_c_vendor" in
gnu)
ATTRIBUTE_CFLAGS="-Wall"
HWLOC_ATTRIBUTE_CFLAGS="-Wall"
;;
intel)
# we do not want to get ignored attributes warnings, but rather real warnings
ATTRIBUTE_CFLAGS="-wd1292"
HWLOC_ATTRIBUTE_CFLAGS="-wd1292"
;;
esac
_HWLOC_CHECK_SPECIFIC_ATTRIBUTE([nonnull],
@ -360,7 +360,7 @@ AC_DEFUN([_HWLOC_CHECK_ATTRIBUTES], [
/* The autoconf-generated main-function is int main(), which produces a warning by itself */
int main(void);
],
[$ATTRIBUTE_CFLAGS])
[$HWLOC_ATTRIBUTE_CFLAGS])
_HWLOC_CHECK_SPECIFIC_ATTRIBUTE([noreturn],
@ -402,14 +402,14 @@ AC_DEFUN([_HWLOC_CHECK_ATTRIBUTES], [
# Ignored by PGI-6.2.5 (pgCC) -- recognized by output-parser and cross-check
# Ignored by pathcc-2.2.1 -- recognized by cross-check (through grep ignore)
#
ATTRIBUTE_CFLAGS=
HWLOC_ATTRIBUTE_CFLAGS=
case "$hwloc_c_vendor" in
gnu)
ATTRIBUTE_CFLAGS="-Wall"
HWLOC_ATTRIBUTE_CFLAGS="-Wall"
;;
intel)
# we do not want to get ignored attributes warnings
ATTRIBUTE_CFLAGS="-wd1292"
HWLOC_ATTRIBUTE_CFLAGS="-wd1292"
;;
esac
_HWLOC_CHECK_SPECIFIC_ATTRIBUTE([sentinel],
@ -427,7 +427,7 @@ AC_DEFUN([_HWLOC_CHECK_ATTRIBUTES], [
/* The autoconf-generated main-function is int main(), which produces a warning by itself */
int main(void);
],
[$ATTRIBUTE_CFLAGS])
[$HWLOC_ATTRIBUTE_CFLAGS])
_HWLOC_CHECK_SPECIFIC_ATTRIBUTE([unused],
[
@ -443,14 +443,14 @@ AC_DEFUN([_HWLOC_CHECK_ATTRIBUTES], [
# Ignored by the intel-compiler 9.1.045 -- recognized by cross-check
# Ignored by pathcc-2.2.1 -- recognized by cross-check (through grep ignore)
#
ATTRIBUTE_CFLAGS=
HWLOC_ATTRIBUTE_CFLAGS=
case "$hwloc_c_vendor" in
gnu)
ATTRIBUTE_CFLAGS="-Wall"
HWLOC_ATTRIBUTE_CFLAGS="-Wall"
;;
intel)
# we do not want to get ignored attributes warnings
ATTRIBUTE_CFLAGS="-wd1292"
HWLOC_ATTRIBUTE_CFLAGS="-wd1292"
;;
esac
_HWLOC_CHECK_SPECIFIC_ATTRIBUTE([warn_unused_result],
@ -471,7 +471,7 @@ AC_DEFUN([_HWLOC_CHECK_ATTRIBUTES], [
/* The autoconf-generated main-function is int main(), which produces a warning by itself */
int main(void);
],
[$ATTRIBUTE_CFLAGS])
[$HWLOC_ATTRIBUTE_CFLAGS])
_HWLOC_CHECK_SPECIFIC_ATTRIBUTE([weak_alias],

Просмотреть файл

@ -67,7 +67,7 @@ AC_DEFUN([_HWLOC_CHECK_VISIBILITY],[
else
CFLAGS_orig="$CFLAGS"
CFLAGS="$CFLAGS_orig -fvisibility=hidden"
add=
hwloc_add=
AC_CACHE_CHECK([if $CC supports -fvisibility],
[hwloc_cv_cc_fvisibility],
[AC_TRY_LINK([
@ -89,11 +89,10 @@ AC_DEFUN([_HWLOC_CHECK_VISIBILITY],[
])
if test "$hwloc_cv_cc_fvisibility" = "yes" ; then
add=" -fvisibility=hidden"
hwloc_add=" -fvisibility=hidden"
have_visibility=1
AC_MSG_CHECKING([enable symbol visibility])
AC_MSG_RESULT([yes])
AC_MSG_WARN([$add has been added to CFLAGS])
elif test "$enable_visibility" = "yes"; then
AC_MSG_ERROR([Symbol visibility support requested but compiler does not seem to support it. Aborting])
else
@ -101,9 +100,9 @@ AC_DEFUN([_HWLOC_CHECK_VISIBILITY],[
AC_MSG_RESULT([no])
have_visibility=0
fi
CFLAGS="$CFLAGS_orig$add"
HWLOC_VISIBILITY_CFLAGS="$add"
unset add
CFLAGS=$CFLAGS_orig
HWLOC_VISIBILITY_CFLAGS=$hwloc_add
unset hwloc_add
fi
AC_DEFINE_UNQUOTED([HWLOC_C_HAVE_VISIBILITY], [$have_visibility],
[Whether C compiler supports -fvisibility])

153
opal/mca/paffinity/hwloc/hwloc/configure поставляемый
Просмотреть файл

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.65 for hwloc 1.0rc1.
# Generated by GNU Autoconf 2.65 for hwloc 1.0rc2.
#
# Report bugs to <http://www.open-mpi.org/community/help/>.
#
@ -701,8 +701,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='hwloc'
PACKAGE_TARNAME='hwloc'
PACKAGE_VERSION='1.0rc1'
PACKAGE_STRING='hwloc 1.0rc1'
PACKAGE_VERSION='1.0rc2'
PACKAGE_STRING='hwloc 1.0rc2'
PACKAGE_BUGREPORT='http://www.open-mpi.org/community/help/'
PACKAGE_URL=''
@ -1541,7 +1541,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures hwloc 1.0rc1 to adapt to many kinds of systems.
\`configure' configures hwloc 1.0rc2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1616,7 +1616,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of hwloc 1.0rc1:";;
short | recursive ) echo "Configuration of hwloc 1.0rc2:";;
esac
cat <<\_ACEOF
@ -1770,7 +1770,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
hwloc configure 1.0rc1
hwloc configure 1.0rc2
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@ -2412,7 +2412,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by hwloc $as_me 1.0rc1, which was
It was created by hwloc $as_me 1.0rc2, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@ -3346,7 +3346,7 @@ fi
# Define the identity of the package.
PACKAGE='hwloc'
VERSION='1.0rc1'
VERSION='1.0rc2'
cat >>confdefs.h <<_ACEOF
@ -6548,14 +6548,14 @@ $as_echo "no" >&6; }
ATTRIBUTE_CFLAGS=
HWLOC_ATTRIBUTE_CFLAGS=
case "$hwloc_c_vendor" in
gnu)
ATTRIBUTE_CFLAGS="-Wall"
HWLOC_ATTRIBUTE_CFLAGS="-Wall"
;;
intel)
# we want specifically the warning on format string conversion
ATTRIBUTE_CFLAGS="-we181"
HWLOC_ATTRIBUTE_CFLAGS="-we181"
;;
esac
@ -6624,7 +6624,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag_safe=$ac_c_werror_flag
ac_c_werror_flag="yes"
CFLAGS_safe=$CFLAGS
CFLAGS="$CFLAGS $ATTRIBUTE_CFLAGS"
CFLAGS="$CFLAGS $HWLOC_ATTRIBUTE_CFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -7165,14 +7165,14 @@ $as_echo "no" >&6; }
# Ignored by intel-compiler 9.1.045 -- recognized by cross-check
# Ignored by PGI-6.2.5 (pgCC) -- recognized by cross-check
#
ATTRIBUTE_CFLAGS=
HWLOC_ATTRIBUTE_CFLAGS=
case "$hwloc_c_vendor" in
gnu)
ATTRIBUTE_CFLAGS="-Wall"
HWLOC_ATTRIBUTE_CFLAGS="-Wall"
;;
intel)
# we do not want to get ignored attributes warnings, but rather real warnings
ATTRIBUTE_CFLAGS="-wd1292"
HWLOC_ATTRIBUTE_CFLAGS="-wd1292"
;;
esac
@ -7243,7 +7243,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag_safe=$ac_c_werror_flag
ac_c_werror_flag="yes"
CFLAGS_safe=$CFLAGS
CFLAGS="$CFLAGS $ATTRIBUTE_CFLAGS"
CFLAGS="$CFLAGS $HWLOC_ATTRIBUTE_CFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -7675,14 +7675,14 @@ $as_echo "no" >&6; }
# Ignored by PGI-6.2.5 (pgCC) -- recognized by output-parser and cross-check
# Ignored by pathcc-2.2.1 -- recognized by cross-check (through grep ignore)
#
ATTRIBUTE_CFLAGS=
HWLOC_ATTRIBUTE_CFLAGS=
case "$hwloc_c_vendor" in
gnu)
ATTRIBUTE_CFLAGS="-Wall"
HWLOC_ATTRIBUTE_CFLAGS="-Wall"
;;
intel)
# we do not want to get ignored attributes warnings
ATTRIBUTE_CFLAGS="-wd1292"
HWLOC_ATTRIBUTE_CFLAGS="-wd1292"
;;
esac
@ -7752,7 +7752,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag_safe=$ac_c_werror_flag
ac_c_werror_flag="yes"
CFLAGS_safe=$CFLAGS
CFLAGS="$CFLAGS $ATTRIBUTE_CFLAGS"
CFLAGS="$CFLAGS $HWLOC_ATTRIBUTE_CFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -7942,14 +7942,14 @@ $as_echo "no" >&6; }
# Ignored by the intel-compiler 9.1.045 -- recognized by cross-check
# Ignored by pathcc-2.2.1 -- recognized by cross-check (through grep ignore)
#
ATTRIBUTE_CFLAGS=
HWLOC_ATTRIBUTE_CFLAGS=
case "$hwloc_c_vendor" in
gnu)
ATTRIBUTE_CFLAGS="-Wall"
HWLOC_ATTRIBUTE_CFLAGS="-Wall"
;;
intel)
# we do not want to get ignored attributes warnings
ATTRIBUTE_CFLAGS="-wd1292"
HWLOC_ATTRIBUTE_CFLAGS="-wd1292"
;;
esac
@ -8022,7 +8022,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag_safe=$ac_c_werror_flag
ac_c_werror_flag="yes"
CFLAGS_safe=$CFLAGS
CFLAGS="$CFLAGS $ATTRIBUTE_CFLAGS"
CFLAGS="$CFLAGS $HWLOC_ATTRIBUTE_CFLAGS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -8323,7 +8323,7 @@ $as_echo "no" >&6; }
else
CFLAGS_orig="$CFLAGS"
CFLAGS="$CFLAGS_orig -fvisibility=hidden"
add=
hwloc_add=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fvisibility" >&5
$as_echo_n "checking if $CC supports -fvisibility... " >&6; }
if test "${hwloc_cv_cc_fvisibility+set}" = set; then :
@ -8366,14 +8366,12 @@ fi
$as_echo "$hwloc_cv_cc_fvisibility" >&6; }
if test "$hwloc_cv_cc_fvisibility" = "yes" ; then
add=" -fvisibility=hidden"
hwloc_add=" -fvisibility=hidden"
have_visibility=1
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking enable symbol visibility" >&5
$as_echo_n "checking enable symbol visibility... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $add has been added to CFLAGS" >&5
$as_echo "$as_me: WARNING: $add has been added to CFLAGS" >&2;}
elif test "$enable_visibility" = "yes"; then
as_fn_error "Symbol visibility support requested but compiler does not seem to support it. Aborting" "$LINENO" 5
else
@ -8383,9 +8381,9 @@ $as_echo_n "checking enable symbol visibility... " >&6; }
$as_echo "no" >&6; }
have_visibility=0
fi
CFLAGS="$CFLAGS_orig$add"
HWLOC_VISIBILITY_CFLAGS="$add"
unset add
CFLAGS=$CFLAGS_orig
HWLOC_VISIBILITY_CFLAGS=$hwloc_add
unset hwloc_add
fi
cat >>confdefs.h <<_ACEOF
@ -8394,6 +8392,59 @@ _ACEOF
HWLOC_CFLAGS="$HWLOC_FLAGS $HWLOC_VISIBILITY_CFLAGS"
if test "$HWLOC_VISIBILITY_CFLAGS" != ""; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"$HWLOC_VISIBILITY_CFLAGS\" has been added to hwloc's CFLAGS" >&5
$as_echo "$as_me: WARNING: \"$HWLOC_VISIBILITY_CFLAGS\" has been added to hwloc's CFLAGS" >&2;}
fi
#
# Check for inline compatibility support
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline compatibility keyword" >&5
$as_echo_n "checking for inline compatibility keyword... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
static void __inline__ f(void) { }
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
__hwloc_inline=__inline__
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
static void __inline f(void) {}
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
__hwloc_inline=__inline
else
__hwloc_inline=
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $__hwloc_inline" >&5
$as_echo "$__hwloc_inline" >&6; }
cat >>confdefs.h <<_ACEOF
#define __hwloc_inline $__hwloc_inline
_ACEOF
#
# Now detect support
@ -8562,7 +8613,7 @@ return tparm ();
return 0;
}
_ACEOF
for ac_lib in '' termcap curses; do
for ac_lib in '' termcap ncursesw ncurses curses; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@ -9179,7 +9230,11 @@ $as_echo_n "checking whether function sched_setaffinity is declared... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
#define _GNU_SOURCE
#include <sched.h>
int
main ()
{
@ -12458,13 +12513,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:12461: $ac_compile\"" >&5)
(eval echo "\"\$as_me:12516: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
(eval echo "\"\$as_me:12464: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval echo "\"\$as_me:12519: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
(eval echo "\"\$as_me:12467: output\"" >&5)
(eval echo "\"\$as_me:12522: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@ -13666,7 +13721,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 13669 "configure"' > conftest.$ac_ext
echo '#line 13724 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -15166,11 +15221,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15169: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15224: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15173: \$? = $ac_status" >&5
echo "$as_me:15228: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -15505,11 +15560,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15508: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15563: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15512: \$? = $ac_status" >&5
echo "$as_me:15567: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -15610,11 +15665,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15613: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15668: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:15617: \$? = $ac_status" >&5
echo "$as_me:15672: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -15665,11 +15720,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15668: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15723: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:15672: \$? = $ac_status" >&5
echo "$as_me:15727: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -18032,7 +18087,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 18035 "configure"
#line 18090 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -18128,7 +18183,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 18131 "configure"
#line 18186 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -18991,7 +19046,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by hwloc $as_me 1.0rc1, which was
This file was extended by hwloc $as_me 1.0rc2, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -19061,7 +19116,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
hwloc config.status 1.0rc1
hwloc config.status 1.0rc2
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"

Просмотреть файл

@ -113,8 +113,8 @@ $(DOX_TAG): $(BUILT_SOURCES) $(dox_inputs) $(PREBUILT_IMAGES)
-e 's/\\_\\-\\_\\-hwloc\\_\\-attribute\\_\\-deprecated//g' \
-e 's/HWLOC_DECLSPEC//g' \
-e 's/HWLOC\\_\\-DECLSPEC//g' \
-e 's/__inline/inline/g' \
-e 's/\\_\\-\\_\\-inline/inline/g' \
-e 's/__hwloc_inline/inline/g' \
-e 's/\\_\\-\\_\\-hwloc\\_\\-inline/inline/g' \
$(DOX_DIR)/html/*.html $(DOX_DIR)/latex/*.tex $(DOX_DIR)/man/man3/*.3
@echo "Work-around spurious leading _ in doxygen filenames..."
(cd $(DOX_DIR)/man/man3 ; \
@ -134,12 +134,14 @@ if HWLOC_DOXYGEN_BROKEN_SHORT_NAMES
-@mv -f $(DOX_DIR)/latex/tools.tex $(DOX_DIR)/latex/a00002.tex
-@mv -f $(DOX_DIR)/html/envvar.html $(DOX_DIR)/html/a00003.html
-@mv -f $(DOX_DIR)/latex/envvar.tex $(DOX_DIR)/latex/a00003.tex
-@mv -f $(DOX_DIR)/html/threadsafety.html $(DOX_DIR)/html/a00004.html
-@mv -f $(DOX_DIR)/latex/threadsafety.tex $(DOX_DIR)/latex/a00004.tex
-@mv -f $(DOX_DIR)/html/embed.html $(DOX_DIR)/html/a00005.html
-@mv -f $(DOX_DIR)/latex/embed.tex $(DOX_DIR)/latex/a00005.tex
-@mv -f $(DOX_DIR)/html/switchfromplpa.html $(DOX_DIR)/html/a00006.html
-@mv -f $(DOX_DIR)/latex/switchfromplpa.tex $(DOX_DIR)/latex/a00006.tex
-@mv -f $(DOX_DIR)/html/interoperability.html $(DOX_DIR)/html/a00004.html
-@mv -f $(DOX_DIR)/latex/interoperability.tex $(DOX_DIR)/latex/a00004.tex
-@mv -f $(DOX_DIR)/html/threadsafety.html $(DOX_DIR)/html/a00005.html
-@mv -f $(DOX_DIR)/latex/threadsafety.tex $(DOX_DIR)/latex/a00005.tex
-@mv -f $(DOX_DIR)/html/embed.html $(DOX_DIR)/html/a00006.html
-@mv -f $(DOX_DIR)/latex/embed.tex $(DOX_DIR)/latex/a00006.tex
-@mv -f $(DOX_DIR)/html/switchfromplpa.html $(DOX_DIR)/html/a00007.html
-@mv -f $(DOX_DIR)/latex/switchfromplpa.tex $(DOX_DIR)/latex/a00007.tex
endif
endif

Просмотреть файл

@ -1051,8 +1051,8 @@ uninstall-man: uninstall-man3
@HWLOC_BUILD_DOXYGEN_TRUE@ -e 's/\\_\\-\\_\\-hwloc\\_\\-attribute\\_\\-deprecated//g' \
@HWLOC_BUILD_DOXYGEN_TRUE@ -e 's/HWLOC_DECLSPEC//g' \
@HWLOC_BUILD_DOXYGEN_TRUE@ -e 's/HWLOC\\_\\-DECLSPEC//g' \
@HWLOC_BUILD_DOXYGEN_TRUE@ -e 's/__inline/inline/g' \
@HWLOC_BUILD_DOXYGEN_TRUE@ -e 's/\\_\\-\\_\\-inline/inline/g' \
@HWLOC_BUILD_DOXYGEN_TRUE@ -e 's/__hwloc_inline/inline/g' \
@HWLOC_BUILD_DOXYGEN_TRUE@ -e 's/\\_\\-\\_\\-hwloc\\_\\-inline/inline/g' \
@HWLOC_BUILD_DOXYGEN_TRUE@ $(DOX_DIR)/html/*.html $(DOX_DIR)/latex/*.tex $(DOX_DIR)/man/man3/*.3
@HWLOC_BUILD_DOXYGEN_TRUE@ @echo "Work-around spurious leading _ in doxygen filenames..."
@HWLOC_BUILD_DOXYGEN_TRUE@ (cd $(DOX_DIR)/man/man3 ; \
@ -1071,12 +1071,14 @@ uninstall-man: uninstall-man3
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/latex/tools.tex $(DOX_DIR)/latex/a00002.tex
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/html/envvar.html $(DOX_DIR)/html/a00003.html
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/latex/envvar.tex $(DOX_DIR)/latex/a00003.tex
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/html/threadsafety.html $(DOX_DIR)/html/a00004.html
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/latex/threadsafety.tex $(DOX_DIR)/latex/a00004.tex
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/html/embed.html $(DOX_DIR)/html/a00005.html
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/latex/embed.tex $(DOX_DIR)/latex/a00005.tex
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/html/switchfromplpa.html $(DOX_DIR)/html/a00006.html
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/latex/switchfromplpa.tex $(DOX_DIR)/latex/a00006.tex
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/html/interoperability.html $(DOX_DIR)/html/a00004.html
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/latex/interoperability.tex $(DOX_DIR)/latex/a00004.tex
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/html/threadsafety.html $(DOX_DIR)/html/a00005.html
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/latex/threadsafety.tex $(DOX_DIR)/latex/a00005.tex
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/html/embed.html $(DOX_DIR)/html/a00006.html
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/latex/embed.tex $(DOX_DIR)/latex/a00006.tex
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/html/switchfromplpa.html $(DOX_DIR)/html/a00007.html
@HWLOC_BUILD_DOXYGEN_TRUE@@HWLOC_DOXYGEN_BROKEN_SHORT_NAMES_TRUE@ -@mv -f $(DOX_DIR)/latex/switchfromplpa.tex $(DOX_DIR)/latex/a00007.tex
#
# Rules for building the PDF

Просмотреть файл

@ -24,7 +24,7 @@
<h1><a class="anchor" id="termsanddefs">Terms and Definitions </a></h1><dl>
<dt>Object </dt>
<dd><p class="startdd">Interesting kind of part of the system, such as a Core, a Cache, a Memory node, etc. The different types detected by hwloc are detailed in the <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> enumeration.</p>
<dd><p class="startdd">Interesting kind of part of the system, such as a Core, a Cache, a Memory node, etc. The different types detected by hwloc are detailed in the <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> enumeration.</p>
<p>They are topologically sorted by CPU set into a tree. </p>
<p class="enddd"></p>
</dd>

Просмотреть файл

@ -29,7 +29,7 @@ lstopo</a></h2>
<p>Note that lstopo can read XML files and/or alternate chroot filesystems and display topological maps representing those systems (e.g., use lstopo to output an XML file on one system, and then use lstopo to read in that XML file and display it on a different system).</p>
<h2><a class="anchor" id="cli_hwloc_bind">
hwloc-bind</a></h2>
<p>hwloc-bind binds processes to specific hardware objects through a flexible syntax. A simple example is binding an executable to specific cores (or sockets or cpusets or ...). The hwloc-bind(1) man page provies much more detail on what is possible.</p>
<p>hwloc-bind binds processes to specific hardware objects through a flexible syntax. A simple example is binding an executable to specific cores (or sockets or cpusets or ...). The hwloc-bind(1) man page provides much more detail on what is possible.</p>
<p>hwloc-bind can also be used to retrieve the current process' binding.</p>
<h2><a class="anchor" id="cli_hwloc_calc">
hwloc-calc</a></h2>

Просмотреть файл

@ -25,15 +25,15 @@
<h1><a class="anchor" id="envvar">Environment variables </a></h1><p>The behavior of the hwloc library and tools may be tuned thanks to the following environment variables.</p>
<dl>
<dt>HWLOC_XMLFILE=/path/to/file.xml </dt>
<dd><p class="startdd">enforces the discovery from the given XML file as if <a class="el" href="a00030.html#ga93efcc8a962afe1ed23393700682173f" title="Enable XML-file based topology.">hwloc_topology_set_xml()</a> had been called. This file may have been generated earlier with lstopo file.xml. For conveniency, this backend provides empty binding hooks which just return success. To have hwloc still actually call OS-specific hooks, HWLOC_THISSYSTEM should be set 1 in the environment too, to assert that the loaded file is really the underlying system. </p>
<dd><p class="startdd">enforces the discovery from the given XML file as if <a class="el" href="a00031.html#ga93efcc8a962afe1ed23393700682173f" title="Enable XML-file based topology.">hwloc_topology_set_xml()</a> had been called. This file may have been generated earlier with lstopo file.xml. For convenience, this backend provides empty binding hooks which just return success. To have hwloc still actually call OS-specific hooks, HWLOC_THISSYSTEM should be set 1 in the environment too, to assert that the loaded file is really the underlying system. </p>
<p class="enddd"></p>
</dd>
<dt>HWLOC_FSROOT=/path/to/linux/filesystem-root/ </dt>
<dd><p class="startdd">switches to reading the topology from the specified Linux filesystem root instead of the main file-system root, as if <a class="el" href="a00030.html#ga2f6bfb6958d8b508ea1d7d5bb266432c" title="Change the file-system root path when building the topology from sysfs/procfs.">hwloc_topology_set_fsroot()</a> had been called. Not using the main file-system root causes <a class="el" href="a00032.html#ga0d109e33fc7990f62f665d336e5e5111" title="Does the topology context come from this system?">hwloc_topology_is_thissystem()</a> to return 0. For conveniency, this backend provides empty binding hooks which just return success. To have hwloc still actually call OS-specific hooks, HWLOC_THISSYSTEM should be set 1 in the environment too, to assert that the loaded file is really the underlying system. </p>
<dd><p class="startdd">switches to reading the topology from the specified Linux filesystem root instead of the main file-system root, as if <a class="el" href="a00031.html#ga2f6bfb6958d8b508ea1d7d5bb266432c" title="Change the file-system root path when building the topology from sysfs/procfs.">hwloc_topology_set_fsroot()</a> had been called. Not using the main file-system root causes <a class="el" href="a00033.html#ga0d109e33fc7990f62f665d336e5e5111" title="Does the topology context come from this system?">hwloc_topology_is_thissystem()</a> to return 0. For convenience, this backend provides empty binding hooks which just return success. To have hwloc still actually call OS-specific hooks, HWLOC_THISSYSTEM should be set 1 in the environment too, to assert that the loaded file is really the underlying system. </p>
<p class="enddd"></p>
</dd>
<dt>HWLOC_THISSYSTEM=1 </dt>
<dd><p class="startdd">enforces the return value of <a class="el" href="a00032.html#ga0d109e33fc7990f62f665d336e5e5111" title="Does the topology context come from this system?">hwloc_topology_is_thissystem()</a>. It means that it makes hwloc assume that the selected backend provides the topology for the system on which we are running, even if it is not the OS-specific backend but the XML backend for instance. This means making the binding functions actually call the OS-specific system calls and really do binding, while the XML backend would otherwise provide empty hooks just returning success. This can be used for efficiency reasons to first detect the topology once, save it to an XML file, and quickly reload it later through the XML backend, but still having binding functions actually do bind. </p>
<dd><p class="startdd">enforces the return value of <a class="el" href="a00033.html#ga0d109e33fc7990f62f665d336e5e5111" title="Does the topology context come from this system?">hwloc_topology_is_thissystem()</a>. It means that it makes hwloc assume that the selected backend provides the topology for the system on which we are running, even if it is not the OS-specific backend but the XML backend for instance. This means making the binding functions actually call the OS-specific system calls and really do binding, while the XML backend would otherwise provide empty hooks just returning success. This can be used for efficiency reasons to first detect the topology once, save it to an XML file, and quickly reload it later through the XML backend, but still having binding functions actually do bind. </p>
<p class="enddd"></p>
</dd>
</dl>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Thread safety</title>
<title>Hardware Locality (hwloc): Interoperability with other software</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -22,23 +22,23 @@
<div class="contents">
<h1><a class="anchor" id="threadsafety">Thread safety </a></h1><p>Like most libraries that mainly fill data structures, hwloc is not thread safe but rather reentrant: all state is held in a <a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> instance without mutex protection. That means, for example, that two threads can safely operate on and modify two different <a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> instances, but they should not simultaneously invoke functions that modify the <em>same</em> instance. Similarly, one thread should not modify a <a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> instance while another thread is reading or traversing it. However, two threads can safely read or traverse the same <a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> instance concurrently.</p>
<p>When running in multiprocessor environments, be aware that proper thread synchronization and/or memory coherency protection is needed to pass hwloc data (such as <a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> pointers) from one processor to another (e.g., a mutex, semaphore, or a memory barrier). Note that this is not a hwloc-specific requirement, but it is worth mentioning.</p>
<p>For reference, <a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> modification operations include (but may not be limited to):</p>
<h1><a class="anchor" id="interoperability">Interoperability with other software </a></h1><p>Although hwloc offers its own portable interface, it still may have to interoperate with specific or non-portable libraries that manipulate similar kinds of objects. hwloc therefore offers several specific "helpers" to assist converting between those specific interfaces and hwloc.</p>
<p>Some external libraries may be specific to a particular OS; others may not always be available. The hwloc core therefore generally does not explicitly depend on these types of libraries. However, when a custom application uses or otherwise depends on such a library, it may optionally include the corresponding hwloc helper to extend the hwloc interface with dedicated helpers.</p>
<dl>
<dt>Creation and destruction </dt>
<dd><p class="startdd"><code><a class="el" href="a00029.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init()</a>, <a class="el" href="a00029.html#ga91e2e6427b95fb7339c99dbbef996e71" title="Build the actual topology.">hwloc_topology_load()</a>, <a class="el" href="a00029.html#ga6040925d3ee4bbb2647f2a321aca5f4b" title="Terminate and free a topology context.">hwloc_topology_destroy()</a></code> (see <a class="el" href="a00029.html">Create and Destroy Topologies</a>) imply major modifications of the structure, including freeing some objects. No other thread cannot access the topology or any of its objects at the same time.</p>
<p>Also references to objects inside the topology are not valid anymore after these functions return. </p>
<dt>Linux specific features </dt>
<dd><p class="startdd"><a class="el" href="a00024_source.html" title="Macros to help interaction between hwloc and Linux.">hwloc/linux.h</a> offers Linux-specific helpers that utilize some non-portable features of the Linux system, such as binding threads through their thread ID ("tid") or parsing kernel CPU mask files. </p>
<p class="enddd"></p>
</dd>
<dt>Runtime topology modifications </dt>
<dd><p class="startdd"><code>hwloc_topology_insert_misc_object_by_*</code> (see <a class="el" href="a00031.html">Tinker with topologies.</a>) may modify the topology significantly by adding objects inside the tree, changing the topology depth, etc.</p>
<p>Although references to former objects <em>may</em> still be valid after insertion, it is strongly advised to not rely on any such guarantee and always re-consult the topology to reacquire new instances of objects. </p>
<dt>Linux libnuma </dt>
<dd><p class="startdd"><a class="el" href="a00023_source.html" title="Macros to help interaction between hwloc and Linux libnuma.">hwloc/linux-libnuma.h</a> provides conversion helpers between hwloc CPU sets and libnuma-specific types, such as nodemasks and bitmasks. It helps you use libnuma memory-binding functions with hwloc CPU sets. </p>
<p class="enddd"></p>
</dd>
<dt>Locating topologies </dt>
<dd><p class="startdd"><code>hwloc_topology_ignore*</code>, <code>hwloc_topology_set*</code> (see <a class="el" href="a00030.html">Configure Topology Detection</a>) do not modify the topology directly, but they do modify internal structures describing the behavior of the next invocation of <code><a class="el" href="a00029.html#ga91e2e6427b95fb7339c99dbbef996e71" title="Build the actual topology.">hwloc_topology_load()</a></code>. Hence, all of these functions should not be used concurrently.</p>
<p>Note that these functions do not modify the current topology until it is actually reloaded; it is possible to use them while other threads are only read the current topology. </p>
<dt>Glibc </dt>
<dd><p class="startdd"><a class="el" href="a00019_source.html" title="Macros to help interaction between hwloc and glibc scheduling routines.">hwloc/glibc-sched.h</a> offers conversion routines between Glibc and hwloc CPU sets in order to use hwloc with functions such as sched_setaffinity(). </p>
<p class="enddd"></p>
</dd>
<dt>OpenFabrics Verbs </dt>
<dd><p class="startdd"><a class="el" href="a00025_source.html" title="Macros to help interaction between hwloc and OpenFabrics verbs.">hwloc/openfabrics-verbs.h</a> helps interoperability with the OpenFabrics Verbs interface. For example, it can return a list of processors near an OpenFabrics device. </p>
<p class="enddd"></p>
</dd>
</dl>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Embedding hwloc in other software</title>
<title>Hardware Locality (hwloc): Thread safety</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -22,54 +22,26 @@
<div class="contents">
<h1><a class="anchor" id="embed">Embedding hwloc in other software </a></h1><p>It can be desirable to include hwloc in a larger software package (be sure to check out the LICENSE file) so that users don't have to separately download and install it before installing your software. This can be advantageous to ensure that your software uses a known-tested/good version of hwloc, or for use on systems that do not have hwloc pre-installed.</p>
<p>When used in "embedded" mode, hwloc will:</p>
<ul>
<li>not install any header files</li>
<li>not build any documentation files</li>
<li>not build or install any executables or tests</li>
<li>not build <code>libhwloc.*</code> -- instead, it will build <code>libhwloc_embedded.*</code></li>
</ul>
<p>There are two ways to put hwloc into "embedded" mode. The first is directly from the configure command line:</p>
<div class="fragment"><pre class="fragment">
shell$ ./configure --enable-embedded-mode ...
</pre></div><p>The second requires that your software project uses the GNU Autoconf / Automake / Libtool tool chain to build your software. If you do this, you can directly integrate hwloc's m4 configure macro into your configure script. You can then invoke hwloc's configuration tests and build setup by calling an m4 macro (see below).</p>
<h2><a class="anchor" id="embedding_m4">
Using hwloc's m4 embedding capabilities</a></h2>
<p>Every project is different, and there are many different ways of integrating hwloc into yours. What follows is <em>one</em> example of how to do it.</p>
<p>If your project uses recent versions Autoconf, Automake, and Libtool to build, you can use hwloc's embedded m4 capabilities. We have tested the embedded m4 with projects that use Autoconf 2.65, Automake 1.11.1, and Libtool 2.2.6b. Slightly earlier versions of may also work but are untested. Autoconf versions prior to 2.63 are almost certain to not work because hwloc uses macros that were introduced in 2.63.</p>
<p>You can either copy all the config/hwloc*m4 files from the hwloc source tree to the directory where your project's m4 files reside, or you can tell aclocal to find more m4 files in the embedded hwloc's "config" subdirectory (e.g., add "-Ipath/to/embedded/hwloc/config" to your Makefile.am's ACLOCAL_AMFLAGS).</p>
<p>The following macros can then be used from your configure script (only HWLOC_INIT <em>must</em> be invoked if using the m4 macros):</p>
<ul>
<li>HWLOC_INIT(config-dir-prefix, action-upon-success, action-upon-failure): Invoke the hwloc configuration tests and setup the hwloc tree to build. The first argument is the prefix to use for AC_OUTPUT files -- it's where the hwloc tree is located relative to <code>$top_srcdir</code>. Hence, if your embedded hwloc is located in the source tree at contrib/hwloc, you should pass <code>[contrib/hwloc]</code> as the first argument. If HWLOC_INIT and the rest of <code>configure</code> completes successfully, then "make" traversals of the hwloc tree with standard Automake targets (all, clean, install, etc.) should behave as expected. For example, it is safe to list the hwloc directory in the SUBDIRS of a higher-level Makefile.am. <b>NOTE: If the HWLOC_SET_SYMBOL_PREFIX macro is used, it must be invoked <em>before</em> HWLOC_INIT.</b></li>
</ul>
<ul>
<li>HWLOC_SET_SYMBOL_PREFIX(foo_): Tells the hwloc to prefix all of hwloc's types and public symbols with "foo_"; meaning that function hwloc_init() becomes foo_hwloc_init(). Enum values are prefixed with an upper-case translation if the prefix supplied; HWLOC_OBJ_SYSTEM becomes FOO_HWLOC_OBJ_SYSTEM. This is recommended behavior if you are including hwloc in middleware -- it is possible that your software will be combined with other software that links to another copy of hwloc. If both uses of hwloc utilize different symbol prefixes, there will be no type/symbol clashes, and everything will compile, link, and run successfully. If you both embed hwloc without changing the symbol prefix and also link against an external hwloc, you may get multiple symbol definitions when linking your final library or application.</li>
</ul>
<ul>
<li>HWLOC_DO_AM_CONDITIONALS: If you embed hwloc in a larger project and build it conditionally (e.g., if HWLOC_INIT is invoked conditionally), you must unconditionally invoke HWLOC_DO_AM_CONDITIONALS to avoid warnings from Automake (for the cases where hwloc is not selected to be built). This macro is necessary because hwloc uses some AM_CONDITIONALs to build itself, and AM_CONDITIONALs cannot be defined conditionally. Note that it is safe (but unnecessary) to call HWLOC_DO_AM_CONDITIONALS even if HWLOC_INIT is invoked unconditionally.</li>
</ul>
<p>NOTE: When using the HWLOC_INIT m4 macro, it may be necessary to explicitly invoke AC_CANONICAL_TARGET and/or AC_USE_SYSTEM_EXTENSIONS macros early in the configure script (e.g., after AC_INIT but before AM_INIT_AUTOMAKE). See the Autoconf documentation for further information.</p>
<h2><a class="anchor" id="embedding_example">
Example embedding hwloc</a></h2>
<p>Here's an example of integrating with a larger project named sandbox that already uses Autoconf, Automake, and Libtool to build itself:</p>
<div class="fragment"><pre class="fragment">
# First, cd into the sandbox project source tree
shell$ cd sandbox
shell$ cp -r /somewhere/else/hwloc-&lt;version&gt; my-embedded-hwloc
shell$ edit Makefile.am
1. Add "-Imy-embedded-hwloc/config" to ACLOCAL_AMFLAGS
2. Add "my-embedded-hwloc" to SUBDIRS
3. Add "$(HWLOC_EMBEDDED_LDADD)" to sandbox's executable's LDADD line
4. Add "$(HWLOC_EMBEDDED_CPPFLAGS)" to AM_CPPFLAGS
shell$ edit configure.ac
1. Add "HWLOC_SET_SYMBOL_PREFIX(sandbox_hwloc_)" line
2. Add "HWLOC_INIT([my-embedded-hwloc], [happy=yes], [happy=no])" line
3. Add error checking for happy=no case
shell$ edit sandbox.c
1. Add #include &lt;hwloc.h&gt;
2. Add calls to sandbox_hwloc_init() and other hwloc API functions
</pre></div><p>Now you can bootstrap, configure, build, and run the sandbox as normal -- all calls to "sandbox_hwloc_*" will use the embedded hwloc rather than any system-provided copy of hwloc. </p>
<h1><a class="anchor" id="threadsafety">Thread safety </a></h1><p>Like most libraries that mainly fill data structures, hwloc is not thread safe but rather reentrant: all state is held in a <a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> instance without mutex protection. That means, for example, that two threads can safely operate on and modify two different <a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> instances, but they should not simultaneously invoke functions that modify the <em>same</em> instance. Similarly, one thread should not modify a <a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> instance while another thread is reading or traversing it. However, two threads can safely read or traverse the same <a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> instance concurrently.</p>
<p>When running in multiprocessor environments, be aware that proper thread synchronization and/or memory coherency protection is needed to pass hwloc data (such as <a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> pointers) from one processor to another (e.g., a mutex, semaphore, or a memory barrier). Note that this is not a hwloc-specific requirement, but it is worth mentioning.</p>
<p>For reference, <a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> modification operations include (but may not be limited to):</p>
<dl>
<dt>Creation and destruction </dt>
<dd><p class="startdd"><code><a class="el" href="a00030.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init()</a>, <a class="el" href="a00030.html#ga91e2e6427b95fb7339c99dbbef996e71" title="Build the actual topology.">hwloc_topology_load()</a>, <a class="el" href="a00030.html#ga6040925d3ee4bbb2647f2a321aca5f4b" title="Terminate and free a topology context.">hwloc_topology_destroy()</a></code> (see <a class="el" href="a00030.html">Create and Destroy Topologies</a>) imply major modifications of the structure, including freeing some objects. No other thread cannot access the topology or any of its objects at the same time.</p>
<p>Also references to objects inside the topology are not valid anymore after these functions return. </p>
<p class="enddd"></p>
</dd>
<dt>Runtime topology modifications </dt>
<dd><p class="startdd"><code>hwloc_topology_insert_misc_object_by_*</code> (see <a class="el" href="a00032.html">Tinker with topologies.</a>) may modify the topology significantly by adding objects inside the tree, changing the topology depth, etc.</p>
<p>Although references to former objects <em>may</em> still be valid after insertion, it is strongly advised to not rely on any such guarantee and always re-consult the topology to reacquire new instances of objects. </p>
<p class="enddd"></p>
</dd>
<dt>Locating topologies </dt>
<dd><p class="startdd"><code>hwloc_topology_ignore*</code>, <code>hwloc_topology_set*</code> (see <a class="el" href="a00031.html">Configure Topology Detection</a>) do not modify the topology directly, but they do modify internal structures describing the behavior of the next invocation of <code><a class="el" href="a00030.html#ga91e2e6427b95fb7339c99dbbef996e71" title="Build the actual topology.">hwloc_topology_load()</a></code>. Hence, all of these functions should not be used concurrently.</p>
<p>Note that these functions do not modify the current topology until it is actually reloaded; it is possible to use them while other threads are only read the current topology. </p>
<p class="enddd"></p>
</dd>
</dl>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Switching from PLPA to hwloc</title>
<title>Hardware Locality (hwloc): Embedding hwloc in other software</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -22,29 +22,54 @@
<div class="contents">
<h1><a class="anchor" id="switchfromplpa">Switching from PLPA to hwloc </a></h1><p>Although PLPA and hwloc share some of the same ideas, their programming interfaces are quite different. After much debate, it was decided <em>not</em> to emulate the PLPA API with hwloc's API because hwloc's API is already far more rich than PLPA's.</p>
<p>More specifically, exploiting modern computing architecture <em>requires</em> the flexible functionality provided by the hwloc API -- the PLPA API is too rigid in its definitions and practices to handle the evolving server hardware landscape (e.g., PLPA only understands cores and sockets; hwloc understands a much larger set of hardware objects).</p>
<p>As such, even though it is fully possible to emulate the PLPA API with hwloc (e.g., only deal with sockets and cores), and while the documentation below describes how to do this, we encourage any existing PLPA application authors to actually re-think their application in terms of more than just sockets and cores. In short, we encourage you to use the full hwloc API to exploit <em>all</em> the hardware.</p>
<h2><a class="anchor" id="switchfromplpa_caching">
Topology context vs. caching</a></h2>
<p>First, all hwloc functions take a <code>topology</code> parameter. This parameter serves as an internal storage for the result of the topology discovery. It replaces PLPA's caching abilities and even lets you manipulate multiple topologies as the same time, if needed.</p>
<p>Thus, all programs should first run <a class="el" href="a00029.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init()</a> and <a class="el" href="a00029.html#ga6040925d3ee4bbb2647f2a321aca5f4b" title="Terminate and free a topology context.">hwloc_topology_destroy()</a> as they did plpa_init() and plpa_finalize() in the past.</p>
<h2><a class="anchor" id="switchfromplpa_hierarchy">
Hierarchy vs. Core@Socket</a></h2>
<p>PLPA was designed to understand only cores and sockets. hwloc offers many more different types of objects (e.g., cores, sockets, hardware threads, NUMA nodes, and others) and stores them within a tree of resources.</p>
<p>To emulate the PLPA model, it is possible to find sockets using functions such as <a class="el" href="a00033.html#gaabd26357fea30ceb7754ad970b9a0aaa" title="Returns the topology object at index index with type type.">hwloc_get_obj_by_type()</a>. Iterating over sockets is also possible using <a class="el" href="a00037.html#gad011fce572551516267de3c57241a326" title="Returns the next object of type type.">hwloc_get_next_obj_by_type()</a>. Then, finding a core within a socket may be done using <a class="el" href="a00038.html#ga1e4f92f59977be6f4d0f6e8219936a17" title="Return the idx -th object of type type included in CPU set set.">hwloc_get_obj_inside_cpuset_by_type()</a> or <a class="el" href="a00038.html#ga0e939b904fa1e255dde8b295e72b4f07" title="Return the next object of type type included in CPU set set.">hwloc_get_next_obj_inside_cpuset_by_type()</a>.</p>
<p>It is also possible to directly find an object "below" another object using <a class="el" href="a00042.html#ga80af44c7616bd27eb15949543e12cc9c" title="Find an object below another object, both specified by types and indexes.">hwloc_get_obj_below_by_type()</a> (or <a class="el" href="a00042.html#ga9af0c03238ebcd4b0e174656890a67dc" title="Find an object below a chain of objects specified by types and indexes.">hwloc_get_obj_below_array_by_type()</a>).</p>
<h2><a class="anchor" id="switchfromplpa_indexes">
Logical vs. Physical/OS indexes</a></h2>
<p>hwloc manipulates logical indexes, meaning indexes specified with regard to the ordering of objects in the hwloc-provided hierarchical tree. Physical or OS indexes may be entirely hidden if not strictly required. The reason for this is that physical/OS indexes may change with the OS or with the BIOS version. They may be non-consecutive, multiple objects may have the same physical/OS indexes, making their manipulation tricky and highly non-portable.</p>
<p>Note that hwloc tries very hard to always present a hierarchical tree with the same logical ordering, regardless of physical or OS index ordering.</p>
<p>It is still possible to retrieve physical/OS indexes through the <code>os_index</code> field of objects, but such practice should be avoided as much as possible for the reasons described above (except perhaps for prettyprinting / debugging purposes).</p>
<p><a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a> objects are supposed to have different physical/OS indexes since the OS uses them for binding. The <code>os_index</code> field of these objects provides the identifier that may be used for such binding, and hwloc_get_proc_obj_by_os_index() finds the object associated with a specfic OS index.</p>
<p>But as mentioned above, we discourage the use of these conversion methods for actual binding. Instead, hwloc offers its own binding model using the <code>cpuset</code> field of objects. These cpusets may be duplicated, modified, combined, etc. (see <a class="el" href="a00017_source.html" title="The Cpuset API, for use in hwloc itself.">hwloc/cpuset.h</a> for details) and then passed to <a class="el" href="a00035.html#ga42f02baaf7dc0c0f5a6bbeca731fd144" title="Bind current process or thread on cpus given in cpuset set.">hwloc_set_cpubind()</a> for binding.</p>
<h2><a class="anchor" id="switchfromplpa_counting">
Counting specification</a></h2>
<p>PLPA offers a countspec parameter to specify whether counting all CPUs, only the online ones or only the offline ones. However, some operating systems do not expose the topology of offline CPUs (i.e., offline CPUs are not reported at all by the OS). Also, some processors may not be visible to the current application due to administrative restrictions. Finally, some processors let you shutdown a single hardware thread in a core, making some of the PLPA features irrelevant.</p>
<p>hwloc stores in the hierarchical tree of objects all CPUs that have known topology information. It then provides the applications with several cpusets that contain the list of CPUs that are actually known, that have topology information, that are online, or that are available to the application. These cpusets may be retrieved with <a class="el" href="a00044.html#gac3626396192ce01ad6a4811d9d29306b" title="Get online CPU set.">hwloc_topology_get_online_cpuset()</a> and other similar functions to filter the object that are relevant or not. </p>
<h1><a class="anchor" id="embed">Embedding hwloc in other software </a></h1><p>It can be desirable to include hwloc in a larger software package (be sure to check out the LICENSE file) so that users don't have to separately download and install it before installing your software. This can be advantageous to ensure that your software uses a known-tested/good version of hwloc, or for use on systems that do not have hwloc pre-installed.</p>
<p>When used in "embedded" mode, hwloc will:</p>
<ul>
<li>not install any header files</li>
<li>not build any documentation files</li>
<li>not build or install any executables or tests</li>
<li>not build <code>libhwloc.*</code> -- instead, it will build <code>libhwloc_embedded.*</code></li>
</ul>
<p>There are two ways to put hwloc into "embedded" mode. The first is directly from the configure command line:</p>
<div class="fragment"><pre class="fragment">
shell$ ./configure --enable-embedded-mode ...
</pre></div><p>The second requires that your software project uses the GNU Autoconf / Automake / Libtool tool chain to build your software. If you do this, you can directly integrate hwloc's m4 configure macro into your configure script. You can then invoke hwloc's configuration tests and build setup by calling an m4 macro (see below).</p>
<h2><a class="anchor" id="embedding_m4">
Using hwloc's m4 embedding capabilities</a></h2>
<p>Every project is different, and there are many different ways of integrating hwloc into yours. What follows is <em>one</em> example of how to do it.</p>
<p>If your project uses recent versions Autoconf, Automake, and Libtool to build, you can use hwloc's embedded m4 capabilities. We have tested the embedded m4 with projects that use Autoconf 2.65, Automake 1.11.1, and Libtool 2.2.6b. Slightly earlier versions of may also work but are untested. Autoconf versions prior to 2.63 are almost certain to not work because hwloc uses macros that were introduced in 2.63.</p>
<p>You can either copy all the config/hwloc*m4 files from the hwloc source tree to the directory where your project's m4 files reside, or you can tell aclocal to find more m4 files in the embedded hwloc's "config" subdirectory (e.g., add "-Ipath/to/embedded/hwloc/config" to your Makefile.am's ACLOCAL_AMFLAGS).</p>
<p>The following macros can then be used from your configure script (only HWLOC_INIT <em>must</em> be invoked if using the m4 macros):</p>
<ul>
<li>HWLOC_INIT(config-dir-prefix, action-upon-success, action-upon-failure): Invoke the hwloc configuration tests and setup the hwloc tree to build. The first argument is the prefix to use for AC_OUTPUT files -- it's where the hwloc tree is located relative to <code>$top_srcdir</code>. Hence, if your embedded hwloc is located in the source tree at contrib/hwloc, you should pass <code>[contrib/hwloc]</code> as the first argument. If HWLOC_INIT and the rest of <code>configure</code> completes successfully, then "make" traversals of the hwloc tree with standard Automake targets (all, clean, install, etc.) should behave as expected. For example, it is safe to list the hwloc directory in the SUBDIRS of a higher-level Makefile.am. <b>NOTE: If the HWLOC_SET_SYMBOL_PREFIX macro is used, it must be invoked <em>before</em> HWLOC_INIT.</b></li>
</ul>
<ul>
<li>HWLOC_SET_SYMBOL_PREFIX(foo_): Tells the hwloc to prefix all of hwloc's types and public symbols with "foo_"; meaning that function hwloc_init() becomes foo_hwloc_init(). Enum values are prefixed with an upper-case translation if the prefix supplied; HWLOC_OBJ_SYSTEM becomes FOO_HWLOC_OBJ_SYSTEM. This is recommended behavior if you are including hwloc in middleware -- it is possible that your software will be combined with other software that links to another copy of hwloc. If both uses of hwloc utilize different symbol prefixes, there will be no type/symbol clashes, and everything will compile, link, and run successfully. If you both embed hwloc without changing the symbol prefix and also link against an external hwloc, you may get multiple symbol definitions when linking your final library or application.</li>
</ul>
<ul>
<li>HWLOC_DO_AM_CONDITIONALS: If you embed hwloc in a larger project and build it conditionally (e.g., if HWLOC_INIT is invoked conditionally), you must unconditionally invoke HWLOC_DO_AM_CONDITIONALS to avoid warnings from Automake (for the cases where hwloc is not selected to be built). This macro is necessary because hwloc uses some AM_CONDITIONALs to build itself, and AM_CONDITIONALs cannot be defined conditionally. Note that it is safe (but unnecessary) to call HWLOC_DO_AM_CONDITIONALS even if HWLOC_INIT is invoked unconditionally.</li>
</ul>
<p>NOTE: When using the HWLOC_INIT m4 macro, it may be necessary to explicitly invoke AC_CANONICAL_TARGET and/or AC_USE_SYSTEM_EXTENSIONS macros early in the configure script (e.g., after AC_INIT but before AM_INIT_AUTOMAKE). See the Autoconf documentation for further information.</p>
<h2><a class="anchor" id="embedding_example">
Example embedding hwloc</a></h2>
<p>Here's an example of integrating with a larger project named sandbox that already uses Autoconf, Automake, and Libtool to build itself:</p>
<div class="fragment"><pre class="fragment">
# First, cd into the sandbox project source tree
shell$ cd sandbox
shell$ cp -r /somewhere/else/hwloc-&lt;version&gt; my-embedded-hwloc
shell$ edit Makefile.am
1. Add "-Imy-embedded-hwloc/config" to ACLOCAL_AMFLAGS
2. Add "my-embedded-hwloc" to SUBDIRS
3. Add "$(HWLOC_EMBEDDED_LDADD)" to sandbox's executable's LDADD line
4. Add "$(HWLOC_EMBEDDED_CPPFLAGS)" to AM_CPPFLAGS
shell$ edit configure.ac
1. Add "HWLOC_SET_SYMBOL_PREFIX(sandbox_hwloc_)" line
2. Add "HWLOC_INIT([my-embedded-hwloc], [happy=yes], [happy=no])" line
3. Add error checking for happy=no case
shell$ edit sandbox.c
1. Add #include &lt;hwloc.h&gt;
2. Add calls to sandbox_hwloc_init() and other hwloc API functions
</pre></div><p>Now you can bootstrap, configure, build, and run the sandbox as normal -- all calls to "sandbox_hwloc_*" will use the embedded hwloc rather than any system-provided copy of hwloc. </p>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): hwloc_obj_attr_u::hwloc_cache_attr_s Struct Reference</title>
<title>Hardware Locality (hwloc): Switching from PLPA to hwloc</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -12,70 +12,39 @@
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li class="current"><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00011.html">hwloc_obj_attr_u</a>::<a class="el" href="a00007.html">hwloc_cache_attr_s</a>
</div>
</div>
<div class="contents">
<h1>hwloc_obj_attr_u::hwloc_cache_attr_s Struct Reference</h1><!-- doxytag: class="hwloc_obj_attr_u::hwloc_cache_attr_s" -->
<p>Cache-specific Object Attributes.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="a00021_source.html">hwloc.h</a>&gt;</code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint64_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00007.html#a3c68235220554308f89768f281ad1e62">size</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Size of cache in bytes. <a href="#a3c68235220554308f89768f281ad1e62"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00007.html#a5c8f7f39193736c2187ed626940835d5">depth</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Depth of cache. <a href="#a5c8f7f39193736c2187ed626940835d5"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Cache-specific Object Attributes. </p>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="a5c8f7f39193736c2187ed626940835d5"></a><!-- doxytag: member="hwloc_obj_attr_u::hwloc_cache_attr_s::depth" ref="a5c8f7f39193736c2187ed626940835d5" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="a00007.html#a5c8f7f39193736c2187ed626940835d5">hwloc_obj_attr_u::hwloc_cache_attr_s::depth</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Depth of cache. </p>
</div>
</div>
<a class="anchor" id="a3c68235220554308f89768f281ad1e62"></a><!-- doxytag: member="hwloc_obj_attr_u::hwloc_cache_attr_s::size" ref="a3c68235220554308f89768f281ad1e62" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint64_t <a class="el" href="a00007.html#a3c68235220554308f89768f281ad1e62">hwloc_obj_attr_u::hwloc_cache_attr_s::size</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Size of cache in bytes. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="a00021_source.html">hwloc.h</a></li>
</ul>
<h1><a class="anchor" id="switchfromplpa">Switching from PLPA to hwloc </a></h1><p>Although PLPA and hwloc share some of the same ideas, their programming interfaces are quite different. After much debate, it was decided <em>not</em> to emulate the PLPA API with hwloc's API because hwloc's API is already far more rich than PLPA's.</p>
<p>More specifically, exploiting modern computing architecture <em>requires</em> the flexible functionality provided by the hwloc API -- the PLPA API is too rigid in its definitions and practices to handle the evolving server hardware landscape (e.g., PLPA only understands cores and sockets; hwloc understands a much larger set of hardware objects).</p>
<p>As such, even though it is fully possible to emulate the PLPA API with hwloc (e.g., only deal with sockets and cores), and while the documentation below describes how to do this, we encourage any existing PLPA application authors to actually re-think their application in terms of more than just sockets and cores. In short, we encourage you to use the full hwloc API to exploit <em>all</em> the hardware.</p>
<h2><a class="anchor" id="switchfromplpa_caching">
Topology context vs. caching</a></h2>
<p>First, all hwloc functions take a <code>topology</code> parameter. This parameter serves as an internal storage for the result of the topology discovery. It replaces PLPA's caching abilities and even lets you manipulate multiple topologies as the same time, if needed.</p>
<p>Thus, all programs should first run <a class="el" href="a00030.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init()</a> and <a class="el" href="a00030.html#ga6040925d3ee4bbb2647f2a321aca5f4b" title="Terminate and free a topology context.">hwloc_topology_destroy()</a> as they did plpa_init() and plpa_finalize() in the past.</p>
<h2><a class="anchor" id="switchfromplpa_hierarchy">
Hierarchy vs. Core@Socket</a></h2>
<p>PLPA was designed to understand only cores and sockets. hwloc offers many more different types of objects (e.g., cores, sockets, hardware threads, NUMA nodes, and others) and stores them within a tree of resources.</p>
<p>To emulate the PLPA model, it is possible to find sockets using functions such as <a class="el" href="a00034.html#ga701f83b2cf0cb8e0acd58cd2dc1c67a2" title="Returns the topology object at index index with type type.">hwloc_get_obj_by_type()</a>. Iterating over sockets is also possible using <a class="el" href="a00038.html#ga5f08ceb69375341e73563cfe2e77534e" title="Returns the next object of type type.">hwloc_get_next_obj_by_type()</a>. Then, finding a core within a socket may be done using <a class="el" href="a00039.html#ga50a80a0021e5843d968c3b97aebaad9b" title="Return the idx -th object of type type included in CPU set set.">hwloc_get_obj_inside_cpuset_by_type()</a> or <a class="el" href="a00039.html#ga934e7ecd68b33403e0c0be779d9ed1e6" title="Return the next object of type type included in CPU set set.">hwloc_get_next_obj_inside_cpuset_by_type()</a>.</p>
<p>It is also possible to directly find an object "below" another object using <a class="el" href="a00043.html#ga3d32c128aa36b5c9d56f6bf9e70d0e78" title="Find an object below another object, both specified by types and indexes.">hwloc_get_obj_below_by_type()</a> (or <a class="el" href="a00043.html#ga340bb7021204078c30382ea77d38bde9" title="Find an object below a chain of objects specified by types and indexes.">hwloc_get_obj_below_array_by_type()</a>).</p>
<h2><a class="anchor" id="switchfromplpa_indexes">
Logical vs. Physical/OS indexes</a></h2>
<p>hwloc manipulates logical indexes, meaning indexes specified with regard to the ordering of objects in the hwloc-provided hierarchical tree. Physical or OS indexes may be entirely hidden if not strictly required. The reason for this is that physical/OS indexes may change with the OS or with the BIOS version. They may be non-consecutive, multiple objects may have the same physical/OS indexes, making their manipulation tricky and highly non-portable.</p>
<p>Note that hwloc tries very hard to always present a hierarchical tree with the same logical ordering, regardless of physical or OS index ordering.</p>
<p>It is still possible to retrieve physical/OS indexes through the <code>os_index</code> field of objects, but such practice should be avoided as much as possible for the reasons described above (except perhaps for prettyprinting / debugging purposes).</p>
<p><a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a> objects are supposed to have different physical/OS indexes since the OS uses them for binding. The <code>os_index</code> field of these objects provides the identifier that may be used for such binding, and hwloc_get_proc_obj_by_os_index() finds the object associated with a specific OS index.</p>
<p>But as mentioned above, we discourage the use of these conversion methods for actual binding. Instead, hwloc offers its own binding model using the <code>cpuset</code> field of objects. These cpusets may be duplicated, modified, combined, etc. (see <a class="el" href="a00018_source.html" title="The Cpuset API, for use in hwloc itself.">hwloc/cpuset.h</a> for details) and then passed to <a class="el" href="a00036.html#ga42f02baaf7dc0c0f5a6bbeca731fd144" title="Bind current process or thread on cpus given in cpuset set.">hwloc_set_cpubind()</a> for binding.</p>
<h2><a class="anchor" id="switchfromplpa_counting">
Counting specification</a></h2>
<p>PLPA offers a countspec parameter to specify whether counting all CPUs, only the online ones or only the offline ones. However, some operating systems do not expose the topology of offline CPUs (i.e., offline CPUs are not reported at all by the OS). Also, some processors may not be visible to the current application due to administrative restrictions. Finally, some processors let you shutdown a single hardware thread in a core, making some of the PLPA features irrelevant.</p>
<p>hwloc stores in the hierarchical tree of objects all CPUs that have known topology information. It then provides the applications with several cpusets that contain the list of CPUs that are actually known, that have topology information, that are online, or that are available to the application. These cpusets may be retrieved with <a class="el" href="a00045.html#gad00abc77f1670049a5b2139471d0c8db" title="Get online CPU set.">hwloc_topology_get_online_cpuset()</a> and other similar functions to filter the object that are relevant or not. </p>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): hwloc_obj_attr_u::hwloc_group_attr_s Struct Reference</title>
<title>Hardware Locality (hwloc): hwloc_obj_attr_u::hwloc_cache_attr_s Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -24,40 +24,57 @@
<li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00011.html">hwloc_obj_attr_u</a>::<a class="el" href="a00008.html">hwloc_group_attr_s</a>
<div class="navpath"><a class="el" href="a00012.html">hwloc_obj_attr_u</a>::<a class="el" href="a00008.html">hwloc_cache_attr_s</a>
</div>
</div>
<div class="contents">
<h1>hwloc_obj_attr_u::hwloc_group_attr_s Struct Reference</h1><!-- doxytag: class="hwloc_obj_attr_u::hwloc_group_attr_s" -->
<p>Group-specific Object Attributes.
<h1>hwloc_obj_attr_u::hwloc_cache_attr_s Struct Reference</h1><!-- doxytag: class="hwloc_obj_attr_u::hwloc_cache_attr_s" -->
<p>Cache-specific Object Attributes.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="a00021_source.html">hwloc.h</a>&gt;</code></p>
<p><code>#include &lt;<a class="el" href="a00022_source.html">hwloc.h</a>&gt;</code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00008.html#ad914eac61c77481e1b7037877bcc5579">depth</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Depth of group object. <a href="#ad914eac61c77481e1b7037877bcc5579"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint64_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00008.html#a3c68235220554308f89768f281ad1e62">size</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Size of cache in bytes. <a href="#a3c68235220554308f89768f281ad1e62"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00008.html#a5c8f7f39193736c2187ed626940835d5">depth</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Depth of cache. <a href="#a5c8f7f39193736c2187ed626940835d5"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Group-specific Object Attributes. </p>
<p>Cache-specific Object Attributes. </p>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="ad914eac61c77481e1b7037877bcc5579"></a><!-- doxytag: member="hwloc_obj_attr_u::hwloc_group_attr_s::depth" ref="ad914eac61c77481e1b7037877bcc5579" args="" -->
<a class="anchor" id="a5c8f7f39193736c2187ed626940835d5"></a><!-- doxytag: member="hwloc_obj_attr_u::hwloc_cache_attr_s::depth" ref="a5c8f7f39193736c2187ed626940835d5" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="a00008.html#ad914eac61c77481e1b7037877bcc5579">hwloc_obj_attr_u::hwloc_group_attr_s::depth</a></td>
<td class="memname">unsigned <a class="el" href="a00008.html#a5c8f7f39193736c2187ed626940835d5">hwloc_obj_attr_u::hwloc_cache_attr_s::depth</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Depth of group object. </p>
<p>Depth of cache. </p>
</div>
</div>
<a class="anchor" id="a3c68235220554308f89768f281ad1e62"></a><!-- doxytag: member="hwloc_obj_attr_u::hwloc_cache_attr_s::size" ref="a3c68235220554308f89768f281ad1e62" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint64_t <a class="el" href="a00008.html#a3c68235220554308f89768f281ad1e62">hwloc_obj_attr_u::hwloc_cache_attr_s::size</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Size of cache in bytes. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="a00021_source.html">hwloc.h</a></li>
<li><a class="el" href="a00022_source.html">hwloc.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): hwloc_obj_attr_u::hwloc_machine_attr_s Struct Reference</title>
<title>Hardware Locality (hwloc): hwloc_obj_attr_u::hwloc_group_attr_s Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -24,57 +24,40 @@
<li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00011.html">hwloc_obj_attr_u</a>::<a class="el" href="a00009.html">hwloc_machine_attr_s</a>
<div class="navpath"><a class="el" href="a00012.html">hwloc_obj_attr_u</a>::<a class="el" href="a00009.html">hwloc_group_attr_s</a>
</div>
</div>
<div class="contents">
<h1>hwloc_obj_attr_u::hwloc_machine_attr_s Struct Reference</h1><!-- doxytag: class="hwloc_obj_attr_u::hwloc_machine_attr_s" -->
<p>Machine-specific Object Attributes.
<h1>hwloc_obj_attr_u::hwloc_group_attr_s Struct Reference</h1><!-- doxytag: class="hwloc_obj_attr_u::hwloc_group_attr_s" -->
<p>Group-specific Object Attributes.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="a00021_source.html">hwloc.h</a>&gt;</code></p>
<p><code>#include &lt;<a class="el" href="a00022_source.html">hwloc.h</a>&gt;</code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00009.html#aae85be0b4ebb86501718c4b460df5167">dmi_board_vendor</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">DMI board vendor name. <a href="#aae85be0b4ebb86501718c4b460df5167"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00009.html#a8b99af84fd38753a91c861f0e856b461">dmi_board_name</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">DMI board model name. <a href="#a8b99af84fd38753a91c861f0e856b461"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00009.html#ad914eac61c77481e1b7037877bcc5579">depth</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Depth of group object. <a href="#ad914eac61c77481e1b7037877bcc5579"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Machine-specific Object Attributes. </p>
<p>Group-specific Object Attributes. </p>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="a8b99af84fd38753a91c861f0e856b461"></a><!-- doxytag: member="hwloc_obj_attr_u::hwloc_machine_attr_s::dmi_board_name" ref="a8b99af84fd38753a91c861f0e856b461" args="" -->
<a class="anchor" id="ad914eac61c77481e1b7037877bcc5579"></a><!-- doxytag: member="hwloc_obj_attr_u::hwloc_group_attr_s::depth" ref="ad914eac61c77481e1b7037877bcc5579" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="a00009.html#a8b99af84fd38753a91c861f0e856b461">hwloc_obj_attr_u::hwloc_machine_attr_s::dmi_board_name</a></td>
<td class="memname">unsigned <a class="el" href="a00009.html#ad914eac61c77481e1b7037877bcc5579">hwloc_obj_attr_u::hwloc_group_attr_s::depth</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>DMI board model name. </p>
</div>
</div>
<a class="anchor" id="aae85be0b4ebb86501718c4b460df5167"></a><!-- doxytag: member="hwloc_obj_attr_u::hwloc_machine_attr_s::dmi_board_vendor" ref="aae85be0b4ebb86501718c4b460df5167" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="a00009.html#aae85be0b4ebb86501718c4b460df5167">hwloc_obj_attr_u::hwloc_machine_attr_s::dmi_board_vendor</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>DMI board vendor name. </p>
<p>Depth of group object. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="a00021_source.html">hwloc.h</a></li>
<li><a class="el" href="a00022_source.html">hwloc.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): hwloc_obj Struct Reference</title>
<title>Hardware Locality (hwloc): hwloc_obj_attr_u::hwloc_machine_attr_s Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -24,483 +24,57 @@
<li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00012.html">hwloc_obj_attr_u</a>::<a class="el" href="a00010.html">hwloc_machine_attr_s</a>
</div>
</div>
<div class="contents">
<h1>hwloc_obj Struct Reference<br/>
<small>
[<a class="el" href="a00028.html">Topology Objects</a>]</small>
</h1><!-- doxytag: class="hwloc_obj" -->
<p>Structure of a topology object.
<h1>hwloc_obj_attr_u::hwloc_machine_attr_s Struct Reference</h1><!-- doxytag: class="hwloc_obj_attr_u::hwloc_machine_attr_s" -->
<p>Machine-specific Object Attributes.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="a00021_source.html">hwloc.h</a>&gt;</code></p>
<p><code>#include &lt;<a class="el" href="a00022_source.html">hwloc.h</a>&gt;</code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#acc4f0803f244867e68fe0036800be5de">type</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Type of object. <a href="#acc4f0803f244867e68fe0036800be5de"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a61a7a80a68eaccbaaa28269e678c81a9">os_index</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">OS-provided physical index number. <a href="#a61a7a80a68eaccbaaa28269e678c81a9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#abb709ec38f2970677e4e57d1d30be96d">name</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Object description if any. <a href="#abb709ec38f2970677e4e57d1d30be96d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00013.html">hwloc_obj_memory_s</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a1dc830816716213b5f797e4052487864">memory</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Memory attributes. <a href="#a1dc830816716213b5f797e4052487864"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">union <a class="el" href="a00011.html">hwloc_obj_attr_u</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#accd40e29f71f19e88db62ea3df02adc8">attr</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Object type-specific Attributes. <a href="#accd40e29f71f19e88db62ea3df02adc8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5">depth</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vertical index in the hierarchy. <a href="#a9d82690370275d42d652eccdea5d3ee5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a0d07fb7b8935e137c94d75a3eb492ae9">logical_index</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Horizontal index in the whole list of similar objects, could be a "cousin_rank" since it's the rank within the "cousin" list below. <a href="#a0d07fb7b8935e137c94d75a3eb492ae9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">signed&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a68766f0b1c4d61b5bad87e3b81dacfde">os_level</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">OS-provided physical level, -1 if unknown or meaningless. <a href="#a68766f0b1c4d61b5bad87e3b81dacfde"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00010.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a85a788017457129589318b6c39451acf">next_cousin</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Next object of same type. <a href="#a85a788017457129589318b6c39451acf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00010.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#ac715989f55ff5a0eb6be2969ee477ec0">prev_cousin</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Previous object of same type. <a href="#ac715989f55ff5a0eb6be2969ee477ec0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00010.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#adc494f6aed939992be1c55cca5822900">parent</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parent, <code>NULL</code> if root (system object). <a href="#adc494f6aed939992be1c55cca5822900"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#aaa6043eee6f55869933c1d974efd9acd">sibling_rank</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Index in parent's <code>children</code>[] array. <a href="#aaa6043eee6f55869933c1d974efd9acd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00010.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a7f2343ed476fe4942e6fffd4cade1b40">next_sibling</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Next object below the same parent. <a href="#a7f2343ed476fe4942e6fffd4cade1b40"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00010.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a7b89e8c189876c0158a9282aaaf17f50">prev_sibling</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Previous object below the same parent. <a href="#a7b89e8c189876c0158a9282aaaf17f50"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#aac3f6da35c9b57599909a44ce2b716c1">arity</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of children. <a href="#aac3f6da35c9b57599909a44ce2b716c1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00010.html">hwloc_obj</a> **&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a04d05403da37bfe17cd63b7c7dd07b1f">children</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Children, <code>children</code>[0 .. arity -1]. <a href="#a04d05403da37bfe17cd63b7c7dd07b1f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00010.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#af51d08a0a79dba517c06c5afedc8d2dc">first_child</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">First child. <a href="#af51d08a0a79dba517c06c5afedc8d2dc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00010.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a84bd65634dbc55f4158b74443a9bd04f">last_child</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Last child. <a href="#a84bd65634dbc55f4158b74443a9bd04f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a76fd3ac94401cf32dfccc3a3a8de68a5">userdata</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Application-given private data pointer, initialized to <code>NULL</code>, use it as you wish. <a href="#a76fd3ac94401cf32dfccc3a3a8de68a5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f">cpuset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">CPUs covered by this object. <a href="#a67925e0f2c47f50408fbdb9bddd0790f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a91788a9da687beb7224cc1fd7b75208c">complete_cpuset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The complete CPU set of logical processors of this object,. <a href="#a91788a9da687beb7224cc1fd7b75208c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a8842d56c2975380f327ea401c5f53564">online_cpuset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The CPU set of online logical processors. <a href="#a8842d56c2975380f327ea401c5f53564"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#afa3c59a6dd3da8ffa48710780a1bfb34">allowed_cpuset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The CPU set of allowed logical processors. <a href="#afa3c59a6dd3da8ffa48710780a1bfb34"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a79982ede313c2190505fc5e3714a16fb">nodeset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">NUMA nodes covered by this object or containing this object. <a href="#a79982ede313c2190505fc5e3714a16fb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#adc473a52c071d7fd49e659ac90467a0f">complete_nodeset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The complete NUMA node set of this object,. <a href="#adc473a52c071d7fd49e659ac90467a0f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a9c1af614e0978a65ce309f921a822c8b">allowed_nodeset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The set of allowed NUMA memory nodes. <a href="#a9c1af614e0978a65ce309f921a822c8b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#aae85be0b4ebb86501718c4b460df5167">dmi_board_vendor</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">DMI board vendor name. <a href="#aae85be0b4ebb86501718c4b460df5167"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html#a8b99af84fd38753a91c861f0e856b461">dmi_board_name</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">DMI board model name. <a href="#a8b99af84fd38753a91c861f0e856b461"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Structure of a topology object. </p>
<p>Applications mustn't modify any field except userdata . </p>
<p>Machine-specific Object Attributes. </p>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="afa3c59a6dd3da8ffa48710780a1bfb34"></a><!-- doxytag: member="hwloc_obj::allowed_cpuset" ref="afa3c59a6dd3da8ffa48710780a1bfb34" args="" -->
<a class="anchor" id="a8b99af84fd38753a91c861f0e856b461"></a><!-- doxytag: member="hwloc_obj_attr_u::hwloc_machine_attr_s::dmi_board_name" ref="a8b99af84fd38753a91c861f0e856b461" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00010.html#afa3c59a6dd3da8ffa48710780a1bfb34">hwloc_obj::allowed_cpuset</a></td>
<td class="memname">char* <a class="el" href="a00010.html#a8b99af84fd38753a91c861f0e856b461">hwloc_obj_attr_u::hwloc_machine_attr_s::dmi_board_name</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The CPU set of allowed logical processors. </p>
<p>This includes the CPUs contained in this object which are allowed for binding, i.e. passing them to the hwloc binding functions should not return permission errors. This is usually restricted by administration rules. Some of them may however be offline so binding to them may still not be possible, see online_cpuset.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
<p>DMI board model name. </p>
</div>
</div>
<a class="anchor" id="a9c1af614e0978a65ce309f921a822c8b"></a><!-- doxytag: member="hwloc_obj::allowed_nodeset" ref="a9c1af614e0978a65ce309f921a822c8b" args="" -->
<a class="anchor" id="aae85be0b4ebb86501718c4b460df5167"></a><!-- doxytag: member="hwloc_obj_attr_u::hwloc_machine_attr_s::dmi_board_vendor" ref="aae85be0b4ebb86501718c4b460df5167" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00010.html#a9c1af614e0978a65ce309f921a822c8b">hwloc_obj::allowed_nodeset</a></td>
<td class="memname">char* <a class="el" href="a00010.html#aae85be0b4ebb86501718c4b460df5167">hwloc_obj_attr_u::hwloc_machine_attr_s::dmi_board_vendor</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The set of allowed NUMA memory nodes. </p>
<p>This includes the NUMA memory nodes contained in this object which are allowed for memory allocation, i.e. passing them to NUMA node-directed memory allocation should not return permission errors. This is usually restricted by administration rules.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
</div>
</div>
<a class="anchor" id="aac3f6da35c9b57599909a44ce2b716c1"></a><!-- doxytag: member="hwloc_obj::arity" ref="aac3f6da35c9b57599909a44ce2b716c1" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="a00010.html#aac3f6da35c9b57599909a44ce2b716c1">hwloc_obj::arity</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Number of children. </p>
</div>
</div>
<a class="anchor" id="accd40e29f71f19e88db62ea3df02adc8"></a><!-- doxytag: member="hwloc_obj::attr" ref="accd40e29f71f19e88db62ea3df02adc8" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">union <a class="el" href="a00011.html">hwloc_obj_attr_u</a>* <a class="el" href="a00010.html#accd40e29f71f19e88db62ea3df02adc8">hwloc_obj::attr</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Object type-specific Attributes. </p>
</div>
</div>
<a class="anchor" id="a04d05403da37bfe17cd63b7c7dd07b1f"></a><!-- doxytag: member="hwloc_obj::children" ref="a04d05403da37bfe17cd63b7c7dd07b1f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00010.html">hwloc_obj</a>** <a class="el" href="a00010.html#a04d05403da37bfe17cd63b7c7dd07b1f">hwloc_obj::children</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Children, <code>children</code>[0 .. arity -1]. </p>
</div>
</div>
<a class="anchor" id="a91788a9da687beb7224cc1fd7b75208c"></a><!-- doxytag: member="hwloc_obj::complete_cpuset" ref="a91788a9da687beb7224cc1fd7b75208c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00010.html#a91788a9da687beb7224cc1fd7b75208c">hwloc_obj::complete_cpuset</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The complete CPU set of logical processors of this object,. </p>
<p>This includes not only the same as the cpuset field, but also the CPUs for which topology information is unknown or incomplete, and the CPUs that are ignored when the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set. Thus no corresponding PU object may be found in the topology, because the precise position is undefined. It is however known that it would be somewhere under this object.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
</div>
</div>
<a class="anchor" id="adc473a52c071d7fd49e659ac90467a0f"></a><!-- doxytag: member="hwloc_obj::complete_nodeset" ref="adc473a52c071d7fd49e659ac90467a0f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00010.html#adc473a52c071d7fd49e659ac90467a0f">hwloc_obj::complete_nodeset</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The complete NUMA node set of this object,. </p>
<p>This includes not only the same as the nodeset field, but also the NUMA nodes for which topology information is unknown or incomplete, and the nodes that are ignored when the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set. Thus no corresponding NODE object may be found in the topology, because the precise position is undefined. It is however known that it would be somewhere under this object.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
</div>
</div>
<a class="anchor" id="a67925e0f2c47f50408fbdb9bddd0790f"></a><!-- doxytag: member="hwloc_obj::cpuset" ref="a67925e0f2c47f50408fbdb9bddd0790f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f">hwloc_obj::cpuset</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>CPUs covered by this object. </p>
<p>This is the set of CPUs for which there are PU objects in the topology under this object, i.e. which are known to be physically contained in this object and known how (the children path between this object and the PU objects).</p>
<p>If the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set, some of these CPUs may be offline, or not allowed for binding, see online_cpuset and allowed_cpuset.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
</div>
</div>
<a class="anchor" id="a9d82690370275d42d652eccdea5d3ee5"></a><!-- doxytag: member="hwloc_obj::depth" ref="a9d82690370275d42d652eccdea5d3ee5" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5">hwloc_obj::depth</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Vertical index in the hierarchy. </p>
</div>
</div>
<a class="anchor" id="af51d08a0a79dba517c06c5afedc8d2dc"></a><!-- doxytag: member="hwloc_obj::first_child" ref="af51d08a0a79dba517c06c5afedc8d2dc" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00010.html">hwloc_obj</a>* <a class="el" href="a00010.html#af51d08a0a79dba517c06c5afedc8d2dc">hwloc_obj::first_child</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>First child. </p>
</div>
</div>
<a class="anchor" id="a84bd65634dbc55f4158b74443a9bd04f"></a><!-- doxytag: member="hwloc_obj::last_child" ref="a84bd65634dbc55f4158b74443a9bd04f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00010.html">hwloc_obj</a>* <a class="el" href="a00010.html#a84bd65634dbc55f4158b74443a9bd04f">hwloc_obj::last_child</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Last child. </p>
</div>
</div>
<a class="anchor" id="a0d07fb7b8935e137c94d75a3eb492ae9"></a><!-- doxytag: member="hwloc_obj::logical_index" ref="a0d07fb7b8935e137c94d75a3eb492ae9" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="a00010.html#a0d07fb7b8935e137c94d75a3eb492ae9">hwloc_obj::logical_index</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Horizontal index in the whole list of similar objects, could be a "cousin_rank" since it's the rank within the "cousin" list below. </p>
</div>
</div>
<a class="anchor" id="a1dc830816716213b5f797e4052487864"></a><!-- doxytag: member="hwloc_obj::memory" ref="a1dc830816716213b5f797e4052487864" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00013.html">hwloc_obj_memory_s</a> <a class="el" href="a00010.html#a1dc830816716213b5f797e4052487864">hwloc_obj::memory</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Memory attributes. </p>
</div>
</div>
<a class="anchor" id="abb709ec38f2970677e4e57d1d30be96d"></a><!-- doxytag: member="hwloc_obj::name" ref="abb709ec38f2970677e4e57d1d30be96d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="a00010.html#abb709ec38f2970677e4e57d1d30be96d">hwloc_obj::name</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Object description if any. </p>
</div>
</div>
<a class="anchor" id="a85a788017457129589318b6c39451acf"></a><!-- doxytag: member="hwloc_obj::next_cousin" ref="a85a788017457129589318b6c39451acf" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00010.html">hwloc_obj</a>* <a class="el" href="a00010.html#a85a788017457129589318b6c39451acf">hwloc_obj::next_cousin</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Next object of same type. </p>
</div>
</div>
<a class="anchor" id="a7f2343ed476fe4942e6fffd4cade1b40"></a><!-- doxytag: member="hwloc_obj::next_sibling" ref="a7f2343ed476fe4942e6fffd4cade1b40" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00010.html">hwloc_obj</a>* <a class="el" href="a00010.html#a7f2343ed476fe4942e6fffd4cade1b40">hwloc_obj::next_sibling</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Next object below the same parent. </p>
</div>
</div>
<a class="anchor" id="a79982ede313c2190505fc5e3714a16fb"></a><!-- doxytag: member="hwloc_obj::nodeset" ref="a79982ede313c2190505fc5e3714a16fb" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00010.html#a79982ede313c2190505fc5e3714a16fb">hwloc_obj::nodeset</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>NUMA nodes covered by this object or containing this object. </p>
<p>This is the set of NUMA nodes for which there are NODE objects in the topology under or above this object, i.e. which are known to be physically contained in this object or containing it and known how (the children path between this object and the NODE objects).</p>
<p>If the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set, some of these nodes may not be allowed for allocation, see allowed_nodeset.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
</div>
</div>
<a class="anchor" id="a8842d56c2975380f327ea401c5f53564"></a><!-- doxytag: member="hwloc_obj::online_cpuset" ref="a8842d56c2975380f327ea401c5f53564" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00010.html#a8842d56c2975380f327ea401c5f53564">hwloc_obj::online_cpuset</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The CPU set of online logical processors. </p>
<p>This includes the CPUs contained in this object that are online, i.e. draw power and can execute threads. It may however not be allowed to bind to them due to administration rules, see allowed_cpuset.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
</div>
</div>
<a class="anchor" id="a61a7a80a68eaccbaaa28269e678c81a9"></a><!-- doxytag: member="hwloc_obj::os_index" ref="a61a7a80a68eaccbaaa28269e678c81a9" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="a00010.html#a61a7a80a68eaccbaaa28269e678c81a9">hwloc_obj::os_index</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>OS-provided physical index number. </p>
</div>
</div>
<a class="anchor" id="a68766f0b1c4d61b5bad87e3b81dacfde"></a><!-- doxytag: member="hwloc_obj::os_level" ref="a68766f0b1c4d61b5bad87e3b81dacfde" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">signed <a class="el" href="a00010.html#a68766f0b1c4d61b5bad87e3b81dacfde">hwloc_obj::os_level</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>OS-provided physical level, -1 if unknown or meaningless. </p>
</div>
</div>
<a class="anchor" id="adc494f6aed939992be1c55cca5822900"></a><!-- doxytag: member="hwloc_obj::parent" ref="adc494f6aed939992be1c55cca5822900" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00010.html">hwloc_obj</a>* <a class="el" href="a00010.html#adc494f6aed939992be1c55cca5822900">hwloc_obj::parent</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Parent, <code>NULL</code> if root (system object). </p>
</div>
</div>
<a class="anchor" id="ac715989f55ff5a0eb6be2969ee477ec0"></a><!-- doxytag: member="hwloc_obj::prev_cousin" ref="ac715989f55ff5a0eb6be2969ee477ec0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00010.html">hwloc_obj</a>* <a class="el" href="a00010.html#ac715989f55ff5a0eb6be2969ee477ec0">hwloc_obj::prev_cousin</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Previous object of same type. </p>
</div>
</div>
<a class="anchor" id="a7b89e8c189876c0158a9282aaaf17f50"></a><!-- doxytag: member="hwloc_obj::prev_sibling" ref="a7b89e8c189876c0158a9282aaaf17f50" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00010.html">hwloc_obj</a>* <a class="el" href="a00010.html#a7b89e8c189876c0158a9282aaaf17f50">hwloc_obj::prev_sibling</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Previous object below the same parent. </p>
</div>
</div>
<a class="anchor" id="aaa6043eee6f55869933c1d974efd9acd"></a><!-- doxytag: member="hwloc_obj::sibling_rank" ref="aaa6043eee6f55869933c1d974efd9acd" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="a00010.html#aaa6043eee6f55869933c1d974efd9acd">hwloc_obj::sibling_rank</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Index in parent's <code>children</code>[] array. </p>
</div>
</div>
<a class="anchor" id="acc4f0803f244867e68fe0036800be5de"></a><!-- doxytag: member="hwloc_obj::type" ref="acc4f0803f244867e68fe0036800be5de" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> <a class="el" href="a00010.html#acc4f0803f244867e68fe0036800be5de">hwloc_obj::type</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Type of object. </p>
</div>
</div>
<a class="anchor" id="a76fd3ac94401cf32dfccc3a3a8de68a5"></a><!-- doxytag: member="hwloc_obj::userdata" ref="a76fd3ac94401cf32dfccc3a3a8de68a5" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* <a class="el" href="a00010.html#a76fd3ac94401cf32dfccc3a3a8de68a5">hwloc_obj::userdata</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Application-given private data pointer, initialized to <code>NULL</code>, use it as you wish. </p>
<p>DMI board vendor name. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="a00021_source.html">hwloc.h</a></li>
<li><a class="el" href="a00022_source.html">hwloc.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): hwloc_obj_attr_u Union Reference</title>
<title>Hardware Locality (hwloc): hwloc_obj Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -26,83 +26,481 @@
</div>
</div>
<div class="contents">
<h1>hwloc_obj_attr_u Union Reference<br/>
<h1>hwloc_obj Struct Reference<br/>
<small>
[<a class="el" href="a00028.html">Topology Objects</a>]</small>
</h1><!-- doxytag: class="hwloc_obj_attr_u" -->
<p>Object type-specific Attributes.
[<a class="el" href="a00029.html">Topology Objects</a>]</small>
</h1><!-- doxytag: class="hwloc_obj" -->
<p>Structure of a topology object.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="a00021_source.html">hwloc.h</a>&gt;</code></p>
<p><code>#include &lt;<a class="el" href="a00022_source.html">hwloc.h</a>&gt;</code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00007.html">hwloc_cache_attr_s</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cache-specific Object Attributes. <a href="a00007.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00008.html">hwloc_group_attr_s</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Group-specific Object Attributes. <a href="a00008.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00009.html">hwloc_machine_attr_s</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Machine-specific Object Attributes. <a href="a00009.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <br class="typebreak"/>
<a class="el" href="a00007.html">hwloc_obj_attr_u::hwloc_cache_attr_s</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#ab5a8ae3bf490e6b1071fea53f7382836">cache</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cache-specific Object Attributes. <a href="#ab5a8ae3bf490e6b1071fea53f7382836"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <br class="typebreak"/>
<a class="el" href="a00009.html">hwloc_obj_attr_u::hwloc_machine_attr_s</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a5b42966df7c5bfdc36891e414cc31607">machine</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Machine-specific Object Attributes. <a href="#a5b42966df7c5bfdc36891e414cc31607"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <br class="typebreak"/>
<a class="el" href="a00008.html">hwloc_obj_attr_u::hwloc_group_attr_s</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#ae4ba157cc313e2cdd9a82f1c1df7aaa6">group</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Group-specific Object Attributes. <a href="#ae4ba157cc313e2cdd9a82f1c1df7aaa6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#acc4f0803f244867e68fe0036800be5de">type</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Type of object. <a href="#acc4f0803f244867e68fe0036800be5de"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a61a7a80a68eaccbaaa28269e678c81a9">os_index</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">OS-provided physical index number. <a href="#a61a7a80a68eaccbaaa28269e678c81a9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#abb709ec38f2970677e4e57d1d30be96d">name</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Object description if any. <a href="#abb709ec38f2970677e4e57d1d30be96d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00014.html">hwloc_obj_memory_s</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a1dc830816716213b5f797e4052487864">memory</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Memory attributes. <a href="#a1dc830816716213b5f797e4052487864"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">union <a class="el" href="a00012.html">hwloc_obj_attr_u</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#accd40e29f71f19e88db62ea3df02adc8">attr</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Object type-specific Attributes. <a href="#accd40e29f71f19e88db62ea3df02adc8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5">depth</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vertical index in the hierarchy. <a href="#a9d82690370275d42d652eccdea5d3ee5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a0d07fb7b8935e137c94d75a3eb492ae9">logical_index</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Horizontal index in the whole list of similar objects, could be a "cousin_rank" since it's the rank within the "cousin" list below. <a href="#a0d07fb7b8935e137c94d75a3eb492ae9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">signed&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a68766f0b1c4d61b5bad87e3b81dacfde">os_level</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">OS-provided physical level, -1 if unknown or meaningless. <a href="#a68766f0b1c4d61b5bad87e3b81dacfde"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00011.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a85a788017457129589318b6c39451acf">next_cousin</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Next object of same type. <a href="#a85a788017457129589318b6c39451acf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00011.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#ac715989f55ff5a0eb6be2969ee477ec0">prev_cousin</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Previous object of same type. <a href="#ac715989f55ff5a0eb6be2969ee477ec0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00011.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#adc494f6aed939992be1c55cca5822900">parent</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parent, <code>NULL</code> if root (system object). <a href="#adc494f6aed939992be1c55cca5822900"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#aaa6043eee6f55869933c1d974efd9acd">sibling_rank</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Index in parent's <code>children</code>[] array. <a href="#aaa6043eee6f55869933c1d974efd9acd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00011.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a7f2343ed476fe4942e6fffd4cade1b40">next_sibling</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Next object below the same parent. <a href="#a7f2343ed476fe4942e6fffd4cade1b40"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00011.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a7b89e8c189876c0158a9282aaaf17f50">prev_sibling</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Previous object below the same parent. <a href="#a7b89e8c189876c0158a9282aaaf17f50"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#aac3f6da35c9b57599909a44ce2b716c1">arity</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of children. <a href="#aac3f6da35c9b57599909a44ce2b716c1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00011.html">hwloc_obj</a> **&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a04d05403da37bfe17cd63b7c7dd07b1f">children</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Children, <code>children</code>[0 .. arity -1]. <a href="#a04d05403da37bfe17cd63b7c7dd07b1f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00011.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#af51d08a0a79dba517c06c5afedc8d2dc">first_child</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">First child. <a href="#af51d08a0a79dba517c06c5afedc8d2dc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="a00011.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a84bd65634dbc55f4158b74443a9bd04f">last_child</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Last child. <a href="#a84bd65634dbc55f4158b74443a9bd04f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a76fd3ac94401cf32dfccc3a3a8de68a5">userdata</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Application-given private data pointer, initialized to <code>NULL</code>, use it as you wish. <a href="#a76fd3ac94401cf32dfccc3a3a8de68a5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f">cpuset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">CPUs covered by this object. <a href="#a67925e0f2c47f50408fbdb9bddd0790f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a91788a9da687beb7224cc1fd7b75208c">complete_cpuset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The complete CPU set of logical processors of this object,. <a href="#a91788a9da687beb7224cc1fd7b75208c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a8842d56c2975380f327ea401c5f53564">online_cpuset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The CPU set of online logical processors. <a href="#a8842d56c2975380f327ea401c5f53564"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#afa3c59a6dd3da8ffa48710780a1bfb34">allowed_cpuset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The CPU set of allowed logical processors. <a href="#afa3c59a6dd3da8ffa48710780a1bfb34"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a79982ede313c2190505fc5e3714a16fb">nodeset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">NUMA nodes covered by this object or containing this object. <a href="#a79982ede313c2190505fc5e3714a16fb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#adc473a52c071d7fd49e659ac90467a0f">complete_nodeset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The complete NUMA node set of this object,. <a href="#adc473a52c071d7fd49e659ac90467a0f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html#a9c1af614e0978a65ce309f921a822c8b">allowed_nodeset</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The set of allowed NUMA memory nodes. <a href="#a9c1af614e0978a65ce309f921a822c8b"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Object type-specific Attributes. </p>
<p>Structure of a topology object. </p>
<p>Applications mustn't modify any field except userdata . </p>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="ab5a8ae3bf490e6b1071fea53f7382836"></a><!-- doxytag: member="hwloc_obj_attr_u::cache" ref="ab5a8ae3bf490e6b1071fea53f7382836" args="" -->
<a class="anchor" id="afa3c59a6dd3da8ffa48710780a1bfb34"></a><!-- doxytag: member="hwloc_obj::allowed_cpuset" ref="afa3c59a6dd3da8ffa48710780a1bfb34" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00007.html">hwloc_obj_attr_u::hwloc_cache_attr_s</a> <a class="el" href="a00011.html#ab5a8ae3bf490e6b1071fea53f7382836">hwloc_obj_attr_u::cache</a></td>
<td class="memname"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00011.html#afa3c59a6dd3da8ffa48710780a1bfb34">hwloc_obj::allowed_cpuset</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Cache-specific Object Attributes. </p>
<p>The CPU set of allowed logical processors. </p>
<p>This includes the CPUs contained in this object which are allowed for binding, i.e. passing them to the hwloc binding functions should not return permission errors. This is usually restricted by administration rules. Some of them may however be offline so binding to them may still not be possible, see online_cpuset.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
</div>
</div>
<a class="anchor" id="ae4ba157cc313e2cdd9a82f1c1df7aaa6"></a><!-- doxytag: member="hwloc_obj_attr_u::group" ref="ae4ba157cc313e2cdd9a82f1c1df7aaa6" args="" -->
<a class="anchor" id="a9c1af614e0978a65ce309f921a822c8b"></a><!-- doxytag: member="hwloc_obj::allowed_nodeset" ref="a9c1af614e0978a65ce309f921a822c8b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00008.html">hwloc_obj_attr_u::hwloc_group_attr_s</a> <a class="el" href="a00011.html#ae4ba157cc313e2cdd9a82f1c1df7aaa6">hwloc_obj_attr_u::group</a></td>
<td class="memname"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00011.html#a9c1af614e0978a65ce309f921a822c8b">hwloc_obj::allowed_nodeset</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Group-specific Object Attributes. </p>
<p>The set of allowed NUMA memory nodes. </p>
<p>This includes the NUMA memory nodes contained in this object which are allowed for memory allocation, i.e. passing them to NUMA node-directed memory allocation should not return permission errors. This is usually restricted by administration rules.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
</div>
</div>
<a class="anchor" id="a5b42966df7c5bfdc36891e414cc31607"></a><!-- doxytag: member="hwloc_obj_attr_u::machine" ref="a5b42966df7c5bfdc36891e414cc31607" args="" -->
<a class="anchor" id="aac3f6da35c9b57599909a44ce2b716c1"></a><!-- doxytag: member="hwloc_obj::arity" ref="aac3f6da35c9b57599909a44ce2b716c1" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00009.html">hwloc_obj_attr_u::hwloc_machine_attr_s</a> <a class="el" href="a00011.html#a5b42966df7c5bfdc36891e414cc31607">hwloc_obj_attr_u::machine</a></td>
<td class="memname">unsigned <a class="el" href="a00011.html#aac3f6da35c9b57599909a44ce2b716c1">hwloc_obj::arity</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Machine-specific Object Attributes. </p>
<p>Number of children. </p>
</div>
</div>
<hr/>The documentation for this union was generated from the following file:<ul>
<li><a class="el" href="a00021_source.html">hwloc.h</a></li>
<a class="anchor" id="accd40e29f71f19e88db62ea3df02adc8"></a><!-- doxytag: member="hwloc_obj::attr" ref="accd40e29f71f19e88db62ea3df02adc8" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">union <a class="el" href="a00012.html">hwloc_obj_attr_u</a>* <a class="el" href="a00011.html#accd40e29f71f19e88db62ea3df02adc8">hwloc_obj::attr</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Object type-specific Attributes. </p>
</div>
</div>
<a class="anchor" id="a04d05403da37bfe17cd63b7c7dd07b1f"></a><!-- doxytag: member="hwloc_obj::children" ref="a04d05403da37bfe17cd63b7c7dd07b1f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00011.html">hwloc_obj</a>** <a class="el" href="a00011.html#a04d05403da37bfe17cd63b7c7dd07b1f">hwloc_obj::children</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Children, <code>children</code>[0 .. arity -1]. </p>
</div>
</div>
<a class="anchor" id="a91788a9da687beb7224cc1fd7b75208c"></a><!-- doxytag: member="hwloc_obj::complete_cpuset" ref="a91788a9da687beb7224cc1fd7b75208c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00011.html#a91788a9da687beb7224cc1fd7b75208c">hwloc_obj::complete_cpuset</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The complete CPU set of logical processors of this object,. </p>
<p>This includes not only the same as the cpuset field, but also the CPUs for which topology information is unknown or incomplete, and the CPUs that are ignored when the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set. Thus no corresponding PU object may be found in the topology, because the precise position is undefined. It is however known that it would be somewhere under this object.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
</div>
</div>
<a class="anchor" id="adc473a52c071d7fd49e659ac90467a0f"></a><!-- doxytag: member="hwloc_obj::complete_nodeset" ref="adc473a52c071d7fd49e659ac90467a0f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00011.html#adc473a52c071d7fd49e659ac90467a0f">hwloc_obj::complete_nodeset</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The complete NUMA node set of this object,. </p>
<p>This includes not only the same as the nodeset field, but also the NUMA nodes for which topology information is unknown or incomplete, and the nodes that are ignored when the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM flag is not set. Thus no corresponding NODE object may be found in the topology, because the precise position is undefined. It is however known that it would be somewhere under this object.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
</div>
</div>
<a class="anchor" id="a67925e0f2c47f50408fbdb9bddd0790f"></a><!-- doxytag: member="hwloc_obj::cpuset" ref="a67925e0f2c47f50408fbdb9bddd0790f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f">hwloc_obj::cpuset</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>CPUs covered by this object. </p>
<p>This is the set of CPUs for which there are PU objects in the topology under this object, i.e. which are known to be physically contained in this object and known how (the children path between this object and the PU objects).</p>
<p>If the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set, some of these CPUs may be offline, or not allowed for binding, see online_cpuset and allowed_cpuset.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
</div>
</div>
<a class="anchor" id="a9d82690370275d42d652eccdea5d3ee5"></a><!-- doxytag: member="hwloc_obj::depth" ref="a9d82690370275d42d652eccdea5d3ee5" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5">hwloc_obj::depth</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Vertical index in the hierarchy. </p>
</div>
</div>
<a class="anchor" id="af51d08a0a79dba517c06c5afedc8d2dc"></a><!-- doxytag: member="hwloc_obj::first_child" ref="af51d08a0a79dba517c06c5afedc8d2dc" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00011.html">hwloc_obj</a>* <a class="el" href="a00011.html#af51d08a0a79dba517c06c5afedc8d2dc">hwloc_obj::first_child</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>First child. </p>
</div>
</div>
<a class="anchor" id="a84bd65634dbc55f4158b74443a9bd04f"></a><!-- doxytag: member="hwloc_obj::last_child" ref="a84bd65634dbc55f4158b74443a9bd04f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00011.html">hwloc_obj</a>* <a class="el" href="a00011.html#a84bd65634dbc55f4158b74443a9bd04f">hwloc_obj::last_child</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Last child. </p>
</div>
</div>
<a class="anchor" id="a0d07fb7b8935e137c94d75a3eb492ae9"></a><!-- doxytag: member="hwloc_obj::logical_index" ref="a0d07fb7b8935e137c94d75a3eb492ae9" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="a00011.html#a0d07fb7b8935e137c94d75a3eb492ae9">hwloc_obj::logical_index</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Horizontal index in the whole list of similar objects, could be a "cousin_rank" since it's the rank within the "cousin" list below. </p>
</div>
</div>
<a class="anchor" id="a1dc830816716213b5f797e4052487864"></a><!-- doxytag: member="hwloc_obj::memory" ref="a1dc830816716213b5f797e4052487864" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00014.html">hwloc_obj_memory_s</a> <a class="el" href="a00011.html#a1dc830816716213b5f797e4052487864">hwloc_obj::memory</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Memory attributes. </p>
</div>
</div>
<a class="anchor" id="abb709ec38f2970677e4e57d1d30be96d"></a><!-- doxytag: member="hwloc_obj::name" ref="abb709ec38f2970677e4e57d1d30be96d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char* <a class="el" href="a00011.html#abb709ec38f2970677e4e57d1d30be96d">hwloc_obj::name</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Object description if any. </p>
</div>
</div>
<a class="anchor" id="a85a788017457129589318b6c39451acf"></a><!-- doxytag: member="hwloc_obj::next_cousin" ref="a85a788017457129589318b6c39451acf" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00011.html">hwloc_obj</a>* <a class="el" href="a00011.html#a85a788017457129589318b6c39451acf">hwloc_obj::next_cousin</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Next object of same type. </p>
</div>
</div>
<a class="anchor" id="a7f2343ed476fe4942e6fffd4cade1b40"></a><!-- doxytag: member="hwloc_obj::next_sibling" ref="a7f2343ed476fe4942e6fffd4cade1b40" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00011.html">hwloc_obj</a>* <a class="el" href="a00011.html#a7f2343ed476fe4942e6fffd4cade1b40">hwloc_obj::next_sibling</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Next object below the same parent. </p>
</div>
</div>
<a class="anchor" id="a79982ede313c2190505fc5e3714a16fb"></a><!-- doxytag: member="hwloc_obj::nodeset" ref="a79982ede313c2190505fc5e3714a16fb" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00011.html#a79982ede313c2190505fc5e3714a16fb">hwloc_obj::nodeset</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>NUMA nodes covered by this object or containing this object. </p>
<p>This is the set of NUMA nodes for which there are NODE objects in the topology under or above this object, i.e. which are known to be physically contained in this object or containing it and known how (the children path between this object and the NODE objects).</p>
<p>If the HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM configuration flag is set, some of these nodes may not be allowed for allocation, see allowed_nodeset.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
</div>
</div>
<a class="anchor" id="a8842d56c2975380f327ea401c5f53564"></a><!-- doxytag: member="hwloc_obj::online_cpuset" ref="a8842d56c2975380f327ea401c5f53564" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> <a class="el" href="a00011.html#a8842d56c2975380f327ea401c5f53564">hwloc_obj::online_cpuset</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The CPU set of online logical processors. </p>
<p>This includes the CPUs contained in this object that are online, i.e. draw power and can execute threads. It may however not be allowed to bind to them due to administration rules, see allowed_cpuset.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Its value must not be changed, hwloc_cpuset_dup must be used instead. </dd></dl>
</div>
</div>
<a class="anchor" id="a61a7a80a68eaccbaaa28269e678c81a9"></a><!-- doxytag: member="hwloc_obj::os_index" ref="a61a7a80a68eaccbaaa28269e678c81a9" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="a00011.html#a61a7a80a68eaccbaaa28269e678c81a9">hwloc_obj::os_index</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>OS-provided physical index number. </p>
</div>
</div>
<a class="anchor" id="a68766f0b1c4d61b5bad87e3b81dacfde"></a><!-- doxytag: member="hwloc_obj::os_level" ref="a68766f0b1c4d61b5bad87e3b81dacfde" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">signed <a class="el" href="a00011.html#a68766f0b1c4d61b5bad87e3b81dacfde">hwloc_obj::os_level</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>OS-provided physical level, -1 if unknown or meaningless. </p>
</div>
</div>
<a class="anchor" id="adc494f6aed939992be1c55cca5822900"></a><!-- doxytag: member="hwloc_obj::parent" ref="adc494f6aed939992be1c55cca5822900" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00011.html">hwloc_obj</a>* <a class="el" href="a00011.html#adc494f6aed939992be1c55cca5822900">hwloc_obj::parent</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Parent, <code>NULL</code> if root (system object). </p>
</div>
</div>
<a class="anchor" id="ac715989f55ff5a0eb6be2969ee477ec0"></a><!-- doxytag: member="hwloc_obj::prev_cousin" ref="ac715989f55ff5a0eb6be2969ee477ec0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00011.html">hwloc_obj</a>* <a class="el" href="a00011.html#ac715989f55ff5a0eb6be2969ee477ec0">hwloc_obj::prev_cousin</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Previous object of same type. </p>
</div>
</div>
<a class="anchor" id="a7b89e8c189876c0158a9282aaaf17f50"></a><!-- doxytag: member="hwloc_obj::prev_sibling" ref="a7b89e8c189876c0158a9282aaaf17f50" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00011.html">hwloc_obj</a>* <a class="el" href="a00011.html#a7b89e8c189876c0158a9282aaaf17f50">hwloc_obj::prev_sibling</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Previous object below the same parent. </p>
</div>
</div>
<a class="anchor" id="aaa6043eee6f55869933c1d974efd9acd"></a><!-- doxytag: member="hwloc_obj::sibling_rank" ref="aaa6043eee6f55869933c1d974efd9acd" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="a00011.html#aaa6043eee6f55869933c1d974efd9acd">hwloc_obj::sibling_rank</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Index in parent's <code>children</code>[] array. </p>
</div>
</div>
<a class="anchor" id="acc4f0803f244867e68fe0036800be5de"></a><!-- doxytag: member="hwloc_obj::type" ref="acc4f0803f244867e68fe0036800be5de" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> <a class="el" href="a00011.html#acc4f0803f244867e68fe0036800be5de">hwloc_obj::type</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Type of object. </p>
</div>
</div>
<a class="anchor" id="a76fd3ac94401cf32dfccc3a3a8de68a5"></a><!-- doxytag: member="hwloc_obj::userdata" ref="a76fd3ac94401cf32dfccc3a3a8de68a5" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* <a class="el" href="a00011.html#a76fd3ac94401cf32dfccc3a3a8de68a5">hwloc_obj::userdata</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Application-given private data pointer, initialized to <code>NULL</code>, use it as you wish. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="a00022_source.html">hwloc.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): hwloc_obj_memory_s::hwloc_obj_memory_page_type_s Struct Reference</title>
<title>Hardware Locality (hwloc): hwloc_obj_attr_u Union Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -24,58 +24,85 @@
<li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00013.html">hwloc_obj_memory_s</a>::<a class="el" href="a00012.html">hwloc_obj_memory_page_type_s</a>
</div>
</div>
<div class="contents">
<h1>hwloc_obj_memory_s::hwloc_obj_memory_page_type_s Struct Reference</h1><!-- doxytag: class="hwloc_obj_memory_s::hwloc_obj_memory_page_type_s" -->
<p>Array of local memory page types, <code>NULL</code> if no local memory and <code>page_types</code> is 0.
<h1>hwloc_obj_attr_u Union Reference<br/>
<small>
[<a class="el" href="a00029.html">Topology Objects</a>]</small>
</h1><!-- doxytag: class="hwloc_obj_attr_u" -->
<p>Object type-specific Attributes.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="a00021_source.html">hwloc.h</a>&gt;</code></p>
<p><code>#include &lt;<a class="el" href="a00022_source.html">hwloc.h</a>&gt;</code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00008.html">hwloc_cache_attr_s</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cache-specific Object Attributes. <a href="a00008.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00009.html">hwloc_group_attr_s</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Group-specific Object Attributes. <a href="a00009.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html">hwloc_machine_attr_s</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Machine-specific Object Attributes. <a href="a00010.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint64_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00012.html#af0619463fb5d10052b7fe3495a66d74b">size</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Size of pages. <a href="#af0619463fb5d10052b7fe3495a66d74b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint64_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00012.html#ab5d01db7b26177a6b5361107cad152c3">count</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of pages of this size. <a href="#ab5d01db7b26177a6b5361107cad152c3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <br class="typebreak"/>
<a class="el" href="a00008.html">hwloc_obj_attr_u::hwloc_cache_attr_s</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00012.html#ab5a8ae3bf490e6b1071fea53f7382836">cache</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cache-specific Object Attributes. <a href="#ab5a8ae3bf490e6b1071fea53f7382836"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <br class="typebreak"/>
<a class="el" href="a00010.html">hwloc_obj_attr_u::hwloc_machine_attr_s</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00012.html#a5b42966df7c5bfdc36891e414cc31607">machine</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Machine-specific Object Attributes. <a href="#a5b42966df7c5bfdc36891e414cc31607"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <br class="typebreak"/>
<a class="el" href="a00009.html">hwloc_obj_attr_u::hwloc_group_attr_s</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00012.html#ae4ba157cc313e2cdd9a82f1c1df7aaa6">group</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Group-specific Object Attributes. <a href="#ae4ba157cc313e2cdd9a82f1c1df7aaa6"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Array of local memory page types, <code>NULL</code> if no local memory and <code>page_types</code> is 0. </p>
<p>The array is sorted by increasing <code>size</code> fields. It contains <code>page_types_len</code> slots. </p>
<p>Object type-specific Attributes. </p>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="ab5d01db7b26177a6b5361107cad152c3"></a><!-- doxytag: member="hwloc_obj_memory_s::hwloc_obj_memory_page_type_s::count" ref="ab5d01db7b26177a6b5361107cad152c3" args="" -->
<a class="anchor" id="ab5a8ae3bf490e6b1071fea53f7382836"></a><!-- doxytag: member="hwloc_obj_attr_u::cache" ref="ab5a8ae3bf490e6b1071fea53f7382836" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint64_t <a class="el" href="a00012.html#ab5d01db7b26177a6b5361107cad152c3">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s::count</a></td>
<td class="memname">struct <a class="el" href="a00008.html">hwloc_obj_attr_u::hwloc_cache_attr_s</a> <a class="el" href="a00012.html#ab5a8ae3bf490e6b1071fea53f7382836">hwloc_obj_attr_u::cache</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Number of pages of this size. </p>
<p>Cache-specific Object Attributes. </p>
</div>
</div>
<a class="anchor" id="af0619463fb5d10052b7fe3495a66d74b"></a><!-- doxytag: member="hwloc_obj_memory_s::hwloc_obj_memory_page_type_s::size" ref="af0619463fb5d10052b7fe3495a66d74b" args="" -->
<a class="anchor" id="ae4ba157cc313e2cdd9a82f1c1df7aaa6"></a><!-- doxytag: member="hwloc_obj_attr_u::group" ref="ae4ba157cc313e2cdd9a82f1c1df7aaa6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint64_t <a class="el" href="a00012.html#af0619463fb5d10052b7fe3495a66d74b">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s::size</a></td>
<td class="memname">struct <a class="el" href="a00009.html">hwloc_obj_attr_u::hwloc_group_attr_s</a> <a class="el" href="a00012.html#ae4ba157cc313e2cdd9a82f1c1df7aaa6">hwloc_obj_attr_u::group</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Size of pages. </p>
<p>Group-specific Object Attributes. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="a00021_source.html">hwloc.h</a></li>
<a class="anchor" id="a5b42966df7c5bfdc36891e414cc31607"></a><!-- doxytag: member="hwloc_obj_attr_u::machine" ref="a5b42966df7c5bfdc36891e414cc31607" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00010.html">hwloc_obj_attr_u::hwloc_machine_attr_s</a> <a class="el" href="a00012.html#a5b42966df7c5bfdc36891e414cc31607">hwloc_obj_attr_u::machine</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Machine-specific Object Attributes. </p>
</div>
</div>
<hr/>The documentation for this union was generated from the following file:<ul>
<li><a class="el" href="a00022_source.html">hwloc.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): hwloc_obj_memory_s Struct Reference</title>
<title>Hardware Locality (hwloc): hwloc_obj_memory_s::hwloc_obj_memory_page_type_s Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -24,97 +24,58 @@
<li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00014.html">hwloc_obj_memory_s</a>::<a class="el" href="a00013.html">hwloc_obj_memory_page_type_s</a>
</div>
</div>
<div class="contents">
<h1>hwloc_obj_memory_s Struct Reference<br/>
<small>
[<a class="el" href="a00028.html">Topology Objects</a>]</small>
</h1><!-- doxytag: class="hwloc_obj_memory_s" -->
<p>Object memory.
<h1>hwloc_obj_memory_s::hwloc_obj_memory_page_type_s Struct Reference</h1><!-- doxytag: class="hwloc_obj_memory_s::hwloc_obj_memory_page_type_s" -->
<p>Array of local memory page types, <code>NULL</code> if no local memory and <code>page_types</code> is 0.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="a00021_source.html">hwloc.h</a>&gt;</code></p>
<p><code>#include &lt;<a class="el" href="a00022_source.html">hwloc.h</a>&gt;</code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00012.html">hwloc_obj_memory_page_type_s</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Array of local memory page types, <code>NULL</code> if no local memory and <code>page_types</code> is 0. <a href="a00012.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint64_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00013.html#a68c3323d2d0a248d1b7fec7af44bebe3">total_memory</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Total memory (in bytes) in this object and its children. <a href="#a68c3323d2d0a248d1b7fec7af44bebe3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint64_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00013.html#a27043a3150660f44ed84916c2d0d7e0e">local_memory</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Local memory (in bytes). <a href="#a27043a3150660f44ed84916c2d0d7e0e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00013.html#a208c27f4491077d7fb9ba5db8b29cb57">page_types_len</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Size of array <code>page_types</code>. <a href="#a208c27f4491077d7fb9ba5db8b29cb57"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <br class="typebreak"/>
<a class="el" href="a00012.html">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00013.html#a865eba7b12b986d72dbe7a2cfd97c50d">page_types</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Array of local memory page types, <code>NULL</code> if no local memory and <code>page_types</code> is 0. <a href="#a865eba7b12b986d72dbe7a2cfd97c50d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint64_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00013.html#af0619463fb5d10052b7fe3495a66d74b">size</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Size of pages. <a href="#af0619463fb5d10052b7fe3495a66d74b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint64_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00013.html#ab5d01db7b26177a6b5361107cad152c3">count</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of pages of this size. <a href="#ab5d01db7b26177a6b5361107cad152c3"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Object memory. </p>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="a27043a3150660f44ed84916c2d0d7e0e"></a><!-- doxytag: member="hwloc_obj_memory_s::local_memory" ref="a27043a3150660f44ed84916c2d0d7e0e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint64_t <a class="el" href="a00013.html#a27043a3150660f44ed84916c2d0d7e0e">hwloc_obj_memory_s::local_memory</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Local memory (in bytes). </p>
</div>
</div>
<a class="anchor" id="a865eba7b12b986d72dbe7a2cfd97c50d"></a><!-- doxytag: member="hwloc_obj_memory_s::page_types" ref="a865eba7b12b986d72dbe7a2cfd97c50d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00012.html">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a> * <a class="el" href="a00013.html#a865eba7b12b986d72dbe7a2cfd97c50d">hwloc_obj_memory_s::page_types</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Array of local memory page types, <code>NULL</code> if no local memory and <code>page_types</code> is 0. </p>
<p>The array is sorted by increasing <code>size</code> fields. It contains <code>page_types_len</code> slots. </p>
</div>
</div>
<a class="anchor" id="a208c27f4491077d7fb9ba5db8b29cb57"></a><!-- doxytag: member="hwloc_obj_memory_s::page_types_len" ref="a208c27f4491077d7fb9ba5db8b29cb57" args="" -->
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="ab5d01db7b26177a6b5361107cad152c3"></a><!-- doxytag: member="hwloc_obj_memory_s::hwloc_obj_memory_page_type_s::count" ref="ab5d01db7b26177a6b5361107cad152c3" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned <a class="el" href="a00013.html#a208c27f4491077d7fb9ba5db8b29cb57">hwloc_obj_memory_s::page_types_len</a></td>
<td class="memname">uint64_t <a class="el" href="a00013.html#ab5d01db7b26177a6b5361107cad152c3">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s::count</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Size of array <code>page_types</code>. </p>
<p>Number of pages of this size. </p>
</div>
</div>
<a class="anchor" id="a68c3323d2d0a248d1b7fec7af44bebe3"></a><!-- doxytag: member="hwloc_obj_memory_s::total_memory" ref="a68c3323d2d0a248d1b7fec7af44bebe3" args="" -->
<a class="anchor" id="af0619463fb5d10052b7fe3495a66d74b"></a><!-- doxytag: member="hwloc_obj_memory_s::hwloc_obj_memory_page_type_s::size" ref="af0619463fb5d10052b7fe3495a66d74b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint64_t <a class="el" href="a00013.html#a68c3323d2d0a248d1b7fec7af44bebe3">hwloc_obj_memory_s::total_memory</a></td>
<td class="memname">uint64_t <a class="el" href="a00013.html#af0619463fb5d10052b7fe3495a66d74b">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s::size</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Total memory (in bytes) in this object and its children. </p>
<p>Size of pages. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="a00021_source.html">hwloc.h</a></li>
<li><a class="el" href="a00022_source.html">hwloc.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): hwloc_topology_cpubind_support Struct Reference</title>
<title>Hardware Locality (hwloc): hwloc_obj_memory_s Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -26,142 +26,95 @@
</div>
</div>
<div class="contents">
<h1>hwloc_topology_cpubind_support Struct Reference<br/>
<h1>hwloc_obj_memory_s Struct Reference<br/>
<small>
[<a class="el" href="a00030.html">Configure Topology Detection</a>]</small>
</h1><!-- doxytag: class="hwloc_topology_cpubind_support" -->
<p>Flags describing actual binding support for this topology.
[<a class="el" href="a00029.html">Topology Objects</a>]</small>
</h1><!-- doxytag: class="hwloc_obj_memory_s" -->
<p>Object memory.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="a00021_source.html">hwloc.h</a>&gt;</code></p>
<p><code>#include &lt;<a class="el" href="a00022_source.html">hwloc.h</a>&gt;</code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00013.html">hwloc_obj_memory_page_type_s</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Array of local memory page types, <code>NULL</code> if no local memory and <code>page_types</code> is 0. <a href="a00013.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a9403d51657a4d546b3ea9553a2973a27">set_thisproc_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a77a09ddd78ee3e9ff5f532a6ac74f7eb">get_thisproc_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#aa166223d1c2a6de7256ab2d8b675a87e">set_proc_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#aae705bc447adc163ead377362c4dfe9f">get_proc_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a57a89a4b5f1f74fa6cfe176f1e8b0798">set_thisthread_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a80d762e532d677dff262d83cc7bb1c60">get_thisthread_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a46fba33e307909ce256624687799dd6d">set_thread_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a8dd4d8531ed2eebdce1507e7d104154e">get_thread_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint64_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a68c3323d2d0a248d1b7fec7af44bebe3">total_memory</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Total memory (in bytes) in this object and its children. <a href="#a68c3323d2d0a248d1b7fec7af44bebe3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint64_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a27043a3150660f44ed84916c2d0d7e0e">local_memory</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Local memory (in bytes). <a href="#a27043a3150660f44ed84916c2d0d7e0e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a208c27f4491077d7fb9ba5db8b29cb57">page_types_len</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Size of array <code>page_types</code>. <a href="#a208c27f4491077d7fb9ba5db8b29cb57"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <br class="typebreak"/>
<a class="el" href="a00013.html">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html#a865eba7b12b986d72dbe7a2cfd97c50d">page_types</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Array of local memory page types, <code>NULL</code> if no local memory and <code>page_types</code> is 0. <a href="#a865eba7b12b986d72dbe7a2cfd97c50d"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Flags describing actual binding support for this topology. </p>
<p>Object memory. </p>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="aae705bc447adc163ead377362c4dfe9f"></a><!-- doxytag: member="hwloc_topology_cpubind_support::get_proc_cpubind" ref="aae705bc447adc163ead377362c4dfe9f" args="" -->
<a class="anchor" id="a27043a3150660f44ed84916c2d0d7e0e"></a><!-- doxytag: member="hwloc_obj_memory_s::local_memory" ref="a27043a3150660f44ed84916c2d0d7e0e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00014.html#aae705bc447adc163ead377362c4dfe9f">hwloc_topology_cpubind_support::get_proc_cpubind</a></td>
<td class="memname">uint64_t <a class="el" href="a00014.html#a27043a3150660f44ed84916c2d0d7e0e">hwloc_obj_memory_s::local_memory</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getting the binding of a whole given process is supported. </p>
<p>Local memory (in bytes). </p>
</div>
</div>
<a class="anchor" id="a77a09ddd78ee3e9ff5f532a6ac74f7eb"></a><!-- doxytag: member="hwloc_topology_cpubind_support::get_thisproc_cpubind" ref="a77a09ddd78ee3e9ff5f532a6ac74f7eb" args="" -->
<a class="anchor" id="a865eba7b12b986d72dbe7a2cfd97c50d"></a><!-- doxytag: member="hwloc_obj_memory_s::page_types" ref="a865eba7b12b986d72dbe7a2cfd97c50d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00014.html#a77a09ddd78ee3e9ff5f532a6ac74f7eb">hwloc_topology_cpubind_support::get_thisproc_cpubind</a></td>
<td class="memname">struct <a class="el" href="a00013.html">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a> * <a class="el" href="a00014.html#a865eba7b12b986d72dbe7a2cfd97c50d">hwloc_obj_memory_s::page_types</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getting the binding of the whole current process is supported. </p>
<p>Array of local memory page types, <code>NULL</code> if no local memory and <code>page_types</code> is 0. </p>
<p>The array is sorted by increasing <code>size</code> fields. It contains <code>page_types_len</code> slots. </p>
</div>
</div>
<a class="anchor" id="a80d762e532d677dff262d83cc7bb1c60"></a><!-- doxytag: member="hwloc_topology_cpubind_support::get_thisthread_cpubind" ref="a80d762e532d677dff262d83cc7bb1c60" args="" -->
<a class="anchor" id="a208c27f4491077d7fb9ba5db8b29cb57"></a><!-- doxytag: member="hwloc_obj_memory_s::page_types_len" ref="a208c27f4491077d7fb9ba5db8b29cb57" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00014.html#a80d762e532d677dff262d83cc7bb1c60">hwloc_topology_cpubind_support::get_thisthread_cpubind</a></td>
<td class="memname">unsigned <a class="el" href="a00014.html#a208c27f4491077d7fb9ba5db8b29cb57">hwloc_obj_memory_s::page_types_len</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getting the binding of the current thread only is supported. </p>
<p>Size of array <code>page_types</code>. </p>
</div>
</div>
<a class="anchor" id="a8dd4d8531ed2eebdce1507e7d104154e"></a><!-- doxytag: member="hwloc_topology_cpubind_support::get_thread_cpubind" ref="a8dd4d8531ed2eebdce1507e7d104154e" args="" -->
<a class="anchor" id="a68c3323d2d0a248d1b7fec7af44bebe3"></a><!-- doxytag: member="hwloc_obj_memory_s::total_memory" ref="a68c3323d2d0a248d1b7fec7af44bebe3" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00014.html#a8dd4d8531ed2eebdce1507e7d104154e">hwloc_topology_cpubind_support::get_thread_cpubind</a></td>
<td class="memname">uint64_t <a class="el" href="a00014.html#a68c3323d2d0a248d1b7fec7af44bebe3">hwloc_obj_memory_s::total_memory</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getting the binding of a given thread only is supported. </p>
</div>
</div>
<a class="anchor" id="aa166223d1c2a6de7256ab2d8b675a87e"></a><!-- doxytag: member="hwloc_topology_cpubind_support::set_proc_cpubind" ref="aa166223d1c2a6de7256ab2d8b675a87e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00014.html#aa166223d1c2a6de7256ab2d8b675a87e">hwloc_topology_cpubind_support::set_proc_cpubind</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Binding a whole given process is supported. </p>
</div>
</div>
<a class="anchor" id="a9403d51657a4d546b3ea9553a2973a27"></a><!-- doxytag: member="hwloc_topology_cpubind_support::set_thisproc_cpubind" ref="a9403d51657a4d546b3ea9553a2973a27" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00014.html#a9403d51657a4d546b3ea9553a2973a27">hwloc_topology_cpubind_support::set_thisproc_cpubind</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Binding the whole current process is supported. </p>
</div>
</div>
<a class="anchor" id="a57a89a4b5f1f74fa6cfe176f1e8b0798"></a><!-- doxytag: member="hwloc_topology_cpubind_support::set_thisthread_cpubind" ref="a57a89a4b5f1f74fa6cfe176f1e8b0798" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00014.html#a57a89a4b5f1f74fa6cfe176f1e8b0798">hwloc_topology_cpubind_support::set_thisthread_cpubind</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Binding the current thread only is supported. </p>
</div>
</div>
<a class="anchor" id="a46fba33e307909ce256624687799dd6d"></a><!-- doxytag: member="hwloc_topology_cpubind_support::set_thread_cpubind" ref="a46fba33e307909ce256624687799dd6d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00014.html#a46fba33e307909ce256624687799dd6d">hwloc_topology_cpubind_support::set_thread_cpubind</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Binding a given thread only is supported. </p>
<p>Total memory (in bytes) in this object and its children. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="a00021_source.html">hwloc.h</a></li>
<li><a class="el" href="a00022_source.html">hwloc.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): hwloc_topology_discovery_support Struct Reference</title>
<title>Hardware Locality (hwloc): hwloc_topology_cpubind_support Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -26,39 +26,142 @@
</div>
</div>
<div class="contents">
<h1>hwloc_topology_discovery_support Struct Reference<br/>
<h1>hwloc_topology_cpubind_support Struct Reference<br/>
<small>
[<a class="el" href="a00030.html">Configure Topology Detection</a>]</small>
</h1><!-- doxytag: class="hwloc_topology_discovery_support" -->
<p>Flags describing actual discovery support for this topology.
[<a class="el" href="a00031.html">Configure Topology Detection</a>]</small>
</h1><!-- doxytag: class="hwloc_topology_cpubind_support" -->
<p>Flags describing actual binding support for this topology.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="a00021_source.html">hwloc.h</a>&gt;</code></p>
<p><code>#include &lt;<a class="el" href="a00022_source.html">hwloc.h</a>&gt;</code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#ad7bb4ecf7a82f5a04fc632e9592ad3ab">pu</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Detecting the number of PU objects is supported. <a href="#ad7bb4ecf7a82f5a04fc632e9592ad3ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#a9403d51657a4d546b3ea9553a2973a27">set_thisproc_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#a77a09ddd78ee3e9ff5f532a6ac74f7eb">get_thisproc_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#aa166223d1c2a6de7256ab2d8b675a87e">set_proc_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#aae705bc447adc163ead377362c4dfe9f">get_proc_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#a57a89a4b5f1f74fa6cfe176f1e8b0798">set_thisthread_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#a80d762e532d677dff262d83cc7bb1c60">get_thisthread_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#a46fba33e307909ce256624687799dd6d">set_thread_cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html#a8dd4d8531ed2eebdce1507e7d104154e">get_thread_cpubind</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Flags describing actual discovery support for this topology. </p>
<p>Flags describing actual binding support for this topology. </p>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="ad7bb4ecf7a82f5a04fc632e9592ad3ab"></a><!-- doxytag: member="hwloc_topology_discovery_support::pu" ref="ad7bb4ecf7a82f5a04fc632e9592ad3ab" args="" -->
<a class="anchor" id="aae705bc447adc163ead377362c4dfe9f"></a><!-- doxytag: member="hwloc_topology_cpubind_support::get_proc_cpubind" ref="aae705bc447adc163ead377362c4dfe9f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00015.html#ad7bb4ecf7a82f5a04fc632e9592ad3ab">hwloc_topology_discovery_support::pu</a></td>
<td class="memname">unsigned char <a class="el" href="a00015.html#aae705bc447adc163ead377362c4dfe9f">hwloc_topology_cpubind_support::get_proc_cpubind</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getting the binding of a whole given process is supported. </p>
<p>Detecting the number of PU objects is supported. </p>
</div>
</div>
<a class="anchor" id="a77a09ddd78ee3e9ff5f532a6ac74f7eb"></a><!-- doxytag: member="hwloc_topology_cpubind_support::get_thisproc_cpubind" ref="a77a09ddd78ee3e9ff5f532a6ac74f7eb" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00015.html#a77a09ddd78ee3e9ff5f532a6ac74f7eb">hwloc_topology_cpubind_support::get_thisproc_cpubind</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getting the binding of the whole current process is supported. </p>
</div>
</div>
<a class="anchor" id="a80d762e532d677dff262d83cc7bb1c60"></a><!-- doxytag: member="hwloc_topology_cpubind_support::get_thisthread_cpubind" ref="a80d762e532d677dff262d83cc7bb1c60" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00015.html#a80d762e532d677dff262d83cc7bb1c60">hwloc_topology_cpubind_support::get_thisthread_cpubind</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getting the binding of the current thread only is supported. </p>
</div>
</div>
<a class="anchor" id="a8dd4d8531ed2eebdce1507e7d104154e"></a><!-- doxytag: member="hwloc_topology_cpubind_support::get_thread_cpubind" ref="a8dd4d8531ed2eebdce1507e7d104154e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00015.html#a8dd4d8531ed2eebdce1507e7d104154e">hwloc_topology_cpubind_support::get_thread_cpubind</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Getting the binding of a given thread only is supported. </p>
</div>
</div>
<a class="anchor" id="aa166223d1c2a6de7256ab2d8b675a87e"></a><!-- doxytag: member="hwloc_topology_cpubind_support::set_proc_cpubind" ref="aa166223d1c2a6de7256ab2d8b675a87e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00015.html#aa166223d1c2a6de7256ab2d8b675a87e">hwloc_topology_cpubind_support::set_proc_cpubind</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Binding a whole given process is supported. </p>
</div>
</div>
<a class="anchor" id="a9403d51657a4d546b3ea9553a2973a27"></a><!-- doxytag: member="hwloc_topology_cpubind_support::set_thisproc_cpubind" ref="a9403d51657a4d546b3ea9553a2973a27" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00015.html#a9403d51657a4d546b3ea9553a2973a27">hwloc_topology_cpubind_support::set_thisproc_cpubind</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Binding the whole current process is supported. </p>
</div>
</div>
<a class="anchor" id="a57a89a4b5f1f74fa6cfe176f1e8b0798"></a><!-- doxytag: member="hwloc_topology_cpubind_support::set_thisthread_cpubind" ref="a57a89a4b5f1f74fa6cfe176f1e8b0798" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00015.html#a57a89a4b5f1f74fa6cfe176f1e8b0798">hwloc_topology_cpubind_support::set_thisthread_cpubind</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Binding the current thread only is supported. </p>
</div>
</div>
<a class="anchor" id="a46fba33e307909ce256624687799dd6d"></a><!-- doxytag: member="hwloc_topology_cpubind_support::set_thread_cpubind" ref="a46fba33e307909ce256624687799dd6d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned char <a class="el" href="a00015.html#a46fba33e307909ce256624687799dd6d">hwloc_topology_cpubind_support::set_thread_cpubind</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Binding a given thread only is supported. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="a00021_source.html">hwloc.h</a></li>
<li><a class="el" href="a00022_source.html">hwloc.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): hwloc_topology_support Struct Reference</title>
<title>Hardware Locality (hwloc): hwloc_topology_discovery_support Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -26,53 +26,39 @@
</div>
</div>
<div class="contents">
<h1>hwloc_topology_support Struct Reference<br/>
<h1>hwloc_topology_discovery_support Struct Reference<br/>
<small>
[<a class="el" href="a00030.html">Configure Topology Detection</a>]</small>
</h1><!-- doxytag: class="hwloc_topology_support" -->
<p>Set of flags describing actual support for this topology.
[<a class="el" href="a00031.html">Configure Topology Detection</a>]</small>
</h1><!-- doxytag: class="hwloc_topology_discovery_support" -->
<p>Flags describing actual discovery support for this topology.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="a00021_source.html">hwloc.h</a>&gt;</code></p>
<p><code>#include &lt;<a class="el" href="a00022_source.html">hwloc.h</a>&gt;</code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <br class="typebreak"/>
<a class="el" href="a00015.html">hwloc_topology_discovery_support</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00016.html#aea3fbd7653d987d81f848636c420504d">discovery</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <br class="typebreak"/>
<a class="el" href="a00014.html">hwloc_topology_cpubind_support</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00016.html#adef2bb91f74c3e70a2a071393caf5f56">cpubind</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00016.html#ad7bb4ecf7a82f5a04fc632e9592ad3ab">pu</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Detecting the number of PU objects is supported. <a href="#ad7bb4ecf7a82f5a04fc632e9592ad3ab"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Set of flags describing actual support for this topology. </p>
<p>This is retrieved with <a class="el" href="a00030.html#gac2126e105f3ae708efca2e90d612625a" title="Retrieve the topology support.">hwloc_topology_get_support()</a> and will be valid until the topology object is destroyed. Note: the values are correct only after discovery. </p>
<p>Flags describing actual discovery support for this topology. </p>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="adef2bb91f74c3e70a2a071393caf5f56"></a><!-- doxytag: member="hwloc_topology_support::cpubind" ref="adef2bb91f74c3e70a2a071393caf5f56" args="" -->
<a class="anchor" id="ad7bb4ecf7a82f5a04fc632e9592ad3ab"></a><!-- doxytag: member="hwloc_topology_discovery_support::pu" ref="ad7bb4ecf7a82f5a04fc632e9592ad3ab" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00014.html">hwloc_topology_cpubind_support</a>* <a class="el" href="a00016.html#adef2bb91f74c3e70a2a071393caf5f56">hwloc_topology_support::cpubind</a></td>
<td class="memname">unsigned char <a class="el" href="a00016.html#ad7bb4ecf7a82f5a04fc632e9592ad3ab">hwloc_topology_discovery_support::pu</a></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="aea3fbd7653d987d81f848636c420504d"></a><!-- doxytag: member="hwloc_topology_support::discovery" ref="aea3fbd7653d987d81f848636c420504d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00015.html">hwloc_topology_discovery_support</a>* <a class="el" href="a00016.html#aea3fbd7653d987d81f848636c420504d">hwloc_topology_support::discovery</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Detecting the number of PU objects is supported. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="a00021_source.html">hwloc.h</a></li>
<li><a class="el" href="a00022_source.html">hwloc.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;

Просмотреть файл

@ -0,0 +1,82 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): hwloc_topology_support Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>hwloc_topology_support Struct Reference<br/>
<small>
[<a class="el" href="a00031.html">Configure Topology Detection</a>]</small>
</h1><!-- doxytag: class="hwloc_topology_support" -->
<p>Set of flags describing actual support for this topology.
<a href="#_details">More...</a></p>
<p><code>#include &lt;<a class="el" href="a00022_source.html">hwloc.h</a>&gt;</code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <br class="typebreak"/>
<a class="el" href="a00016.html">hwloc_topology_discovery_support</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00017.html#aea3fbd7653d987d81f848636c420504d">discovery</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <br class="typebreak"/>
<a class="el" href="a00015.html">hwloc_topology_cpubind_support</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00017.html#adef2bb91f74c3e70a2a071393caf5f56">cpubind</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Set of flags describing actual support for this topology. </p>
<p>This is retrieved with <a class="el" href="a00031.html#gac2126e105f3ae708efca2e90d612625a" title="Retrieve the topology support.">hwloc_topology_get_support()</a> and will be valid until the topology object is destroyed. Note: the values are correct only after discovery. </p>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="adef2bb91f74c3e70a2a071393caf5f56"></a><!-- doxytag: member="hwloc_topology_support::cpubind" ref="adef2bb91f74c3e70a2a071393caf5f56" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00015.html">hwloc_topology_cpubind_support</a>* <a class="el" href="a00017.html#adef2bb91f74c3e70a2a071393caf5f56">hwloc_topology_support::cpubind</a></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="aea3fbd7653d987d81f848636c420504d"></a><!-- doxytag: member="hwloc_topology_support::discovery" ref="aea3fbd7653d987d81f848636c420504d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="a00016.html">hwloc_topology_discovery_support</a>* <a class="el" href="a00017.html#aea3fbd7653d987d81f848636c420504d">hwloc_topology_support::discovery</a></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="a00022_source.html">hwloc.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>

Просмотреть файл

@ -1,146 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): cpuset.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>cpuset.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright © 2009 CNRS, INRIA, Université Bordeaux 1</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.</span>
<a name="l00004"></a>00004 <span class="comment"> * See COPYING in top-level directory.</span>
<a name="l00005"></a>00005 <span class="comment"> */</span>
<a name="l00006"></a>00006
<a name="l00011"></a>00011 <span class="preprocessor">#ifndef HWLOC_CPUSET_H</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_CPUSET_H</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;hwloc/config.h&gt;</span>
<a name="l00015"></a>00015
<a name="l00016"></a>00016
<a name="l00030"></a><a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">00030</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>hwloc_cpuset_s * <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a>;
<a name="l00031"></a><a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">00031</a> <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keyword">struct </span>hwloc_cpuset_s * <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>;
<a name="l00032"></a>00032
<a name="l00033"></a>00033
<a name="l00034"></a>00034 <span class="comment">/*</span>
<a name="l00035"></a>00035 <span class="comment"> * CPU set allocation, freeing and copying.</span>
<a name="l00036"></a>00036 <span class="comment"> */</span>
<a name="l00037"></a>00037
<a name="l00044"></a>00044 HWLOC_DECLSPEC <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00045.html#gaf270165b6a08e8418fcfb68f5793ff7f" title="Allocate a new empty CPU set.">hwloc_cpuset_alloc</a>(<span class="keywordtype">void</span>) __hwloc_attribute_malloc;
<a name="l00045"></a>00045
<a name="l00047"></a>00047 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#gaaac6c1536cdcc35f1a1a3a9ab84da80d" title="Free CPU set set.">hwloc_cpuset_free</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set);
<a name="l00048"></a>00048
<a name="l00050"></a>00050 HWLOC_DECLSPEC <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00045.html#ga468c6e3fd92a9d0db1fb56634a851be3" title="Duplicate CPU set set by allocating a new CPU set and copying set&amp;#39;s contents...">hwloc_cpuset_dup</a>(<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_malloc;
<a name="l00051"></a>00051
<a name="l00053"></a>00053 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#ga27a3b6994bd6f20c1f26d10bdb29ac0b" title="Copy the contents of CPU set src into the already allocated CPU set dst.">hwloc_cpuset_copy</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> dst, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> src);
<a name="l00054"></a>00054
<a name="l00055"></a>00055
<a name="l00056"></a>00056 <span class="comment">/*</span>
<a name="l00057"></a>00057 <span class="comment"> * Cpuset/String Conversion</span>
<a name="l00058"></a>00058 <span class="comment"> */</span>
<a name="l00059"></a>00059
<a name="l00067"></a>00067 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#ga4ed0a2badc6ff03f4d91a8d3c505b3e6" title="Stringify a cpuset.">hwloc_cpuset_snprintf</a>(<span class="keywordtype">char</span> * __hwloc_restrict buf, <span class="keywordtype">size_t</span> buflen, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set);
<a name="l00068"></a>00068
<a name="l00074"></a>00074 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#ga7a89398cbc58c9095aa094b9aeacbf00" title="Stringify a cpuset into a newly allocated string.">hwloc_cpuset_asprintf</a>(<span class="keywordtype">char</span> ** strp, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set);
<a name="l00075"></a>00075
<a name="l00080"></a>00080 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#gab6fb26149e25d4e5719a787ee01bacaa" title="Parse a cpuset string and stores it in CPU set set.">hwloc_cpuset_from_string</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, const <span class="keywordtype">char</span> * __hwloc_restrict <span class="keywordtype">string</span>);
<a name="l00081"></a>00081
<a name="l00082"></a>00082
<a name="l00083"></a>00083 <span class="comment">/*</span>
<a name="l00084"></a>00084 <span class="comment"> * Primitives &amp; macros for building, modifying and consulting &quot;sets&quot; of cpus.</span>
<a name="l00085"></a>00085 <span class="comment"> */</span>
<a name="l00086"></a>00086
<a name="l00088"></a>00088 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set);
<a name="l00089"></a>00089
<a name="l00091"></a>00091 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#gacdc29003a0663e9b8b3a9d405a94fb70" title="Fill CPU set set with all possible CPUs (even if those CPUs don&amp;#39;t exist or are...">hwloc_cpuset_fill</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set);
<a name="l00092"></a>00092
<a name="l00094"></a>00094 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#ga81218f1945e8fa25bbbc4e6277019122" title="Setup CPU set set from unsigned long mask.">hwloc_cpuset_from_ulong</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask);
<a name="l00095"></a>00095
<a name="l00097"></a>00097 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#gac473267f1aa161c3e3e2a26ef25a477c" title="Setup CPU set set from unsigned long mask used as i -th subset.">hwloc_cpuset_from_ith_ulong</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> i, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask);
<a name="l00098"></a>00098
<a name="l00100"></a>00100 HWLOC_DECLSPEC <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="a00045.html#ga5eb912bf1d0572127c3eed1b8a47e6ac" title="Convert the beginning part of CPU set set into unsigned long mask.">hwloc_cpuset_to_ulong</a>(<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_pure;
<a name="l00101"></a>00101
<a name="l00103"></a>00103 HWLOC_DECLSPEC <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="a00045.html#ga7576f6a70291feafe9e538942c8b7ee5" title="Convert the i -th subset of CPU set set into unsigned long mask.">hwloc_cpuset_to_ith_ulong</a>(<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <span class="keywordtype">unsigned</span> i) __hwloc_attribute_pure;
<a name="l00104"></a>00104
<a name="l00106"></a>00106 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#ga8ee7aa4827fb49af47eac9b66c74fd78" title="Empty the CPU set set and add CPU cpu.">hwloc_cpuset_cpu</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> cpu);
<a name="l00107"></a>00107
<a name="l00109"></a>00109 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#ga02d86bba61be473bfdceb336c9087736" title="Empty the CPU set set and add all but the CPU cpu.">hwloc_cpuset_all_but_cpu</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> cpu);
<a name="l00110"></a>00110
<a name="l00112"></a>00112 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#ga793d0c31b524337355ddce1c6568a866" title="Add CPU cpu in CPU set set.">hwloc_cpuset_set</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> cpu);
<a name="l00113"></a>00113
<a name="l00115"></a>00115 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#ga2f15dc90a98d14db8022f76a38c39727" title="Add CPUs from begincpu to endcpu in CPU set set.">hwloc_cpuset_set_range</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> begincpu, <span class="keywordtype">unsigned</span> endcpu);
<a name="l00116"></a>00116
<a name="l00118"></a>00118 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#ga59f2a65f5260581ee642b0a8375be564" title="Remove CPU cpu from CPU set set.">hwloc_cpuset_clr</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> cpu);
<a name="l00119"></a>00119
<a name="l00121"></a>00121 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#ga214d599ff5b66073460b7ee9a75016a8" title="Remove CPUs from begincpu to endcpu in CPU set set.">hwloc_cpuset_clr_range</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> begincpu, <span class="keywordtype">unsigned</span> endcpu);
<a name="l00122"></a>00122
<a name="l00124"></a>00124 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#ga7236a9cf8be3ded29a912790e35065f7" title="Test whether CPU cpu is part of set set.">hwloc_cpuset_isset</a>(<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <span class="keywordtype">unsigned</span> cpu) __hwloc_attribute_pure;
<a name="l00125"></a>00125
<a name="l00127"></a>00127 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#gac5b8ad0c32e9d14c587eabde188182a9" title="Test whether set set is empty.">hwloc_cpuset_iszero</a>(<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_pure;
<a name="l00128"></a>00128
<a name="l00130"></a>00130 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#gab8703a0f28053bd3981852548e3182d1" title="Test whether set set is completely full.">hwloc_cpuset_isfull</a>(<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_pure;
<a name="l00131"></a>00131
<a name="l00133"></a>00133 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#ga9534d84820beade1e6155a1e734307a2" title="Test whether set set1 is equal to set set2.">hwloc_cpuset_isequal</a> (<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2) __hwloc_attribute_pure;
<a name="l00134"></a>00134
<a name="l00136"></a>00136 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#gad7cbab558a9a80652c3ad0b30d488f04" title="Test whether sets set1 and set2 intersects.">hwloc_cpuset_intersects</a> (<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2) __hwloc_attribute_pure;
<a name="l00137"></a>00137
<a name="l00139"></a>00139 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a> (<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> sub_set, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> super_set) __hwloc_attribute_pure;
<a name="l00140"></a>00140
<a name="l00142"></a>00142 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#ga9654f87331e6f33090bed3d326346e85" title="Or sets set1 and set2 and store the result in set res.">hwloc_cpuset_or</a> (<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> res, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2);
<a name="l00143"></a>00143
<a name="l00145"></a>00145 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#gacd5a399d475b7d75e71489177650b6df" title="And sets set1 and set2 and store the result in set res.">hwloc_cpuset_and</a> (<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> res, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2);
<a name="l00146"></a>00146
<a name="l00148"></a>00148 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#ga338fa981505cb2c87e3e9dc543a698b9" title="And set set1 and the negation of set2 and store the result in set res.">hwloc_cpuset_andnot</a> (<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> res, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2);
<a name="l00149"></a>00149
<a name="l00151"></a>00151 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#ga82f8b81aa98c3a488e21838620da8852" title="Xor sets set1 and set2 and store the result in set res.">hwloc_cpuset_xor</a> (<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> res, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2);
<a name="l00152"></a>00152
<a name="l00154"></a>00154 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#ga9494650a8cb93e1dc77590e2393519a5" title="Negate set set and store the result in set res.">hwloc_cpuset_not</a> (<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> res, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set);
<a name="l00155"></a>00155
<a name="l00160"></a>00160 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#gaec614784aab4c1bd4d279fc548f4aa40" title="Compute the first CPU (least significant bit) in CPU set set.">hwloc_cpuset_first</a>(<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_pure;
<a name="l00161"></a>00161
<a name="l00166"></a>00166 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#gaf4fb6d1ca812633f2e5eaa8ae98b1aef" title="Compute the last CPU (most significant bit) in CPU set set.">hwloc_cpuset_last</a>(<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_pure;
<a name="l00167"></a>00167
<a name="l00172"></a>00172 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#ga6bf3fd9ea7b0d0fcb5656bab8b68c1bf" title="Compute the next CPU in CPU set set which is after CPU prev_cpu.">hwloc_cpuset_next</a>(<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <span class="keywordtype">unsigned</span> prev_cpu) __hwloc_attribute_pure;
<a name="l00173"></a>00173
<a name="l00180"></a>00180 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00045.html#gace7ad3d2a71d9884e7a28311228931af" title="Keep a single CPU among those set in CPU set set.">hwloc_cpuset_singlify</a>(<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set);
<a name="l00181"></a>00181
<a name="l00187"></a>00187 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#ga6d54e9fa190351368ea08d02b6b09d32" title="Compare CPU sets set1 and set2 using their lowest index CPU.">hwloc_cpuset_compare_first</a>(<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2) __hwloc_attribute_pure;
<a name="l00188"></a>00188
<a name="l00194"></a>00194 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#gad3ec83a8f86764d87676a7a48c837d70" title="Compare CPU sets set1 and set2 using their highest index CPU.">hwloc_cpuset_compare</a>(<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2) __hwloc_attribute_pure;
<a name="l00195"></a>00195
<a name="l00201"></a>00201 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00045.html#ga432291e25ca6e91ab689b08cdc26d3fa" title="Compute the &amp;quot;weight&amp;quot; of CPU set set (i.e., number of CPUs that are in the...">hwloc_cpuset_weight</a>(<a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_pure;
<a name="l00202"></a>00202
<a name="l00212"></a><a class="code" href="a00045.html#ga8f896ce703ad1740fdf9ce8ac6361359">00212</a> <span class="preprocessor">#define hwloc_cpuset_foreach_begin(cpu, set) \</span>
<a name="l00213"></a>00213 <span class="preprocessor">do { \</span>
<a name="l00214"></a>00214 <span class="preprocessor"> for (cpu = hwloc_cpuset_first(set); \</span>
<a name="l00215"></a>00215 <span class="preprocessor"> cpu != (__typeof__(cpu)) -1; \</span>
<a name="l00216"></a>00216 <span class="preprocessor"> cpu = hwloc_cpuset_next(set, cpu)) { \</span>
<a name="l00217"></a>00217 <span class="preprocessor"></span>
<a name="l00221"></a><a class="code" href="a00045.html#gae2974be78a7d7cddbd38cb23fcc6240a">00221</a> <span class="preprocessor">#define hwloc_cpuset_foreach_end() \</span>
<a name="l00222"></a>00222 <span class="preprocessor"> } \</span>
<a name="l00223"></a>00223 <span class="preprocessor">} while (0)</span>
<a name="l00224"></a>00224 <span class="preprocessor"></span>
<a name="l00227"></a>00227 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_CPUSET_H */</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): glibc-sched.h Source File</title>
<title>Hardware Locality (hwloc): cpuset.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -23,80 +23,121 @@
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>glibc-sched.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<h1>cpuset.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright © 2009 CNRS, INRIA, Université Bordeaux 1</span>
<a name="l00003"></a>00003 <span class="comment"> * See COPYING in top-level directory.</span>
<a name="l00004"></a>00004 <span class="comment"> */</span>
<a name="l00005"></a>00005
<a name="l00014"></a>00014 <span class="preprocessor">#ifndef HWLOC_GLIBC_SCHED_H</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_GLIBC_SCHED_H</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;hwloc.h&gt;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;hwloc/helper.h&gt;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;assert.h&gt;</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021 <span class="preprocessor">#if !defined _GNU_SOURCE || !defined _SCHED_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#error sched.h must be included with _GNU_SOURCE defined</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a>00025 <span class="preprocessor">#ifdef HWLOC_HAVE_CPU_SET</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027
<a name="l00040"></a>00040 <span class="keyword">static</span> __inline <span class="keywordtype">int</span>
<a name="l00041"></a><a class="code" href="a00046.html#gab6bf9c8614d0336c2a358e23e71dbaa9">00041</a> <a class="code" href="a00046.html#gab6bf9c8614d0336c2a358e23e71dbaa9" title="Convert hwloc CPU set toposet into glibc sched affinity CPU set schedset.">hwloc_cpuset_to_glibc_sched_affinity</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> hwlocset,
<a name="l00042"></a>00042 cpu_set_t *schedset, <span class="keywordtype">size_t</span> schedsetsize)
<a name="l00043"></a>00043 {
<a name="l00044"></a>00044 <span class="preprocessor">#ifdef CPU_ZERO_S</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span> <span class="keywordtype">unsigned</span> cpu;
<a name="l00046"></a>00046 CPU_ZERO_S(schedsetsize, schedset);
<a name="l00047"></a>00047 <a class="code" href="a00045.html#ga8f896ce703ad1740fdf9ce8ac6361359" title="Loop macro iterating on CPU set set.">hwloc_cpuset_foreach_begin</a>(cpu, hwlocset)
<a name="l00048"></a>00048 CPU_SET_S(cpu, schedsetsize, schedset);
<a name="l00049"></a>00049 <a class="code" href="a00045.html#gae2974be78a7d7cddbd38cb23fcc6240a" title="End of loop. Needs a terminating &amp;#39;;&amp;#39;.">hwloc_cpuset_foreach_end</a>();
<a name="l00050"></a>00050 <span class="preprocessor">#else </span><span class="comment">/* !CPU_ZERO_S */</span>
<a name="l00051"></a>00051 <span class="keywordtype">unsigned</span> cpu;
<a name="l00052"></a>00052 CPU_ZERO(schedset);
<a name="l00053"></a>00053 assert(schedsetsize == <span class="keyword">sizeof</span>(cpu_set_t));
<a name="l00054"></a>00054 <a class="code" href="a00045.html#ga8f896ce703ad1740fdf9ce8ac6361359" title="Loop macro iterating on CPU set set.">hwloc_cpuset_foreach_begin</a>(cpu, hwlocset)
<a name="l00055"></a>00055 CPU_SET(cpu, schedset);
<a name="l00056"></a>00056 <a class="code" href="a00045.html#gae2974be78a7d7cddbd38cb23fcc6240a" title="End of loop. Needs a terminating &amp;#39;;&amp;#39;.">hwloc_cpuset_foreach_end</a>();
<a name="l00057"></a>00057 <span class="preprocessor">#endif </span><span class="comment">/* !CPU_ZERO_S */</span>
<a name="l00058"></a>00058 <span class="keywordflow">return</span> 0;
<a name="l00059"></a>00059 }
<a name="l00060"></a>00060
<a name="l00068"></a>00068 <span class="keyword">static</span> __inline <span class="keywordtype">int</span>
<a name="l00069"></a><a class="code" href="a00046.html#gac8de46372b7bf4dbc3c68ee04eefb841">00069</a> <a class="code" href="a00046.html#gac8de46372b7bf4dbc3c68ee04eefb841" title="Convert glibc sched affinity CPU set schedset into hwloc CPU set.">hwloc_cpuset_from_glibc_sched_affinity</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> hwlocset,
<a name="l00070"></a>00070 <span class="keyword">const</span> cpu_set_t *schedset, <span class="keywordtype">size_t</span> schedsetsize)
<a name="l00071"></a>00071 {
<a name="l00072"></a>00072 <a class="code" href="a00045.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(hwlocset);
<a name="l00073"></a>00073 <span class="preprocessor">#ifdef CPU_ZERO_S</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span> <span class="keywordtype">int</span> cpu, count;
<a name="l00075"></a>00075 count = CPU_COUNT_S(schedsetsize, schedset);
<a name="l00076"></a>00076 cpu = 0;
<a name="l00077"></a>00077 <span class="keywordflow">while</span> (count) {
<a name="l00078"></a>00078 <span class="keywordflow">if</span> (CPU_ISSET_S(cpu, schedsetsize, schedset)) {
<a name="l00079"></a>00079 <a class="code" href="a00045.html#ga793d0c31b524337355ddce1c6568a866" title="Add CPU cpu in CPU set set.">hwloc_cpuset_set</a>(hwlocset, cpu);
<a name="l00080"></a>00080 count--;
<a name="l00081"></a>00081 }
<a name="l00082"></a>00082 cpu++;
<a name="l00083"></a>00083 <span class="keywordflow">if</span> (cpu &gt; HWLOC_NBMAXCPUS)
<a name="l00084"></a>00084 <span class="keywordflow">break</span>;
<a name="l00085"></a>00085 }
<a name="l00086"></a>00086 <span class="preprocessor">#else </span><span class="comment">/* !CPU_ZERO_S */</span>
<a name="l00087"></a>00087 <span class="comment">/* sched.h does not support dynamic cpu_set_t (introduced in glibc 2.7),</span>
<a name="l00088"></a>00088 <span class="comment"> * assume we have a very old interface without CPU_COUNT (added in 2.6)</span>
<a name="l00089"></a>00089 <span class="comment"> */</span>
<a name="l00090"></a>00090 <span class="keywordtype">int</span> cpu;
<a name="l00091"></a>00091 assert(schedsetsize == <span class="keyword">sizeof</span>(cpu_set_t));
<a name="l00092"></a>00092 <span class="keywordflow">for</span>(cpu=0; cpu&lt;CPU_SETSIZE &amp;&amp; cpu&lt;HWLOC_NBMAXCPUS; cpu++)
<a name="l00093"></a>00093 <span class="keywordflow">if</span> (CPU_ISSET(cpu, schedset))
<a name="l00094"></a>00094 <a class="code" href="a00045.html#ga793d0c31b524337355ddce1c6568a866" title="Add CPU cpu in CPU set set.">hwloc_cpuset_set</a>(hwlocset, cpu);
<a name="l00095"></a>00095 <span class="preprocessor">#endif </span><span class="comment">/* !CPU_ZERO_S */</span>
<a name="l00096"></a>00096 <span class="keywordflow">return</span> 0;
<a name="l00097"></a>00097 }
<a name="l00003"></a>00003 <span class="comment"> * Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.</span>
<a name="l00004"></a>00004 <span class="comment"> * See COPYING in top-level directory.</span>
<a name="l00005"></a>00005 <span class="comment"> */</span>
<a name="l00006"></a>00006
<a name="l00011"></a>00011 <span class="preprocessor">#ifndef HWLOC_CPUSET_H</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_CPUSET_H</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;hwloc/config.h&gt;</span>
<a name="l00015"></a>00015
<a name="l00016"></a>00016
<a name="l00030"></a><a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">00030</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>hwloc_cpuset_s * <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a>;
<a name="l00031"></a><a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">00031</a> <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keyword">struct </span>hwloc_cpuset_s * <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>;
<a name="l00032"></a>00032
<a name="l00033"></a>00033
<a name="l00034"></a>00034 <span class="comment">/*</span>
<a name="l00035"></a>00035 <span class="comment"> * CPU set allocation, freeing and copying.</span>
<a name="l00036"></a>00036 <span class="comment"> */</span>
<a name="l00037"></a>00037
<a name="l00044"></a>00044 HWLOC_DECLSPEC <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00046.html#gaf270165b6a08e8418fcfb68f5793ff7f" title="Allocate a new empty CPU set.">hwloc_cpuset_alloc</a>(<span class="keywordtype">void</span>) __hwloc_attribute_malloc;
<a name="l00045"></a>00045
<a name="l00047"></a>00047 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#gaaac6c1536cdcc35f1a1a3a9ab84da80d" title="Free CPU set set.">hwloc_cpuset_free</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set);
<a name="l00048"></a>00048
<a name="l00050"></a>00050 HWLOC_DECLSPEC <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00046.html#ga468c6e3fd92a9d0db1fb56634a851be3" title="Duplicate CPU set set by allocating a new CPU set and copying set&amp;#39;s contents...">hwloc_cpuset_dup</a>(<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_malloc;
<a name="l00051"></a>00051
<a name="l00053"></a>00053 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#ga27a3b6994bd6f20c1f26d10bdb29ac0b" title="Copy the contents of CPU set src into the already allocated CPU set dst.">hwloc_cpuset_copy</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> dst, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> src);
<a name="l00054"></a>00054
<a name="l00055"></a>00055
<a name="l00056"></a>00056 <span class="comment">/*</span>
<a name="l00057"></a>00057 <span class="comment"> * Cpuset/String Conversion</span>
<a name="l00058"></a>00058 <span class="comment"> */</span>
<a name="l00059"></a>00059
<a name="l00067"></a>00067 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#ga4ed0a2badc6ff03f4d91a8d3c505b3e6" title="Stringify a cpuset.">hwloc_cpuset_snprintf</a>(<span class="keywordtype">char</span> * __hwloc_restrict buf, <span class="keywordtype">size_t</span> buflen, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set);
<a name="l00068"></a>00068
<a name="l00074"></a>00074 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#ga7a89398cbc58c9095aa094b9aeacbf00" title="Stringify a cpuset into a newly allocated string.">hwloc_cpuset_asprintf</a>(<span class="keywordtype">char</span> ** strp, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set);
<a name="l00075"></a>00075
<a name="l00080"></a>00080 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#gab6fb26149e25d4e5719a787ee01bacaa" title="Parse a cpuset string and stores it in CPU set set.">hwloc_cpuset_from_string</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, const <span class="keywordtype">char</span> * __hwloc_restrict <span class="keywordtype">string</span>);
<a name="l00081"></a>00081
<a name="l00082"></a>00082
<a name="l00083"></a>00083 <span class="comment">/*</span>
<a name="l00084"></a>00084 <span class="comment"> * Primitives &amp; macros for building, modifying and consulting &quot;sets&quot; of cpus.</span>
<a name="l00085"></a>00085 <span class="comment"> */</span>
<a name="l00086"></a>00086
<a name="l00088"></a>00088 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set);
<a name="l00089"></a>00089
<a name="l00091"></a>00091 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#gacdc29003a0663e9b8b3a9d405a94fb70" title="Fill CPU set set with all possible CPUs (even if those CPUs don&amp;#39;t exist or are...">hwloc_cpuset_fill</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set);
<a name="l00092"></a>00092
<a name="l00094"></a>00094 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#ga81218f1945e8fa25bbbc4e6277019122" title="Setup CPU set set from unsigned long mask.">hwloc_cpuset_from_ulong</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask);
<a name="l00095"></a>00095
<a name="l00097"></a>00097 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#gac473267f1aa161c3e3e2a26ef25a477c" title="Setup CPU set set from unsigned long mask used as i -th subset.">hwloc_cpuset_from_ith_ulong</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> i, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask);
<a name="l00098"></a>00098
<a name="l00102"></a>00102 <span class="preprocessor">#endif </span><span class="comment">/* CPU_SET */</span>
<a name="l00103"></a>00103
<a name="l00104"></a>00104 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_GLIBC_SCHED_H */</span>
<a name="l00100"></a>00100 HWLOC_DECLSPEC <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="a00046.html#ga5eb912bf1d0572127c3eed1b8a47e6ac" title="Convert the beginning part of CPU set set into unsigned long mask.">hwloc_cpuset_to_ulong</a>(<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_pure;
<a name="l00101"></a>00101
<a name="l00103"></a>00103 HWLOC_DECLSPEC <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="a00046.html#ga7576f6a70291feafe9e538942c8b7ee5" title="Convert the i -th subset of CPU set set into unsigned long mask.">hwloc_cpuset_to_ith_ulong</a>(<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <span class="keywordtype">unsigned</span> i) __hwloc_attribute_pure;
<a name="l00104"></a>00104
<a name="l00106"></a>00106 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#ga8ee7aa4827fb49af47eac9b66c74fd78" title="Empty the CPU set set and add CPU cpu.">hwloc_cpuset_cpu</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> cpu);
<a name="l00107"></a>00107
<a name="l00109"></a>00109 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#ga02d86bba61be473bfdceb336c9087736" title="Empty the CPU set set and add all but the CPU cpu.">hwloc_cpuset_all_but_cpu</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> cpu);
<a name="l00110"></a>00110
<a name="l00112"></a>00112 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#ga793d0c31b524337355ddce1c6568a866" title="Add CPU cpu in CPU set set.">hwloc_cpuset_set</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> cpu);
<a name="l00113"></a>00113
<a name="l00115"></a>00115 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#ga2f15dc90a98d14db8022f76a38c39727" title="Add CPUs from begincpu to endcpu in CPU set set.">hwloc_cpuset_set_range</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> begincpu, <span class="keywordtype">unsigned</span> endcpu);
<a name="l00116"></a>00116
<a name="l00118"></a>00118 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#ga59f2a65f5260581ee642b0a8375be564" title="Remove CPU cpu from CPU set set.">hwloc_cpuset_clr</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> cpu);
<a name="l00119"></a>00119
<a name="l00121"></a>00121 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#ga214d599ff5b66073460b7ee9a75016a8" title="Remove CPUs from begincpu to endcpu in CPU set set.">hwloc_cpuset_clr_range</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set, <span class="keywordtype">unsigned</span> begincpu, <span class="keywordtype">unsigned</span> endcpu);
<a name="l00122"></a>00122
<a name="l00124"></a>00124 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#ga7236a9cf8be3ded29a912790e35065f7" title="Test whether CPU cpu is part of set set.">hwloc_cpuset_isset</a>(<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <span class="keywordtype">unsigned</span> cpu) __hwloc_attribute_pure;
<a name="l00125"></a>00125
<a name="l00127"></a>00127 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#gac5b8ad0c32e9d14c587eabde188182a9" title="Test whether set set is empty.">hwloc_cpuset_iszero</a>(<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_pure;
<a name="l00128"></a>00128
<a name="l00130"></a>00130 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#gab8703a0f28053bd3981852548e3182d1" title="Test whether set set is completely full.">hwloc_cpuset_isfull</a>(<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_pure;
<a name="l00131"></a>00131
<a name="l00133"></a>00133 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#ga9534d84820beade1e6155a1e734307a2" title="Test whether set set1 is equal to set set2.">hwloc_cpuset_isequal</a> (<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2) __hwloc_attribute_pure;
<a name="l00134"></a>00134
<a name="l00136"></a>00136 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#gad7cbab558a9a80652c3ad0b30d488f04" title="Test whether sets set1 and set2 intersects.">hwloc_cpuset_intersects</a> (<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2) __hwloc_attribute_pure;
<a name="l00137"></a>00137
<a name="l00139"></a>00139 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a> (<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> sub_set, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> super_set) __hwloc_attribute_pure;
<a name="l00140"></a>00140
<a name="l00142"></a>00142 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#ga9654f87331e6f33090bed3d326346e85" title="Or sets set1 and set2 and store the result in set res.">hwloc_cpuset_or</a> (<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> res, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2);
<a name="l00143"></a>00143
<a name="l00145"></a>00145 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#gacd5a399d475b7d75e71489177650b6df" title="And sets set1 and set2 and store the result in set res.">hwloc_cpuset_and</a> (<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> res, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2);
<a name="l00146"></a>00146
<a name="l00148"></a>00148 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#ga338fa981505cb2c87e3e9dc543a698b9" title="And set set1 and the negation of set2 and store the result in set res.">hwloc_cpuset_andnot</a> (<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> res, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2);
<a name="l00149"></a>00149
<a name="l00151"></a>00151 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#ga82f8b81aa98c3a488e21838620da8852" title="Xor sets set1 and set2 and store the result in set res.">hwloc_cpuset_xor</a> (<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> res, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2);
<a name="l00152"></a>00152
<a name="l00154"></a>00154 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#ga9494650a8cb93e1dc77590e2393519a5" title="Negate set set and store the result in set res.">hwloc_cpuset_not</a> (<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> res, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set);
<a name="l00155"></a>00155
<a name="l00160"></a>00160 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#gaec614784aab4c1bd4d279fc548f4aa40" title="Compute the first CPU (least significant bit) in CPU set set.">hwloc_cpuset_first</a>(<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_pure;
<a name="l00161"></a>00161
<a name="l00166"></a>00166 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#gaf4fb6d1ca812633f2e5eaa8ae98b1aef" title="Compute the last CPU (most significant bit) in CPU set set.">hwloc_cpuset_last</a>(<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_pure;
<a name="l00167"></a>00167
<a name="l00172"></a>00172 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#ga6bf3fd9ea7b0d0fcb5656bab8b68c1bf" title="Compute the next CPU in CPU set set which is after CPU prev_cpu.">hwloc_cpuset_next</a>(<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <span class="keywordtype">unsigned</span> prev_cpu) __hwloc_attribute_pure;
<a name="l00173"></a>00173
<a name="l00180"></a>00180 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00046.html#gace7ad3d2a71d9884e7a28311228931af" title="Keep a single CPU among those set in CPU set set.">hwloc_cpuset_singlify</a>(<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> set);
<a name="l00181"></a>00181
<a name="l00187"></a>00187 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#ga6d54e9fa190351368ea08d02b6b09d32" title="Compare CPU sets set1 and set2 using their lowest index CPU.">hwloc_cpuset_compare_first</a>(<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2) __hwloc_attribute_pure;
<a name="l00188"></a>00188
<a name="l00194"></a>00194 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#gad3ec83a8f86764d87676a7a48c837d70" title="Compare CPU sets set1 and set2 using their highest index CPU.">hwloc_cpuset_compare</a>(<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set1, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set2) __hwloc_attribute_pure;
<a name="l00195"></a>00195
<a name="l00201"></a>00201 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00046.html#ga432291e25ca6e91ab689b08cdc26d3fa" title="Compute the &amp;quot;weight&amp;quot; of CPU set set (i.e., number of CPUs that are in the...">hwloc_cpuset_weight</a>(<a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set) __hwloc_attribute_pure;
<a name="l00202"></a>00202
<a name="l00212"></a><a class="code" href="a00046.html#ga8f896ce703ad1740fdf9ce8ac6361359">00212</a> <span class="preprocessor">#define hwloc_cpuset_foreach_begin(cpu, set) \</span>
<a name="l00213"></a>00213 <span class="preprocessor">do { \</span>
<a name="l00214"></a>00214 <span class="preprocessor"> for (cpu = hwloc_cpuset_first(set); \</span>
<a name="l00215"></a>00215 <span class="preprocessor"> (unsigned) cpu != (unsigned) -1; \</span>
<a name="l00216"></a>00216 <span class="preprocessor"> cpu = hwloc_cpuset_next(set, cpu)) { \</span>
<a name="l00217"></a>00217 <span class="preprocessor"></span>
<a name="l00221"></a><a class="code" href="a00046.html#gae2974be78a7d7cddbd38cb23fcc6240a">00221</a> <span class="preprocessor">#define hwloc_cpuset_foreach_end() \</span>
<a name="l00222"></a>00222 <span class="preprocessor"> } \</span>
<a name="l00223"></a>00223 <span class="preprocessor">} while (0)</span>
<a name="l00224"></a>00224 <span class="preprocessor"></span>
<a name="l00227"></a>00227 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_CPUSET_H */</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): helper.h Source File</title>
<title>Hardware Locality (hwloc): glibc-sched.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -23,439 +23,80 @@
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>helper.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<h1>glibc-sched.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright © 2009 CNRS, INRIA, Université Bordeaux 1</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.</span>
<a name="l00004"></a>00004 <span class="comment"> * See COPYING in top-level directory.</span>
<a name="l00005"></a>00005 <span class="comment"> */</span>
<a name="l00006"></a>00006
<a name="l00011"></a>00011 <span class="preprocessor">#ifndef HWLOC_HELPER_H</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_HELPER_H</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span>
<a name="l00014"></a>00014 <span class="preprocessor">#ifndef HWLOC_H</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#error Please include the main hwloc.h instead</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;errno.h&gt;</span>
<a name="l00003"></a>00003 <span class="comment"> * See COPYING in top-level directory.</span>
<a name="l00004"></a>00004 <span class="comment"> */</span>
<a name="l00005"></a>00005
<a name="l00014"></a>00014 <span class="preprocessor">#ifndef HWLOC_GLIBC_SCHED_H</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_GLIBC_SCHED_H</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;hwloc.h&gt;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;hwloc/helper.h&gt;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;assert.h&gt;</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021
<a name="l00032"></a>00032 <span class="keyword">static</span> __inline <span class="keywordtype">int</span> __hwloc_attribute_pure
<a name="l00033"></a><a class="code" href="a00036.html#gaf324fdd1fcb895c32cc6540c92e9245a">00033</a> <a class="code" href="a00036.html#gaf324fdd1fcb895c32cc6540c92e9245a" title="Returns the depth of objects of type type or below.">hwloc_get_type_or_below_depth</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type)
<a name="l00034"></a>00034 {
<a name="l00035"></a>00035 <span class="keywordtype">int</span> depth = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="keywordflow">if</span> (depth != <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>)
<a name="l00038"></a>00038 <span class="keywordflow">return</span> depth;
<a name="l00039"></a>00039
<a name="l00040"></a>00040 <span class="comment">/* find the highest existing level with type order &gt;= */</span>
<a name="l00041"></a>00041 <span class="keywordflow">for</span>(depth = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a>); ; depth--)
<a name="l00042"></a>00042 <span class="keywordflow">if</span> (<a class="code" href="a00027.html#gabd7da4f4ea12b420b8ecbde458b27805" title="Compare the depth of two object types.">hwloc_compare_types</a>(<a class="code" href="a00032.html#gadd4964764ae7e49231065d58a553fd31" title="Returns the type of objects at depth depth.">hwloc_get_depth_type</a>(topology, depth), type) &lt; 0)
<a name="l00043"></a>00043 <span class="keywordflow">return</span> depth+1;
<a name="l00044"></a>00044
<a name="l00045"></a>00045 <span class="comment">/* Shouldn&#39;t ever happen, as there is always a SYSTEM level with lower order and known depth. */</span>
<a name="l00046"></a>00046 abort();
<a name="l00047"></a>00047 }
<a name="l00048"></a>00048
<a name="l00055"></a>00055 <span class="keyword">static</span> __inline <span class="keywordtype">int</span> __hwloc_attribute_pure
<a name="l00056"></a><a class="code" href="a00036.html#ga4451dffe0bb068f597ec55403e8ed5b8">00056</a> <a class="code" href="a00036.html#ga4451dffe0bb068f597ec55403e8ed5b8" title="Returns the depth of objects of type type or above.">hwloc_get_type_or_above_depth</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type)
<a name="l00057"></a>00057 {
<a name="l00058"></a>00058 <span class="keywordtype">int</span> depth = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00059"></a>00059
<a name="l00060"></a>00060 <span class="keywordflow">if</span> (depth != <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>)
<a name="l00061"></a>00061 <span class="keywordflow">return</span> depth;
<a name="l00062"></a>00062
<a name="l00063"></a>00063 <span class="comment">/* find the lowest existing level with type order &lt;= */</span>
<a name="l00064"></a>00064 <span class="keywordflow">for</span>(depth = 0; ; depth++)
<a name="l00065"></a>00065 <span class="keywordflow">if</span> (<a class="code" href="a00027.html#gabd7da4f4ea12b420b8ecbde458b27805" title="Compare the depth of two object types.">hwloc_compare_types</a>(<a class="code" href="a00032.html#gadd4964764ae7e49231065d58a553fd31" title="Returns the type of objects at depth depth.">hwloc_get_depth_type</a>(topology, depth), type) &gt; 0)
<a name="l00066"></a>00066 <span class="keywordflow">return</span> depth-1;
<a name="l00067"></a>00067
<a name="l00068"></a>00068 <span class="comment">/* Shouldn&#39;t ever happen, as there is always a PU level with higher order and known depth. */</span>
<a name="l00069"></a>00069 abort();
<a name="l00070"></a>00070 }
<a name="l00071"></a>00071
<a name="l00086"></a>00086 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00087"></a><a class="code" href="a00037.html#ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6">00087</a> <a class="code" href="a00037.html#ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology)
<a name="l00088"></a>00088 {
<a name="l00089"></a>00089 <span class="keywordflow">return</span> <a class="code" href="a00033.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a> (topology, 0, 0);
<a name="l00090"></a>00090 }
<a name="l00091"></a>00091
<a name="l00092"></a>00092 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_deprecated
<a name="l00093"></a><a class="code" href="a00037.html#ga2cd3460755de499e238c95ba18b323b8">00093</a> <a class="code" href="a00037.html#ga2cd3460755de499e238c95ba18b323b8">hwloc_get_system_obj</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology) { <span class="keywordflow">return</span> <a class="code" href="a00037.html#ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a> (topology); }
<a name="l00094"></a>00094
<a name="l00096"></a>00096 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00097"></a><a class="code" href="a00037.html#ga9cd80f27afd312569715528f3bc5c740">00097</a> <a class="code" href="a00037.html#ga9cd80f27afd312569715528f3bc5c740" title="Returns the ancestor object of obj at depth depth.">hwloc_get_ancestor_obj_by_depth</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <span class="keywordtype">unsigned</span> depth, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj)
<a name="l00098"></a>00098 {
<a name="l00099"></a>00099 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> ancestor = obj;
<a name="l00100"></a>00100 <span class="keywordflow">if</span> (obj-&gt;<a class="code" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a> &lt; depth)
<a name="l00101"></a>00101 <span class="keywordflow">return</span> NULL;
<a name="l00102"></a>00102 <span class="keywordflow">while</span> (ancestor &amp;&amp; ancestor-&gt;<a class="code" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a> &gt; depth)
<a name="l00103"></a>00103 ancestor = ancestor-&gt;<a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00104"></a>00104 <span class="keywordflow">return</span> ancestor;
<a name="l00105"></a>00105 }
<a name="l00106"></a>00106
<a name="l00108"></a>00108 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00109"></a><a class="code" href="a00037.html#gada9d7486d8d7a45d05aa5f2ce70c7ab1">00109</a> <a class="code" href="a00037.html#gada9d7486d8d7a45d05aa5f2ce70c7ab1" title="Returns the ancestor object of obj with type type.">hwloc_get_ancestor_obj_by_type</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj)
<a name="l00110"></a>00110 {
<a name="l00111"></a>00111 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> ancestor = obj-&gt;<a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00112"></a>00112 <span class="keywordflow">while</span> (ancestor &amp;&amp; ancestor-&gt;<a class="code" href="a00010.html#acc4f0803f244867e68fe0036800be5de" title="Type of object.">type</a> != type)
<a name="l00113"></a>00113 ancestor = ancestor-&gt;<a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00114"></a>00114 <span class="keywordflow">return</span> ancestor;
<a name="l00115"></a>00115 }
<a name="l00116"></a>00116
<a name="l00121"></a>00121 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00122"></a><a class="code" href="a00037.html#ga5755cecb9124c5181642ac84dc5bc554">00122</a> <a class="code" href="a00037.html#ga5755cecb9124c5181642ac84dc5bc554" title="Returns the next object at depth depth.">hwloc_get_next_obj_by_depth</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">unsigned</span> depth, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00123"></a>00123 {
<a name="l00124"></a>00124 <span class="keywordflow">if</span> (!prev)
<a name="l00125"></a>00125 <span class="keywordflow">return</span> <a class="code" href="a00033.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a> (topology, depth, 0);
<a name="l00126"></a>00126 <span class="keywordflow">if</span> (prev-&gt;<a class="code" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a> != depth)
<a name="l00127"></a>00127 <span class="keywordflow">return</span> NULL;
<a name="l00128"></a>00128 <span class="keywordflow">return</span> prev-&gt;<a class="code" href="a00010.html#a85a788017457129589318b6c39451acf" title="Next object of same type.">next_cousin</a>;
<a name="l00129"></a>00129 }
<a name="l00130"></a>00130
<a name="l00137"></a>00137 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00138"></a><a class="code" href="a00037.html#gad011fce572551516267de3c57241a326">00138</a> <a class="code" href="a00037.html#gad011fce572551516267de3c57241a326" title="Returns the next object of type type.">hwloc_get_next_obj_by_type</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type,
<a name="l00139"></a>00139 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00140"></a>00140 {
<a name="l00141"></a>00141 <span class="keywordtype">int</span> depth = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00142"></a>00142 <span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a> || depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00143"></a>00143 <span class="keywordflow">return</span> NULL;
<a name="l00144"></a>00144 <span class="keywordflow">return</span> <a class="code" href="a00037.html#ga5755cecb9124c5181642ac84dc5bc554" title="Returns the next object at depth depth.">hwloc_get_next_obj_by_depth</a> (topology, depth, prev);
<a name="l00145"></a>00145 }
<a name="l00146"></a>00146
<a name="l00155"></a>00155 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00156"></a><a class="code" href="a00037.html#ga8e939dd36f60110b8ce408f4b294a085">00156</a> <a class="code" href="a00037.html#ga8e939dd36f60110b8ce408f4b294a085" title="Returns the object of type HWLOC_OBJ_PU with os_index.">hwloc_get_pu_obj_by_os_index</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">unsigned</span> os_index)
<a name="l00157"></a>00157 {
<a name="l00158"></a>00158 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj = NULL;
<a name="l00159"></a>00159 <span class="keywordflow">while</span> ((obj = <a class="code" href="a00037.html#gad011fce572551516267de3c57241a326" title="Returns the next object of type type.">hwloc_get_next_obj_by_type</a>(topology, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a>, obj)) != NULL)
<a name="l00160"></a>00160 <span class="keywordflow">if</span> (obj-&gt;<a class="code" href="a00010.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a> == os_index)
<a name="l00161"></a>00161 <span class="keywordflow">return</span> obj;
<a name="l00162"></a>00162 <span class="keywordflow">return</span> NULL;
<a name="l00163"></a>00163 }
<a name="l00164"></a>00164
<a name="l00169"></a>00169 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00170"></a><a class="code" href="a00037.html#ga4b5f5ddd9bd1a4443a27453423829b06">00170</a> <a class="code" href="a00037.html#ga4b5f5ddd9bd1a4443a27453423829b06" title="Return the next child.">hwloc_get_next_child</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> parent, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00171"></a>00171 {
<a name="l00172"></a>00172 <span class="keywordflow">if</span> (!prev)
<a name="l00173"></a>00173 <span class="keywordflow">return</span> parent-&gt;<a class="code" href="a00010.html#af51d08a0a79dba517c06c5afedc8d2dc" title="First child.">first_child</a>;
<a name="l00174"></a>00174 <span class="keywordflow">if</span> (prev-&gt;<a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a> != parent)
<a name="l00175"></a>00175 <span class="keywordflow">return</span> NULL;
<a name="l00176"></a>00176 <span class="keywordflow">return</span> prev-&gt;<a class="code" href="a00010.html#a7f2343ed476fe4942e6fffd4cade1b40" title="Next object below the same parent.">next_sibling</a>;
<a name="l00177"></a>00177 }
<a name="l00178"></a>00178
<a name="l00180"></a>00180 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00181"></a><a class="code" href="a00037.html#gac8fd7795061352cfb7013aee2462c592">00181</a> <a class="code" href="a00037.html#gac8fd7795061352cfb7013aee2462c592" title="Returns the common parent object to objects lvl1 and lvl2.">hwloc_get_common_ancestor_obj</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj1, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj2)
<a name="l00182"></a>00182 {
<a name="l00183"></a>00183 <span class="keywordflow">while</span> (obj1-&gt;<a class="code" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a> &gt; obj2-&gt;<a class="code" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a>)
<a name="l00184"></a>00184 obj1 = obj1-&gt;<a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00185"></a>00185 <span class="keywordflow">while</span> (obj2-&gt;<a class="code" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a> &gt; obj1-&gt;<a class="code" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a>)
<a name="l00186"></a>00186 obj2 = obj2-&gt;<a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00187"></a>00187 <span class="keywordflow">while</span> (obj1 != obj2) {
<a name="l00188"></a>00188 obj1 = obj1-&gt;<a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00189"></a>00189 obj2 = obj2-&gt;<a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00190"></a>00190 }
<a name="l00191"></a>00191 <span class="keywordflow">return</span> obj1;
<a name="l00192"></a>00192 }
<a name="l00193"></a>00193
<a name="l00196"></a>00196 <span class="keyword">static</span> __inline <span class="keywordtype">int</span> __hwloc_attribute_pure
<a name="l00197"></a><a class="code" href="a00037.html#gadcdc48e34ad3f2fb90c7cc6c5950f06f">00197</a> <a class="code" href="a00037.html#gadcdc48e34ad3f2fb90c7cc6c5950f06f" title="Returns true if _obj_ is inside the subtree beginning with subtree_root.">hwloc_obj_is_in_subtree</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> subtree_root)
<a name="l00198"></a>00198 {
<a name="l00199"></a>00199 <span class="keywordflow">return</span> <a class="code" href="a00045.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(obj-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, subtree_root-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
<a name="l00200"></a>00200 }
<a name="l00201"></a>00201
<a name="l00218"></a>00218 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00219"></a><a class="code" href="a00038.html#ga14a384b43da1640e0a4f87252ebab7ce">00219</a> <a class="code" href="a00038.html#ga14a384b43da1640e0a4f87252ebab7ce" title="Get the first largest object included in the given cpuset set.">hwloc_get_first_largest_obj_inside_cpuset</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>)
<a name="l00220"></a>00220 {
<a name="l00221"></a>00221 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj = <a class="code" href="a00037.html#ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology);
<a name="l00222"></a>00222 <span class="keywordflow">if</span> (!<a class="code" href="a00045.html#gad7cbab558a9a80652c3ad0b30d488f04" title="Test whether sets set1 and set2 intersects.">hwloc_cpuset_intersects</a>(obj-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keyword">set</span>))
<a name="l00223"></a>00223 <span class="keywordflow">return</span> NULL;
<a name="l00224"></a>00224 <span class="keywordflow">while</span> (!<a class="code" href="a00045.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(obj-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keyword">set</span>)) {
<a name="l00225"></a>00225 <span class="comment">/* while the object intersects without being included, look at its children */</span>
<a name="l00226"></a>00226 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> child = NULL;
<a name="l00227"></a>00227 <span class="keywordflow">while</span> ((child = <a class="code" href="a00037.html#ga4b5f5ddd9bd1a4443a27453423829b06" title="Return the next child.">hwloc_get_next_child</a>(topology, obj, child)) != NULL) {
<a name="l00228"></a>00228 <span class="keywordflow">if</span> (<a class="code" href="a00045.html#gad7cbab558a9a80652c3ad0b30d488f04" title="Test whether sets set1 and set2 intersects.">hwloc_cpuset_intersects</a>(child-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keyword">set</span>))
<a name="l00229"></a>00229 <span class="keywordflow">break</span>;
<a name="l00230"></a>00230 }
<a name="l00231"></a>00231 <span class="keywordflow">if</span> (!child)
<a name="l00232"></a>00232 <span class="comment">/* no child intersects, return their father */</span>
<a name="l00233"></a>00233 <span class="keywordflow">return</span> obj;
<a name="l00234"></a>00234 <span class="comment">/* found one intersecting child, look at its children */</span>
<a name="l00235"></a>00235 obj = child;
<a name="l00236"></a>00236 }
<a name="l00237"></a>00237 <span class="comment">/* obj is included, return it */</span>
<a name="l00238"></a>00238 <span class="keywordflow">return</span> obj;
<a name="l00239"></a>00239 }
<a name="l00240"></a>00240
<a name="l00245"></a>00245 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00038.html#gaab04c89623662e63a48ed2cd48eb601c" title="Get the set of largest objects covering exactly a given cpuset set.">hwloc_get_largest_objs_inside_cpuset</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00246"></a>00246 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> * __hwloc_restrict objs, <span class="keywordtype">int</span> max);
<a name="l00247"></a>00247
<a name="l00254"></a>00254 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00255"></a><a class="code" href="a00038.html#ga0bf3f1e8e58c2a4561dceb2e261a1913">00255</a> <a class="code" href="a00038.html#ga0bf3f1e8e58c2a4561dceb2e261a1913" title="Return the next object at depth depth included in CPU set set.">hwloc_get_next_obj_inside_cpuset_by_depth</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00256"></a>00256 <span class="keywordtype">unsigned</span> depth, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00257"></a>00257 {
<a name="l00258"></a>00258 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> next = <a class="code" href="a00037.html#ga5755cecb9124c5181642ac84dc5bc554" title="Returns the next object at depth depth.">hwloc_get_next_obj_by_depth</a>(topology, depth, prev);
<a name="l00259"></a>00259 <span class="keywordflow">while</span> (next &amp;&amp; !<a class="code" href="a00045.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(next-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keyword">set</span>))
<a name="l00260"></a>00260 next = next-&gt;<a class="code" href="a00010.html#a85a788017457129589318b6c39451acf" title="Next object of same type.">next_cousin</a>;
<a name="l00261"></a>00261 <span class="keywordflow">return</span> next;
<a name="l00262"></a>00262 }
<a name="l00263"></a>00263
<a name="l00270"></a>00270 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00271"></a><a class="code" href="a00038.html#ga0e939b904fa1e255dde8b295e72b4f07">00271</a> <a class="code" href="a00038.html#ga0e939b904fa1e255dde8b295e72b4f07" title="Return the next object of type type included in CPU set set.">hwloc_get_next_obj_inside_cpuset_by_type</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00272"></a>00272 <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00273"></a>00273 {
<a name="l00274"></a>00274 <span class="keywordtype">int</span> depth = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00275"></a>00275 <span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a> || depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00276"></a>00276 <span class="keywordflow">return</span> NULL;
<a name="l00277"></a>00277 <span class="keywordflow">return</span> <a class="code" href="a00038.html#ga0bf3f1e8e58c2a4561dceb2e261a1913" title="Return the next object at depth depth included in CPU set set.">hwloc_get_next_obj_inside_cpuset_by_depth</a>(topology, <span class="keyword">set</span>, depth, prev);
<a name="l00278"></a>00278 }
<a name="l00279"></a>00279
<a name="l00282"></a>00282 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00283"></a><a class="code" href="a00038.html#ga7be828a425e78d155bd09aba5aaa3d51">00283</a> <a class="code" href="a00038.html#ga7be828a425e78d155bd09aba5aaa3d51" title="Return the index -th object at depth depth included in CPU set set.">hwloc_get_obj_inside_cpuset_by_depth</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00284"></a>00284 <span class="keywordtype">unsigned</span> depth, <span class="keywordtype">unsigned</span> idx)
<a name="l00285"></a>00285 {
<a name="l00286"></a>00286 <span class="keywordtype">unsigned</span> count = 0;
<a name="l00287"></a>00287 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj = <a class="code" href="a00033.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a> (topology, depth, 0);
<a name="l00288"></a>00288 <span class="keywordflow">while</span> (obj) {
<a name="l00289"></a>00289 <span class="keywordflow">if</span> (<a class="code" href="a00045.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(obj-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keyword">set</span>)) {
<a name="l00290"></a>00290 <span class="keywordflow">if</span> (count == idx)
<a name="l00291"></a>00291 <span class="keywordflow">return</span> obj;
<a name="l00292"></a>00292 count++;
<a name="l00293"></a>00293 }
<a name="l00294"></a>00294 obj = obj-&gt;<a class="code" href="a00010.html#a85a788017457129589318b6c39451acf" title="Next object of same type.">next_cousin</a>;
<a name="l00295"></a>00295 }
<a name="l00296"></a>00296 <span class="keywordflow">return</span> NULL;
<a name="l00297"></a>00297 }
<a name="l00298"></a>00298
<a name="l00305"></a>00305 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00306"></a><a class="code" href="a00038.html#ga1e4f92f59977be6f4d0f6e8219936a17">00306</a> <a class="code" href="a00038.html#ga1e4f92f59977be6f4d0f6e8219936a17" title="Return the idx -th object of type type included in CPU set set.">hwloc_get_obj_inside_cpuset_by_type</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00307"></a>00307 <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type, <span class="keywordtype">unsigned</span> idx)
<a name="l00308"></a>00308 {
<a name="l00309"></a>00309 <span class="keywordtype">int</span> depth = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00310"></a>00310 <span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a> || depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00311"></a>00311 <span class="keywordflow">return</span> NULL;
<a name="l00312"></a>00312 <span class="keywordflow">return</span> <a class="code" href="a00038.html#ga7be828a425e78d155bd09aba5aaa3d51" title="Return the index -th object at depth depth included in CPU set set.">hwloc_get_obj_inside_cpuset_by_depth</a>(topology, <span class="keyword">set</span>, depth, idx);
<a name="l00313"></a>00313 }
<a name="l00314"></a>00314
<a name="l00316"></a>00316 <span class="keyword">static</span> __inline <span class="keywordtype">unsigned</span> __hwloc_attribute_pure
<a name="l00317"></a><a class="code" href="a00038.html#gada32f235ce6abb3ed1c7571221c52d89">00317</a> <a class="code" href="a00038.html#gada32f235ce6abb3ed1c7571221c52d89" title="Return the number of objects at depth depth included in CPU set set.">hwloc_get_nbobjs_inside_cpuset_by_depth</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00318"></a>00318 <span class="keywordtype">unsigned</span> depth)
<a name="l00319"></a>00319 {
<a name="l00320"></a>00320 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj = <a class="code" href="a00033.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a> (topology, depth, 0);
<a name="l00321"></a>00321 <span class="keywordtype">int</span> count = 0;
<a name="l00322"></a>00322 <span class="keywordflow">while</span> (obj) {
<a name="l00323"></a>00323 <span class="keywordflow">if</span> (<a class="code" href="a00045.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(obj-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keyword">set</span>))
<a name="l00324"></a>00324 count++;
<a name="l00325"></a>00325 obj = obj-&gt;<a class="code" href="a00010.html#a85a788017457129589318b6c39451acf" title="Next object of same type.">next_cousin</a>;
<a name="l00326"></a>00326 }
<a name="l00327"></a>00327 <span class="keywordflow">return</span> count;
<a name="l00328"></a>00328 }
<a name="l00329"></a>00329
<a name="l00336"></a>00336 <span class="keyword">static</span> __inline <span class="keywordtype">int</span> __hwloc_attribute_pure
<a name="l00337"></a><a class="code" href="a00038.html#ga97c8ff5b2abff365a9833cb4d1740d15">00337</a> <a class="code" href="a00038.html#ga97c8ff5b2abff365a9833cb4d1740d15" title="Return the number of objects of type type included in CPU set set.">hwloc_get_nbobjs_inside_cpuset_by_type</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00338"></a>00338 <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type)
<a name="l00339"></a>00339 {
<a name="l00340"></a>00340 <span class="keywordtype">int</span> depth = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00341"></a>00341 <span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>)
<a name="l00342"></a>00342 <span class="keywordflow">return</span> 0;
<a name="l00343"></a>00343 <span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00344"></a>00344 <span class="keywordflow">return</span> -1; <span class="comment">/* FIXME: agregate nbobjs from different levels? */</span>
<a name="l00345"></a>00345 <span class="keywordflow">return</span> <a class="code" href="a00038.html#gada32f235ce6abb3ed1c7571221c52d89" title="Return the number of objects at depth depth included in CPU set set.">hwloc_get_nbobjs_inside_cpuset_by_depth</a>(topology, <span class="keyword">set</span>, depth);
<a name="l00346"></a>00346 }
<a name="l00347"></a>00347
<a name="l00360"></a>00360 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00361"></a><a class="code" href="a00039.html#gaa6d0c687617638dae76058c00832d936">00361</a> <a class="code" href="a00039.html#gaa6d0c687617638dae76058c00832d936" title="Get the child covering at least CPU set set.">hwloc_get_child_covering_cpuset</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00362"></a>00362 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> parent)
<a name="l00363"></a>00363 {
<a name="l00364"></a>00364 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> child;
<a name="l00365"></a>00365
<a name="l00366"></a>00366 <span class="keywordflow">if</span> (<a class="code" href="a00045.html#gac5b8ad0c32e9d14c587eabde188182a9" title="Test whether set set is empty.">hwloc_cpuset_iszero</a>(<span class="keyword">set</span>))
<a name="l00367"></a>00367 <span class="keywordflow">return</span> NULL;
<a name="l00368"></a>00368
<a name="l00369"></a>00369 child = parent-&gt;<a class="code" href="a00010.html#af51d08a0a79dba517c06c5afedc8d2dc" title="First child.">first_child</a>;
<a name="l00370"></a>00370 <span class="keywordflow">while</span> (child) {
<a name="l00371"></a>00371 <span class="keywordflow">if</span> (<a class="code" href="a00045.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(<span class="keyword">set</span>, child-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>))
<a name="l00372"></a>00372 <span class="keywordflow">return</span> child;
<a name="l00373"></a>00373 child = child-&gt;<a class="code" href="a00010.html#a7f2343ed476fe4942e6fffd4cade1b40" title="Next object below the same parent.">next_sibling</a>;
<a name="l00374"></a>00374 }
<a name="l00375"></a>00375 <span class="keywordflow">return</span> NULL;
<a name="l00376"></a>00376 }
<a name="l00377"></a>00377
<a name="l00382"></a>00382 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00383"></a><a class="code" href="a00039.html#ga5967ce4cd1c3194b46d57d25598e697a">00383</a> <a class="code" href="a00039.html#ga5967ce4cd1c3194b46d57d25598e697a" title="Get the lowest object covering at least CPU set set.">hwloc_get_obj_covering_cpuset</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>)
<a name="l00384"></a>00384 {
<a name="l00385"></a>00385 <span class="keyword">struct </span><a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj</a> *current = <a class="code" href="a00037.html#ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology);
<a name="l00386"></a>00386
<a name="l00387"></a>00387 <span class="keywordflow">if</span> (<a class="code" href="a00045.html#gac5b8ad0c32e9d14c587eabde188182a9" title="Test whether set set is empty.">hwloc_cpuset_iszero</a>(<span class="keyword">set</span>))
<a name="l00388"></a>00388 <span class="keywordflow">return</span> NULL;
<a name="l00389"></a>00389
<a name="l00390"></a>00390 <span class="keywordflow">if</span> (!<a class="code" href="a00045.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(<span class="keyword">set</span>, current-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>))
<a name="l00391"></a>00391 <span class="keywordflow">return</span> NULL;
<a name="l00392"></a>00392
<a name="l00393"></a>00393 <span class="keywordflow">while</span> (1) {
<a name="l00394"></a>00394 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> child = <a class="code" href="a00039.html#gaa6d0c687617638dae76058c00832d936" title="Get the child covering at least CPU set set.">hwloc_get_child_covering_cpuset</a>(topology, <span class="keyword">set</span>, current);
<a name="l00395"></a>00395 <span class="keywordflow">if</span> (!child)
<a name="l00396"></a>00396 <span class="keywordflow">return</span> current;
<a name="l00397"></a>00397 current = child;
<a name="l00398"></a>00398 }
<a name="l00399"></a>00399 }
<a name="l00400"></a>00400
<a name="l00401"></a>00401
<a name="l00417"></a>00417 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00418"></a><a class="code" href="a00040.html#ga7668a9bba346a87d12bcc522a12ab27b">00418</a> <a class="code" href="a00040.html#ga7668a9bba346a87d12bcc522a12ab27b" title="Iterate through same-depth objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_depth</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00419"></a>00419 <span class="keywordtype">unsigned</span> <a class="code" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a>, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00420"></a>00420 {
<a name="l00421"></a>00421 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> next = <a class="code" href="a00037.html#ga5755cecb9124c5181642ac84dc5bc554" title="Returns the next object at depth depth.">hwloc_get_next_obj_by_depth</a>(topology, depth, prev);
<a name="l00422"></a>00422 <span class="keywordflow">while</span> (next &amp;&amp; !<a class="code" href="a00045.html#gad7cbab558a9a80652c3ad0b30d488f04" title="Test whether sets set1 and set2 intersects.">hwloc_cpuset_intersects</a>(<span class="keyword">set</span>, next-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>))
<a name="l00423"></a>00423 next = next-&gt;<a class="code" href="a00010.html#a85a788017457129589318b6c39451acf" title="Next object of same type.">next_cousin</a>;
<a name="l00424"></a>00424 <span class="keywordflow">return</span> next;
<a name="l00425"></a>00425 }
<a name="l00426"></a>00426
<a name="l00439"></a>00439 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00440"></a><a class="code" href="a00040.html#gad5d1927258d0297cb064ecda6d038f71">00440</a> <a class="code" href="a00040.html#gad5d1927258d0297cb064ecda6d038f71" title="Iterate through same-type objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_type</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00441"></a>00441 <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> <a class="code" href="a00010.html#acc4f0803f244867e68fe0036800be5de" title="Type of object.">type</a>, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00442"></a>00442 {
<a name="l00443"></a>00443 <span class="keywordtype">int</span> <a class="code" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a> = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00444"></a>00444 <span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a> || depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00445"></a>00445 <span class="keywordflow">return</span> NULL;
<a name="l00446"></a>00446 <span class="keywordflow">return</span> <a class="code" href="a00040.html#ga7668a9bba346a87d12bcc522a12ab27b" title="Iterate through same-depth objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_depth</a>(topology, <span class="keyword">set</span>, depth, prev);
<a name="l00447"></a>00447 }
<a name="l00448"></a>00448
<a name="l00461"></a>00461 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00462"></a><a class="code" href="a00041.html#ga4a4388252d02388ff2803e5975af4005">00462</a> <a class="code" href="a00041.html#ga4a4388252d02388ff2803e5975af4005" title="Get the first cache covering a cpuset set.">hwloc_get_cache_covering_cpuset</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>)
<a name="l00463"></a>00463 {
<a name="l00464"></a>00464 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> current = <a class="code" href="a00039.html#ga5967ce4cd1c3194b46d57d25598e697a" title="Get the lowest object covering at least CPU set set.">hwloc_get_obj_covering_cpuset</a>(topology, <span class="keyword">set</span>);
<a name="l00465"></a>00465 <span class="keywordflow">while</span> (current) {
<a name="l00466"></a>00466 <span class="keywordflow">if</span> (current-&gt;<a class="code" href="a00010.html#acc4f0803f244867e68fe0036800be5de" title="Type of object.">type</a> == <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc" title="Data cache. Can be L1, L2, L3, ...">HWLOC_OBJ_CACHE</a>)
<a name="l00467"></a>00467 <span class="keywordflow">return</span> current;
<a name="l00468"></a>00468 current = current-&gt;<a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00469"></a>00469 }
<a name="l00470"></a>00470 <span class="keywordflow">return</span> NULL;
<a name="l00471"></a>00471 }
<a name="l00472"></a>00472
<a name="l00477"></a>00477 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00478"></a><a class="code" href="a00041.html#ga2d7258b849d9def604e8967b713dd5ff">00478</a> <a class="code" href="a00041.html#ga2d7258b849d9def604e8967b713dd5ff" title="Get the first cache shared between an object and somebody else.">hwloc_get_shared_cache_covering_obj</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj)
<a name="l00479"></a>00479 {
<a name="l00480"></a>00480 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> current = obj-&gt;<a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00481"></a>00481 <span class="keywordflow">while</span> (current) {
<a name="l00482"></a>00482 <span class="keywordflow">if</span> (!<a class="code" href="a00045.html#ga9534d84820beade1e6155a1e734307a2" title="Test whether set set1 is equal to set set2.">hwloc_cpuset_isequal</a>(current-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, obj-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>)
<a name="l00483"></a>00483 &amp;&amp; current-&gt;<a class="code" href="a00010.html#acc4f0803f244867e68fe0036800be5de" title="Type of object.">type</a> == <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc" title="Data cache. Can be L1, L2, L3, ...">HWLOC_OBJ_CACHE</a>)
<a name="l00484"></a>00484 <span class="keywordflow">return</span> current;
<a name="l00485"></a>00485 current = current-&gt;<a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00486"></a>00486 }
<a name="l00487"></a>00487 <span class="keywordflow">return</span> NULL;
<a name="l00488"></a>00488 }
<a name="l00489"></a>00489
<a name="l00505"></a>00505 <span class="comment">/* TODO: rather provide an iterator? Provide a way to know how much should be allocated? By returning the total number of objects instead? */</span>
<a name="l00506"></a>00506 HWLOC_DECLSPEC <span class="keywordtype">unsigned</span> <a class="code" href="a00042.html#ga26c2ac4f25b1ed293249c88e232f1bea" title="Do a depth-first traversal of the topology to find and sort.">hwloc_get_closest_objs</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> src, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> * __hwloc_restrict objs, <span class="keywordtype">unsigned</span> max);
<a name="l00507"></a>00507
<a name="l00518"></a>00518 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00519"></a><a class="code" href="a00042.html#ga80af44c7616bd27eb15949543e12cc9c">00519</a> <a class="code" href="a00042.html#ga80af44c7616bd27eb15949543e12cc9c" title="Find an object below another object, both specified by types and indexes.">hwloc_get_obj_below_by_type</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology,
<a name="l00520"></a>00520 <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type1, <span class="keywordtype">unsigned</span> idx1,
<a name="l00521"></a>00521 <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type2, <span class="keywordtype">unsigned</span> idx2)
<a name="l00522"></a>00522 {
<a name="l00523"></a>00523 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj;
<a name="l00524"></a>00524
<a name="l00525"></a>00525 obj = <a class="code" href="a00033.html#gaabd26357fea30ceb7754ad970b9a0aaa" title="Returns the topology object at index index with type type.">hwloc_get_obj_by_type</a> (topology, type1, idx1);
<a name="l00526"></a>00526 <span class="keywordflow">if</span> (!obj)
<a name="l00527"></a>00527 <span class="keywordflow">return</span> NULL;
<a name="l00528"></a>00528
<a name="l00529"></a>00529 <span class="keywordflow">return</span> <a class="code" href="a00038.html#ga1e4f92f59977be6f4d0f6e8219936a17" title="Return the idx -th object of type type included in CPU set set.">hwloc_get_obj_inside_cpuset_by_type</a>(topology, obj-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, type2, idx2);
<a name="l00530"></a>00530 }
<a name="l00531"></a>00531
<a name="l00547"></a>00547 <span class="keyword">static</span> __inline <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00548"></a><a class="code" href="a00042.html#ga9af0c03238ebcd4b0e174656890a67dc">00548</a> <a class="code" href="a00042.html#ga9af0c03238ebcd4b0e174656890a67dc" title="Find an object below a chain of objects specified by types and indexes.">hwloc_get_obj_below_array_by_type</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">int</span> nr, <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> *typev, <span class="keywordtype">unsigned</span> *idxv)
<a name="l00549"></a>00549 {
<a name="l00550"></a>00550 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj = <a class="code" href="a00037.html#ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology);
<a name="l00551"></a>00551 <span class="keywordtype">int</span> i;
<a name="l00552"></a>00552
<a name="l00553"></a>00553 <span class="keywordflow">for</span>(i=0; i&lt;nr; i++) {
<a name="l00554"></a>00554 obj = <a class="code" href="a00038.html#ga1e4f92f59977be6f4d0f6e8219936a17" title="Return the idx -th object of type type included in CPU set set.">hwloc_get_obj_inside_cpuset_by_type</a>(topology, obj-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, typev[i], idxv[i]);
<a name="l00555"></a>00555 <span class="keywordflow">if</span> (!obj)
<a name="l00556"></a>00556 <span class="keywordflow">return</span> NULL;
<a name="l00557"></a>00557 }
<a name="l00558"></a>00558
<a name="l00559"></a>00559 <span class="keywordflow">return</span> obj;
<a name="l00560"></a>00560 }
<a name="l00561"></a>00561
<a name="l00582"></a>00582 <span class="keyword">static</span> __inline <span class="keywordtype">void</span>
<a name="l00583"></a><a class="code" href="a00043.html#gadbea5d9e892dfb5f1fcacd00ba14def9">00583</a> <a class="code" href="a00043.html#gadbea5d9e892dfb5f1fcacd00ba14def9" title="Distribute n items over the topology under root.">hwloc_distribute</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> root, <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> *<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keywordtype">unsigned</span> n)
<a name="l00584"></a>00584 {
<a name="l00585"></a>00585 <span class="keywordtype">unsigned</span> i;
<a name="l00586"></a>00586 <span class="keywordtype">unsigned</span> u;
<a name="l00587"></a>00587 <span class="keywordtype">unsigned</span> chunk_size, complete_chunks;
<a name="l00588"></a>00588 <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> *cpusetp;
<a name="l00589"></a>00589
<a name="l00590"></a>00590 <span class="keywordflow">if</span> (!root-&gt;<a class="code" href="a00010.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a> || n == 1) {
<a name="l00591"></a>00591 <span class="comment">/* Got to the bottom, we can&#39;t split any more, put everything there. */</span>
<a name="l00592"></a>00592 <span class="keywordflow">for</span> (i=0; i&lt;n; i++)
<a name="l00593"></a>00593 cpuset[i] = <a class="code" href="a00045.html#ga468c6e3fd92a9d0db1fb56634a851be3" title="Duplicate CPU set set by allocating a new CPU set and copying set&amp;#39;s contents...">hwloc_cpuset_dup</a>(root-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
<a name="l00594"></a>00594 <span class="keywordflow">return</span>;
<a name="l00595"></a>00595 }
<a name="l00596"></a>00596
<a name="l00597"></a>00597 <span class="comment">/* Divide n in root-&gt;arity chunks. */</span>
<a name="l00598"></a>00598 chunk_size = (n + root-&gt;<a class="code" href="a00010.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a> - 1) / root-&gt;<a class="code" href="a00010.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a>;
<a name="l00599"></a>00599 complete_chunks = n % root-&gt;<a class="code" href="a00010.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a>;
<a name="l00600"></a>00600 if (!complete_chunks)
<a name="l00601"></a>00601 complete_chunks = root-&gt;<a class="code" href="a00010.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a>;
<a name="l00602"></a>00602
<a name="l00603"></a>00603 <span class="comment">/* Allocate complete chunks first. */</span>
<a name="l00604"></a>00604 <span class="keywordflow">for</span> (cpusetp = cpuset, i = 0;
<a name="l00605"></a>00605 i &lt; complete_chunks;
<a name="l00606"></a>00606 i ++, cpusetp += chunk_size)
<a name="l00607"></a>00607 <a class="code" href="a00043.html#gadbea5d9e892dfb5f1fcacd00ba14def9" title="Distribute n items over the topology under root.">hwloc_distribute</a>(topology, root-&gt;<a class="code" href="a00010.html#a04d05403da37bfe17cd63b7c7dd07b1f" title="Children, children[0 .. arity -1].">children</a>[i], cpusetp, chunk_size);
<a name="l00608"></a>00608
<a name="l00609"></a>00609 <span class="comment">/* Now allocate not-so-complete chunks. */</span>
<a name="l00610"></a>00610 <span class="keywordflow">for</span> (u = i;
<a name="l00611"></a>00611 u &lt; root-&gt;<a class="code" href="a00010.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a>;
<a name="l00612"></a>00612 u++, cpusetp += chunk_size-1)
<a name="l00613"></a>00613 <a class="code" href="a00043.html#gadbea5d9e892dfb5f1fcacd00ba14def9" title="Distribute n items over the topology under root.">hwloc_distribute</a>(topology, root-&gt;<a class="code" href="a00010.html#a04d05403da37bfe17cd63b7c7dd07b1f" title="Children, children[0 .. arity -1].">children</a>[u], cpusetp, chunk_size-1);
<a name="l00614"></a>00614 }
<a name="l00615"></a>00615
<a name="l00621"></a>00621 <span class="comment">/* \brief Get complete CPU set</span>
<a name="l00622"></a>00622 <span class="comment"> *</span>
<a name="l00623"></a>00623 <span class="comment"> * \return the complete CPU set of logical processors of the system. If the</span>
<a name="l00624"></a>00624 <span class="comment"> * topology is the result of a combination of several systems, NULL is</span>
<a name="l00625"></a>00625 <span class="comment"> * returned.</span>
<a name="l00626"></a>00626 <span class="comment"> *</span>
<a name="l00627"></a>00627 <span class="comment"> * \note The returned cpuset is not newly allocated and should thus not be</span>
<a name="l00628"></a>00628 <span class="comment"> * changed or freed; hwloc_cpuset_dup must be used to obtain a local copy.</span>
<a name="l00629"></a>00629 <span class="comment"> */</span>
<a name="l00630"></a>00630 <span class="keyword">static</span> __inline <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> __hwloc_attribute_pure
<a name="l00631"></a><a class="code" href="a00044.html#ga0361003cb1e41f6f3e9fc485135a0950">00631</a> <a class="code" href="a00044.html#ga0361003cb1e41f6f3e9fc485135a0950">hwloc_topology_get_complete_cpuset</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology)
<a name="l00632"></a>00632 {
<a name="l00633"></a>00633 <span class="keywordflow">return</span> <a class="code" href="a00037.html#ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology)-&gt;<a class="code" href="a00010.html#a91788a9da687beb7224cc1fd7b75208c" title="The complete CPU set of logical processors of this object,.">complete_cpuset</a>;
<a name="l00634"></a>00634 }
<a name="l00635"></a>00635
<a name="l00636"></a>00636 <span class="comment">/* \brief Get topology CPU set</span>
<a name="l00637"></a>00637 <span class="comment"> *</span>
<a name="l00638"></a>00638 <span class="comment"> * \return the CPU set of logical processors of the system for which hwloc</span>
<a name="l00639"></a>00639 <span class="comment"> * provides topology information. This is equivalent to the cpuset of the</span>
<a name="l00640"></a>00640 <span class="comment"> * system object. If the topology is the result of a combination of several</span>
<a name="l00641"></a>00641 <span class="comment"> * systems, NULL is returned.</span>
<a name="l00642"></a>00642 <span class="comment"> *</span>
<a name="l00643"></a>00643 <span class="comment"> * \note The returned cpuset is not newly allocated and should thus not be</span>
<a name="l00644"></a>00644 <span class="comment"> * changed or freed; hwloc_cpuset_dup must be used to obtain a local copy.</span>
<a name="l00645"></a>00645 <span class="comment"> */</span>
<a name="l00646"></a>00646 <span class="keyword">static</span> __inline <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> __hwloc_attribute_pure
<a name="l00647"></a><a class="code" href="a00044.html#gaa1305cd39c6afd68652f2c6e68759381">00647</a> <a class="code" href="a00044.html#gaa1305cd39c6afd68652f2c6e68759381">hwloc_topology_get_topology_cpuset</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology)
<a name="l00648"></a>00648 {
<a name="l00649"></a>00649 <span class="keywordflow">return</span> <a class="code" href="a00037.html#ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology)-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>;
<a name="l00650"></a>00650 }
<a name="l00651"></a>00651
<a name="l00661"></a>00661 <span class="keyword">static</span> __inline <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> __hwloc_attribute_pure
<a name="l00662"></a><a class="code" href="a00044.html#gac3626396192ce01ad6a4811d9d29306b">00662</a> <a class="code" href="a00044.html#gac3626396192ce01ad6a4811d9d29306b" title="Get online CPU set.">hwloc_topology_get_online_cpuset</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology)
<a name="l00663"></a>00663 {
<a name="l00664"></a>00664 <span class="keywordflow">return</span> <a class="code" href="a00037.html#ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology)-&gt;<a class="code" href="a00010.html#a8842d56c2975380f327ea401c5f53564" title="The CPU set of online logical processors.">online_cpuset</a>;
<a name="l00665"></a>00665 }
<a name="l00666"></a>00666
<a name="l00676"></a>00676 <span class="keyword">static</span> __inline <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> __hwloc_attribute_pure
<a name="l00677"></a><a class="code" href="a00044.html#ga3374bb25a01c5cd447b097eaa6f77c6f">00677</a> <a class="code" href="a00044.html#ga3374bb25a01c5cd447b097eaa6f77c6f" title="Get allowed CPU set.">hwloc_topology_get_allowed_cpuset</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology)
<a name="l00678"></a>00678 {
<a name="l00679"></a>00679 <span class="keywordflow">return</span> <a class="code" href="a00037.html#ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology)-&gt;<a class="code" href="a00010.html#afa3c59a6dd3da8ffa48710780a1bfb34" title="The CPU set of allowed logical processors.">allowed_cpuset</a>;
<a name="l00680"></a>00680 }
<a name="l00681"></a>00681
<a name="l00682"></a>00682
<a name="l00685"></a>00685 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_HELPER_H */</span>
<a name="l00021"></a>00021 <span class="preprocessor">#if !defined _GNU_SOURCE || !defined _SCHED_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#error sched.h must be included with _GNU_SOURCE defined</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a>00025 <span class="preprocessor">#ifdef HWLOC_HAVE_CPU_SET</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027
<a name="l00040"></a>00040 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">int</span>
<a name="l00041"></a><a class="code" href="a00047.html#ga39454e6013441d32e58ef4c4fcba7e4b">00041</a> <a class="code" href="a00047.html#ga39454e6013441d32e58ef4c4fcba7e4b" title="Convert hwloc CPU set toposet into glibc sched affinity CPU set schedset.">hwloc_cpuset_to_glibc_sched_affinity</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> hwlocset,
<a name="l00042"></a>00042 cpu_set_t *schedset, <span class="keywordtype">size_t</span> schedsetsize)
<a name="l00043"></a>00043 {
<a name="l00044"></a>00044 <span class="preprocessor">#ifdef CPU_ZERO_S</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span> <span class="keywordtype">unsigned</span> cpu;
<a name="l00046"></a>00046 CPU_ZERO_S(schedsetsize, schedset);
<a name="l00047"></a>00047 <a class="code" href="a00046.html#ga8f896ce703ad1740fdf9ce8ac6361359" title="Loop macro iterating on CPU set set.">hwloc_cpuset_foreach_begin</a>(cpu, hwlocset)
<a name="l00048"></a>00048 CPU_SET_S(cpu, schedsetsize, schedset);
<a name="l00049"></a>00049 <a class="code" href="a00046.html#gae2974be78a7d7cddbd38cb23fcc6240a" title="End of loop. Needs a terminating &amp;#39;;&amp;#39;.">hwloc_cpuset_foreach_end</a>();
<a name="l00050"></a>00050 <span class="preprocessor">#else </span><span class="comment">/* !CPU_ZERO_S */</span>
<a name="l00051"></a>00051 <span class="keywordtype">unsigned</span> cpu;
<a name="l00052"></a>00052 CPU_ZERO(schedset);
<a name="l00053"></a>00053 assert(schedsetsize == <span class="keyword">sizeof</span>(cpu_set_t));
<a name="l00054"></a>00054 <a class="code" href="a00046.html#ga8f896ce703ad1740fdf9ce8ac6361359" title="Loop macro iterating on CPU set set.">hwloc_cpuset_foreach_begin</a>(cpu, hwlocset)
<a name="l00055"></a>00055 CPU_SET(cpu, schedset);
<a name="l00056"></a>00056 <a class="code" href="a00046.html#gae2974be78a7d7cddbd38cb23fcc6240a" title="End of loop. Needs a terminating &amp;#39;;&amp;#39;.">hwloc_cpuset_foreach_end</a>();
<a name="l00057"></a>00057 <span class="preprocessor">#endif </span><span class="comment">/* !CPU_ZERO_S */</span>
<a name="l00058"></a>00058 <span class="keywordflow">return</span> 0;
<a name="l00059"></a>00059 }
<a name="l00060"></a>00060
<a name="l00068"></a>00068 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">int</span>
<a name="l00069"></a><a class="code" href="a00047.html#ga6df504b2f5440b527be05cdad6b1655e">00069</a> <a class="code" href="a00047.html#ga6df504b2f5440b527be05cdad6b1655e" title="Convert glibc sched affinity CPU set schedset into hwloc CPU set.">hwloc_cpuset_from_glibc_sched_affinity</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> hwlocset,
<a name="l00070"></a>00070 <span class="keyword">const</span> cpu_set_t *schedset, <span class="keywordtype">size_t</span> schedsetsize)
<a name="l00071"></a>00071 {
<a name="l00072"></a>00072 <a class="code" href="a00046.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(hwlocset);
<a name="l00073"></a>00073 <span class="preprocessor">#ifdef CPU_ZERO_S</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span> <span class="keywordtype">int</span> cpu, count;
<a name="l00075"></a>00075 count = CPU_COUNT_S(schedsetsize, schedset);
<a name="l00076"></a>00076 cpu = 0;
<a name="l00077"></a>00077 <span class="keywordflow">while</span> (count) {
<a name="l00078"></a>00078 <span class="keywordflow">if</span> (CPU_ISSET_S(cpu, schedsetsize, schedset)) {
<a name="l00079"></a>00079 <a class="code" href="a00046.html#ga793d0c31b524337355ddce1c6568a866" title="Add CPU cpu in CPU set set.">hwloc_cpuset_set</a>(hwlocset, cpu);
<a name="l00080"></a>00080 count--;
<a name="l00081"></a>00081 }
<a name="l00082"></a>00082 cpu++;
<a name="l00083"></a>00083 <span class="keywordflow">if</span> (cpu &gt; HWLOC_NBMAXCPUS)
<a name="l00084"></a>00084 <span class="keywordflow">break</span>;
<a name="l00085"></a>00085 }
<a name="l00086"></a>00086 <span class="preprocessor">#else </span><span class="comment">/* !CPU_ZERO_S */</span>
<a name="l00087"></a>00087 <span class="comment">/* sched.h does not support dynamic cpu_set_t (introduced in glibc 2.7),</span>
<a name="l00088"></a>00088 <span class="comment"> * assume we have a very old interface without CPU_COUNT (added in 2.6)</span>
<a name="l00089"></a>00089 <span class="comment"> */</span>
<a name="l00090"></a>00090 <span class="keywordtype">int</span> cpu;
<a name="l00091"></a>00091 assert(schedsetsize == <span class="keyword">sizeof</span>(cpu_set_t));
<a name="l00092"></a>00092 <span class="keywordflow">for</span>(cpu=0; cpu&lt;CPU_SETSIZE &amp;&amp; cpu&lt;HWLOC_NBMAXCPUS; cpu++)
<a name="l00093"></a>00093 <span class="keywordflow">if</span> (CPU_ISSET(cpu, schedset))
<a name="l00094"></a>00094 <a class="code" href="a00046.html#ga793d0c31b524337355ddce1c6568a866" title="Add CPU cpu in CPU set set.">hwloc_cpuset_set</a>(hwlocset, cpu);
<a name="l00095"></a>00095 <span class="preprocessor">#endif </span><span class="comment">/* !CPU_ZERO_S */</span>
<a name="l00096"></a>00096 <span class="keywordflow">return</span> 0;
<a name="l00097"></a>00097 }
<a name="l00098"></a>00098
<a name="l00102"></a>00102 <span class="preprocessor">#endif </span><span class="comment">/* CPU_SET */</span>
<a name="l00103"></a>00103
<a name="l00104"></a>00104 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_GLIBC_SCHED_H */</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">

Просмотреть файл

@ -0,0 +1,461 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): helper.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>helper.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright © 2009 CNRS, INRIA, Université Bordeaux 1</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.</span>
<a name="l00004"></a>00004 <span class="comment"> * See COPYING in top-level directory.</span>
<a name="l00005"></a>00005 <span class="comment"> */</span>
<a name="l00006"></a>00006
<a name="l00011"></a>00011 <span class="preprocessor">#ifndef HWLOC_HELPER_H</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_HELPER_H</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span>
<a name="l00014"></a>00014 <span class="preprocessor">#ifndef HWLOC_H</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#error Please include the main hwloc.h instead</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;errno.h&gt;</span>
<a name="l00020"></a>00020
<a name="l00021"></a>00021
<a name="l00032"></a>00032 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">int</span> __hwloc_attribute_pure
<a name="l00033"></a><a class="code" href="a00037.html#ga0ffafb4c0ae13b9a7541ca820ca34883">00033</a> <a class="code" href="a00037.html#ga0ffafb4c0ae13b9a7541ca820ca34883" title="Returns the depth of objects of type type or below.">hwloc_get_type_or_below_depth</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type)
<a name="l00034"></a>00034 {
<a name="l00035"></a>00035 <span class="keywordtype">int</span> depth = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="keywordflow">if</span> (depth != <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>)
<a name="l00038"></a>00038 <span class="keywordflow">return</span> depth;
<a name="l00039"></a>00039
<a name="l00040"></a>00040 <span class="comment">/* find the highest existing level with type order &gt;= */</span>
<a name="l00041"></a>00041 <span class="keywordflow">for</span>(depth = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a>); ; depth--)
<a name="l00042"></a>00042 <span class="keywordflow">if</span> (<a class="code" href="a00028.html#gabd7da4f4ea12b420b8ecbde458b27805" title="Compare the depth of two object types.">hwloc_compare_types</a>(<a class="code" href="a00033.html#gadd4964764ae7e49231065d58a553fd31" title="Returns the type of objects at depth depth.">hwloc_get_depth_type</a>(topology, depth), type) &lt; 0)
<a name="l00043"></a>00043 <span class="keywordflow">return</span> depth+1;
<a name="l00044"></a>00044
<a name="l00045"></a>00045 <span class="comment">/* Shouldn&#39;t ever happen, as there is always a SYSTEM level with lower order and known depth. */</span>
<a name="l00046"></a>00046 <span class="comment">/* abort(); */</span>
<a name="l00047"></a>00047 }
<a name="l00048"></a>00048
<a name="l00055"></a>00055 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">int</span> __hwloc_attribute_pure
<a name="l00056"></a><a class="code" href="a00037.html#ga24b9cd5917fcebac6e45ae38d0a6cda4">00056</a> <a class="code" href="a00037.html#ga24b9cd5917fcebac6e45ae38d0a6cda4" title="Returns the depth of objects of type type or above.">hwloc_get_type_or_above_depth</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type)
<a name="l00057"></a>00057 {
<a name="l00058"></a>00058 <span class="keywordtype">int</span> depth = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00059"></a>00059
<a name="l00060"></a>00060 <span class="keywordflow">if</span> (depth != <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>)
<a name="l00061"></a>00061 <span class="keywordflow">return</span> depth;
<a name="l00062"></a>00062
<a name="l00063"></a>00063 <span class="comment">/* find the lowest existing level with type order &lt;= */</span>
<a name="l00064"></a>00064 <span class="keywordflow">for</span>(depth = 0; ; depth++)
<a name="l00065"></a>00065 <span class="keywordflow">if</span> (<a class="code" href="a00028.html#gabd7da4f4ea12b420b8ecbde458b27805" title="Compare the depth of two object types.">hwloc_compare_types</a>(<a class="code" href="a00033.html#gadd4964764ae7e49231065d58a553fd31" title="Returns the type of objects at depth depth.">hwloc_get_depth_type</a>(topology, depth), type) &gt; 0)
<a name="l00066"></a>00066 <span class="keywordflow">return</span> depth-1;
<a name="l00067"></a>00067
<a name="l00068"></a>00068 <span class="comment">/* Shouldn&#39;t ever happen, as there is always a PU level with higher order and known depth. */</span>
<a name="l00069"></a>00069 <span class="comment">/* abort(); */</span>
<a name="l00070"></a>00070 }
<a name="l00071"></a>00071
<a name="l00086"></a>00086 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00087"></a><a class="code" href="a00038.html#ga632edae4a651996895ebde85ea2c1264">00087</a> <a class="code" href="a00038.html#ga632edae4a651996895ebde85ea2c1264" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology)
<a name="l00088"></a>00088 {
<a name="l00089"></a>00089 <span class="keywordflow">return</span> <a class="code" href="a00034.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a> (topology, 0, 0);
<a name="l00090"></a>00090 }
<a name="l00091"></a>00091
<a name="l00093"></a>00093 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00094"></a><a class="code" href="a00038.html#gafa813c4ff8d610b3e158224a56386b2f">00094</a> <a class="code" href="a00038.html#gafa813c4ff8d610b3e158224a56386b2f" title="Returns the ancestor object of obj at depth depth.">hwloc_get_ancestor_obj_by_depth</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <span class="keywordtype">unsigned</span> depth, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj)
<a name="l00095"></a>00095 {
<a name="l00096"></a>00096 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> ancestor = obj;
<a name="l00097"></a>00097 <span class="keywordflow">if</span> (obj-&gt;<a class="code" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a> &lt; depth)
<a name="l00098"></a>00098 <span class="keywordflow">return</span> NULL;
<a name="l00099"></a>00099 <span class="keywordflow">while</span> (ancestor &amp;&amp; ancestor-&gt;<a class="code" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a> &gt; depth)
<a name="l00100"></a>00100 ancestor = ancestor-&gt;<a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00101"></a>00101 <span class="keywordflow">return</span> ancestor;
<a name="l00102"></a>00102 }
<a name="l00103"></a>00103
<a name="l00105"></a>00105 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00106"></a><a class="code" href="a00038.html#ga20ade151cb33991b4cd960924a830764">00106</a> <a class="code" href="a00038.html#ga20ade151cb33991b4cd960924a830764" title="Returns the ancestor object of obj with type type.">hwloc_get_ancestor_obj_by_type</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj)
<a name="l00107"></a>00107 {
<a name="l00108"></a>00108 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> ancestor = obj-&gt;<a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00109"></a>00109 <span class="keywordflow">while</span> (ancestor &amp;&amp; ancestor-&gt;<a class="code" href="a00011.html#acc4f0803f244867e68fe0036800be5de" title="Type of object.">type</a> != type)
<a name="l00110"></a>00110 ancestor = ancestor-&gt;<a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00111"></a>00111 <span class="keywordflow">return</span> ancestor;
<a name="l00112"></a>00112 }
<a name="l00113"></a>00113
<a name="l00118"></a>00118 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00119"></a><a class="code" href="a00038.html#gab7c1dce3f42ece5bfa621e87cf332418">00119</a> <a class="code" href="a00038.html#gab7c1dce3f42ece5bfa621e87cf332418" title="Returns the next object at depth depth.">hwloc_get_next_obj_by_depth</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">unsigned</span> depth, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00120"></a>00120 {
<a name="l00121"></a>00121 <span class="keywordflow">if</span> (!prev)
<a name="l00122"></a>00122 <span class="keywordflow">return</span> <a class="code" href="a00034.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a> (topology, depth, 0);
<a name="l00123"></a>00123 <span class="keywordflow">if</span> (prev-&gt;<a class="code" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a> != depth)
<a name="l00124"></a>00124 <span class="keywordflow">return</span> NULL;
<a name="l00125"></a>00125 <span class="keywordflow">return</span> prev-&gt;<a class="code" href="a00011.html#a85a788017457129589318b6c39451acf" title="Next object of same type.">next_cousin</a>;
<a name="l00126"></a>00126 }
<a name="l00127"></a>00127
<a name="l00134"></a>00134 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00135"></a><a class="code" href="a00038.html#ga5f08ceb69375341e73563cfe2e77534e">00135</a> <a class="code" href="a00038.html#ga5f08ceb69375341e73563cfe2e77534e" title="Returns the next object of type type.">hwloc_get_next_obj_by_type</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type,
<a name="l00136"></a>00136 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00137"></a>00137 {
<a name="l00138"></a>00138 <span class="keywordtype">int</span> depth = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00139"></a>00139 <span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a> || depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00140"></a>00140 <span class="keywordflow">return</span> NULL;
<a name="l00141"></a>00141 <span class="keywordflow">return</span> <a class="code" href="a00038.html#gab7c1dce3f42ece5bfa621e87cf332418" title="Returns the next object at depth depth.">hwloc_get_next_obj_by_depth</a> (topology, depth, prev);
<a name="l00142"></a>00142 }
<a name="l00143"></a>00143
<a name="l00152"></a>00152 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00153"></a><a class="code" href="a00038.html#ga61e00b83e7e0a1a946dc1bb29c49ccba">00153</a> <a class="code" href="a00038.html#ga61e00b83e7e0a1a946dc1bb29c49ccba" title="Returns the object of type HWLOC_OBJ_PU with os_index.">hwloc_get_pu_obj_by_os_index</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">unsigned</span> os_index)
<a name="l00154"></a>00154 {
<a name="l00155"></a>00155 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj = NULL;
<a name="l00156"></a>00156 <span class="keywordflow">while</span> ((obj = <a class="code" href="a00038.html#ga5f08ceb69375341e73563cfe2e77534e" title="Returns the next object of type type.">hwloc_get_next_obj_by_type</a>(topology, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a>, obj)) != NULL)
<a name="l00157"></a>00157 <span class="keywordflow">if</span> (obj-&gt;<a class="code" href="a00011.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a> == os_index)
<a name="l00158"></a>00158 <span class="keywordflow">return</span> obj;
<a name="l00159"></a>00159 <span class="keywordflow">return</span> NULL;
<a name="l00160"></a>00160 }
<a name="l00161"></a>00161
<a name="l00166"></a>00166 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00167"></a><a class="code" href="a00038.html#gae5ef1af636849f77714e1584ba78cf9c">00167</a> <a class="code" href="a00038.html#gae5ef1af636849f77714e1584ba78cf9c" title="Return the next child.">hwloc_get_next_child</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> parent, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00168"></a>00168 {
<a name="l00169"></a>00169 <span class="keywordflow">if</span> (!prev)
<a name="l00170"></a>00170 <span class="keywordflow">return</span> parent-&gt;<a class="code" href="a00011.html#af51d08a0a79dba517c06c5afedc8d2dc" title="First child.">first_child</a>;
<a name="l00171"></a>00171 <span class="keywordflow">if</span> (prev-&gt;<a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a> != parent)
<a name="l00172"></a>00172 <span class="keywordflow">return</span> NULL;
<a name="l00173"></a>00173 <span class="keywordflow">return</span> prev-&gt;<a class="code" href="a00011.html#a7f2343ed476fe4942e6fffd4cade1b40" title="Next object below the same parent.">next_sibling</a>;
<a name="l00174"></a>00174 }
<a name="l00175"></a>00175
<a name="l00177"></a>00177 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00178"></a><a class="code" href="a00038.html#gac574b7b06d2d937002dd538e08dbd554">00178</a> <a class="code" href="a00038.html#gac574b7b06d2d937002dd538e08dbd554" title="Returns the common parent object to objects lvl1 and lvl2.">hwloc_get_common_ancestor_obj</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj1, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj2)
<a name="l00179"></a>00179 {
<a name="l00180"></a>00180 <span class="keywordflow">while</span> (obj1-&gt;<a class="code" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a> &gt; obj2-&gt;<a class="code" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a>)
<a name="l00181"></a>00181 obj1 = obj1-&gt;<a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00182"></a>00182 <span class="keywordflow">while</span> (obj2-&gt;<a class="code" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a> &gt; obj1-&gt;<a class="code" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a>)
<a name="l00183"></a>00183 obj2 = obj2-&gt;<a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00184"></a>00184 <span class="keywordflow">while</span> (obj1 != obj2) {
<a name="l00185"></a>00185 obj1 = obj1-&gt;<a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00186"></a>00186 obj2 = obj2-&gt;<a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00187"></a>00187 }
<a name="l00188"></a>00188 <span class="keywordflow">return</span> obj1;
<a name="l00189"></a>00189 }
<a name="l00190"></a>00190
<a name="l00193"></a>00193 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">int</span> __hwloc_attribute_pure
<a name="l00194"></a><a class="code" href="a00038.html#ga38d9bd3a7566d0e6b0ab95d652557707">00194</a> <a class="code" href="a00038.html#ga38d9bd3a7566d0e6b0ab95d652557707" title="Returns true if _obj_ is inside the subtree beginning with subtree_root.">hwloc_obj_is_in_subtree</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> subtree_root)
<a name="l00195"></a>00195 {
<a name="l00196"></a>00196 <span class="keywordflow">return</span> <a class="code" href="a00046.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(obj-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, subtree_root-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
<a name="l00197"></a>00197 }
<a name="l00198"></a>00198
<a name="l00215"></a>00215 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00216"></a><a class="code" href="a00039.html#gabcd5fa81a95fa5335950cae092277d5b">00216</a> <a class="code" href="a00039.html#gabcd5fa81a95fa5335950cae092277d5b" title="Get the first largest object included in the given cpuset set.">hwloc_get_first_largest_obj_inside_cpuset</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>)
<a name="l00217"></a>00217 {
<a name="l00218"></a>00218 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj = <a class="code" href="a00038.html#ga632edae4a651996895ebde85ea2c1264" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology);
<a name="l00219"></a>00219 <span class="keywordflow">if</span> (!<a class="code" href="a00046.html#gad7cbab558a9a80652c3ad0b30d488f04" title="Test whether sets set1 and set2 intersects.">hwloc_cpuset_intersects</a>(obj-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keyword">set</span>))
<a name="l00220"></a>00220 <span class="keywordflow">return</span> NULL;
<a name="l00221"></a>00221 <span class="keywordflow">while</span> (!<a class="code" href="a00046.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(obj-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keyword">set</span>)) {
<a name="l00222"></a>00222 <span class="comment">/* while the object intersects without being included, look at its children */</span>
<a name="l00223"></a>00223 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> child = NULL;
<a name="l00224"></a>00224 <span class="keywordflow">while</span> ((child = <a class="code" href="a00038.html#gae5ef1af636849f77714e1584ba78cf9c" title="Return the next child.">hwloc_get_next_child</a>(topology, obj, child)) != NULL) {
<a name="l00225"></a>00225 <span class="keywordflow">if</span> (<a class="code" href="a00046.html#gad7cbab558a9a80652c3ad0b30d488f04" title="Test whether sets set1 and set2 intersects.">hwloc_cpuset_intersects</a>(child-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keyword">set</span>))
<a name="l00226"></a>00226 <span class="keywordflow">break</span>;
<a name="l00227"></a>00227 }
<a name="l00228"></a>00228 <span class="keywordflow">if</span> (!child)
<a name="l00229"></a>00229 <span class="comment">/* no child intersects, return their father */</span>
<a name="l00230"></a>00230 <span class="keywordflow">return</span> obj;
<a name="l00231"></a>00231 <span class="comment">/* found one intersecting child, look at its children */</span>
<a name="l00232"></a>00232 obj = child;
<a name="l00233"></a>00233 }
<a name="l00234"></a>00234 <span class="comment">/* obj is included, return it */</span>
<a name="l00235"></a>00235 <span class="keywordflow">return</span> obj;
<a name="l00236"></a>00236 }
<a name="l00237"></a>00237
<a name="l00242"></a>00242 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00039.html#gaab04c89623662e63a48ed2cd48eb601c" title="Get the set of largest objects covering exactly a given cpuset set.">hwloc_get_largest_objs_inside_cpuset</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00243"></a>00243 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> * __hwloc_restrict objs, <span class="keywordtype">int</span> max);
<a name="l00244"></a>00244
<a name="l00251"></a>00251 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00252"></a><a class="code" href="a00039.html#ga8af256c2572f16520f95440b884c1bd6">00252</a> <a class="code" href="a00039.html#ga8af256c2572f16520f95440b884c1bd6" title="Return the next object at depth depth included in CPU set set.">hwloc_get_next_obj_inside_cpuset_by_depth</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00253"></a>00253 <span class="keywordtype">unsigned</span> depth, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00254"></a>00254 {
<a name="l00255"></a>00255 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> next = <a class="code" href="a00038.html#gab7c1dce3f42ece5bfa621e87cf332418" title="Returns the next object at depth depth.">hwloc_get_next_obj_by_depth</a>(topology, depth, prev);
<a name="l00256"></a>00256 <span class="keywordflow">while</span> (next &amp;&amp; !<a class="code" href="a00046.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(next-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keyword">set</span>))
<a name="l00257"></a>00257 next = next-&gt;<a class="code" href="a00011.html#a85a788017457129589318b6c39451acf" title="Next object of same type.">next_cousin</a>;
<a name="l00258"></a>00258 <span class="keywordflow">return</span> next;
<a name="l00259"></a>00259 }
<a name="l00260"></a>00260
<a name="l00267"></a>00267 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00268"></a><a class="code" href="a00039.html#ga934e7ecd68b33403e0c0be779d9ed1e6">00268</a> <a class="code" href="a00039.html#ga934e7ecd68b33403e0c0be779d9ed1e6" title="Return the next object of type type included in CPU set set.">hwloc_get_next_obj_inside_cpuset_by_type</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00269"></a>00269 <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00270"></a>00270 {
<a name="l00271"></a>00271 <span class="keywordtype">int</span> depth = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00272"></a>00272 <span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a> || depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00273"></a>00273 <span class="keywordflow">return</span> NULL;
<a name="l00274"></a>00274 <span class="keywordflow">return</span> <a class="code" href="a00039.html#ga8af256c2572f16520f95440b884c1bd6" title="Return the next object at depth depth included in CPU set set.">hwloc_get_next_obj_inside_cpuset_by_depth</a>(topology, <span class="keyword">set</span>, depth, prev);
<a name="l00275"></a>00275 }
<a name="l00276"></a>00276
<a name="l00279"></a>00279 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00280"></a><a class="code" href="a00039.html#ga20703980008f82379f98f56857611a1a">00280</a> <a class="code" href="a00039.html#ga20703980008f82379f98f56857611a1a" title="Return the index -th object at depth depth included in CPU set set.">hwloc_get_obj_inside_cpuset_by_depth</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00281"></a>00281 <span class="keywordtype">unsigned</span> depth, <span class="keywordtype">unsigned</span> idx)
<a name="l00282"></a>00282 {
<a name="l00283"></a>00283 <span class="keywordtype">unsigned</span> count = 0;
<a name="l00284"></a>00284 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj = <a class="code" href="a00034.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a> (topology, depth, 0);
<a name="l00285"></a>00285 <span class="keywordflow">while</span> (obj) {
<a name="l00286"></a>00286 <span class="keywordflow">if</span> (<a class="code" href="a00046.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(obj-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keyword">set</span>)) {
<a name="l00287"></a>00287 <span class="keywordflow">if</span> (count == idx)
<a name="l00288"></a>00288 <span class="keywordflow">return</span> obj;
<a name="l00289"></a>00289 count++;
<a name="l00290"></a>00290 }
<a name="l00291"></a>00291 obj = obj-&gt;<a class="code" href="a00011.html#a85a788017457129589318b6c39451acf" title="Next object of same type.">next_cousin</a>;
<a name="l00292"></a>00292 }
<a name="l00293"></a>00293 <span class="keywordflow">return</span> NULL;
<a name="l00294"></a>00294 }
<a name="l00295"></a>00295
<a name="l00302"></a>00302 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00303"></a><a class="code" href="a00039.html#ga50a80a0021e5843d968c3b97aebaad9b">00303</a> <a class="code" href="a00039.html#ga50a80a0021e5843d968c3b97aebaad9b" title="Return the idx -th object of type type included in CPU set set.">hwloc_get_obj_inside_cpuset_by_type</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00304"></a>00304 <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type, <span class="keywordtype">unsigned</span> idx)
<a name="l00305"></a>00305 {
<a name="l00306"></a>00306 <span class="keywordtype">int</span> depth = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00307"></a>00307 <span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a> || depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00308"></a>00308 <span class="keywordflow">return</span> NULL;
<a name="l00309"></a>00309 <span class="keywordflow">return</span> <a class="code" href="a00039.html#ga20703980008f82379f98f56857611a1a" title="Return the index -th object at depth depth included in CPU set set.">hwloc_get_obj_inside_cpuset_by_depth</a>(topology, <span class="keyword">set</span>, depth, idx);
<a name="l00310"></a>00310 }
<a name="l00311"></a>00311
<a name="l00313"></a>00313 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">unsigned</span> __hwloc_attribute_pure
<a name="l00314"></a><a class="code" href="a00039.html#ga6807db0012369efe19b8d3dcee235493">00314</a> <a class="code" href="a00039.html#ga6807db0012369efe19b8d3dcee235493" title="Return the number of objects at depth depth included in CPU set set.">hwloc_get_nbobjs_inside_cpuset_by_depth</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00315"></a>00315 <span class="keywordtype">unsigned</span> depth)
<a name="l00316"></a>00316 {
<a name="l00317"></a>00317 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj = <a class="code" href="a00034.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a> (topology, depth, 0);
<a name="l00318"></a>00318 <span class="keywordtype">int</span> count = 0;
<a name="l00319"></a>00319 <span class="keywordflow">while</span> (obj) {
<a name="l00320"></a>00320 <span class="keywordflow">if</span> (<a class="code" href="a00046.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(obj-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keyword">set</span>))
<a name="l00321"></a>00321 count++;
<a name="l00322"></a>00322 obj = obj-&gt;<a class="code" href="a00011.html#a85a788017457129589318b6c39451acf" title="Next object of same type.">next_cousin</a>;
<a name="l00323"></a>00323 }
<a name="l00324"></a>00324 <span class="keywordflow">return</span> count;
<a name="l00325"></a>00325 }
<a name="l00326"></a>00326
<a name="l00333"></a>00333 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">int</span> __hwloc_attribute_pure
<a name="l00334"></a><a class="code" href="a00039.html#ga72c5bc4317a4c3938e32447b769813a0">00334</a> <a class="code" href="a00039.html#ga72c5bc4317a4c3938e32447b769813a0" title="Return the number of objects of type type included in CPU set set.">hwloc_get_nbobjs_inside_cpuset_by_type</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00335"></a>00335 <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type)
<a name="l00336"></a>00336 {
<a name="l00337"></a>00337 <span class="keywordtype">int</span> depth = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00338"></a>00338 <span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>)
<a name="l00339"></a>00339 <span class="keywordflow">return</span> 0;
<a name="l00340"></a>00340 <span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00341"></a>00341 <span class="keywordflow">return</span> -1; <span class="comment">/* FIXME: agregate nbobjs from different levels? */</span>
<a name="l00342"></a>00342 <span class="keywordflow">return</span> <a class="code" href="a00039.html#ga6807db0012369efe19b8d3dcee235493" title="Return the number of objects at depth depth included in CPU set set.">hwloc_get_nbobjs_inside_cpuset_by_depth</a>(topology, <span class="keyword">set</span>, depth);
<a name="l00343"></a>00343 }
<a name="l00344"></a>00344
<a name="l00357"></a>00357 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00358"></a><a class="code" href="a00040.html#gab56b99460194bbcb36016d36d55132a7">00358</a> <a class="code" href="a00040.html#gab56b99460194bbcb36016d36d55132a7" title="Get the child covering at least CPU set set.">hwloc_get_child_covering_cpuset</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00359"></a>00359 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> parent)
<a name="l00360"></a>00360 {
<a name="l00361"></a>00361 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> child;
<a name="l00362"></a>00362
<a name="l00363"></a>00363 <span class="keywordflow">if</span> (<a class="code" href="a00046.html#gac5b8ad0c32e9d14c587eabde188182a9" title="Test whether set set is empty.">hwloc_cpuset_iszero</a>(<span class="keyword">set</span>))
<a name="l00364"></a>00364 <span class="keywordflow">return</span> NULL;
<a name="l00365"></a>00365
<a name="l00366"></a>00366 child = parent-&gt;<a class="code" href="a00011.html#af51d08a0a79dba517c06c5afedc8d2dc" title="First child.">first_child</a>;
<a name="l00367"></a>00367 <span class="keywordflow">while</span> (child) {
<a name="l00368"></a>00368 <span class="keywordflow">if</span> (<a class="code" href="a00046.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(<span class="keyword">set</span>, child-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>))
<a name="l00369"></a>00369 <span class="keywordflow">return</span> child;
<a name="l00370"></a>00370 child = child-&gt;<a class="code" href="a00011.html#a7f2343ed476fe4942e6fffd4cade1b40" title="Next object below the same parent.">next_sibling</a>;
<a name="l00371"></a>00371 }
<a name="l00372"></a>00372 <span class="keywordflow">return</span> NULL;
<a name="l00373"></a>00373 }
<a name="l00374"></a>00374
<a name="l00379"></a>00379 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00380"></a><a class="code" href="a00040.html#ga2a0de36ea0c3c70fb5f4cba0bb192582">00380</a> <a class="code" href="a00040.html#ga2a0de36ea0c3c70fb5f4cba0bb192582" title="Get the lowest object covering at least CPU set set.">hwloc_get_obj_covering_cpuset</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>)
<a name="l00381"></a>00381 {
<a name="l00382"></a>00382 <span class="keyword">struct </span><a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj</a> *current = <a class="code" href="a00038.html#ga632edae4a651996895ebde85ea2c1264" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology);
<a name="l00383"></a>00383
<a name="l00384"></a>00384 <span class="keywordflow">if</span> (<a class="code" href="a00046.html#gac5b8ad0c32e9d14c587eabde188182a9" title="Test whether set set is empty.">hwloc_cpuset_iszero</a>(<span class="keyword">set</span>))
<a name="l00385"></a>00385 <span class="keywordflow">return</span> NULL;
<a name="l00386"></a>00386
<a name="l00387"></a>00387 <span class="keywordflow">if</span> (!<a class="code" href="a00046.html#ga135bbe4177fbfe8b14bcbe6aad765801" title="Test whether set sub_set is part of set super_set.">hwloc_cpuset_isincluded</a>(<span class="keyword">set</span>, current-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>))
<a name="l00388"></a>00388 <span class="keywordflow">return</span> NULL;
<a name="l00389"></a>00389
<a name="l00390"></a>00390 <span class="keywordflow">while</span> (1) {
<a name="l00391"></a>00391 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> child = <a class="code" href="a00040.html#gab56b99460194bbcb36016d36d55132a7" title="Get the child covering at least CPU set set.">hwloc_get_child_covering_cpuset</a>(topology, <span class="keyword">set</span>, current);
<a name="l00392"></a>00392 <span class="keywordflow">if</span> (!child)
<a name="l00393"></a>00393 <span class="keywordflow">return</span> current;
<a name="l00394"></a>00394 current = child;
<a name="l00395"></a>00395 }
<a name="l00396"></a>00396 }
<a name="l00397"></a>00397
<a name="l00398"></a>00398
<a name="l00414"></a>00414 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00415"></a><a class="code" href="a00041.html#ga2f9a4ec15e9cfae8c21501257a51ce5b">00415</a> <a class="code" href="a00041.html#ga2f9a4ec15e9cfae8c21501257a51ce5b" title="Iterate through same-depth objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_depth</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00416"></a>00416 <span class="keywordtype">unsigned</span> <a class="code" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a>, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00417"></a>00417 {
<a name="l00418"></a>00418 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> next = <a class="code" href="a00038.html#gab7c1dce3f42ece5bfa621e87cf332418" title="Returns the next object at depth depth.">hwloc_get_next_obj_by_depth</a>(topology, depth, prev);
<a name="l00419"></a>00419 <span class="keywordflow">while</span> (next &amp;&amp; !<a class="code" href="a00046.html#gad7cbab558a9a80652c3ad0b30d488f04" title="Test whether sets set1 and set2 intersects.">hwloc_cpuset_intersects</a>(<span class="keyword">set</span>, next-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>))
<a name="l00420"></a>00420 next = next-&gt;<a class="code" href="a00011.html#a85a788017457129589318b6c39451acf" title="Next object of same type.">next_cousin</a>;
<a name="l00421"></a>00421 <span class="keywordflow">return</span> next;
<a name="l00422"></a>00422 }
<a name="l00423"></a>00423
<a name="l00436"></a>00436 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a>
<a name="l00437"></a><a class="code" href="a00041.html#ga5915ea30f326676b3a4cfff371ce04d1">00437</a> <a class="code" href="a00041.html#ga5915ea30f326676b3a4cfff371ce04d1" title="Iterate through same-type objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_type</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00438"></a>00438 <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> <a class="code" href="a00011.html#acc4f0803f244867e68fe0036800be5de" title="Type of object.">type</a>, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> prev)
<a name="l00439"></a>00439 {
<a name="l00440"></a>00440 <span class="keywordtype">int</span> <a class="code" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a> = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00441"></a>00441 <span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a> || depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00442"></a>00442 <span class="keywordflow">return</span> NULL;
<a name="l00443"></a>00443 <span class="keywordflow">return</span> <a class="code" href="a00041.html#ga2f9a4ec15e9cfae8c21501257a51ce5b" title="Iterate through same-depth objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_depth</a>(topology, <span class="keyword">set</span>, depth, prev);
<a name="l00444"></a>00444 }
<a name="l00445"></a>00445
<a name="l00458"></a>00458 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00459"></a><a class="code" href="a00042.html#gae744419648117cbd613a038074aa0627">00459</a> <a class="code" href="a00042.html#gae744419648117cbd613a038074aa0627" title="Get the first cache covering a cpuset set.">hwloc_get_cache_covering_cpuset</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>)
<a name="l00460"></a>00460 {
<a name="l00461"></a>00461 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> current = <a class="code" href="a00040.html#ga2a0de36ea0c3c70fb5f4cba0bb192582" title="Get the lowest object covering at least CPU set set.">hwloc_get_obj_covering_cpuset</a>(topology, <span class="keyword">set</span>);
<a name="l00462"></a>00462 <span class="keywordflow">while</span> (current) {
<a name="l00463"></a>00463 <span class="keywordflow">if</span> (current-&gt;<a class="code" href="a00011.html#acc4f0803f244867e68fe0036800be5de" title="Type of object.">type</a> == <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc" title="Data cache. Can be L1, L2, L3, ...">HWLOC_OBJ_CACHE</a>)
<a name="l00464"></a>00464 <span class="keywordflow">return</span> current;
<a name="l00465"></a>00465 current = current-&gt;<a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00466"></a>00466 }
<a name="l00467"></a>00467 <span class="keywordflow">return</span> NULL;
<a name="l00468"></a>00468 }
<a name="l00469"></a>00469
<a name="l00474"></a>00474 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00475"></a><a class="code" href="a00042.html#ga75e961873d4b976ab10bc4739248c96d">00475</a> <a class="code" href="a00042.html#ga75e961873d4b976ab10bc4739248c96d" title="Get the first cache shared between an object and somebody else.">hwloc_get_shared_cache_covering_obj</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj)
<a name="l00476"></a>00476 {
<a name="l00477"></a>00477 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> current = obj-&gt;<a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00478"></a>00478 <span class="keywordflow">while</span> (current) {
<a name="l00479"></a>00479 <span class="keywordflow">if</span> (!<a class="code" href="a00046.html#ga9534d84820beade1e6155a1e734307a2" title="Test whether set set1 is equal to set set2.">hwloc_cpuset_isequal</a>(current-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, obj-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>)
<a name="l00480"></a>00480 &amp;&amp; current-&gt;<a class="code" href="a00011.html#acc4f0803f244867e68fe0036800be5de" title="Type of object.">type</a> == <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc" title="Data cache. Can be L1, L2, L3, ...">HWLOC_OBJ_CACHE</a>)
<a name="l00481"></a>00481 <span class="keywordflow">return</span> current;
<a name="l00482"></a>00482 current = current-&gt;<a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00483"></a>00483 }
<a name="l00484"></a>00484 <span class="keywordflow">return</span> NULL;
<a name="l00485"></a>00485 }
<a name="l00486"></a>00486
<a name="l00502"></a>00502 <span class="comment">/* TODO: rather provide an iterator? Provide a way to know how much should be allocated? By returning the total number of objects instead? */</span>
<a name="l00503"></a>00503 HWLOC_DECLSPEC <span class="keywordtype">unsigned</span> <a class="code" href="a00043.html#ga26c2ac4f25b1ed293249c88e232f1bea" title="Do a depth-first traversal of the topology to find and sort.">hwloc_get_closest_objs</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> src, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> * __hwloc_restrict objs, <span class="keywordtype">unsigned</span> max);
<a name="l00504"></a>00504
<a name="l00515"></a>00515 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00516"></a><a class="code" href="a00043.html#ga3d32c128aa36b5c9d56f6bf9e70d0e78">00516</a> <a class="code" href="a00043.html#ga3d32c128aa36b5c9d56f6bf9e70d0e78" title="Find an object below another object, both specified by types and indexes.">hwloc_get_obj_below_by_type</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology,
<a name="l00517"></a>00517 <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type1, <span class="keywordtype">unsigned</span> idx1,
<a name="l00518"></a>00518 <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type2, <span class="keywordtype">unsigned</span> idx2)
<a name="l00519"></a>00519 {
<a name="l00520"></a>00520 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj;
<a name="l00521"></a>00521
<a name="l00522"></a>00522 obj = <a class="code" href="a00034.html#ga701f83b2cf0cb8e0acd58cd2dc1c67a2" title="Returns the topology object at index index with type type.">hwloc_get_obj_by_type</a> (topology, type1, idx1);
<a name="l00523"></a>00523 <span class="keywordflow">if</span> (!obj)
<a name="l00524"></a>00524 <span class="keywordflow">return</span> NULL;
<a name="l00525"></a>00525
<a name="l00526"></a>00526 <span class="keywordflow">return</span> <a class="code" href="a00039.html#ga50a80a0021e5843d968c3b97aebaad9b" title="Return the idx -th object of type type included in CPU set set.">hwloc_get_obj_inside_cpuset_by_type</a>(topology, obj-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, type2, idx2);
<a name="l00527"></a>00527 }
<a name="l00528"></a>00528
<a name="l00544"></a>00544 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> __hwloc_attribute_pure
<a name="l00545"></a><a class="code" href="a00043.html#ga340bb7021204078c30382ea77d38bde9">00545</a> <a class="code" href="a00043.html#ga340bb7021204078c30382ea77d38bde9" title="Find an object below a chain of objects specified by types and indexes.">hwloc_get_obj_below_array_by_type</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">int</span> nr, <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> *typev, <span class="keywordtype">unsigned</span> *idxv)
<a name="l00546"></a>00546 {
<a name="l00547"></a>00547 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj = <a class="code" href="a00038.html#ga632edae4a651996895ebde85ea2c1264" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology);
<a name="l00548"></a>00548 <span class="keywordtype">int</span> i;
<a name="l00549"></a>00549
<a name="l00550"></a>00550 <span class="keywordflow">for</span>(i=0; i&lt;nr; i++) {
<a name="l00551"></a>00551 obj = <a class="code" href="a00039.html#ga50a80a0021e5843d968c3b97aebaad9b" title="Return the idx -th object of type type included in CPU set set.">hwloc_get_obj_inside_cpuset_by_type</a>(topology, obj-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, typev[i], idxv[i]);
<a name="l00552"></a>00552 <span class="keywordflow">if</span> (!obj)
<a name="l00553"></a>00553 <span class="keywordflow">return</span> NULL;
<a name="l00554"></a>00554 }
<a name="l00555"></a>00555
<a name="l00556"></a>00556 <span class="keywordflow">return</span> obj;
<a name="l00557"></a>00557 }
<a name="l00558"></a>00558
<a name="l00579"></a>00579 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">void</span>
<a name="l00580"></a><a class="code" href="a00044.html#gaa03a77c4c210a95989ef803ebd9c4524">00580</a> <a class="code" href="a00044.html#gaa03a77c4c210a95989ef803ebd9c4524" title="Distribute n items over the topology under root.">hwloc_distribute</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> root, <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> *<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>, <span class="keywordtype">unsigned</span> n)
<a name="l00581"></a>00581 {
<a name="l00582"></a>00582 <span class="keywordtype">unsigned</span> i;
<a name="l00583"></a>00583 <span class="keywordtype">unsigned</span> u;
<a name="l00584"></a>00584 <span class="keywordtype">unsigned</span> chunk_size, complete_chunks;
<a name="l00585"></a>00585 <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> *cpusetp;
<a name="l00586"></a>00586
<a name="l00587"></a>00587 <span class="keywordflow">if</span> (!root-&gt;<a class="code" href="a00011.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a> || n == 1) {
<a name="l00588"></a>00588 <span class="comment">/* Got to the bottom, we can&#39;t split any more, put everything there. */</span>
<a name="l00589"></a>00589 <span class="keywordflow">for</span> (i=0; i&lt;n; i++)
<a name="l00590"></a>00590 cpuset[i] = <a class="code" href="a00046.html#ga468c6e3fd92a9d0db1fb56634a851be3" title="Duplicate CPU set set by allocating a new CPU set and copying set&amp;#39;s contents...">hwloc_cpuset_dup</a>(root-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
<a name="l00591"></a>00591 <span class="keywordflow">return</span>;
<a name="l00592"></a>00592 }
<a name="l00593"></a>00593
<a name="l00594"></a>00594 <span class="comment">/* Divide n in root-&gt;arity chunks. */</span>
<a name="l00595"></a>00595 chunk_size = (n + root-&gt;<a class="code" href="a00011.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a> - 1) / root-&gt;<a class="code" href="a00011.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a>;
<a name="l00596"></a>00596 complete_chunks = n % root-&gt;<a class="code" href="a00011.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a>;
<a name="l00597"></a>00597 if (!complete_chunks)
<a name="l00598"></a>00598 complete_chunks = root-&gt;<a class="code" href="a00011.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a>;
<a name="l00599"></a>00599
<a name="l00600"></a>00600 <span class="comment">/* Allocate complete chunks first. */</span>
<a name="l00601"></a>00601 <span class="keywordflow">for</span> (cpusetp = cpuset, i = 0;
<a name="l00602"></a>00602 i &lt; complete_chunks;
<a name="l00603"></a>00603 i ++, cpusetp += chunk_size)
<a name="l00604"></a>00604 <a class="code" href="a00044.html#gaa03a77c4c210a95989ef803ebd9c4524" title="Distribute n items over the topology under root.">hwloc_distribute</a>(topology, root-&gt;<a class="code" href="a00011.html#a04d05403da37bfe17cd63b7c7dd07b1f" title="Children, children[0 .. arity -1].">children</a>[i], cpusetp, chunk_size);
<a name="l00605"></a>00605
<a name="l00606"></a>00606 <span class="comment">/* Now allocate not-so-complete chunks. */</span>
<a name="l00607"></a>00607 <span class="keywordflow">for</span> (u = i;
<a name="l00608"></a>00608 u &lt; root-&gt;<a class="code" href="a00011.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a>;
<a name="l00609"></a>00609 u++, cpusetp += chunk_size-1)
<a name="l00610"></a>00610 <a class="code" href="a00044.html#gaa03a77c4c210a95989ef803ebd9c4524" title="Distribute n items over the topology under root.">hwloc_distribute</a>(topology, root-&gt;<a class="code" href="a00011.html#a04d05403da37bfe17cd63b7c7dd07b1f" title="Children, children[0 .. arity -1].">children</a>[u], cpusetp, chunk_size-1);
<a name="l00611"></a>00611 }
<a name="l00612"></a>00612
<a name="l00618"></a>00618 <span class="comment">/* \brief Get complete CPU set</span>
<a name="l00619"></a>00619 <span class="comment"> *</span>
<a name="l00620"></a>00620 <span class="comment"> * \return the complete CPU set of logical processors of the system. If the</span>
<a name="l00621"></a>00621 <span class="comment"> * topology is the result of a combination of several systems, NULL is</span>
<a name="l00622"></a>00622 <span class="comment"> * returned.</span>
<a name="l00623"></a>00623 <span class="comment"> *</span>
<a name="l00624"></a>00624 <span class="comment"> * \note The returned cpuset is not newly allocated and should thus not be</span>
<a name="l00625"></a>00625 <span class="comment"> * changed or freed; hwloc_cpuset_dup must be used to obtain a local copy.</span>
<a name="l00626"></a>00626 <span class="comment"> */</span>
<a name="l00627"></a>00627 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> __hwloc_attribute_pure
<a name="l00628"></a><a class="code" href="a00045.html#ga75f0ac3ac41e9915541c3ae3153a6e26">00628</a> <a class="code" href="a00045.html#ga75f0ac3ac41e9915541c3ae3153a6e26">hwloc_topology_get_complete_cpuset</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology)
<a name="l00629"></a>00629 {
<a name="l00630"></a>00630 <span class="keywordflow">return</span> <a class="code" href="a00038.html#ga632edae4a651996895ebde85ea2c1264" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology)-&gt;<a class="code" href="a00011.html#a91788a9da687beb7224cc1fd7b75208c" title="The complete CPU set of logical processors of this object,.">complete_cpuset</a>;
<a name="l00631"></a>00631 }
<a name="l00632"></a>00632
<a name="l00633"></a>00633 <span class="comment">/* \brief Get topology CPU set</span>
<a name="l00634"></a>00634 <span class="comment"> *</span>
<a name="l00635"></a>00635 <span class="comment"> * \return the CPU set of logical processors of the system for which hwloc</span>
<a name="l00636"></a>00636 <span class="comment"> * provides topology information. This is equivalent to the cpuset of the</span>
<a name="l00637"></a>00637 <span class="comment"> * system object. If the topology is the result of a combination of several</span>
<a name="l00638"></a>00638 <span class="comment"> * systems, NULL is returned.</span>
<a name="l00639"></a>00639 <span class="comment"> *</span>
<a name="l00640"></a>00640 <span class="comment"> * \note The returned cpuset is not newly allocated and should thus not be</span>
<a name="l00641"></a>00641 <span class="comment"> * changed or freed; hwloc_cpuset_dup must be used to obtain a local copy.</span>
<a name="l00642"></a>00642 <span class="comment"> */</span>
<a name="l00643"></a>00643 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> __hwloc_attribute_pure
<a name="l00644"></a><a class="code" href="a00045.html#ga4497338d1cbae6f8a6d68cb14234d5d8">00644</a> <a class="code" href="a00045.html#ga4497338d1cbae6f8a6d68cb14234d5d8">hwloc_topology_get_topology_cpuset</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology)
<a name="l00645"></a>00645 {
<a name="l00646"></a>00646 <span class="keywordflow">return</span> <a class="code" href="a00038.html#ga632edae4a651996895ebde85ea2c1264" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology)-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>;
<a name="l00647"></a>00647 }
<a name="l00648"></a>00648
<a name="l00658"></a>00658 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> __hwloc_attribute_pure
<a name="l00659"></a><a class="code" href="a00045.html#gad00abc77f1670049a5b2139471d0c8db">00659</a> <a class="code" href="a00045.html#gad00abc77f1670049a5b2139471d0c8db" title="Get online CPU set.">hwloc_topology_get_online_cpuset</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology)
<a name="l00660"></a>00660 {
<a name="l00661"></a>00661 <span class="keywordflow">return</span> <a class="code" href="a00038.html#ga632edae4a651996895ebde85ea2c1264" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology)-&gt;<a class="code" href="a00011.html#a8842d56c2975380f327ea401c5f53564" title="The CPU set of online logical processors.">online_cpuset</a>;
<a name="l00662"></a>00662 }
<a name="l00663"></a>00663
<a name="l00673"></a>00673 <span class="keyword">static</span> __hwloc_inline <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> __hwloc_attribute_pure
<a name="l00674"></a><a class="code" href="a00045.html#ga95f116c4c0b1ff2c6418c16341fc2e57">00674</a> <a class="code" href="a00045.html#ga95f116c4c0b1ff2c6418c16341fc2e57" title="Get allowed CPU set.">hwloc_topology_get_allowed_cpuset</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology)
<a name="l00675"></a>00675 {
<a name="l00676"></a>00676 <span class="keywordflow">return</span> <a class="code" href="a00038.html#ga632edae4a651996895ebde85ea2c1264" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology)-&gt;<a class="code" href="a00011.html#afa3c59a6dd3da8ffa48710780a1bfb34" title="The CPU set of allowed logical processors.">allowed_cpuset</a>;
<a name="l00677"></a>00677 }
<a name="l00678"></a>00678
<a name="l00679"></a>00679
<a name="l00682"></a>00682 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_HELPER_H */</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>

Просмотреть файл

@ -1,285 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): hwloc.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>hwloc.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright © 2009 CNRS, INRIA, Université Bordeaux 1</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.</span>
<a name="l00004"></a>00004 <span class="comment"> * See COPYING in top-level directory.</span>
<a name="l00005"></a>00005 <span class="comment"> */</span>
<a name="l00006"></a>00006
<a name="l00014"></a>00014 <span class="preprocessor">#ifndef HWLOC_H</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_H</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;sys/types.h&gt;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;limits.h&gt;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
<a name="l00021"></a>00021
<a name="l00022"></a>00022 <span class="comment">/*</span>
<a name="l00023"></a>00023 <span class="comment"> * Symbol transforms</span>
<a name="l00024"></a>00024 <span class="comment"> */</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;hwloc/rename.h&gt;</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/*</span>
<a name="l00028"></a>00028 <span class="comment"> * Cpuset bitmask definitions</span>
<a name="l00029"></a>00029 <span class="comment"> */</span>
<a name="l00030"></a>00030
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;hwloc/cpuset.h&gt;</span>
<a name="l00032"></a>00032
<a name="l00033"></a>00033
<a name="l00034"></a>00034
<a name="l00040"></a><a class="code" href="a00025.html#ga8f4dfb8eef138af55dd1a0fa802e5476">00040</a> <span class="preprocessor">#define HWLOC_API_VERSION 0x00010000</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00050"></a>00050 <span class="keyword">struct </span>hwloc_topology;
<a name="l00055"></a><a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">00055</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>hwloc_topology * <a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a>;
<a name="l00056"></a>00056
<a name="l00071"></a><a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">00071</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00072"></a><a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a3aa1b842d1fd4207ebce171f95a244ec">00072</a> <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a3aa1b842d1fd4207ebce171f95a244ec" title="Whole system (may be a cluster of machines). The whole system that is accessible...">HWLOC_OBJ_SYSTEM</a>,
<a name="l00077"></a><a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a3f4e83ffc4a259354959ae8a9eaa2a80">00077</a> <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a3f4e83ffc4a259354959ae8a9eaa2a80" title="Machine. The typical root object type. A set of processors and memory with cache...">HWLOC_OBJ_MACHINE</a>,
<a name="l00082"></a><a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd">00082</a> <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>,
<a name="l00086"></a><a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a1ac6e07775ae4324b3fe9dbd72c785ec">00086</a> <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a1ac6e07775ae4324b3fe9dbd72c785ec" title="Socket, physical package, or chip. In the physical meaning, i.e. that you can add...">HWLOC_OBJ_SOCKET</a>,
<a name="l00090"></a><a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc">00090</a> <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc" title="Data cache. Can be L1, L2, L3, ...">HWLOC_OBJ_CACHE</a>,
<a name="l00093"></a><a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55ac793958f330bca371aa1535de8aff45f">00093</a> <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55ac793958f330bca371aa1535de8aff45f" title="Core. A computation unit (may be shared by several logical processors).">HWLOC_OBJ_CORE</a>,
<a name="l00097"></a><a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661">00097</a> <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a>,
<a name="l00106"></a><a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a5269ef95be72f88465559d35c9b7ad56">00106</a> <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a5269ef95be72f88465559d35c9b7ad56" title="Group objects. Objects which do not fit in the above but are detected by hwloc and...">HWLOC_OBJ_GROUP</a>,
<a name="l00118"></a><a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a19f8a6953fa91efc76bcbcdf2d22de4d">00118</a> <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a19f8a6953fa91efc76bcbcdf2d22de4d" title="Miscellaneous objects. Objects without particular meaning, that can e.g. be added...">HWLOC_OBJ_MISC</a>,
<a name="l00122"></a>00122 } <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a>;
<a name="l00123"></a>00123
<a name="l00141"></a>00141 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00027.html#gabd7da4f4ea12b420b8ecbde458b27805" title="Compare the depth of two object types.">hwloc_compare_types</a> (<a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type1, <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type2) __hwloc_attribute_const;
<a name="l00142"></a>00142
<a name="l00143"></a><a class="code" href="a00027.html#ga46323568968005137c32f6a1cd405b74">00143</a> <span class="keyword">enum</span> <a class="code" href="a00027.html#ga46323568968005137c32f6a1cd405b74">hwloc_compare_types_e</a> {
<a name="l00144"></a><a class="code" href="a00027.html#gga46323568968005137c32f6a1cd405b74a2f8297ea36eba46e7596e810a67298fb">00144</a> <a class="code" href="a00027.html#gga46323568968005137c32f6a1cd405b74a2f8297ea36eba46e7596e810a67298fb" title="Value returned by hwloc_compare_types when types can not be compared.">HWLOC_TYPE_UNORDERED</a> = INT_MAX
<a name="l00145"></a>00145 };
<a name="l00146"></a>00146
<a name="l00155"></a>00155 <span class="keyword">union </span><a class="code" href="a00011.html" title="Object type-specific Attributes.">hwloc_obj_attr_u</a>;
<a name="l00156"></a>00156
<a name="l00158"></a><a class="code" href="a00013.html">00158</a> <span class="keyword">struct </span><a class="code" href="a00013.html" title="Object memory.">hwloc_obj_memory_s</a> {
<a name="l00159"></a><a class="code" href="a00013.html#a68c3323d2d0a248d1b7fec7af44bebe3">00159</a> uint64_t <a class="code" href="a00013.html#a68c3323d2d0a248d1b7fec7af44bebe3" title="Total memory (in bytes) in this object and its children.">total_memory</a>;
<a name="l00160"></a><a class="code" href="a00013.html#a27043a3150660f44ed84916c2d0d7e0e">00160</a> uint64_t <a class="code" href="a00013.html#a27043a3150660f44ed84916c2d0d7e0e" title="Local memory (in bytes).">local_memory</a>;
<a name="l00162"></a><a class="code" href="a00013.html#a208c27f4491077d7fb9ba5db8b29cb57">00162</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00013.html#a208c27f4491077d7fb9ba5db8b29cb57" title="Size of array page_types.">page_types_len</a>;
<a name="l00168"></a><a class="code" href="a00012.html">00168</a> <span class="keyword">struct </span><a class="code" href="a00012.html" title="Array of local memory page types, NULL if no local memory and page_types is 0.">hwloc_obj_memory_page_type_s</a> {
<a name="l00169"></a><a class="code" href="a00012.html#af0619463fb5d10052b7fe3495a66d74b">00169</a> uint64_t <a class="code" href="a00012.html#af0619463fb5d10052b7fe3495a66d74b" title="Size of pages.">size</a>;
<a name="l00170"></a><a class="code" href="a00012.html#ab5d01db7b26177a6b5361107cad152c3">00170</a> uint64_t <a class="code" href="a00012.html#ab5d01db7b26177a6b5361107cad152c3" title="Number of pages of this size.">count</a>;
<a name="l00171"></a>00171 } * <a class="code" href="a00013.html#a865eba7b12b986d72dbe7a2cfd97c50d" title="Array of local memory page types, NULL if no local memory and page_types is 0.">page_types</a>;
<a name="l00172"></a>00172 };
<a name="l00173"></a>00173
<a name="l00178"></a><a class="code" href="a00010.html">00178</a> <span class="keyword">struct </span><a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj</a> {
<a name="l00179"></a>00179 <span class="comment">/* physical information */</span>
<a name="l00180"></a><a class="code" href="a00010.html#acc4f0803f244867e68fe0036800be5de">00180</a> <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> <a class="code" href="a00010.html#acc4f0803f244867e68fe0036800be5de" title="Type of object.">type</a>;
<a name="l00181"></a><a class="code" href="a00010.html#a61a7a80a68eaccbaaa28269e678c81a9">00181</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00010.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a>;
<a name="l00182"></a><a class="code" href="a00010.html#abb709ec38f2970677e4e57d1d30be96d">00182</a> <span class="keywordtype">char</span> *<a class="code" href="a00010.html#abb709ec38f2970677e4e57d1d30be96d" title="Object description if any.">name</a>;
<a name="l00185"></a><a class="code" href="a00010.html#a1dc830816716213b5f797e4052487864">00185</a> <span class="keyword">struct </span><a class="code" href="a00013.html" title="Object memory.">hwloc_obj_memory_s</a> <a class="code" href="a00010.html#a1dc830816716213b5f797e4052487864" title="Memory attributes.">memory</a>;
<a name="l00186"></a>00186
<a name="l00188"></a><a class="code" href="a00010.html#accd40e29f71f19e88db62ea3df02adc8">00188</a> <span class="keyword">union </span><a class="code" href="a00011.html" title="Object type-specific Attributes.">hwloc_obj_attr_u</a> *<a class="code" href="a00010.html#accd40e29f71f19e88db62ea3df02adc8" title="Object type-specific Attributes.">attr</a>;
<a name="l00189"></a>00189
<a name="l00190"></a>00190 <span class="comment">/* global position */</span>
<a name="l00191"></a><a class="code" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5">00191</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a>;
<a name="l00192"></a><a class="code" href="a00010.html#a0d07fb7b8935e137c94d75a3eb492ae9">00192</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00010.html#a0d07fb7b8935e137c94d75a3eb492ae9" title="Horizontal index in the whole list of similar objects, could be a &amp;quot;cousin_rank&amp;quot;...">logical_index</a>;
<a name="l00194"></a><a class="code" href="a00010.html#a68766f0b1c4d61b5bad87e3b81dacfde">00194</a> <span class="keywordtype">signed</span> <a class="code" href="a00010.html#a68766f0b1c4d61b5bad87e3b81dacfde" title="OS-provided physical level, -1 if unknown or meaningless.">os_level</a>;
<a name="l00196"></a><a class="code" href="a00010.html#a85a788017457129589318b6c39451acf">00196</a> <span class="keyword">struct </span><a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00010.html#a85a788017457129589318b6c39451acf" title="Next object of same type.">next_cousin</a>;
<a name="l00197"></a><a class="code" href="a00010.html#ac715989f55ff5a0eb6be2969ee477ec0">00197</a> <span class="keyword">struct </span><a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00010.html#ac715989f55ff5a0eb6be2969ee477ec0" title="Previous object of same type.">prev_cousin</a>;
<a name="l00199"></a>00199 <span class="comment">/* parent */</span>
<a name="l00200"></a><a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900">00200</a> <span class="keyword">struct </span><a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00201"></a><a class="code" href="a00010.html#aaa6043eee6f55869933c1d974efd9acd">00201</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00010.html#aaa6043eee6f55869933c1d974efd9acd" title="Index in parent&amp;#39;s children[] array.">sibling_rank</a>;
<a name="l00202"></a><a class="code" href="a00010.html#a7f2343ed476fe4942e6fffd4cade1b40">00202</a> <span class="keyword">struct </span><a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00010.html#a7f2343ed476fe4942e6fffd4cade1b40" title="Next object below the same parent.">next_sibling</a>;
<a name="l00203"></a><a class="code" href="a00010.html#a7b89e8c189876c0158a9282aaaf17f50">00203</a> <span class="keyword">struct </span><a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00010.html#a7b89e8c189876c0158a9282aaaf17f50" title="Previous object below the same parent.">prev_sibling</a>;
<a name="l00205"></a>00205 <span class="comment">/* children */</span>
<a name="l00206"></a><a class="code" href="a00010.html#aac3f6da35c9b57599909a44ce2b716c1">00206</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00010.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a>;
<a name="l00207"></a><a class="code" href="a00010.html#a04d05403da37bfe17cd63b7c7dd07b1f">00207</a> <span class="keyword">struct </span><a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj</a> **<a class="code" href="a00010.html#a04d05403da37bfe17cd63b7c7dd07b1f" title="Children, children[0 .. arity -1].">children</a>;
<a name="l00208"></a><a class="code" href="a00010.html#af51d08a0a79dba517c06c5afedc8d2dc">00208</a> <span class="keyword">struct </span><a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00010.html#af51d08a0a79dba517c06c5afedc8d2dc" title="First child.">first_child</a>;
<a name="l00209"></a><a class="code" href="a00010.html#a84bd65634dbc55f4158b74443a9bd04f">00209</a> <span class="keyword">struct </span><a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00010.html#a84bd65634dbc55f4158b74443a9bd04f" title="Last child.">last_child</a>;
<a name="l00211"></a>00211 <span class="comment">/* misc */</span>
<a name="l00212"></a><a class="code" href="a00010.html#a76fd3ac94401cf32dfccc3a3a8de68a5">00212</a> <span class="keywordtype">void</span> *<a class="code" href="a00010.html#a76fd3ac94401cf32dfccc3a3a8de68a5" title="Application-given private data pointer, initialized to NULL, use it as you wish.">userdata</a>;
<a name="l00214"></a>00214 <span class="comment">/* cpuset */</span>
<a name="l00215"></a><a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f">00215</a> <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>;
<a name="l00228"></a><a class="code" href="a00010.html#a91788a9da687beb7224cc1fd7b75208c">00228</a> <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00010.html#a91788a9da687beb7224cc1fd7b75208c" title="The complete CPU set of logical processors of this object,.">complete_cpuset</a>;
<a name="l00239"></a><a class="code" href="a00010.html#a8842d56c2975380f327ea401c5f53564">00239</a> <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00010.html#a8842d56c2975380f327ea401c5f53564" title="The CPU set of online logical processors.">online_cpuset</a>;
<a name="l00247"></a><a class="code" href="a00010.html#afa3c59a6dd3da8ffa48710780a1bfb34">00247</a> <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00010.html#afa3c59a6dd3da8ffa48710780a1bfb34" title="The CPU set of allowed logical processors.">allowed_cpuset</a>;
<a name="l00258"></a><a class="code" href="a00010.html#a79982ede313c2190505fc5e3714a16fb">00258</a> <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00010.html#a79982ede313c2190505fc5e3714a16fb" title="NUMA nodes covered by this object or containing this object.">nodeset</a>;
<a name="l00270"></a><a class="code" href="a00010.html#adc473a52c071d7fd49e659ac90467a0f">00270</a> <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00010.html#adc473a52c071d7fd49e659ac90467a0f" title="The complete NUMA node set of this object,.">complete_nodeset</a>;
<a name="l00281"></a><a class="code" href="a00010.html#a9c1af614e0978a65ce309f921a822c8b">00281</a> <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00010.html#a9c1af614e0978a65ce309f921a822c8b" title="The set of allowed NUMA memory nodes.">allowed_nodeset</a>;
<a name="l00290"></a>00290 };
<a name="l00294"></a><a class="code" href="a00028.html#ga79b8ab56877ef99ac59b833203391c7d">00294</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj</a> * <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a>;
<a name="l00295"></a>00295
<a name="l00297"></a><a class="code" href="a00011.html">00297</a> <span class="keyword">union </span><a class="code" href="a00011.html" title="Object type-specific Attributes.">hwloc_obj_attr_u</a> {
<a name="l00299"></a><a class="code" href="a00007.html">00299</a> <span class="keyword">struct </span><a class="code" href="a00007.html" title="Cache-specific Object Attributes.">hwloc_cache_attr_s</a> {
<a name="l00300"></a><a class="code" href="a00007.html#a3c68235220554308f89768f281ad1e62">00300</a> uint64_t <a class="code" href="a00007.html#a3c68235220554308f89768f281ad1e62" title="Size of cache in bytes.">size</a>;
<a name="l00301"></a><a class="code" href="a00007.html#a5c8f7f39193736c2187ed626940835d5">00301</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00007.html#a5c8f7f39193736c2187ed626940835d5" title="Depth of cache.">depth</a>;
<a name="l00302"></a>00302 } <a class="code" href="a00011.html#ab5a8ae3bf490e6b1071fea53f7382836" title="Cache-specific Object Attributes.">cache</a>;
<a name="l00304"></a><a class="code" href="a00009.html">00304</a> <span class="keyword">struct </span><a class="code" href="a00009.html" title="Machine-specific Object Attributes.">hwloc_machine_attr_s</a> {
<a name="l00305"></a><a class="code" href="a00009.html#aae85be0b4ebb86501718c4b460df5167">00305</a> <span class="keywordtype">char</span> *<a class="code" href="a00009.html#aae85be0b4ebb86501718c4b460df5167" title="DMI board vendor name.">dmi_board_vendor</a>;
<a name="l00306"></a><a class="code" href="a00009.html#a8b99af84fd38753a91c861f0e856b461">00306</a> <span class="keywordtype">char</span> *<a class="code" href="a00009.html#a8b99af84fd38753a91c861f0e856b461" title="DMI board model name.">dmi_board_name</a>;
<a name="l00307"></a>00307 } <a class="code" href="a00011.html#a5b42966df7c5bfdc36891e414cc31607" title="Machine-specific Object Attributes.">machine</a>;
<a name="l00309"></a><a class="code" href="a00008.html">00309</a> <span class="keyword">struct </span><a class="code" href="a00008.html" title="Group-specific Object Attributes.">hwloc_group_attr_s</a> {
<a name="l00310"></a><a class="code" href="a00008.html#ad914eac61c77481e1b7037877bcc5579">00310</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00008.html#ad914eac61c77481e1b7037877bcc5579" title="Depth of group object.">depth</a>;
<a name="l00311"></a>00311 } <a class="code" href="a00011.html#ae4ba157cc313e2cdd9a82f1c1df7aaa6" title="Group-specific Object Attributes.">group</a>;
<a name="l00312"></a>00312 };
<a name="l00313"></a>00313
<a name="l00328"></a>00328 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00029.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> *topologyp);
<a name="l00329"></a>00329
<a name="l00342"></a>00342 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00029.html#ga91e2e6427b95fb7339c99dbbef996e71" title="Build the actual topology.">hwloc_topology_load</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology);
<a name="l00343"></a>00343
<a name="l00348"></a>00348 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00029.html#ga6040925d3ee4bbb2647f2a321aca5f4b" title="Terminate and free a topology context.">hwloc_topology_destroy</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology);
<a name="l00349"></a>00349
<a name="l00354"></a>00354 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00029.html#gab3628b2a540a5a08e8cf724ef829e70a" title="Run internal checks on a topology structure.">hwloc_topology_check</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology);
<a name="l00355"></a>00355
<a name="l00388"></a>00388 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00030.html#gaf2071c8621fddc53649c245d87835b47" title="Ignore an object type.">hwloc_topology_ignore_type</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type);
<a name="l00389"></a>00389
<a name="l00396"></a>00396 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00030.html#ga6ddd4213d95bd1c30555b294a60efa6b" title="Ignore an object type if it does not bring any structure.">hwloc_topology_ignore_type_keep_structure</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type);
<a name="l00397"></a>00397
<a name="l00403"></a>00403 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00030.html#gaec6fb00050f50cd41007f1ae580d2106" title="Ignore all objects that do not bring any structure.">hwloc_topology_ignore_all_keep_structure</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology);
<a name="l00404"></a>00404
<a name="l00409"></a><a class="code" href="a00030.html#gada025d3ec20b4b420f8038d23d6e7bde">00409</a> <span class="keyword">enum</span> <a class="code" href="a00030.html#gada025d3ec20b4b420f8038d23d6e7bde" title="Flags to be set onto a topology context before load.">hwloc_topology_flags_e</a> {
<a name="l00410"></a><a class="code" href="a00030.html#ggada025d3ec20b4b420f8038d23d6e7bdea129b4fea1300be22bbaf0bb0958994c8">00410</a> <a class="code" href="a00030.html#ggada025d3ec20b4b420f8038d23d6e7bdea129b4fea1300be22bbaf0bb0958994c8" title="Detect the whole system, ignore reservations and offline settings.">HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM</a> = (1&lt;&lt;0),
<a name="l00419"></a><a class="code" href="a00030.html#ggada025d3ec20b4b420f8038d23d6e7bdea6ecb6abc6a0bb75e81564f8bca85783b">00419</a> <a class="code" href="a00030.html#ggada025d3ec20b4b420f8038d23d6e7bdea6ecb6abc6a0bb75e81564f8bca85783b" title="Assume that the selected backend provides the topology for the system on which we...">HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM</a> = (1&lt;&lt;1),
<a name="l00438"></a>00438 };
<a name="l00439"></a>00439
<a name="l00444"></a>00444 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00030.html#ga6d11e53db143ac39c32cdb3912b71f99" title="Set OR&amp;#39;ed flags to non-yet-loaded topology.">hwloc_topology_set_flags</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> flags);
<a name="l00445"></a>00445
<a name="l00459"></a>00459 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00030.html#ga2f6bfb6958d8b508ea1d7d5bb266432c" title="Change the file-system root path when building the topology from sysfs/procfs.">hwloc_topology_set_fsroot</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology, <span class="keyword">const</span> <span class="keywordtype">char</span> * __hwloc_restrict fsroot_path);
<a name="l00460"></a>00460
<a name="l00474"></a>00474 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00030.html#gae1100de0162b3c6a9db750ac14629c05" title="Change which pid the topology is viewed from.">hwloc_topology_set_pid</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology, hwloc_pid_t pid);
<a name="l00475"></a>00475
<a name="l00489"></a>00489 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00030.html#ga2fcb52181b586c20f001b7a999550324" title="Enable synthetic topology.">hwloc_topology_set_synthetic</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology, <span class="keyword">const</span> <span class="keywordtype">char</span> * __hwloc_restrict description);
<a name="l00490"></a>00490
<a name="l00502"></a>00502 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00030.html#ga93efcc8a962afe1ed23393700682173f" title="Enable XML-file based topology.">hwloc_topology_set_xml</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology, <span class="keyword">const</span> <span class="keywordtype">char</span> * __hwloc_restrict xmlpath);
<a name="l00503"></a>00503
<a name="l00505"></a><a class="code" href="a00015.html">00505</a> <span class="keyword">struct </span><a class="code" href="a00015.html" title="Flags describing actual discovery support for this topology.">hwloc_topology_discovery_support</a> {
<a name="l00507"></a><a class="code" href="a00015.html#ad7bb4ecf7a82f5a04fc632e9592ad3ab">00507</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00015.html#ad7bb4ecf7a82f5a04fc632e9592ad3ab" title="Detecting the number of PU objects is supported.">pu</a>;
<a name="l00508"></a>00508 };
<a name="l00509"></a>00509
<a name="l00511"></a><a class="code" href="a00014.html">00511</a> <span class="keyword">struct </span><a class="code" href="a00014.html" title="Flags describing actual binding support for this topology.">hwloc_topology_cpubind_support</a> {
<a name="l00513"></a><a class="code" href="a00014.html#a9403d51657a4d546b3ea9553a2973a27">00513</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00014.html#a9403d51657a4d546b3ea9553a2973a27">set_thisproc_cpubind</a>;
<a name="l00515"></a><a class="code" href="a00014.html#a77a09ddd78ee3e9ff5f532a6ac74f7eb">00515</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00014.html#a77a09ddd78ee3e9ff5f532a6ac74f7eb">get_thisproc_cpubind</a>;
<a name="l00517"></a><a class="code" href="a00014.html#aa166223d1c2a6de7256ab2d8b675a87e">00517</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00014.html#aa166223d1c2a6de7256ab2d8b675a87e">set_proc_cpubind</a>;
<a name="l00519"></a><a class="code" href="a00014.html#aae705bc447adc163ead377362c4dfe9f">00519</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00014.html#aae705bc447adc163ead377362c4dfe9f">get_proc_cpubind</a>;
<a name="l00521"></a><a class="code" href="a00014.html#a57a89a4b5f1f74fa6cfe176f1e8b0798">00521</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00014.html#a57a89a4b5f1f74fa6cfe176f1e8b0798">set_thisthread_cpubind</a>;
<a name="l00523"></a><a class="code" href="a00014.html#a80d762e532d677dff262d83cc7bb1c60">00523</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00014.html#a80d762e532d677dff262d83cc7bb1c60">get_thisthread_cpubind</a>;
<a name="l00525"></a><a class="code" href="a00014.html#a46fba33e307909ce256624687799dd6d">00525</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00014.html#a46fba33e307909ce256624687799dd6d">set_thread_cpubind</a>;
<a name="l00527"></a><a class="code" href="a00014.html#a8dd4d8531ed2eebdce1507e7d104154e">00527</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00014.html#a8dd4d8531ed2eebdce1507e7d104154e">get_thread_cpubind</a>;
<a name="l00528"></a>00528 };
<a name="l00529"></a>00529
<a name="l00536"></a><a class="code" href="a00016.html">00536</a> <span class="keyword">struct </span><a class="code" href="a00016.html" title="Set of flags describing actual support for this topology.">hwloc_topology_support</a> {
<a name="l00537"></a><a class="code" href="a00016.html#aea3fbd7653d987d81f848636c420504d">00537</a> <span class="keyword">struct </span><a class="code" href="a00015.html" title="Flags describing actual discovery support for this topology.">hwloc_topology_discovery_support</a> *<a class="code" href="a00016.html#aea3fbd7653d987d81f848636c420504d">discovery</a>;
<a name="l00538"></a><a class="code" href="a00016.html#adef2bb91f74c3e70a2a071393caf5f56">00538</a> <span class="keyword">struct </span><a class="code" href="a00014.html" title="Flags describing actual binding support for this topology.">hwloc_topology_cpubind_support</a> *<a class="code" href="a00016.html#adef2bb91f74c3e70a2a071393caf5f56">cpubind</a>;
<a name="l00539"></a>00539 };
<a name="l00540"></a>00540
<a name="l00542"></a>00542 HWLOC_DECLSPEC <span class="keyword">const</span> <span class="keyword">struct </span><a class="code" href="a00016.html" title="Set of flags describing actual support for this topology.">hwloc_topology_support</a> *<a class="code" href="a00030.html#gac2126e105f3ae708efca2e90d612625a" title="Retrieve the topology support.">hwloc_topology_get_support</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology);
<a name="l00543"></a>00543
<a name="l00556"></a>00556 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00031.html#ga1c9d8e608232206ce2142fe806a6835b" title="Export the topology into an XML file.">hwloc_topology_export_xml</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keyword">const</span> <span class="keywordtype">char</span> *xmlpath);
<a name="l00557"></a>00557
<a name="l00567"></a>00567 HWLOC_DECLSPEC hwloc_obj_t <a class="code" href="a00031.html#ga017a9ba16d554326c6e3812d545d7230" title="Add a MISC object to the topology.">hwloc_topology_insert_misc_object_by_cpuset</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset, <span class="keyword">const</span> <span class="keywordtype">char</span> *name);
<a name="l00568"></a>00568
<a name="l00578"></a>00578 HWLOC_DECLSPEC hwloc_obj_t <a class="code" href="a00031.html#gadacd7a3d21220fbb30c3256d8b22a294" title="Add a MISC object to the topology.">hwloc_topology_insert_misc_object_by_parent</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, hwloc_obj_t parent, <span class="keyword">const</span> <span class="keywordtype">char</span> *name);
<a name="l00579"></a>00579
<a name="l00592"></a>00592 HWLOC_DECLSPEC <span class="keywordtype">unsigned</span> <a class="code" href="a00032.html#ga8c30b0cec55074eb3ed34e4f2a1a9937" title="Get the depth of the hierachical tree of objects.">hwloc_topology_get_depth</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology) __hwloc_attribute_pure;
<a name="l00593"></a>00593
<a name="l00603"></a>00603 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type);
<a name="l00604"></a>00604
<a name="l00605"></a><a class="code" href="a00032.html#gaf4e663cf42bbe20756b849c6293ef575">00605</a> <span class="keyword">enum</span> <a class="code" href="a00032.html#gaf4e663cf42bbe20756b849c6293ef575">hwloc_get_type_depth_e</a> {
<a name="l00606"></a><a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad">00606</a> <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a> = -1,
<a name="l00607"></a><a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c">00607</a> <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a> = -2
<a name="l00608"></a>00608 };
<a name="l00609"></a>00609
<a name="l00614"></a>00614 HWLOC_DECLSPEC <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> <a class="code" href="a00032.html#gadd4964764ae7e49231065d58a553fd31" title="Returns the type of objects at depth depth.">hwloc_get_depth_type</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">unsigned</span> depth) __hwloc_attribute_pure;
<a name="l00615"></a>00615
<a name="l00617"></a>00617 HWLOC_DECLSPEC <span class="keywordtype">unsigned</span> <a class="code" href="a00032.html#ga20cfe2456f4cfdd789c9aca6d2fdd69f" title="Returns the width of level at depth depth.">hwloc_get_nbobjs_by_depth</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">unsigned</span> depth) __hwloc_attribute_pure;
<a name="l00618"></a>00618
<a name="l00624"></a>00624 <span class="keyword">static</span> __inline <span class="keywordtype">int</span> __hwloc_attribute_pure
<a name="l00625"></a><a class="code" href="a00032.html#ga4c23019de0a7679306059e490dceccd2">00625</a> <a class="code" href="a00032.html#ga4c23019de0a7679306059e490dceccd2" title="Returns the width of level type type.">hwloc_get_nbobjs_by_type</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type)
<a name="l00626"></a>00626 {
<a name="l00627"></a>00627 <span class="keywordtype">int</span> depth = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00628"></a>00628 <span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>)
<a name="l00629"></a>00629 <span class="keywordflow">return</span> 0;
<a name="l00630"></a>00630 <span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00631"></a>00631 <span class="keywordflow">return</span> -1; <span class="comment">/* FIXME: agregate nbobjs from different levels? */</span>
<a name="l00632"></a>00632 <span class="keywordflow">return</span> <a class="code" href="a00032.html#ga20cfe2456f4cfdd789c9aca6d2fdd69f" title="Returns the width of level at depth depth.">hwloc_get_nbobjs_by_depth</a>(topology, depth);
<a name="l00633"></a>00633 }
<a name="l00634"></a>00634
<a name="l00642"></a>00642 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00032.html#ga0d109e33fc7990f62f665d336e5e5111" title="Does the topology context come from this system?">hwloc_topology_is_thissystem</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology) __hwloc_attribute_pure;
<a name="l00643"></a>00643
<a name="l00653"></a>00653 HWLOC_DECLSPEC hwloc_obj_t <a class="code" href="a00033.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">unsigned</span> depth, <span class="keywordtype">unsigned</span> idx) __hwloc_attribute_pure;
<a name="l00654"></a>00654
<a name="l00661"></a>00661 <span class="keyword">static</span> __inline hwloc_obj_t __hwloc_attribute_pure
<a name="l00662"></a><a class="code" href="a00033.html#gaabd26357fea30ceb7754ad970b9a0aaa">00662</a> <a class="code" href="a00033.html#gaabd26357fea30ceb7754ad970b9a0aaa" title="Returns the topology object at index index with type type.">hwloc_get_obj_by_type</a> (<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type, <span class="keywordtype">unsigned</span> idx)
<a name="l00663"></a>00663 {
<a name="l00664"></a>00664 <span class="keywordtype">int</span> depth = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00665"></a>00665 <span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>)
<a name="l00666"></a>00666 <span class="keywordflow">return</span> NULL;
<a name="l00667"></a>00667 <span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00668"></a>00668 <span class="keywordflow">return</span> NULL;
<a name="l00669"></a>00669 <span class="keywordflow">return</span> <a class="code" href="a00033.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a>(topology, depth, idx);
<a name="l00670"></a>00670 }
<a name="l00671"></a>00671
<a name="l00681"></a>00681 HWLOC_DECLSPEC <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="a00034.html#ga7c61920feca6fd9006d930dabfc09058" title="Return a stringified topology object type.">hwloc_obj_type_string</a> (<a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type) __hwloc_attribute_const;
<a name="l00682"></a>00682
<a name="l00687"></a>00687 HWLOC_DECLSPEC <a class="code" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> <a class="code" href="a00034.html#gade722091ae392fdc79557e797a16c370" title="Return an object type from the string.">hwloc_obj_type_of_string</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keywordtype">string</span>) __hwloc_attribute_pure;
<a name="l00688"></a>00688
<a name="l00696"></a>00696 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00034.html#ga3ad856e8f3487d340c82a23b8a2a0351" title="Stringify the type of a given topology object into a human-readable form.">hwloc_obj_type_snprintf</a>(<span class="keywordtype">char</span> * __hwloc_restrict <span class="keywordtype">string</span>, <span class="keywordtype">size_t</span> size, hwloc_obj_t obj,
<a name="l00697"></a>00697 <span class="keywordtype">int</span> verbose);
<a name="l00698"></a>00698
<a name="l00707"></a>00707 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00034.html#ga0db8286d7f3ceda8defd76e3e1e2b284" title="Stringify the attributes of a given topology object into a human-readable form.">hwloc_obj_attr_snprintf</a>(<span class="keywordtype">char</span> * __hwloc_restrict <span class="keywordtype">string</span>, <span class="keywordtype">size_t</span> size, hwloc_obj_t obj, <span class="keyword">const</span> <span class="keywordtype">char</span> * __hwloc_restrict separator,
<a name="l00708"></a>00708 <span class="keywordtype">int</span> verbose);
<a name="l00709"></a>00709
<a name="l00727"></a>00727 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00034.html#ga5c6a61a83f4790b421e2f62e9088446f" title="Stringify a given topology object into a human-readable form.">hwloc_obj_snprintf</a>(<span class="keywordtype">char</span> * __hwloc_restrict <span class="keywordtype">string</span>, <span class="keywordtype">size_t</span> size,
<a name="l00728"></a>00728 <a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, hwloc_obj_t obj,
<a name="l00729"></a>00729 <span class="keyword">const</span> <span class="keywordtype">char</span> * __hwloc_restrict indexprefix, <span class="keywordtype">int</span> verbose);
<a name="l00730"></a>00730
<a name="l00734"></a>00734 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00034.html#gabbfb92224c992c0e2ecef6b6e45260f2" title="Stringify the cpuset containing a set of objects.">hwloc_obj_cpuset_snprintf</a>(<span class="keywordtype">char</span> * __hwloc_restrict str, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> nobj, <span class="keyword">const</span> hwloc_obj_t * __hwloc_restrict objs);
<a name="l00735"></a>00735
<a name="l00781"></a><a class="code" href="a00035.html#ga9b2de9a34a18edb39fb272adf9c33622">00781</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00782"></a><a class="code" href="a00035.html#gga9b2de9a34a18edb39fb272adf9c33622a2e0dd0128dac6b03408c7dd170477fdc">00782</a> <a class="code" href="a00035.html#gga9b2de9a34a18edb39fb272adf9c33622a2e0dd0128dac6b03408c7dd170477fdc" title="Bind all threads of the current multithreaded process. This may not be supported...">HWLOC_CPUBIND_PROCESS</a> = (1&lt;&lt;0),
<a name="l00785"></a><a class="code" href="a00035.html#gga9b2de9a34a18edb39fb272adf9c33622af1b6bbad00d7b1017b918e3719f4d421">00785</a> <a class="code" href="a00035.html#gga9b2de9a34a18edb39fb272adf9c33622af1b6bbad00d7b1017b918e3719f4d421" title="Bind current thread of current process.">HWLOC_CPUBIND_THREAD</a> = (1&lt;&lt;1),
<a name="l00787"></a><a class="code" href="a00035.html#gga9b2de9a34a18edb39fb272adf9c33622a679a7e0f0c7ee06b123565f90d98e7fa">00787</a> <a class="code" href="a00035.html#gga9b2de9a34a18edb39fb272adf9c33622a679a7e0f0c7ee06b123565f90d98e7fa" title="Request for strict binding from the OS.">HWLOC_CPUBIND_STRICT</a> = (1&lt;&lt;2),
<a name="l00815"></a>00815 } <a class="code" href="a00035.html#ga9b2de9a34a18edb39fb272adf9c33622" title="Process/Thread binding policy.">hwloc_cpubind_policy_t</a>;
<a name="l00816"></a>00816
<a name="l00822"></a>00822 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00035.html#ga42f02baaf7dc0c0f5a6bbeca731fd144" title="Bind current process or thread on cpus given in cpuset set.">hwloc_set_cpubind</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00823"></a>00823 <span class="keywordtype">int</span> policy);
<a name="l00824"></a>00824
<a name="l00827"></a>00827 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00035.html#ga55427f8da8073ae16d0bab11f8137f1c" title="Get current process or thread binding.">hwloc_get_cpubind</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <span class="keyword">set</span>, <span class="keywordtype">int</span> policy);
<a name="l00828"></a>00828
<a name="l00836"></a>00836 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00035.html#gac349497da8f4f738bad51b2861461dc3" title="Bind a process pid on cpus given in cpuset set.">hwloc_set_proc_cpubind</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, hwloc_pid_t pid, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>, <span class="keywordtype">int</span> policy);
<a name="l00837"></a>00837
<a name="l00845"></a>00845 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00035.html#ga02141a2049739d63a5fa7a172d301f1c" title="Get the current binding of process pid.">hwloc_get_proc_cpubind</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, hwloc_pid_t pid, <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <span class="keyword">set</span>, <span class="keywordtype">int</span> policy);
<a name="l00846"></a>00846
<a name="l00854"></a>00854 <span class="preprocessor">#ifdef hwloc_thread_t</span>
<a name="l00855"></a>00855 <span class="preprocessor"></span>HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00035.html#ga2be36e3ab9c9076ab5cca8fd57ae0dcf" title="Bind a thread tid on cpus given in cpuset set.">hwloc_set_thread_cpubind</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, hwloc_thread_t tid, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>, <span class="keywordtype">int</span> policy);
<a name="l00856"></a>00856 <span class="preprocessor">#endif</span>
<a name="l00857"></a>00857 <span class="preprocessor"></span>
<a name="l00865"></a>00865 <span class="preprocessor">#ifdef hwloc_thread_t</span>
<a name="l00866"></a>00866 <span class="preprocessor"></span>HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00035.html#ga5f265c78ea768372bae8e5d89d628c22" title="Get the current binding of thread tid.">hwloc_get_thread_cpubind</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, hwloc_thread_t tid, <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <span class="keyword">set</span>, <span class="keywordtype">int</span> policy);
<a name="l00867"></a>00867 <span class="preprocessor">#endif</span>
<a name="l00868"></a>00868 <span class="preprocessor"></span>
<a name="l00872"></a>00872 <span class="comment">/* high-level helpers */</span>
<a name="l00873"></a>00873 <span class="preprocessor">#include &lt;hwloc/helper.h&gt;</span>
<a name="l00874"></a>00874
<a name="l00875"></a>00875
<a name="l00876"></a>00876 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_H */</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): linux-libnuma.h Source File</title>
<title>Hardware Locality (hwloc): hwloc.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -23,196 +23,260 @@
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>linux-libnuma.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<h1>hwloc.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright © 2009 CNRS, INRIA, Université Bordeaux 1</span>
<a name="l00003"></a>00003 <span class="comment"> * See COPYING in top-level directory.</span>
<a name="l00004"></a>00004 <span class="comment"> */</span>
<a name="l00005"></a>00005
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef HWLOC_LINUX_LIBNUMA_H</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_LINUX_LIBNUMA_H</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;hwloc.h&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;numa.h&gt;</span>
<a name="l00018"></a>00018
<a name="l00019"></a>00019
<a name="l00035"></a>00035 <span class="keyword">static</span> __inline <span class="keywordtype">int</span>
<a name="l00036"></a><a class="code" href="a00048.html#gab728b8eeaa8a79fa2c6f88a4494d3333">00036</a> <a class="code" href="a00048.html#gab728b8eeaa8a79fa2c6f88a4494d3333" title="Convert hwloc CPU set cpuset into the array of unsigned long mask.">hwloc_cpuset_to_linux_libnuma_ulongs</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset,
<a name="l00037"></a>00037 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *mask, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *maxnode)
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> outmaxnode = -1;
<a name="l00040"></a>00040 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> node = NULL;
<a name="l00041"></a>00041 <span class="keywordtype">unsigned</span> nbnodes = <a class="code" href="a00032.html#ga4c23019de0a7679306059e490dceccd2" title="Returns the width of level type type.">hwloc_get_nbobjs_by_type</a>(topology, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>);
<a name="l00042"></a>00042 <span class="keywordtype">unsigned</span> i;
<a name="l00043"></a>00043
<a name="l00044"></a>00044 <span class="keywordflow">for</span>(i=0; i&lt;*maxnode/HWLOC_BITS_PER_LONG; i++)
<a name="l00045"></a>00045 mask[i] = 0;
<a name="l00046"></a>00046
<a name="l00047"></a>00047 <span class="keywordflow">if</span> (nbnodes) {
<a name="l00048"></a>00048 <span class="keywordflow">while</span> ((node = <a class="code" href="a00040.html#gad5d1927258d0297cb064ecda6d038f71" title="Iterate through same-type objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_type</a>(topology, cpuset, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>, node)) != NULL) {
<a name="l00049"></a>00049 <span class="keywordflow">if</span> (node-&gt;<a class="code" href="a00010.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a> &gt;= *maxnode)
<a name="l00050"></a>00050 <span class="keywordflow">break</span>;
<a name="l00051"></a>00051 mask[node-&gt;<a class="code" href="a00010.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a>/HWLOC_BITS_PER_LONG] |= 1 &lt;&lt; (node-&gt;<a class="code" href="a00010.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a> % HWLOC_BITS_PER_LONG);
<a name="l00052"></a>00052 outmaxnode = node-&gt;<a class="code" href="a00010.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a>;
<a name="l00053"></a>00053 }
<a name="l00054"></a>00054
<a name="l00055"></a>00055 } <span class="keywordflow">else</span> {
<a name="l00056"></a>00056 <span class="comment">/* if no numa, libnuma assumes we have a single node */</span>
<a name="l00057"></a>00057 <span class="keywordflow">if</span> (!<a class="code" href="a00045.html#gac5b8ad0c32e9d14c587eabde188182a9" title="Test whether set set is empty.">hwloc_cpuset_iszero</a>(cpuset)) {
<a name="l00058"></a>00058 mask[0] = 1;
<a name="l00059"></a>00059 outmaxnode = 0;
<a name="l00060"></a>00060 }
<a name="l00061"></a>00061 }
<a name="l00062"></a>00062
<a name="l00063"></a>00063 *maxnode = outmaxnode+1;
<a name="l00064"></a>00064 <span class="keywordflow">return</span> 0;
<a name="l00065"></a>00065 }
<a name="l00066"></a>00066
<a name="l00076"></a>00076 <span class="keyword">static</span> __inline <span class="keywordtype">int</span>
<a name="l00077"></a><a class="code" href="a00048.html#gaa23cfc12b367b1c5da2ffb6efdf083a8">00077</a> <a class="code" href="a00048.html#gaa23cfc12b367b1c5da2ffb6efdf083a8" title="Convert the array of unsigned long mask into hwloc CPU set.">hwloc_cpuset_from_linux_libnuma_ulongs</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> cpuset,
<a name="l00078"></a>00078 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *mask, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> maxnode)
<a name="l00079"></a>00079 {
<a name="l00080"></a>00080 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> node;
<a name="l00081"></a>00081 <span class="keywordtype">int</span> depth;
<a name="l00082"></a>00082 <span class="keywordtype">unsigned</span> i;
<a name="l00083"></a>00083
<a name="l00084"></a>00084 depth = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>);
<a name="l00085"></a>00085 <span class="comment">/* cannot be HWLOC_TYPE_DEPTH_MULTIPLE */</span>
<a name="l00086"></a>00086
<a name="l00087"></a>00087 <span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>) {
<a name="l00088"></a>00088 <span class="comment">/* if no numa, libnuma assumes we have a single node */</span>
<a name="l00089"></a>00089 <span class="keywordflow">if</span> (mask[0] &amp; 1)
<a name="l00090"></a>00090 <a class="code" href="a00045.html#ga27a3b6994bd6f20c1f26d10bdb29ac0b" title="Copy the contents of CPU set src into the already allocated CPU set dst.">hwloc_cpuset_copy</a>(cpuset, <a class="code" href="a00044.html#ga0361003cb1e41f6f3e9fc485135a0950">hwloc_topology_get_complete_cpuset</a>(topology));
<a name="l00091"></a>00091 <span class="keywordflow">else</span>
<a name="l00092"></a>00092 <a class="code" href="a00045.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(cpuset);
<a name="l00093"></a>00093
<a name="l00094"></a>00094 } <span class="keywordflow">else</span> {
<a name="l00095"></a>00095 <a class="code" href="a00045.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(cpuset);
<a name="l00096"></a>00096 <span class="keywordflow">for</span>(i=0; i&lt;maxnode; i++)
<a name="l00097"></a>00097 <span class="keywordflow">if</span> (mask[i/HWLOC_BITS_PER_LONG] &amp; (1 &lt;&lt; (i% HWLOC_BITS_PER_LONG))) {
<a name="l00098"></a>00098 node = <a class="code" href="a00033.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a>(topology, depth, i);
<a name="l00099"></a>00099 <span class="keywordflow">if</span> (node)
<a name="l00100"></a>00100 <a class="code" href="a00045.html#ga9654f87331e6f33090bed3d326346e85" title="Or sets set1 and set2 and store the result in set res.">hwloc_cpuset_or</a>(cpuset, cpuset, node-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
<a name="l00101"></a>00101 }
<a name="l00102"></a>00102 }
<a name="l00103"></a>00103
<a name="l00104"></a>00104 <span class="keywordflow">return</span> 0;
<a name="l00105"></a>00105 }
<a name="l00106"></a>00106
<a name="l00125"></a>00125 <span class="keyword">static</span> __inline <span class="keyword">struct </span>bitmask * __hwloc_attribute_malloc
<a name="l00126"></a><a class="code" href="a00049.html#ga80bea6f05af929fbaf50557225ddd927">00126</a> <a class="code" href="a00049.html#ga80bea6f05af929fbaf50557225ddd927" title="Convert hwloc CPU set cpuset into the returned libnuma bitmask.">hwloc_cpuset_to_linux_libnuma_bitmask</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset)
<a name="l00127"></a>00127 {
<a name="l00128"></a>00128 <span class="keyword">struct </span>bitmask *bitmask;
<a name="l00129"></a>00129 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> node = NULL;
<a name="l00130"></a>00130 <span class="keywordtype">unsigned</span> nbnodes = <a class="code" href="a00032.html#ga4c23019de0a7679306059e490dceccd2" title="Returns the width of level type type.">hwloc_get_nbobjs_by_type</a>(topology, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>);
<a name="l00131"></a>00131
<a name="l00132"></a>00132 <span class="keywordflow">if</span> (nbnodes) {
<a name="l00133"></a>00133 bitmask = numa_bitmask_alloc(nbnodes);
<a name="l00134"></a>00134 <span class="keywordflow">if</span> (!bitmask)
<a name="l00135"></a>00135 <span class="keywordflow">return</span> NULL;
<a name="l00136"></a>00136 <span class="keywordflow">while</span> ((node = <a class="code" href="a00040.html#gad5d1927258d0297cb064ecda6d038f71" title="Iterate through same-type objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_type</a>(topology, cpuset, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>, node)) != NULL)
<a name="l00137"></a>00137 numa_bitmask_setbit(bitmask, node-&gt;<a class="code" href="a00010.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a>);
<a name="l00138"></a>00138
<a name="l00139"></a>00139 } <span class="keywordflow">else</span> {
<a name="l00140"></a>00140 <span class="comment">/* if no numa, libnuma assumes we have a single node */</span>
<a name="l00141"></a>00141 bitmask = numa_bitmask_alloc(1);
<a name="l00142"></a>00142 <span class="keywordflow">if</span> (!bitmask)
<a name="l00143"></a>00143 <span class="keywordflow">return</span> NULL;
<a name="l00144"></a>00144 <span class="keywordflow">if</span> (!<a class="code" href="a00045.html#gac5b8ad0c32e9d14c587eabde188182a9" title="Test whether set set is empty.">hwloc_cpuset_iszero</a>(cpuset))
<a name="l00145"></a>00145 numa_bitmask_setbit(bitmask, 0);
<a name="l00146"></a>00146 }
<a name="l00147"></a>00147
<a name="l00148"></a>00148 <span class="keywordflow">return</span> bitmask;
<a name="l00149"></a>00149 }
<a name="l00150"></a>00150
<a name="l00156"></a>00156 <span class="keyword">static</span> __inline <span class="keywordtype">int</span>
<a name="l00157"></a><a class="code" href="a00049.html#gaa92103c3051e8ee3aa4a8a483143e85e">00157</a> <a class="code" href="a00049.html#gaa92103c3051e8ee3aa4a8a483143e85e" title="Convert libnuma bitmask bitmask into hwloc CPU set cpuset.">hwloc_cpuset_from_linux_libnuma_bitmask</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> cpuset,
<a name="l00158"></a>00158 <span class="keyword">const</span> <span class="keyword">struct</span> bitmask *bitmask)
<a name="l00159"></a>00159 {
<a name="l00160"></a>00160 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> node;
<a name="l00161"></a>00161 <span class="keywordtype">int</span> depth;
<a name="l00162"></a>00162 <span class="keywordtype">int</span> i;
<a name="l00163"></a>00163
<a name="l00164"></a>00164 depth = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>);
<a name="l00165"></a>00165 <span class="comment">/* cannot be HWLOC_TYPE_DEPTH_MULTIPLE */</span>
<a name="l00166"></a>00166
<a name="l00167"></a>00167 <span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>) {
<a name="l00168"></a>00168 <span class="comment">/* if no numa, libnuma assumes we have a single node */</span>
<a name="l00169"></a>00169 <span class="keywordflow">if</span> (numa_bitmask_isbitset(bitmask, 0))
<a name="l00170"></a>00170 <a class="code" href="a00045.html#ga27a3b6994bd6f20c1f26d10bdb29ac0b" title="Copy the contents of CPU set src into the already allocated CPU set dst.">hwloc_cpuset_copy</a>(cpuset, <a class="code" href="a00044.html#ga0361003cb1e41f6f3e9fc485135a0950">hwloc_topology_get_complete_cpuset</a>(topology));
<a name="l00171"></a>00171 <span class="keywordflow">else</span>
<a name="l00172"></a>00172 <a class="code" href="a00045.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(cpuset);
<a name="l00003"></a>00003 <span class="comment"> * Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.</span>
<a name="l00004"></a>00004 <span class="comment"> * See COPYING in top-level directory.</span>
<a name="l00005"></a>00005 <span class="comment"> */</span>
<a name="l00006"></a>00006
<a name="l00014"></a>00014 <span class="preprocessor">#ifndef HWLOC_H</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_H</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;sys/types.h&gt;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;limits.h&gt;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
<a name="l00021"></a>00021
<a name="l00022"></a>00022 <span class="comment">/*</span>
<a name="l00023"></a>00023 <span class="comment"> * Symbol transforms</span>
<a name="l00024"></a>00024 <span class="comment"> */</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;hwloc/rename.h&gt;</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="comment">/*</span>
<a name="l00028"></a>00028 <span class="comment"> * Cpuset bitmask definitions</span>
<a name="l00029"></a>00029 <span class="comment"> */</span>
<a name="l00030"></a>00030
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;hwloc/cpuset.h&gt;</span>
<a name="l00032"></a>00032
<a name="l00033"></a>00033
<a name="l00034"></a>00034
<a name="l00040"></a><a class="code" href="a00026.html#ga8f4dfb8eef138af55dd1a0fa802e5476">00040</a> <span class="preprocessor">#define HWLOC_API_VERSION 0x00010000</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00050"></a>00050 <span class="keyword">struct </span>hwloc_topology;
<a name="l00055"></a><a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">00055</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>hwloc_topology * <a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a>;
<a name="l00056"></a>00056
<a name="l00071"></a><a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">00071</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00072"></a><a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a3aa1b842d1fd4207ebce171f95a244ec">00072</a> <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a3aa1b842d1fd4207ebce171f95a244ec" title="Whole system (may be a cluster of machines). The whole system that is accessible...">HWLOC_OBJ_SYSTEM</a>,
<a name="l00077"></a><a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a3f4e83ffc4a259354959ae8a9eaa2a80">00077</a> <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a3f4e83ffc4a259354959ae8a9eaa2a80" title="Machine. The typical root object type. A set of processors and memory with cache...">HWLOC_OBJ_MACHINE</a>,
<a name="l00082"></a><a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd">00082</a> <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>,
<a name="l00086"></a><a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a1ac6e07775ae4324b3fe9dbd72c785ec">00086</a> <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a1ac6e07775ae4324b3fe9dbd72c785ec" title="Socket, physical package, or chip. In the physical meaning, i.e. that you can add...">HWLOC_OBJ_SOCKET</a>,
<a name="l00090"></a><a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc">00090</a> <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc" title="Data cache. Can be L1, L2, L3, ...">HWLOC_OBJ_CACHE</a>,
<a name="l00093"></a><a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55ac793958f330bca371aa1535de8aff45f">00093</a> <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55ac793958f330bca371aa1535de8aff45f" title="Core. A computation unit (may be shared by several logical processors).">HWLOC_OBJ_CORE</a>,
<a name="l00097"></a><a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661">00097</a> <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a>,
<a name="l00106"></a><a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a5269ef95be72f88465559d35c9b7ad56">00106</a> <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a5269ef95be72f88465559d35c9b7ad56" title="Group objects. Objects which do not fit in the above but are detected by hwloc and...">HWLOC_OBJ_GROUP</a>,
<a name="l00118"></a><a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a19f8a6953fa91efc76bcbcdf2d22de4d">00118</a> <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a19f8a6953fa91efc76bcbcdf2d22de4d" title="Miscellaneous objects. Objects without particular meaning, that can e.g. be added...">HWLOC_OBJ_MISC</a>
<a name="l00122"></a>00122 } <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a>;
<a name="l00123"></a>00123
<a name="l00141"></a>00141 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00028.html#gabd7da4f4ea12b420b8ecbde458b27805" title="Compare the depth of two object types.">hwloc_compare_types</a> (<a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type1, <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type2) __hwloc_attribute_const;
<a name="l00142"></a>00142
<a name="l00143"></a><a class="code" href="a00028.html#ga46323568968005137c32f6a1cd405b74">00143</a> <span class="keyword">enum</span> <a class="code" href="a00028.html#ga46323568968005137c32f6a1cd405b74">hwloc_compare_types_e</a> {
<a name="l00144"></a><a class="code" href="a00028.html#gga46323568968005137c32f6a1cd405b74a2f8297ea36eba46e7596e810a67298fb">00144</a> <a class="code" href="a00028.html#gga46323568968005137c32f6a1cd405b74a2f8297ea36eba46e7596e810a67298fb" title="Value returned by hwloc_compare_types when types can not be compared.">HWLOC_TYPE_UNORDERED</a> = INT_MAX
<a name="l00145"></a>00145 };
<a name="l00146"></a>00146
<a name="l00155"></a>00155 <span class="keyword">union </span><a class="code" href="a00012.html" title="Object type-specific Attributes.">hwloc_obj_attr_u</a>;
<a name="l00156"></a>00156
<a name="l00158"></a><a class="code" href="a00014.html">00158</a> <span class="keyword">struct </span><a class="code" href="a00014.html" title="Object memory.">hwloc_obj_memory_s</a> {
<a name="l00159"></a><a class="code" href="a00014.html#a68c3323d2d0a248d1b7fec7af44bebe3">00159</a> uint64_t <a class="code" href="a00014.html#a68c3323d2d0a248d1b7fec7af44bebe3" title="Total memory (in bytes) in this object and its children.">total_memory</a>;
<a name="l00160"></a><a class="code" href="a00014.html#a27043a3150660f44ed84916c2d0d7e0e">00160</a> uint64_t <a class="code" href="a00014.html#a27043a3150660f44ed84916c2d0d7e0e" title="Local memory (in bytes).">local_memory</a>;
<a name="l00162"></a><a class="code" href="a00014.html#a208c27f4491077d7fb9ba5db8b29cb57">00162</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00014.html#a208c27f4491077d7fb9ba5db8b29cb57" title="Size of array page_types.">page_types_len</a>;
<a name="l00168"></a><a class="code" href="a00013.html">00168</a> <span class="keyword">struct </span><a class="code" href="a00013.html" title="Array of local memory page types, NULL if no local memory and page_types is 0.">hwloc_obj_memory_page_type_s</a> {
<a name="l00169"></a><a class="code" href="a00013.html#af0619463fb5d10052b7fe3495a66d74b">00169</a> uint64_t <a class="code" href="a00013.html#af0619463fb5d10052b7fe3495a66d74b" title="Size of pages.">size</a>;
<a name="l00170"></a><a class="code" href="a00013.html#ab5d01db7b26177a6b5361107cad152c3">00170</a> uint64_t <a class="code" href="a00013.html#ab5d01db7b26177a6b5361107cad152c3" title="Number of pages of this size.">count</a>;
<a name="l00171"></a>00171 } * <a class="code" href="a00014.html#a865eba7b12b986d72dbe7a2cfd97c50d" title="Array of local memory page types, NULL if no local memory and page_types is 0.">page_types</a>;
<a name="l00172"></a>00172 };
<a name="l00173"></a>00173
<a name="l00174"></a>00174 } <span class="keywordflow">else</span> {
<a name="l00175"></a>00175 <a class="code" href="a00045.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(cpuset);
<a name="l00176"></a>00176 <span class="keywordflow">for</span>(i=0; i&lt;NUMA_NUM_NODES; i++)
<a name="l00177"></a>00177 <span class="keywordflow">if</span> (numa_bitmask_isbitset(bitmask, i)) {
<a name="l00178"></a>00178 node = <a class="code" href="a00033.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a>(topology, depth, i);
<a name="l00179"></a>00179 <span class="keywordflow">if</span> (node)
<a name="l00180"></a>00180 <a class="code" href="a00045.html#ga9654f87331e6f33090bed3d326346e85" title="Or sets set1 and set2 and store the result in set res.">hwloc_cpuset_or</a>(cpuset, cpuset, node-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
<a name="l00181"></a>00181 }
<a name="l00182"></a>00182 }
<a name="l00183"></a>00183
<a name="l00184"></a>00184 <span class="keywordflow">return</span> 0;
<a name="l00185"></a>00185 }
<a name="l00178"></a><a class="code" href="a00011.html">00178</a> <span class="keyword">struct </span><a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj</a> {
<a name="l00179"></a>00179 <span class="comment">/* physical information */</span>
<a name="l00180"></a><a class="code" href="a00011.html#acc4f0803f244867e68fe0036800be5de">00180</a> <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> <a class="code" href="a00011.html#acc4f0803f244867e68fe0036800be5de" title="Type of object.">type</a>;
<a name="l00181"></a><a class="code" href="a00011.html#a61a7a80a68eaccbaaa28269e678c81a9">00181</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00011.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a>;
<a name="l00182"></a><a class="code" href="a00011.html#abb709ec38f2970677e4e57d1d30be96d">00182</a> <span class="keywordtype">char</span> *<a class="code" href="a00011.html#abb709ec38f2970677e4e57d1d30be96d" title="Object description if any.">name</a>;
<a name="l00185"></a><a class="code" href="a00011.html#a1dc830816716213b5f797e4052487864">00185</a> <span class="keyword">struct </span><a class="code" href="a00014.html" title="Object memory.">hwloc_obj_memory_s</a> <a class="code" href="a00011.html#a1dc830816716213b5f797e4052487864" title="Memory attributes.">memory</a>;
<a name="l00186"></a>00186
<a name="l00191"></a>00191 <span class="preprocessor">#ifdef NUMA_VERSION1_COMPATIBILITY</span>
<a name="l00192"></a>00192 <span class="preprocessor"></span>
<a name="l00202"></a>00202 <span class="keyword">static</span> __inline <span class="keywordtype">int</span>
<a name="l00203"></a><a class="code" href="a00050.html#gaac14df7a9821f2a29391f01556bd2af3">00203</a> <a class="code" href="a00050.html#gaac14df7a9821f2a29391f01556bd2af3" title="Convert hwloc CPU set cpuset into libnuma nodemask nodemask.">hwloc_cpuset_to_linux_libnuma_nodemask</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset,
<a name="l00204"></a>00204 nodemask_t *nodemask)
<a name="l00205"></a>00205 {
<a name="l00206"></a>00206 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> node = NULL;
<a name="l00207"></a>00207 <span class="keywordtype">unsigned</span> nbnodes = <a class="code" href="a00032.html#ga4c23019de0a7679306059e490dceccd2" title="Returns the width of level type type.">hwloc_get_nbobjs_by_type</a>(topology, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>);
<a name="l00208"></a>00208
<a name="l00209"></a>00209 nodemask_zero(nodemask);
<a name="l00210"></a>00210 <span class="keywordflow">if</span> (nbnodes) {
<a name="l00211"></a>00211 <span class="keywordflow">while</span> ((node = <a class="code" href="a00040.html#gad5d1927258d0297cb064ecda6d038f71" title="Iterate through same-type objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_type</a>(topology, cpuset, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>, node)) != NULL)
<a name="l00212"></a>00212 nodemask_set(nodemask, node-&gt;<a class="code" href="a00010.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a>);
<a name="l00213"></a>00213
<a name="l00214"></a>00214 } <span class="keywordflow">else</span> {
<a name="l00215"></a>00215 <span class="comment">/* if no numa, libnuma assumes we have a single node */</span>
<a name="l00216"></a>00216 <span class="keywordflow">if</span> (!<a class="code" href="a00045.html#gac5b8ad0c32e9d14c587eabde188182a9" title="Test whether set set is empty.">hwloc_cpuset_iszero</a>(cpuset))
<a name="l00217"></a>00217 nodemask_set(nodemask, 0);
<a name="l00218"></a>00218 }
<a name="l00219"></a>00219
<a name="l00220"></a>00220 <span class="keywordflow">return</span> 0;
<a name="l00221"></a>00221 }
<a name="l00222"></a>00222
<a name="l00228"></a>00228 <span class="keyword">static</span> __inline <span class="keywordtype">int</span>
<a name="l00229"></a><a class="code" href="a00050.html#ga1a887850b8fa7bbf7c4a92742c150a1a">00229</a> <a class="code" href="a00050.html#ga1a887850b8fa7bbf7c4a92742c150a1a" title="Convert libnuma nodemask nodemask into hwloc CPU set cpuset.">hwloc_cpuset_from_linux_libnuma_nodemask</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> cpuset,
<a name="l00230"></a>00230 <span class="keyword">const</span> nodemask_t *nodemask)
<a name="l00231"></a>00231 {
<a name="l00232"></a>00232 <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> node;
<a name="l00233"></a>00233 <span class="keywordtype">int</span> depth;
<a name="l00234"></a>00234 <span class="keywordtype">int</span> i;
<a name="l00235"></a>00235
<a name="l00236"></a>00236 depth = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>);
<a name="l00237"></a>00237 <span class="comment">/* cannot be HWLOC_TYPE_DEPTH_MULTIPLE */</span>
<a name="l00238"></a>00238
<a name="l00239"></a>00239 <span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>) {
<a name="l00240"></a>00240 <span class="comment">/* if no numa, libnuma assumes we have a single node */</span>
<a name="l00241"></a>00241 <span class="keywordflow">if</span> (nodemask_isset(nodemask, 0))
<a name="l00242"></a>00242 <a class="code" href="a00045.html#ga27a3b6994bd6f20c1f26d10bdb29ac0b" title="Copy the contents of CPU set src into the already allocated CPU set dst.">hwloc_cpuset_copy</a>(cpuset, <a class="code" href="a00044.html#ga0361003cb1e41f6f3e9fc485135a0950">hwloc_topology_get_complete_cpuset</a>(topology));
<a name="l00243"></a>00243 <span class="keywordflow">else</span>
<a name="l00244"></a>00244 <a class="code" href="a00045.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(cpuset);
<a name="l00245"></a>00245
<a name="l00246"></a>00246 } <span class="keywordflow">else</span> {
<a name="l00247"></a>00247 <a class="code" href="a00045.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(cpuset);
<a name="l00248"></a>00248 <span class="keywordflow">for</span>(i=0; i&lt;NUMA_NUM_NODES; i++)
<a name="l00249"></a>00249 <span class="keywordflow">if</span> (nodemask_isset(nodemask, i)) {
<a name="l00250"></a>00250 node = <a class="code" href="a00033.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a>(topology, depth, i);
<a name="l00251"></a>00251 <span class="keywordflow">if</span> (node)
<a name="l00252"></a>00252 <a class="code" href="a00045.html#ga9654f87331e6f33090bed3d326346e85" title="Or sets set1 and set2 and store the result in set res.">hwloc_cpuset_or</a>(cpuset, cpuset, node-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
<a name="l00253"></a>00253 }
<a name="l00254"></a>00254 }
<a name="l00255"></a>00255
<a name="l00256"></a>00256 <span class="keywordflow">return</span> 0;
<a name="l00257"></a>00257 }
<a name="l00258"></a>00258
<a name="l00260"></a>00260 <span class="preprocessor">#endif </span><span class="comment">/* NUMA_VERSION1_COMPATIBILITY */</span>
<a name="l00261"></a>00261
<a name="l00262"></a>00262
<a name="l00263"></a>00263 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_LINUX_NUMA_H */</span>
<a name="l00188"></a><a class="code" href="a00011.html#accd40e29f71f19e88db62ea3df02adc8">00188</a> <span class="keyword">union </span><a class="code" href="a00012.html" title="Object type-specific Attributes.">hwloc_obj_attr_u</a> *<a class="code" href="a00011.html#accd40e29f71f19e88db62ea3df02adc8" title="Object type-specific Attributes.">attr</a>;
<a name="l00189"></a>00189
<a name="l00190"></a>00190 <span class="comment">/* global position */</span>
<a name="l00191"></a><a class="code" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5">00191</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5" title="Vertical index in the hierarchy.">depth</a>;
<a name="l00192"></a><a class="code" href="a00011.html#a0d07fb7b8935e137c94d75a3eb492ae9">00192</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00011.html#a0d07fb7b8935e137c94d75a3eb492ae9" title="Horizontal index in the whole list of similar objects, could be a &amp;quot;cousin_rank&amp;quot;...">logical_index</a>;
<a name="l00194"></a><a class="code" href="a00011.html#a68766f0b1c4d61b5bad87e3b81dacfde">00194</a> <span class="keywordtype">signed</span> <a class="code" href="a00011.html#a68766f0b1c4d61b5bad87e3b81dacfde" title="OS-provided physical level, -1 if unknown or meaningless.">os_level</a>;
<a name="l00196"></a><a class="code" href="a00011.html#a85a788017457129589318b6c39451acf">00196</a> <span class="keyword">struct </span><a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00011.html#a85a788017457129589318b6c39451acf" title="Next object of same type.">next_cousin</a>;
<a name="l00197"></a><a class="code" href="a00011.html#ac715989f55ff5a0eb6be2969ee477ec0">00197</a> <span class="keyword">struct </span><a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00011.html#ac715989f55ff5a0eb6be2969ee477ec0" title="Previous object of same type.">prev_cousin</a>;
<a name="l00199"></a>00199 <span class="comment">/* parent */</span>
<a name="l00200"></a><a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900">00200</a> <span class="keyword">struct </span><a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>;
<a name="l00201"></a><a class="code" href="a00011.html#aaa6043eee6f55869933c1d974efd9acd">00201</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00011.html#aaa6043eee6f55869933c1d974efd9acd" title="Index in parent&amp;#39;s children[] array.">sibling_rank</a>;
<a name="l00202"></a><a class="code" href="a00011.html#a7f2343ed476fe4942e6fffd4cade1b40">00202</a> <span class="keyword">struct </span><a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00011.html#a7f2343ed476fe4942e6fffd4cade1b40" title="Next object below the same parent.">next_sibling</a>;
<a name="l00203"></a><a class="code" href="a00011.html#a7b89e8c189876c0158a9282aaaf17f50">00203</a> <span class="keyword">struct </span><a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00011.html#a7b89e8c189876c0158a9282aaaf17f50" title="Previous object below the same parent.">prev_sibling</a>;
<a name="l00205"></a>00205 <span class="comment">/* children */</span>
<a name="l00206"></a><a class="code" href="a00011.html#aac3f6da35c9b57599909a44ce2b716c1">00206</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00011.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a>;
<a name="l00207"></a><a class="code" href="a00011.html#a04d05403da37bfe17cd63b7c7dd07b1f">00207</a> <span class="keyword">struct </span><a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj</a> **<a class="code" href="a00011.html#a04d05403da37bfe17cd63b7c7dd07b1f" title="Children, children[0 .. arity -1].">children</a>;
<a name="l00208"></a><a class="code" href="a00011.html#af51d08a0a79dba517c06c5afedc8d2dc">00208</a> <span class="keyword">struct </span><a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00011.html#af51d08a0a79dba517c06c5afedc8d2dc" title="First child.">first_child</a>;
<a name="l00209"></a><a class="code" href="a00011.html#a84bd65634dbc55f4158b74443a9bd04f">00209</a> <span class="keyword">struct </span><a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj</a> *<a class="code" href="a00011.html#a84bd65634dbc55f4158b74443a9bd04f" title="Last child.">last_child</a>;
<a name="l00211"></a>00211 <span class="comment">/* misc */</span>
<a name="l00212"></a><a class="code" href="a00011.html#a76fd3ac94401cf32dfccc3a3a8de68a5">00212</a> <span class="keywordtype">void</span> *<a class="code" href="a00011.html#a76fd3ac94401cf32dfccc3a3a8de68a5" title="Application-given private data pointer, initialized to NULL, use it as you wish.">userdata</a>;
<a name="l00214"></a>00214 <span class="comment">/* cpuset */</span>
<a name="l00215"></a><a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f">00215</a> <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>;
<a name="l00228"></a><a class="code" href="a00011.html#a91788a9da687beb7224cc1fd7b75208c">00228</a> <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00011.html#a91788a9da687beb7224cc1fd7b75208c" title="The complete CPU set of logical processors of this object,.">complete_cpuset</a>;
<a name="l00239"></a><a class="code" href="a00011.html#a8842d56c2975380f327ea401c5f53564">00239</a> <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00011.html#a8842d56c2975380f327ea401c5f53564" title="The CPU set of online logical processors.">online_cpuset</a>;
<a name="l00247"></a><a class="code" href="a00011.html#afa3c59a6dd3da8ffa48710780a1bfb34">00247</a> <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00011.html#afa3c59a6dd3da8ffa48710780a1bfb34" title="The CPU set of allowed logical processors.">allowed_cpuset</a>;
<a name="l00258"></a><a class="code" href="a00011.html#a79982ede313c2190505fc5e3714a16fb">00258</a> <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00011.html#a79982ede313c2190505fc5e3714a16fb" title="NUMA nodes covered by this object or containing this object.">nodeset</a>;
<a name="l00270"></a><a class="code" href="a00011.html#adc473a52c071d7fd49e659ac90467a0f">00270</a> <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00011.html#adc473a52c071d7fd49e659ac90467a0f" title="The complete NUMA node set of this object,.">complete_nodeset</a>;
<a name="l00281"></a><a class="code" href="a00011.html#a9c1af614e0978a65ce309f921a822c8b">00281</a> <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <a class="code" href="a00011.html#a9c1af614e0978a65ce309f921a822c8b" title="The set of allowed NUMA memory nodes.">allowed_nodeset</a>;
<a name="l00290"></a>00290 };
<a name="l00294"></a><a class="code" href="a00029.html#ga79b8ab56877ef99ac59b833203391c7d">00294</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj</a> * <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a>;
<a name="l00295"></a>00295
<a name="l00297"></a><a class="code" href="a00012.html">00297</a> <span class="keyword">union </span><a class="code" href="a00012.html" title="Object type-specific Attributes.">hwloc_obj_attr_u</a> {
<a name="l00299"></a><a class="code" href="a00008.html">00299</a> <span class="keyword">struct </span><a class="code" href="a00008.html" title="Cache-specific Object Attributes.">hwloc_cache_attr_s</a> {
<a name="l00300"></a><a class="code" href="a00008.html#a3c68235220554308f89768f281ad1e62">00300</a> uint64_t <a class="code" href="a00008.html#a3c68235220554308f89768f281ad1e62" title="Size of cache in bytes.">size</a>;
<a name="l00301"></a><a class="code" href="a00008.html#a5c8f7f39193736c2187ed626940835d5">00301</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00008.html#a5c8f7f39193736c2187ed626940835d5" title="Depth of cache.">depth</a>;
<a name="l00302"></a>00302 } <a class="code" href="a00012.html#ab5a8ae3bf490e6b1071fea53f7382836" title="Cache-specific Object Attributes.">cache</a>;
<a name="l00304"></a><a class="code" href="a00010.html">00304</a> <span class="keyword">struct </span><a class="code" href="a00010.html" title="Machine-specific Object Attributes.">hwloc_machine_attr_s</a> {
<a name="l00305"></a><a class="code" href="a00010.html#aae85be0b4ebb86501718c4b460df5167">00305</a> <span class="keywordtype">char</span> *<a class="code" href="a00010.html#aae85be0b4ebb86501718c4b460df5167" title="DMI board vendor name.">dmi_board_vendor</a>;
<a name="l00306"></a><a class="code" href="a00010.html#a8b99af84fd38753a91c861f0e856b461">00306</a> <span class="keywordtype">char</span> *<a class="code" href="a00010.html#a8b99af84fd38753a91c861f0e856b461" title="DMI board model name.">dmi_board_name</a>;
<a name="l00307"></a>00307 } <a class="code" href="a00012.html#a5b42966df7c5bfdc36891e414cc31607" title="Machine-specific Object Attributes.">machine</a>;
<a name="l00309"></a><a class="code" href="a00009.html">00309</a> <span class="keyword">struct </span><a class="code" href="a00009.html" title="Group-specific Object Attributes.">hwloc_group_attr_s</a> {
<a name="l00310"></a><a class="code" href="a00009.html#ad914eac61c77481e1b7037877bcc5579">00310</a> <span class="keywordtype">unsigned</span> <a class="code" href="a00009.html#ad914eac61c77481e1b7037877bcc5579" title="Depth of group object.">depth</a>;
<a name="l00311"></a>00311 } <a class="code" href="a00012.html#ae4ba157cc313e2cdd9a82f1c1df7aaa6" title="Group-specific Object Attributes.">group</a>;
<a name="l00312"></a>00312 };
<a name="l00313"></a>00313
<a name="l00328"></a>00328 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00030.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> *topologyp);
<a name="l00329"></a>00329
<a name="l00342"></a>00342 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00030.html#ga91e2e6427b95fb7339c99dbbef996e71" title="Build the actual topology.">hwloc_topology_load</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology);
<a name="l00343"></a>00343
<a name="l00348"></a>00348 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00030.html#ga6040925d3ee4bbb2647f2a321aca5f4b" title="Terminate and free a topology context.">hwloc_topology_destroy</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology);
<a name="l00349"></a>00349
<a name="l00354"></a>00354 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00030.html#gab3628b2a540a5a08e8cf724ef829e70a" title="Run internal checks on a topology structure.">hwloc_topology_check</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology);
<a name="l00355"></a>00355
<a name="l00388"></a>00388 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00031.html#gaf2071c8621fddc53649c245d87835b47" title="Ignore an object type.">hwloc_topology_ignore_type</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type);
<a name="l00389"></a>00389
<a name="l00396"></a>00396 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00031.html#ga6ddd4213d95bd1c30555b294a60efa6b" title="Ignore an object type if it does not bring any structure.">hwloc_topology_ignore_type_keep_structure</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type);
<a name="l00397"></a>00397
<a name="l00403"></a>00403 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00031.html#gaec6fb00050f50cd41007f1ae580d2106" title="Ignore all objects that do not bring any structure.">hwloc_topology_ignore_all_keep_structure</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology);
<a name="l00404"></a>00404
<a name="l00409"></a><a class="code" href="a00031.html#gada025d3ec20b4b420f8038d23d6e7bde">00409</a> <span class="keyword">enum</span> <a class="code" href="a00031.html#gada025d3ec20b4b420f8038d23d6e7bde" title="Flags to be set onto a topology context before load.">hwloc_topology_flags_e</a> {
<a name="l00410"></a><a class="code" href="a00031.html#ggada025d3ec20b4b420f8038d23d6e7bdea129b4fea1300be22bbaf0bb0958994c8">00410</a> <a class="code" href="a00031.html#ggada025d3ec20b4b420f8038d23d6e7bdea129b4fea1300be22bbaf0bb0958994c8" title="Detect the whole system, ignore reservations and offline settings.">HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM</a> = (1&lt;&lt;0),
<a name="l00419"></a><a class="code" href="a00031.html#ggada025d3ec20b4b420f8038d23d6e7bdea6ecb6abc6a0bb75e81564f8bca85783b">00419</a> <a class="code" href="a00031.html#ggada025d3ec20b4b420f8038d23d6e7bdea6ecb6abc6a0bb75e81564f8bca85783b" title="Assume that the selected backend provides the topology for the system on which we...">HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM</a> = (1&lt;&lt;1)
<a name="l00438"></a>00438 };
<a name="l00439"></a>00439
<a name="l00444"></a>00444 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00031.html#ga6d11e53db143ac39c32cdb3912b71f99" title="Set OR&amp;#39;ed flags to non-yet-loaded topology.">hwloc_topology_set_flags</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> flags);
<a name="l00445"></a>00445
<a name="l00459"></a>00459 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00031.html#ga2f6bfb6958d8b508ea1d7d5bb266432c" title="Change the file-system root path when building the topology from sysfs/procfs.">hwloc_topology_set_fsroot</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology, <span class="keyword">const</span> <span class="keywordtype">char</span> * __hwloc_restrict fsroot_path);
<a name="l00460"></a>00460
<a name="l00474"></a>00474 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00031.html#gae1100de0162b3c6a9db750ac14629c05" title="Change which pid the topology is viewed from.">hwloc_topology_set_pid</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology, hwloc_pid_t pid);
<a name="l00475"></a>00475
<a name="l00489"></a>00489 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00031.html#ga2fcb52181b586c20f001b7a999550324" title="Enable synthetic topology.">hwloc_topology_set_synthetic</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology, <span class="keyword">const</span> <span class="keywordtype">char</span> * __hwloc_restrict description);
<a name="l00490"></a>00490
<a name="l00502"></a>00502 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00031.html#ga93efcc8a962afe1ed23393700682173f" title="Enable XML-file based topology.">hwloc_topology_set_xml</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology, <span class="keyword">const</span> <span class="keywordtype">char</span> * __hwloc_restrict xmlpath);
<a name="l00503"></a>00503
<a name="l00505"></a><a class="code" href="a00016.html">00505</a> <span class="keyword">struct </span><a class="code" href="a00016.html" title="Flags describing actual discovery support for this topology.">hwloc_topology_discovery_support</a> {
<a name="l00507"></a><a class="code" href="a00016.html#ad7bb4ecf7a82f5a04fc632e9592ad3ab">00507</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00016.html#ad7bb4ecf7a82f5a04fc632e9592ad3ab" title="Detecting the number of PU objects is supported.">pu</a>;
<a name="l00508"></a>00508 };
<a name="l00509"></a>00509
<a name="l00511"></a><a class="code" href="a00015.html">00511</a> <span class="keyword">struct </span><a class="code" href="a00015.html" title="Flags describing actual binding support for this topology.">hwloc_topology_cpubind_support</a> {
<a name="l00513"></a><a class="code" href="a00015.html#a9403d51657a4d546b3ea9553a2973a27">00513</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00015.html#a9403d51657a4d546b3ea9553a2973a27">set_thisproc_cpubind</a>;
<a name="l00515"></a><a class="code" href="a00015.html#a77a09ddd78ee3e9ff5f532a6ac74f7eb">00515</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00015.html#a77a09ddd78ee3e9ff5f532a6ac74f7eb">get_thisproc_cpubind</a>;
<a name="l00517"></a><a class="code" href="a00015.html#aa166223d1c2a6de7256ab2d8b675a87e">00517</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00015.html#aa166223d1c2a6de7256ab2d8b675a87e">set_proc_cpubind</a>;
<a name="l00519"></a><a class="code" href="a00015.html#aae705bc447adc163ead377362c4dfe9f">00519</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00015.html#aae705bc447adc163ead377362c4dfe9f">get_proc_cpubind</a>;
<a name="l00521"></a><a class="code" href="a00015.html#a57a89a4b5f1f74fa6cfe176f1e8b0798">00521</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00015.html#a57a89a4b5f1f74fa6cfe176f1e8b0798">set_thisthread_cpubind</a>;
<a name="l00523"></a><a class="code" href="a00015.html#a80d762e532d677dff262d83cc7bb1c60">00523</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00015.html#a80d762e532d677dff262d83cc7bb1c60">get_thisthread_cpubind</a>;
<a name="l00525"></a><a class="code" href="a00015.html#a46fba33e307909ce256624687799dd6d">00525</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00015.html#a46fba33e307909ce256624687799dd6d">set_thread_cpubind</a>;
<a name="l00527"></a><a class="code" href="a00015.html#a8dd4d8531ed2eebdce1507e7d104154e">00527</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="a00015.html#a8dd4d8531ed2eebdce1507e7d104154e">get_thread_cpubind</a>;
<a name="l00528"></a>00528 };
<a name="l00529"></a>00529
<a name="l00536"></a><a class="code" href="a00017.html">00536</a> <span class="keyword">struct </span><a class="code" href="a00017.html" title="Set of flags describing actual support for this topology.">hwloc_topology_support</a> {
<a name="l00537"></a><a class="code" href="a00017.html#aea3fbd7653d987d81f848636c420504d">00537</a> <span class="keyword">struct </span><a class="code" href="a00016.html" title="Flags describing actual discovery support for this topology.">hwloc_topology_discovery_support</a> *<a class="code" href="a00017.html#aea3fbd7653d987d81f848636c420504d">discovery</a>;
<a name="l00538"></a><a class="code" href="a00017.html#adef2bb91f74c3e70a2a071393caf5f56">00538</a> <span class="keyword">struct </span><a class="code" href="a00015.html" title="Flags describing actual binding support for this topology.">hwloc_topology_cpubind_support</a> *<a class="code" href="a00017.html#adef2bb91f74c3e70a2a071393caf5f56">cpubind</a>;
<a name="l00539"></a>00539 };
<a name="l00540"></a>00540
<a name="l00542"></a>00542 HWLOC_DECLSPEC <span class="keyword">const</span> <span class="keyword">struct </span><a class="code" href="a00017.html" title="Set of flags describing actual support for this topology.">hwloc_topology_support</a> *<a class="code" href="a00031.html#gac2126e105f3ae708efca2e90d612625a" title="Retrieve the topology support.">hwloc_topology_get_support</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology);
<a name="l00543"></a>00543
<a name="l00556"></a>00556 HWLOC_DECLSPEC <span class="keywordtype">void</span> <a class="code" href="a00032.html#ga1c9d8e608232206ce2142fe806a6835b" title="Export the topology into an XML file.">hwloc_topology_export_xml</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keyword">const</span> <span class="keywordtype">char</span> *xmlpath);
<a name="l00557"></a>00557
<a name="l00567"></a>00567 HWLOC_DECLSPEC hwloc_obj_t <a class="code" href="a00032.html#ga017a9ba16d554326c6e3812d545d7230" title="Add a MISC object to the topology.">hwloc_topology_insert_misc_object_by_cpuset</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset, <span class="keyword">const</span> <span class="keywordtype">char</span> *name);
<a name="l00568"></a>00568
<a name="l00578"></a>00578 HWLOC_DECLSPEC hwloc_obj_t <a class="code" href="a00032.html#gadacd7a3d21220fbb30c3256d8b22a294" title="Add a MISC object to the topology.">hwloc_topology_insert_misc_object_by_parent</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, hwloc_obj_t parent, <span class="keyword">const</span> <span class="keywordtype">char</span> *name);
<a name="l00579"></a>00579
<a name="l00592"></a>00592 HWLOC_DECLSPEC <span class="keywordtype">unsigned</span> <a class="code" href="a00033.html#ga8c30b0cec55074eb3ed34e4f2a1a9937" title="Get the depth of the hierachical tree of objects.">hwloc_topology_get_depth</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology) __hwloc_attribute_pure;
<a name="l00593"></a>00593
<a name="l00603"></a>00603 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type);
<a name="l00604"></a>00604
<a name="l00605"></a><a class="code" href="a00033.html#gaf4e663cf42bbe20756b849c6293ef575">00605</a> <span class="keyword">enum</span> <a class="code" href="a00033.html#gaf4e663cf42bbe20756b849c6293ef575">hwloc_get_type_depth_e</a> {
<a name="l00606"></a><a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad">00606</a> <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a> = -1,
<a name="l00607"></a><a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c">00607</a> <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a> = -2
<a name="l00608"></a>00608 };
<a name="l00609"></a>00609
<a name="l00614"></a>00614 HWLOC_DECLSPEC <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> <a class="code" href="a00033.html#gadd4964764ae7e49231065d58a553fd31" title="Returns the type of objects at depth depth.">hwloc_get_depth_type</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">unsigned</span> depth) __hwloc_attribute_pure;
<a name="l00615"></a>00615
<a name="l00617"></a>00617 HWLOC_DECLSPEC <span class="keywordtype">unsigned</span> <a class="code" href="a00033.html#ga20cfe2456f4cfdd789c9aca6d2fdd69f" title="Returns the width of level at depth depth.">hwloc_get_nbobjs_by_depth</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">unsigned</span> depth) __hwloc_attribute_pure;
<a name="l00618"></a>00618
<a name="l00624"></a>00624 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">int</span> __hwloc_attribute_pure
<a name="l00625"></a><a class="code" href="a00033.html#ga0131ab1051011fabfa69d7c1853e716c">00625</a> <a class="code" href="a00033.html#ga0131ab1051011fabfa69d7c1853e716c" title="Returns the width of level type type.">hwloc_get_nbobjs_by_type</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type)
<a name="l00626"></a>00626 {
<a name="l00627"></a>00627 <span class="keywordtype">int</span> depth = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00628"></a>00628 <span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>)
<a name="l00629"></a>00629 <span class="keywordflow">return</span> 0;
<a name="l00630"></a>00630 <span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00631"></a>00631 <span class="keywordflow">return</span> -1; <span class="comment">/* FIXME: agregate nbobjs from different levels? */</span>
<a name="l00632"></a>00632 <span class="keywordflow">return</span> <a class="code" href="a00033.html#ga20cfe2456f4cfdd789c9aca6d2fdd69f" title="Returns the width of level at depth depth.">hwloc_get_nbobjs_by_depth</a>(topology, depth);
<a name="l00633"></a>00633 }
<a name="l00634"></a>00634
<a name="l00642"></a>00642 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00033.html#ga0d109e33fc7990f62f665d336e5e5111" title="Does the topology context come from this system?">hwloc_topology_is_thissystem</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> __hwloc_restrict topology) __hwloc_attribute_pure;
<a name="l00643"></a>00643
<a name="l00653"></a>00653 HWLOC_DECLSPEC hwloc_obj_t <a class="code" href="a00034.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <span class="keywordtype">unsigned</span> depth, <span class="keywordtype">unsigned</span> idx) __hwloc_attribute_pure;
<a name="l00654"></a>00654
<a name="l00661"></a>00661 <span class="keyword">static</span> __hwloc_inline hwloc_obj_t __hwloc_attribute_pure
<a name="l00662"></a><a class="code" href="a00034.html#ga701f83b2cf0cb8e0acd58cd2dc1c67a2">00662</a> <a class="code" href="a00034.html#ga701f83b2cf0cb8e0acd58cd2dc1c67a2" title="Returns the topology object at index index with type type.">hwloc_get_obj_by_type</a> (<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type, <span class="keywordtype">unsigned</span> idx)
<a name="l00663"></a>00663 {
<a name="l00664"></a>00664 <span class="keywordtype">int</span> depth = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, type);
<a name="l00665"></a>00665 <span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>)
<a name="l00666"></a>00666 <span class="keywordflow">return</span> NULL;
<a name="l00667"></a>00667 <span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" title="Objects of given type exist at different depth in the topology.">HWLOC_TYPE_DEPTH_MULTIPLE</a>)
<a name="l00668"></a>00668 <span class="keywordflow">return</span> NULL;
<a name="l00669"></a>00669 <span class="keywordflow">return</span> <a class="code" href="a00034.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a>(topology, depth, idx);
<a name="l00670"></a>00670 }
<a name="l00671"></a>00671
<a name="l00681"></a>00681 HWLOC_DECLSPEC <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="a00035.html#ga7c61920feca6fd9006d930dabfc09058" title="Return a stringified topology object type.">hwloc_obj_type_string</a> (<a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> type) __hwloc_attribute_const;
<a name="l00682"></a>00682
<a name="l00687"></a>00687 HWLOC_DECLSPEC <a class="code" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55" title="Type of topology object.">hwloc_obj_type_t</a> <a class="code" href="a00035.html#gade722091ae392fdc79557e797a16c370" title="Return an object type from the string.">hwloc_obj_type_of_string</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keywordtype">string</span>) __hwloc_attribute_pure;
<a name="l00688"></a>00688
<a name="l00696"></a>00696 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00035.html#ga3ad856e8f3487d340c82a23b8a2a0351" title="Stringify the type of a given topology object into a human-readable form.">hwloc_obj_type_snprintf</a>(<span class="keywordtype">char</span> * __hwloc_restrict <span class="keywordtype">string</span>, <span class="keywordtype">size_t</span> size, hwloc_obj_t obj,
<a name="l00697"></a>00697 <span class="keywordtype">int</span> verbose);
<a name="l00698"></a>00698
<a name="l00707"></a>00707 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00035.html#ga0db8286d7f3ceda8defd76e3e1e2b284" title="Stringify the attributes of a given topology object into a human-readable form.">hwloc_obj_attr_snprintf</a>(<span class="keywordtype">char</span> * __hwloc_restrict <span class="keywordtype">string</span>, <span class="keywordtype">size_t</span> size, hwloc_obj_t obj, <span class="keyword">const</span> <span class="keywordtype">char</span> * __hwloc_restrict separator,
<a name="l00708"></a>00708 <span class="keywordtype">int</span> verbose);
<a name="l00709"></a>00709
<a name="l00727"></a>00727 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00035.html#ga5c6a61a83f4790b421e2f62e9088446f" title="Stringify a given topology object into a human-readable form.">hwloc_obj_snprintf</a>(<span class="keywordtype">char</span> * __hwloc_restrict <span class="keywordtype">string</span>, <span class="keywordtype">size_t</span> size,
<a name="l00728"></a>00728 <a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, hwloc_obj_t obj,
<a name="l00729"></a>00729 <span class="keyword">const</span> <span class="keywordtype">char</span> * __hwloc_restrict indexprefix, <span class="keywordtype">int</span> verbose);
<a name="l00730"></a>00730
<a name="l00734"></a>00734 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00035.html#gabbfb92224c992c0e2ecef6b6e45260f2" title="Stringify the cpuset containing a set of objects.">hwloc_obj_cpuset_snprintf</a>(<span class="keywordtype">char</span> * __hwloc_restrict str, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> nobj, <span class="keyword">const</span> hwloc_obj_t * __hwloc_restrict objs);
<a name="l00735"></a>00735
<a name="l00781"></a><a class="code" href="a00036.html#ga9b2de9a34a18edb39fb272adf9c33622">00781</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
<a name="l00782"></a><a class="code" href="a00036.html#gga9b2de9a34a18edb39fb272adf9c33622a2e0dd0128dac6b03408c7dd170477fdc">00782</a> <a class="code" href="a00036.html#gga9b2de9a34a18edb39fb272adf9c33622a2e0dd0128dac6b03408c7dd170477fdc" title="Bind all threads of the current multithreaded process. This may not be supported...">HWLOC_CPUBIND_PROCESS</a> = (1&lt;&lt;0),
<a name="l00785"></a><a class="code" href="a00036.html#gga9b2de9a34a18edb39fb272adf9c33622af1b6bbad00d7b1017b918e3719f4d421">00785</a> <a class="code" href="a00036.html#gga9b2de9a34a18edb39fb272adf9c33622af1b6bbad00d7b1017b918e3719f4d421" title="Bind current thread of current process.">HWLOC_CPUBIND_THREAD</a> = (1&lt;&lt;1),
<a name="l00787"></a><a class="code" href="a00036.html#gga9b2de9a34a18edb39fb272adf9c33622a679a7e0f0c7ee06b123565f90d98e7fa">00787</a> <a class="code" href="a00036.html#gga9b2de9a34a18edb39fb272adf9c33622a679a7e0f0c7ee06b123565f90d98e7fa" title="Request for strict binding from the OS.">HWLOC_CPUBIND_STRICT</a> = (1&lt;&lt;2)
<a name="l00815"></a>00815 } <a class="code" href="a00036.html#ga9b2de9a34a18edb39fb272adf9c33622" title="Process/Thread binding policy.">hwloc_cpubind_policy_t</a>;
<a name="l00816"></a>00816
<a name="l00822"></a>00822 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00036.html#ga42f02baaf7dc0c0f5a6bbeca731fd144" title="Bind current process or thread on cpus given in cpuset set.">hwloc_set_cpubind</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>,
<a name="l00823"></a>00823 <span class="keywordtype">int</span> policy);
<a name="l00824"></a>00824
<a name="l00827"></a>00827 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00036.html#ga55427f8da8073ae16d0bab11f8137f1c" title="Get current process or thread binding.">hwloc_get_cpubind</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <span class="keyword">set</span>, <span class="keywordtype">int</span> policy);
<a name="l00828"></a>00828
<a name="l00836"></a>00836 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00036.html#gac349497da8f4f738bad51b2861461dc3" title="Bind a process pid on cpus given in cpuset set.">hwloc_set_proc_cpubind</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, hwloc_pid_t pid, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>, <span class="keywordtype">int</span> policy);
<a name="l00837"></a>00837
<a name="l00845"></a>00845 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00036.html#ga02141a2049739d63a5fa7a172d301f1c" title="Get the current binding of process pid.">hwloc_get_proc_cpubind</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, hwloc_pid_t pid, <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <span class="keyword">set</span>, <span class="keywordtype">int</span> policy);
<a name="l00846"></a>00846
<a name="l00854"></a>00854 <span class="preprocessor">#ifdef hwloc_thread_t</span>
<a name="l00855"></a>00855 <span class="preprocessor"></span>HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00036.html#ga2be36e3ab9c9076ab5cca8fd57ae0dcf" title="Bind a thread tid on cpus given in cpuset set.">hwloc_set_thread_cpubind</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, hwloc_thread_t tid, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>, <span class="keywordtype">int</span> policy);
<a name="l00856"></a>00856 <span class="preprocessor">#endif</span>
<a name="l00857"></a>00857 <span class="preprocessor"></span>
<a name="l00865"></a>00865 <span class="preprocessor">#ifdef hwloc_thread_t</span>
<a name="l00866"></a>00866 <span class="preprocessor"></span>HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00036.html#ga5f265c78ea768372bae8e5d89d628c22" title="Get the current binding of thread tid.">hwloc_get_thread_cpubind</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, hwloc_thread_t tid, <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <span class="keyword">set</span>, <span class="keywordtype">int</span> policy);
<a name="l00867"></a>00867 <span class="preprocessor">#endif</span>
<a name="l00868"></a>00868 <span class="preprocessor"></span>
<a name="l00872"></a>00872 <span class="comment">/* high-level helpers */</span>
<a name="l00873"></a>00873 <span class="preprocessor">#include &lt;hwloc/helper.h&gt;</span>
<a name="l00874"></a>00874
<a name="l00875"></a>00875
<a name="l00876"></a>00876 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_H */</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): linux.h Source File</title>
<title>Hardware Locality (hwloc): linux-libnuma.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -23,24 +23,196 @@
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>linux.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<h1>linux-libnuma.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright © 2009 CNRS, INRIA, Université Bordeaux 1</span>
<a name="l00003"></a>00003 <span class="comment"> * See COPYING in top-level directory.</span>
<a name="l00004"></a>00004 <span class="comment"> */</span>
<a name="l00005"></a>00005
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef HWLOC_LINUX_H</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_LINUX_H</span>
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef HWLOC_LINUX_LIBNUMA_H</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_LINUX_LIBNUMA_H</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;hwloc.h&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;numa.h&gt;</span>
<a name="l00018"></a>00018
<a name="l00032"></a>00032 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00047.html#gaeacad897c30dbea284948374ad4b010c" title="Convert a linux kernel cpumap file file into hwloc CPU set.">hwloc_linux_parse_cpumap_file</a>(FILE *file, <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <span class="keyword">set</span>);
<a name="l00033"></a>00033
<a name="l00039"></a>00039 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00047.html#gaaaca5d1687053b6c3326b2c165bd6530" title="Bind a thread tid on cpus given in cpuset set.">hwloc_linux_set_tid_cpubind</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, pid_t tid, <a class="code" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>);
<a name="l00040"></a>00040
<a name="l00046"></a>00046 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00047.html#gaf36a9211a21eb930f59090eb5d460b8e" title="Get the current binding of thread tid.">hwloc_linux_get_tid_cpubind</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, pid_t tid, <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <span class="keyword">set</span>);
<a name="l00047"></a>00047
<a name="l00050"></a>00050 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_GLIBC_SCHED_H */</span>
<a name="l00019"></a>00019
<a name="l00035"></a>00035 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">int</span>
<a name="l00036"></a><a class="code" href="a00049.html#ga018e57a42a780ce2ba2e35ef975d8888">00036</a> <a class="code" href="a00049.html#ga018e57a42a780ce2ba2e35ef975d8888" title="Convert hwloc CPU set cpuset into the array of unsigned long mask.">hwloc_cpuset_to_linux_libnuma_ulongs</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset,
<a name="l00037"></a>00037 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *mask, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *maxnode)
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> outmaxnode = -1;
<a name="l00040"></a>00040 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> node = NULL;
<a name="l00041"></a>00041 <span class="keywordtype">unsigned</span> nbnodes = <a class="code" href="a00033.html#ga0131ab1051011fabfa69d7c1853e716c" title="Returns the width of level type type.">hwloc_get_nbobjs_by_type</a>(topology, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>);
<a name="l00042"></a>00042 <span class="keywordtype">unsigned</span> i;
<a name="l00043"></a>00043
<a name="l00044"></a>00044 <span class="keywordflow">for</span>(i=0; i&lt;*maxnode/HWLOC_BITS_PER_LONG; i++)
<a name="l00045"></a>00045 mask[i] = 0;
<a name="l00046"></a>00046
<a name="l00047"></a>00047 <span class="keywordflow">if</span> (nbnodes) {
<a name="l00048"></a>00048 <span class="keywordflow">while</span> ((node = <a class="code" href="a00041.html#ga5915ea30f326676b3a4cfff371ce04d1" title="Iterate through same-type objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_type</a>(topology, cpuset, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>, node)) != NULL) {
<a name="l00049"></a>00049 <span class="keywordflow">if</span> (node-&gt;<a class="code" href="a00011.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a> &gt;= *maxnode)
<a name="l00050"></a>00050 <span class="keywordflow">break</span>;
<a name="l00051"></a>00051 mask[node-&gt;<a class="code" href="a00011.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a>/HWLOC_BITS_PER_LONG] |= 1 &lt;&lt; (node-&gt;<a class="code" href="a00011.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a> % HWLOC_BITS_PER_LONG);
<a name="l00052"></a>00052 outmaxnode = node-&gt;<a class="code" href="a00011.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a>;
<a name="l00053"></a>00053 }
<a name="l00054"></a>00054
<a name="l00055"></a>00055 } <span class="keywordflow">else</span> {
<a name="l00056"></a>00056 <span class="comment">/* if no numa, libnuma assumes we have a single node */</span>
<a name="l00057"></a>00057 <span class="keywordflow">if</span> (!<a class="code" href="a00046.html#gac5b8ad0c32e9d14c587eabde188182a9" title="Test whether set set is empty.">hwloc_cpuset_iszero</a>(cpuset)) {
<a name="l00058"></a>00058 mask[0] = 1;
<a name="l00059"></a>00059 outmaxnode = 0;
<a name="l00060"></a>00060 }
<a name="l00061"></a>00061 }
<a name="l00062"></a>00062
<a name="l00063"></a>00063 *maxnode = outmaxnode+1;
<a name="l00064"></a>00064 <span class="keywordflow">return</span> 0;
<a name="l00065"></a>00065 }
<a name="l00066"></a>00066
<a name="l00076"></a>00076 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">int</span>
<a name="l00077"></a><a class="code" href="a00049.html#gafa60816dde33d69149497bcf6c7818e0">00077</a> <a class="code" href="a00049.html#gafa60816dde33d69149497bcf6c7818e0" title="Convert the array of unsigned long mask into hwloc CPU set.">hwloc_cpuset_from_linux_libnuma_ulongs</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> cpuset,
<a name="l00078"></a>00078 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *mask, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> maxnode)
<a name="l00079"></a>00079 {
<a name="l00080"></a>00080 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> node;
<a name="l00081"></a>00081 <span class="keywordtype">int</span> depth;
<a name="l00082"></a>00082 <span class="keywordtype">unsigned</span> i;
<a name="l00083"></a>00083
<a name="l00084"></a>00084 depth = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>);
<a name="l00085"></a>00085 <span class="comment">/* cannot be HWLOC_TYPE_DEPTH_MULTIPLE */</span>
<a name="l00086"></a>00086
<a name="l00087"></a>00087 <span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>) {
<a name="l00088"></a>00088 <span class="comment">/* if no numa, libnuma assumes we have a single node */</span>
<a name="l00089"></a>00089 <span class="keywordflow">if</span> (mask[0] &amp; 1)
<a name="l00090"></a>00090 <a class="code" href="a00046.html#ga27a3b6994bd6f20c1f26d10bdb29ac0b" title="Copy the contents of CPU set src into the already allocated CPU set dst.">hwloc_cpuset_copy</a>(cpuset, <a class="code" href="a00045.html#ga75f0ac3ac41e9915541c3ae3153a6e26">hwloc_topology_get_complete_cpuset</a>(topology));
<a name="l00091"></a>00091 <span class="keywordflow">else</span>
<a name="l00092"></a>00092 <a class="code" href="a00046.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(cpuset);
<a name="l00093"></a>00093
<a name="l00094"></a>00094 } <span class="keywordflow">else</span> {
<a name="l00095"></a>00095 <a class="code" href="a00046.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(cpuset);
<a name="l00096"></a>00096 <span class="keywordflow">for</span>(i=0; i&lt;maxnode; i++)
<a name="l00097"></a>00097 <span class="keywordflow">if</span> (mask[i/HWLOC_BITS_PER_LONG] &amp; (1 &lt;&lt; (i% HWLOC_BITS_PER_LONG))) {
<a name="l00098"></a>00098 node = <a class="code" href="a00034.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a>(topology, depth, i);
<a name="l00099"></a>00099 <span class="keywordflow">if</span> (node)
<a name="l00100"></a>00100 <a class="code" href="a00046.html#ga9654f87331e6f33090bed3d326346e85" title="Or sets set1 and set2 and store the result in set res.">hwloc_cpuset_or</a>(cpuset, cpuset, node-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
<a name="l00101"></a>00101 }
<a name="l00102"></a>00102 }
<a name="l00103"></a>00103
<a name="l00104"></a>00104 <span class="keywordflow">return</span> 0;
<a name="l00105"></a>00105 }
<a name="l00106"></a>00106
<a name="l00125"></a>00125 <span class="keyword">static</span> __hwloc_inline <span class="keyword">struct </span>bitmask * __hwloc_attribute_malloc
<a name="l00126"></a><a class="code" href="a00050.html#ga067ec565345a346bfd9d721cff5901ae">00126</a> <a class="code" href="a00050.html#ga067ec565345a346bfd9d721cff5901ae" title="Convert hwloc CPU set cpuset into the returned libnuma bitmask.">hwloc_cpuset_to_linux_libnuma_bitmask</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset)
<a name="l00127"></a>00127 {
<a name="l00128"></a>00128 <span class="keyword">struct </span>bitmask *bitmask;
<a name="l00129"></a>00129 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> node = NULL;
<a name="l00130"></a>00130 <span class="keywordtype">unsigned</span> nbnodes = <a class="code" href="a00033.html#ga0131ab1051011fabfa69d7c1853e716c" title="Returns the width of level type type.">hwloc_get_nbobjs_by_type</a>(topology, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>);
<a name="l00131"></a>00131
<a name="l00132"></a>00132 <span class="keywordflow">if</span> (nbnodes) {
<a name="l00133"></a>00133 bitmask = numa_bitmask_alloc(nbnodes);
<a name="l00134"></a>00134 <span class="keywordflow">if</span> (!bitmask)
<a name="l00135"></a>00135 <span class="keywordflow">return</span> NULL;
<a name="l00136"></a>00136 <span class="keywordflow">while</span> ((node = <a class="code" href="a00041.html#ga5915ea30f326676b3a4cfff371ce04d1" title="Iterate through same-type objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_type</a>(topology, cpuset, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>, node)) != NULL)
<a name="l00137"></a>00137 numa_bitmask_setbit(bitmask, node-&gt;<a class="code" href="a00011.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a>);
<a name="l00138"></a>00138
<a name="l00139"></a>00139 } <span class="keywordflow">else</span> {
<a name="l00140"></a>00140 <span class="comment">/* if no numa, libnuma assumes we have a single node */</span>
<a name="l00141"></a>00141 bitmask = numa_bitmask_alloc(1);
<a name="l00142"></a>00142 <span class="keywordflow">if</span> (!bitmask)
<a name="l00143"></a>00143 <span class="keywordflow">return</span> NULL;
<a name="l00144"></a>00144 <span class="keywordflow">if</span> (!<a class="code" href="a00046.html#gac5b8ad0c32e9d14c587eabde188182a9" title="Test whether set set is empty.">hwloc_cpuset_iszero</a>(cpuset))
<a name="l00145"></a>00145 numa_bitmask_setbit(bitmask, 0);
<a name="l00146"></a>00146 }
<a name="l00147"></a>00147
<a name="l00148"></a>00148 <span class="keywordflow">return</span> bitmask;
<a name="l00149"></a>00149 }
<a name="l00150"></a>00150
<a name="l00156"></a>00156 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">int</span>
<a name="l00157"></a><a class="code" href="a00050.html#ga47747968f12c2674d2840dfbacce4940">00157</a> <a class="code" href="a00050.html#ga47747968f12c2674d2840dfbacce4940" title="Convert libnuma bitmask bitmask into hwloc CPU set cpuset.">hwloc_cpuset_from_linux_libnuma_bitmask</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> cpuset,
<a name="l00158"></a>00158 <span class="keyword">const</span> <span class="keyword">struct</span> bitmask *bitmask)
<a name="l00159"></a>00159 {
<a name="l00160"></a>00160 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> node;
<a name="l00161"></a>00161 <span class="keywordtype">int</span> depth;
<a name="l00162"></a>00162 <span class="keywordtype">int</span> i;
<a name="l00163"></a>00163
<a name="l00164"></a>00164 depth = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>);
<a name="l00165"></a>00165 <span class="comment">/* cannot be HWLOC_TYPE_DEPTH_MULTIPLE */</span>
<a name="l00166"></a>00166
<a name="l00167"></a>00167 <span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>) {
<a name="l00168"></a>00168 <span class="comment">/* if no numa, libnuma assumes we have a single node */</span>
<a name="l00169"></a>00169 <span class="keywordflow">if</span> (numa_bitmask_isbitset(bitmask, 0))
<a name="l00170"></a>00170 <a class="code" href="a00046.html#ga27a3b6994bd6f20c1f26d10bdb29ac0b" title="Copy the contents of CPU set src into the already allocated CPU set dst.">hwloc_cpuset_copy</a>(cpuset, <a class="code" href="a00045.html#ga75f0ac3ac41e9915541c3ae3153a6e26">hwloc_topology_get_complete_cpuset</a>(topology));
<a name="l00171"></a>00171 <span class="keywordflow">else</span>
<a name="l00172"></a>00172 <a class="code" href="a00046.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(cpuset);
<a name="l00173"></a>00173
<a name="l00174"></a>00174 } <span class="keywordflow">else</span> {
<a name="l00175"></a>00175 <a class="code" href="a00046.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(cpuset);
<a name="l00176"></a>00176 <span class="keywordflow">for</span>(i=0; i&lt;NUMA_NUM_NODES; i++)
<a name="l00177"></a>00177 <span class="keywordflow">if</span> (numa_bitmask_isbitset(bitmask, i)) {
<a name="l00178"></a>00178 node = <a class="code" href="a00034.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a>(topology, depth, i);
<a name="l00179"></a>00179 <span class="keywordflow">if</span> (node)
<a name="l00180"></a>00180 <a class="code" href="a00046.html#ga9654f87331e6f33090bed3d326346e85" title="Or sets set1 and set2 and store the result in set res.">hwloc_cpuset_or</a>(cpuset, cpuset, node-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
<a name="l00181"></a>00181 }
<a name="l00182"></a>00182 }
<a name="l00183"></a>00183
<a name="l00184"></a>00184 <span class="keywordflow">return</span> 0;
<a name="l00185"></a>00185 }
<a name="l00186"></a>00186
<a name="l00191"></a>00191 <span class="preprocessor">#ifdef NUMA_VERSION1_COMPATIBILITY</span>
<a name="l00192"></a>00192 <span class="preprocessor"></span>
<a name="l00202"></a>00202 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">int</span>
<a name="l00203"></a><a class="code" href="a00051.html#ga36feb81315de87ce11d9a5aa2b4c6e6d">00203</a> <a class="code" href="a00051.html#ga36feb81315de87ce11d9a5aa2b4c6e6d" title="Convert hwloc CPU set cpuset into libnuma nodemask nodemask.">hwloc_cpuset_to_linux_libnuma_nodemask</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset,
<a name="l00204"></a>00204 nodemask_t *nodemask)
<a name="l00205"></a>00205 {
<a name="l00206"></a>00206 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> node = NULL;
<a name="l00207"></a>00207 <span class="keywordtype">unsigned</span> nbnodes = <a class="code" href="a00033.html#ga0131ab1051011fabfa69d7c1853e716c" title="Returns the width of level type type.">hwloc_get_nbobjs_by_type</a>(topology, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>);
<a name="l00208"></a>00208
<a name="l00209"></a>00209 nodemask_zero(nodemask);
<a name="l00210"></a>00210 <span class="keywordflow">if</span> (nbnodes) {
<a name="l00211"></a>00211 <span class="keywordflow">while</span> ((node = <a class="code" href="a00041.html#ga5915ea30f326676b3a4cfff371ce04d1" title="Iterate through same-type objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_type</a>(topology, cpuset, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>, node)) != NULL)
<a name="l00212"></a>00212 nodemask_set(nodemask, node-&gt;<a class="code" href="a00011.html#a61a7a80a68eaccbaaa28269e678c81a9" title="OS-provided physical index number.">os_index</a>);
<a name="l00213"></a>00213
<a name="l00214"></a>00214 } <span class="keywordflow">else</span> {
<a name="l00215"></a>00215 <span class="comment">/* if no numa, libnuma assumes we have a single node */</span>
<a name="l00216"></a>00216 <span class="keywordflow">if</span> (!<a class="code" href="a00046.html#gac5b8ad0c32e9d14c587eabde188182a9" title="Test whether set set is empty.">hwloc_cpuset_iszero</a>(cpuset))
<a name="l00217"></a>00217 nodemask_set(nodemask, 0);
<a name="l00218"></a>00218 }
<a name="l00219"></a>00219
<a name="l00220"></a>00220 <span class="keywordflow">return</span> 0;
<a name="l00221"></a>00221 }
<a name="l00222"></a>00222
<a name="l00228"></a>00228 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">int</span>
<a name="l00229"></a><a class="code" href="a00051.html#gac24c9e4bb2eab3e23b2039559adc9df8">00229</a> <a class="code" href="a00051.html#gac24c9e4bb2eab3e23b2039559adc9df8" title="Convert libnuma nodemask nodemask into hwloc CPU set cpuset.">hwloc_cpuset_from_linux_libnuma_nodemask</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> cpuset,
<a name="l00230"></a>00230 <span class="keyword">const</span> nodemask_t *nodemask)
<a name="l00231"></a>00231 {
<a name="l00232"></a>00232 <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> node;
<a name="l00233"></a>00233 <span class="keywordtype">int</span> depth;
<a name="l00234"></a>00234 <span class="keywordtype">int</span> i;
<a name="l00235"></a>00235
<a name="l00236"></a>00236 depth = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" title="NUMA node. A set of processors around memory which the processors can directly access...">HWLOC_OBJ_NODE</a>);
<a name="l00237"></a>00237 <span class="comment">/* cannot be HWLOC_TYPE_DEPTH_MULTIPLE */</span>
<a name="l00238"></a>00238
<a name="l00239"></a>00239 <span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>) {
<a name="l00240"></a>00240 <span class="comment">/* if no numa, libnuma assumes we have a single node */</span>
<a name="l00241"></a>00241 <span class="keywordflow">if</span> (nodemask_isset(nodemask, 0))
<a name="l00242"></a>00242 <a class="code" href="a00046.html#ga27a3b6994bd6f20c1f26d10bdb29ac0b" title="Copy the contents of CPU set src into the already allocated CPU set dst.">hwloc_cpuset_copy</a>(cpuset, <a class="code" href="a00045.html#ga75f0ac3ac41e9915541c3ae3153a6e26">hwloc_topology_get_complete_cpuset</a>(topology));
<a name="l00243"></a>00243 <span class="keywordflow">else</span>
<a name="l00244"></a>00244 <a class="code" href="a00046.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(cpuset);
<a name="l00245"></a>00245
<a name="l00246"></a>00246 } <span class="keywordflow">else</span> {
<a name="l00247"></a>00247 <a class="code" href="a00046.html#gacabf3491be3ab41b4ad1ee28f72db89e" title="Empty the CPU set set.">hwloc_cpuset_zero</a>(cpuset);
<a name="l00248"></a>00248 <span class="keywordflow">for</span>(i=0; i&lt;NUMA_NUM_NODES; i++)
<a name="l00249"></a>00249 <span class="keywordflow">if</span> (nodemask_isset(nodemask, i)) {
<a name="l00250"></a>00250 node = <a class="code" href="a00034.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a>(topology, depth, i);
<a name="l00251"></a>00251 <span class="keywordflow">if</span> (node)
<a name="l00252"></a>00252 <a class="code" href="a00046.html#ga9654f87331e6f33090bed3d326346e85" title="Or sets set1 and set2 and store the result in set res.">hwloc_cpuset_or</a>(cpuset, cpuset, node-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
<a name="l00253"></a>00253 }
<a name="l00254"></a>00254 }
<a name="l00255"></a>00255
<a name="l00256"></a>00256 <span class="keywordflow">return</span> 0;
<a name="l00257"></a>00257 }
<a name="l00258"></a>00258
<a name="l00260"></a>00260 <span class="preprocessor">#endif </span><span class="comment">/* NUMA_VERSION1_COMPATIBILITY */</span>
<a name="l00261"></a>00261
<a name="l00262"></a>00262
<a name="l00263"></a>00263 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_LINUX_NUMA_H */</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): openfabrics-verbs.h Source File</title>
<title>Hardware Locality (hwloc): linux.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -23,49 +23,24 @@
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>openfabrics-verbs.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<h1>linux.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright © 2009 CNRS, INRIA, Université Bordeaux 1</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright © 2009 Cisco Systems, Inc. All rights reserved.</span>
<a name="l00004"></a>00004 <span class="comment"> * See COPYING in top-level directory.</span>
<a name="l00005"></a>00005 <span class="comment"> */</span>
<a name="l00006"></a>00006
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef HWLOC_OPENFABRICS_VERBS_H</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_OPENFABRICS_VERBS_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;hwloc.h&gt;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;hwloc/config.h&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;hwloc/linux.h&gt;</span>
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;infiniband/verbs.h&gt;</span>
<a name="l00025"></a>00025
<a name="l00038"></a>00038 <span class="keyword">static</span> __inline <span class="keywordtype">int</span>
<a name="l00039"></a><a class="code" href="a00051.html#gaa8e3405c00a4b46991336549c461974c">00039</a> <a class="code" href="a00051.html#gaa8e3405c00a4b46991336549c461974c" title="Get the CPU set of logical processors that are physically close to device ibdev.">hwloc_ibv_get_device_cpuset</a>(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused,
<a name="l00040"></a>00040 <span class="keyword">struct</span> ibv_device *ibdev, <a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <span class="keyword">set</span>)
<a name="l00041"></a>00041 {
<a name="l00042"></a>00042 <span class="preprocessor">#ifdef HWLOC_LINUX_SYS</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span> <span class="comment">/* If we&#39;re on Linux, use the verbs-provided sysfs mechanism to</span>
<a name="l00044"></a>00044 <span class="comment"> get the local cpus */</span>
<a name="l00045"></a>00045 <span class="preprocessor">#define HWLOC_OPENFABRICS_VERBS_SYSFS_PATH_MAX 128</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span> <span class="keywordtype">char</span> path[HWLOC_OPENFABRICS_VERBS_SYSFS_PATH_MAX];
<a name="l00047"></a>00047 FILE *sysfile = NULL;
<a name="l00048"></a>00048
<a name="l00049"></a>00049 sprintf(path, <span class="stringliteral">&quot;/sys/class/infiniband/%s/device/local_cpus&quot;</span>,
<a name="l00050"></a>00050 ibv_get_device_name(ibdev));
<a name="l00051"></a>00051 sysfile = fopen(path, <span class="stringliteral">&quot;r&quot;</span>);
<a name="l00052"></a>00052 <span class="keywordflow">if</span> (!sysfile)
<a name="l00053"></a>00053 <span class="keywordflow">return</span> -1;
<a name="l00054"></a>00054
<a name="l00055"></a>00055 <a class="code" href="a00047.html#gaeacad897c30dbea284948374ad4b010c" title="Convert a linux kernel cpumap file file into hwloc CPU set.">hwloc_linux_parse_cpumap_file</a>(sysfile, <span class="keyword">set</span>);
<a name="l00056"></a>00056
<a name="l00057"></a>00057 fclose(sysfile);
<a name="l00058"></a>00058 <span class="preprocessor">#else</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span> <span class="comment">/* Non-Linux systems simply get a full cpuset */</span>
<a name="l00060"></a>00060 <a class="code" href="a00045.html#ga27a3b6994bd6f20c1f26d10bdb29ac0b" title="Copy the contents of CPU set src into the already allocated CPU set dst.">hwloc_cpuset_copy</a>(<span class="keyword">set</span>, <a class="code" href="a00044.html#ga0361003cb1e41f6f3e9fc485135a0950">hwloc_topology_get_complete_cpuset</a>(topology));
<a name="l00061"></a>00061 <span class="preprocessor">#endif</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span> <span class="keywordflow">return</span> 0;
<a name="l00063"></a>00063 }
<a name="l00064"></a>00064
<a name="l00067"></a>00067 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_OPENFABRICS_VERBS_H */</span>
<a name="l00003"></a>00003 <span class="comment"> * See COPYING in top-level directory.</span>
<a name="l00004"></a>00004 <span class="comment"> */</span>
<a name="l00005"></a>00005
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef HWLOC_LINUX_H</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_LINUX_H</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;hwloc.h&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00018"></a>00018
<a name="l00032"></a>00032 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00048.html#gaeacad897c30dbea284948374ad4b010c" title="Convert a linux kernel cpumap file file into hwloc CPU set.">hwloc_linux_parse_cpumap_file</a>(FILE *file, <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <span class="keyword">set</span>);
<a name="l00033"></a>00033
<a name="l00039"></a>00039 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00048.html#gaaaca5d1687053b6c3326b2c165bd6530" title="Bind a thread tid on cpus given in cpuset set.">hwloc_linux_set_tid_cpubind</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, pid_t tid, <a class="code" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <span class="keyword">set</span>);
<a name="l00040"></a>00040
<a name="l00046"></a>00046 HWLOC_DECLSPEC <span class="keywordtype">int</span> <a class="code" href="a00048.html#gaf36a9211a21eb930f59090eb5d460b8e" title="Get the current binding of thread tid.">hwloc_linux_get_tid_cpubind</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, pid_t tid, <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <span class="keyword">set</span>);
<a name="l00047"></a>00047
<a name="l00050"></a>00050 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_GLIBC_SCHED_H */</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">

Просмотреть файл

@ -1,49 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): API version</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>API version</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00025.html#ga8f4dfb8eef138af55dd1a0fa802e5476">HWLOC_API_VERSION</a>&nbsp;&nbsp;&nbsp;0x00010000</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Indicate at build time which hwloc API version is being used. <a href="#ga8f4dfb8eef138af55dd1a0fa802e5476"></a><br/></td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ga8f4dfb8eef138af55dd1a0fa802e5476"></a><!-- doxytag: member="hwloc.h::HWLOC_API_VERSION" ref="ga8f4dfb8eef138af55dd1a0fa802e5476" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define HWLOC_API_VERSION&nbsp;&nbsp;&nbsp;0x00010000</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Indicate at build time which hwloc API version is being used. </p>
</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>

Просмотреть файл

@ -0,0 +1,74 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): openfabrics-verbs.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<h1>openfabrics-verbs.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright © 2009 CNRS, INRIA, Université Bordeaux 1</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright © 2009 Cisco Systems, Inc. All rights reserved.</span>
<a name="l00004"></a>00004 <span class="comment"> * See COPYING in top-level directory.</span>
<a name="l00005"></a>00005 <span class="comment"> */</span>
<a name="l00006"></a>00006
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef HWLOC_OPENFABRICS_VERBS_H</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define HWLOC_OPENFABRICS_VERBS_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;hwloc.h&gt;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;hwloc/config.h&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;hwloc/linux.h&gt;</span>
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;infiniband/verbs.h&gt;</span>
<a name="l00025"></a>00025
<a name="l00038"></a>00038 <span class="keyword">static</span> __hwloc_inline <span class="keywordtype">int</span>
<a name="l00039"></a><a class="code" href="a00052.html#gaa8ea979ce3a9b8c70ae80bc5716a0fbe">00039</a> <a class="code" href="a00052.html#gaa8ea979ce3a9b8c70ae80bc5716a0fbe" title="Get the CPU set of logical processors that are physically close to device ibdev.">hwloc_ibv_get_device_cpuset</a>(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology __hwloc_attribute_unused,
<a name="l00040"></a>00040 <span class="keyword">struct</span> ibv_device *ibdev, <a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> <span class="keyword">set</span>)
<a name="l00041"></a>00041 {
<a name="l00042"></a>00042 <span class="preprocessor">#ifdef HWLOC_LINUX_SYS</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span> <span class="comment">/* If we&#39;re on Linux, use the verbs-provided sysfs mechanism to</span>
<a name="l00044"></a>00044 <span class="comment"> get the local cpus */</span>
<a name="l00045"></a>00045 <span class="preprocessor">#define HWLOC_OPENFABRICS_VERBS_SYSFS_PATH_MAX 128</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span> <span class="keywordtype">char</span> path[HWLOC_OPENFABRICS_VERBS_SYSFS_PATH_MAX];
<a name="l00047"></a>00047 FILE *sysfile = NULL;
<a name="l00048"></a>00048
<a name="l00049"></a>00049 sprintf(path, <span class="stringliteral">&quot;/sys/class/infiniband/%s/device/local_cpus&quot;</span>,
<a name="l00050"></a>00050 ibv_get_device_name(ibdev));
<a name="l00051"></a>00051 sysfile = fopen(path, <span class="stringliteral">&quot;r&quot;</span>);
<a name="l00052"></a>00052 <span class="keywordflow">if</span> (!sysfile)
<a name="l00053"></a>00053 <span class="keywordflow">return</span> -1;
<a name="l00054"></a>00054
<a name="l00055"></a>00055 <a class="code" href="a00048.html#gaeacad897c30dbea284948374ad4b010c" title="Convert a linux kernel cpumap file file into hwloc CPU set.">hwloc_linux_parse_cpumap_file</a>(sysfile, <span class="keyword">set</span>);
<a name="l00056"></a>00056
<a name="l00057"></a>00057 fclose(sysfile);
<a name="l00058"></a>00058 <span class="preprocessor">#else</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span> <span class="comment">/* Non-Linux systems simply get a full cpuset */</span>
<a name="l00060"></a>00060 <a class="code" href="a00046.html#ga27a3b6994bd6f20c1f26d10bdb29ac0b" title="Copy the contents of CPU set src into the already allocated CPU set dst.">hwloc_cpuset_copy</a>(<span class="keyword">set</span>, <a class="code" href="a00045.html#ga75f0ac3ac41e9915541c3ae3153a6e26">hwloc_topology_get_complete_cpuset</a>(topology));
<a name="l00061"></a>00061 <span class="preprocessor">#endif</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span> <span class="keywordflow">return</span> 0;
<a name="l00063"></a>00063 }
<a name="l00064"></a>00064
<a name="l00067"></a>00067 <span class="preprocessor">#endif </span><span class="comment">/* HWLOC_OPENFABRICS_VERBS_H */</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Topology context</title>
<title>Hardware Locality (hwloc): API version</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,25 +20,24 @@
</div>
</div>
<div class="contents">
<h1>Topology context</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct hwloc_topology *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Topology context. <a href="#ga9d1e76ee15a7dee158b786c30b6a6e38"></a><br/></td></tr>
<h1>API version</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00026.html#ga8f4dfb8eef138af55dd1a0fa802e5476">HWLOC_API_VERSION</a>&nbsp;&nbsp;&nbsp;0x00010000</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Indicate at build time which hwloc API version is being used. <a href="#ga8f4dfb8eef138af55dd1a0fa802e5476"></a><br/></td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga9d1e76ee15a7dee158b786c30b6a6e38"></a><!-- doxytag: member="hwloc.h::hwloc_topology_t" ref="ga9d1e76ee15a7dee158b786c30b6a6e38" args="" -->
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ga8f4dfb8eef138af55dd1a0fa802e5476"></a><!-- doxytag: member="hwloc.h::HWLOC_API_VERSION" ref="ga8f4dfb8eef138af55dd1a0fa802e5476" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct hwloc_topology* <a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td>
<td class="memname">#define HWLOC_API_VERSION&nbsp;&nbsp;&nbsp;0x00010000</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Topology context. </p>
<p>To be initialized with <a class="el" href="a00029.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init()</a> and built with <a class="el" href="a00029.html#ga91e2e6427b95fb7339c99dbbef996e71" title="Build the actual topology.">hwloc_topology_load()</a>. </p>
<p>Indicate at build time which hwloc API version is being used. </p>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Topology Object Types</title>
<title>Hardware Locality (hwloc): Topology context</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,131 +20,25 @@
</div>
</div>
<div class="contents">
<h1>Topology Object Types</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> { <br/>
&nbsp;&nbsp;<a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a3aa1b842d1fd4207ebce171f95a244ec">HWLOC_OBJ_SYSTEM</a>,
<a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a3f4e83ffc4a259354959ae8a9eaa2a80">HWLOC_OBJ_MACHINE</a>,
<a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd">HWLOC_OBJ_NODE</a>,
<a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a1ac6e07775ae4324b3fe9dbd72c785ec">HWLOC_OBJ_SOCKET</a>,
<br/>
&nbsp;&nbsp;<a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc">HWLOC_OBJ_CACHE</a>,
<a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55ac793958f330bca371aa1535de8aff45f">HWLOC_OBJ_CORE</a>,
<a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661">HWLOC_OBJ_PU</a>,
<a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a5269ef95be72f88465559d35c9b7ad56">HWLOC_OBJ_GROUP</a>,
<br/>
&nbsp;&nbsp;<a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a19f8a6953fa91efc76bcbcdf2d22de4d">HWLOC_OBJ_MISC</a>
<br/>
}</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Type of topology object. </p>
<a href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00027.html#ga46323568968005137c32f6a1cd405b74">hwloc_compare_types_e</a> { <a class="el" href="a00027.html#gga46323568968005137c32f6a1cd405b74a2f8297ea36eba46e7596e810a67298fb">HWLOC_TYPE_UNORDERED</a>
}</td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00027.html#gabd7da4f4ea12b420b8ecbde458b27805">hwloc_compare_types</a> (<a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type1, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type2) __hwloc_attribute_const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare the depth of two object types. <a href="#gabd7da4f4ea12b420b8ecbde458b27805"></a><br/></td></tr>
<h1>Topology context</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct hwloc_topology *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Topology context. <a href="#ga9d1e76ee15a7dee158b786c30b6a6e38"></a><br/></td></tr>
</table>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="ga46323568968005137c32f6a1cd405b74"></a><!-- doxytag: member="hwloc.h::hwloc_compare_types_e" ref="ga46323568968005137c32f6a1cd405b74" args="" -->
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga9d1e76ee15a7dee158b786c30b6a6e38"></a><!-- doxytag: member="hwloc.h::hwloc_topology_t" ref="ga9d1e76ee15a7dee158b786c30b6a6e38" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="a00027.html#ga46323568968005137c32f6a1cd405b74">hwloc_compare_types_e</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga46323568968005137c32f6a1cd405b74a2f8297ea36eba46e7596e810a67298fb"></a><!-- doxytag: member="HWLOC_TYPE_UNORDERED" ref="gga46323568968005137c32f6a1cd405b74a2f8297ea36eba46e7596e810a67298fb" args="" -->HWLOC_TYPE_UNORDERED</em>&nbsp;</td><td>
<p>Value returned by hwloc_compare_types when types can not be compared. </p>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gacd37bb612667dc437d66bfb175a8dc55"></a><!-- doxytag: member="hwloc.h::hwloc_obj_type_t" ref="gacd37bb612667dc437d66bfb175a8dc55" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a></td>
<td class="memname">typedef struct hwloc_topology* <a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Type of topology object. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Do not rely on the ordering or completeness of the values as new ones may be defined in the future! If you need to compare types, use <a class="el" href="a00027.html#gabd7da4f4ea12b420b8ecbde458b27805" title="Compare the depth of two object types.">hwloc_compare_types()</a> instead. </dd></dl>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55a3aa1b842d1fd4207ebce171f95a244ec"></a><!-- doxytag: member="HWLOC_OBJ_SYSTEM" ref="ggacd37bb612667dc437d66bfb175a8dc55a3aa1b842d1fd4207ebce171f95a244ec" args="" -->HWLOC_OBJ_SYSTEM</em>&nbsp;</td><td>
<p>Whole system (may be a cluster of machines). The whole system that is accessible to hwloc. That may comprise several machines in SSI systems like Kerrighed. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55a3f4e83ffc4a259354959ae8a9eaa2a80"></a><!-- doxytag: member="HWLOC_OBJ_MACHINE" ref="ggacd37bb612667dc437d66bfb175a8dc55a3f4e83ffc4a259354959ae8a9eaa2a80" args="" -->HWLOC_OBJ_MACHINE</em>&nbsp;</td><td>
<p>Machine. The typical root object type. A set of processors and memory with cache coherency. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd"></a><!-- doxytag: member="HWLOC_OBJ_NODE" ref="ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" args="" -->HWLOC_OBJ_NODE</em>&nbsp;</td><td>
<p>NUMA node. A set of processors around memory which the processors can directly access. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55a1ac6e07775ae4324b3fe9dbd72c785ec"></a><!-- doxytag: member="HWLOC_OBJ_SOCKET" ref="ggacd37bb612667dc437d66bfb175a8dc55a1ac6e07775ae4324b3fe9dbd72c785ec" args="" -->HWLOC_OBJ_SOCKET</em>&nbsp;</td><td>
<p>Socket, physical package, or chip. In the physical meaning, i.e. that you can add or remove physically. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc"></a><!-- doxytag: member="HWLOC_OBJ_CACHE" ref="ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc" args="" -->HWLOC_OBJ_CACHE</em>&nbsp;</td><td>
<p>Data cache. Can be L1, L2, L3, ... </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55ac793958f330bca371aa1535de8aff45f"></a><!-- doxytag: member="HWLOC_OBJ_CORE" ref="ggacd37bb612667dc437d66bfb175a8dc55ac793958f330bca371aa1535de8aff45f" args="" -->HWLOC_OBJ_CORE</em>&nbsp;</td><td>
<p>Core. A computation unit (may be shared by several logical processors). </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661"></a><!-- doxytag: member="HWLOC_OBJ_PU" ref="ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" args="" -->HWLOC_OBJ_PU</em>&nbsp;</td><td>
<p>Processing Unit, or (Logical) Processor. An execution unit (may share a core with some other logical processors, e.g. in the case of an SMT core). </p>
<p>Objects of this kind are always reported and can thus be used as fallback when others are not. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55a5269ef95be72f88465559d35c9b7ad56"></a><!-- doxytag: member="HWLOC_OBJ_GROUP" ref="ggacd37bb612667dc437d66bfb175a8dc55a5269ef95be72f88465559d35c9b7ad56" args="" -->HWLOC_OBJ_GROUP</em>&nbsp;</td><td>
<p>Group objects. Objects which do not fit in the above but are detected by hwloc and are useful to take into account for affinity. For instance, some OSes expose their arbitrary processors aggregation this way. And hwloc may insert such objects to group NUMA nodes according to their distances. </p>
<p>These objects are ignored when they do not bring any structure. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55a19f8a6953fa91efc76bcbcdf2d22de4d"></a><!-- doxytag: member="HWLOC_OBJ_MISC" ref="ggacd37bb612667dc437d66bfb175a8dc55a19f8a6953fa91efc76bcbcdf2d22de4d" args="" -->HWLOC_OBJ_MISC</em>&nbsp;</td><td>
<p>Miscellaneous objects. Objects without particular meaning, that can e.g. be added by the application for its own use. </p>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gabd7da4f4ea12b420b8ecbde458b27805"></a><!-- doxytag: member="hwloc.h::hwloc_compare_types" ref="gabd7da4f4ea12b420b8ecbde458b27805" args="(hwloc_obj_type_t type1, hwloc_obj_type_t type2) __hwloc_attribute_const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_compare_types </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type2</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Compare the depth of two object types. </p>
<p>Types shouldn't be compared as they are, since newer ones may be added in the future. This function returns less than, equal to, or greater than zero respectively if <code>type1</code> objects usually include <code>type2</code> objects, are the same as <code>type2</code> objects, or are included in <code>type2</code> objects. If the types can not be compared (because neither is usually contained in the other), HWLOC_TYPE_UNORDERED is returned. Object types containing CPUs can always be compared (usually, a system contains machines which contain nodes which contain sockets which contain caches, which contain cores, which contain processors).</p>
<dl class="note"><dt><b>Note:</b></dt><dd>HWLOC_OBJ_PU will always be the deepest. </dd>
<dd>
This does not mean that the actual topology will respect that order: e.g. as of today cores may also contain caches, and sockets may also contain nodes. This is thus just to be seen as a fallback comparison method. </dd></dl>
<p>Topology context. </p>
<p>To be initialized with <a class="el" href="a00030.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init()</a> and built with <a class="el" href="a00030.html#ga91e2e6427b95fb7339c99dbbef996e71" title="Build the actual topology.">hwloc_topology_load()</a>. </p>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Topology Objects</title>
<title>Hardware Locality (hwloc): Topology Object Types</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,31 +20,131 @@
</div>
</div>
<div class="contents">
<h1>Topology Objects</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00013.html">hwloc_obj_memory_s</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Object memory. <a href="a00013.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00010.html">hwloc_obj</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Structure of a topology object. <a href="a00010.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">union &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html">hwloc_obj_attr_u</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Object type-specific Attributes. <a href="a00011.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="a00010.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00028.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience typedef; a pointer to a struct <a class="el" href="a00010.html" title="Structure of a topology object.">hwloc_obj</a>. <a href="#ga79b8ab56877ef99ac59b833203391c7d"></a><br/></td></tr>
<h1>Topology Object Types</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> { <br/>
&nbsp;&nbsp;<a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a3aa1b842d1fd4207ebce171f95a244ec">HWLOC_OBJ_SYSTEM</a>,
<a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a3f4e83ffc4a259354959ae8a9eaa2a80">HWLOC_OBJ_MACHINE</a>,
<a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd">HWLOC_OBJ_NODE</a>,
<a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a1ac6e07775ae4324b3fe9dbd72c785ec">HWLOC_OBJ_SOCKET</a>,
<br/>
&nbsp;&nbsp;<a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc">HWLOC_OBJ_CACHE</a>,
<a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55ac793958f330bca371aa1535de8aff45f">HWLOC_OBJ_CORE</a>,
<a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661">HWLOC_OBJ_PU</a>,
<a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a5269ef95be72f88465559d35c9b7ad56">HWLOC_OBJ_GROUP</a>,
<br/>
&nbsp;&nbsp;<a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a19f8a6953fa91efc76bcbcdf2d22de4d">HWLOC_OBJ_MISC</a>
<br/>
}</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Type of topology object. </p>
<a href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00028.html#ga46323568968005137c32f6a1cd405b74">hwloc_compare_types_e</a> { <a class="el" href="a00028.html#gga46323568968005137c32f6a1cd405b74a2f8297ea36eba46e7596e810a67298fb">HWLOC_TYPE_UNORDERED</a>
}</td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00028.html#gabd7da4f4ea12b420b8ecbde458b27805">hwloc_compare_types</a> (<a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type1, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type2) __hwloc_attribute_const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare the depth of two object types. <a href="#gabd7da4f4ea12b420b8ecbde458b27805"></a><br/></td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga79b8ab56877ef99ac59b833203391c7d"></a><!-- doxytag: member="hwloc.h::hwloc_obj_t" ref="ga79b8ab56877ef99ac59b833203391c7d" args="" -->
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="ga46323568968005137c32f6a1cd405b74"></a><!-- doxytag: member="hwloc.h::hwloc_compare_types_e" ref="ga46323568968005137c32f6a1cd405b74" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="a00010.html">hwloc_obj</a>* <a class="el" href="a00010.html">hwloc_obj_t</a></td>
<td class="memname">enum <a class="el" href="a00028.html#ga46323568968005137c32f6a1cd405b74">hwloc_compare_types_e</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga46323568968005137c32f6a1cd405b74a2f8297ea36eba46e7596e810a67298fb"></a><!-- doxytag: member="HWLOC_TYPE_UNORDERED" ref="gga46323568968005137c32f6a1cd405b74a2f8297ea36eba46e7596e810a67298fb" args="" -->HWLOC_TYPE_UNORDERED</em>&nbsp;</td><td>
<p>Value returned by hwloc_compare_types when types can not be compared. </p>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gacd37bb612667dc437d66bfb175a8dc55"></a><!-- doxytag: member="hwloc.h::hwloc_obj_type_t" ref="gacd37bb612667dc437d66bfb175a8dc55" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Convenience typedef; a pointer to a struct <a class="el" href="a00010.html" title="Structure of a topology object.">hwloc_obj</a>. </p>
<p>Type of topology object. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Do not rely on the ordering or completeness of the values as new ones may be defined in the future! If you need to compare types, use <a class="el" href="a00028.html#gabd7da4f4ea12b420b8ecbde458b27805" title="Compare the depth of two object types.">hwloc_compare_types()</a> instead. </dd></dl>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55a3aa1b842d1fd4207ebce171f95a244ec"></a><!-- doxytag: member="HWLOC_OBJ_SYSTEM" ref="ggacd37bb612667dc437d66bfb175a8dc55a3aa1b842d1fd4207ebce171f95a244ec" args="" -->HWLOC_OBJ_SYSTEM</em>&nbsp;</td><td>
<p>Whole system (may be a cluster of machines). The whole system that is accessible to hwloc. That may comprise several machines in SSI systems like Kerrighed. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55a3f4e83ffc4a259354959ae8a9eaa2a80"></a><!-- doxytag: member="HWLOC_OBJ_MACHINE" ref="ggacd37bb612667dc437d66bfb175a8dc55a3f4e83ffc4a259354959ae8a9eaa2a80" args="" -->HWLOC_OBJ_MACHINE</em>&nbsp;</td><td>
<p>Machine. The typical root object type. A set of processors and memory with cache coherency. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd"></a><!-- doxytag: member="HWLOC_OBJ_NODE" ref="ggacd37bb612667dc437d66bfb175a8dc55aaf0964881117bdedf1a5e9332cd120dd" args="" -->HWLOC_OBJ_NODE</em>&nbsp;</td><td>
<p>NUMA node. A set of processors around memory which the processors can directly access. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55a1ac6e07775ae4324b3fe9dbd72c785ec"></a><!-- doxytag: member="HWLOC_OBJ_SOCKET" ref="ggacd37bb612667dc437d66bfb175a8dc55a1ac6e07775ae4324b3fe9dbd72c785ec" args="" -->HWLOC_OBJ_SOCKET</em>&nbsp;</td><td>
<p>Socket, physical package, or chip. In the physical meaning, i.e. that you can add or remove physically. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc"></a><!-- doxytag: member="HWLOC_OBJ_CACHE" ref="ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc" args="" -->HWLOC_OBJ_CACHE</em>&nbsp;</td><td>
<p>Data cache. Can be L1, L2, L3, ... </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55ac793958f330bca371aa1535de8aff45f"></a><!-- doxytag: member="HWLOC_OBJ_CORE" ref="ggacd37bb612667dc437d66bfb175a8dc55ac793958f330bca371aa1535de8aff45f" args="" -->HWLOC_OBJ_CORE</em>&nbsp;</td><td>
<p>Core. A computation unit (may be shared by several logical processors). </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661"></a><!-- doxytag: member="HWLOC_OBJ_PU" ref="ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" args="" -->HWLOC_OBJ_PU</em>&nbsp;</td><td>
<p>Processing Unit, or (Logical) Processor. An execution unit (may share a core with some other logical processors, e.g. in the case of an SMT core). </p>
<p>Objects of this kind are always reported and can thus be used as fallback when others are not. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55a5269ef95be72f88465559d35c9b7ad56"></a><!-- doxytag: member="HWLOC_OBJ_GROUP" ref="ggacd37bb612667dc437d66bfb175a8dc55a5269ef95be72f88465559d35c9b7ad56" args="" -->HWLOC_OBJ_GROUP</em>&nbsp;</td><td>
<p>Group objects. Objects which do not fit in the above but are detected by hwloc and are useful to take into account for affinity. For instance, some OSes expose their arbitrary processors aggregation this way. And hwloc may insert such objects to group NUMA nodes according to their distances. </p>
<p>These objects are ignored when they do not bring any structure. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacd37bb612667dc437d66bfb175a8dc55a19f8a6953fa91efc76bcbcdf2d22de4d"></a><!-- doxytag: member="HWLOC_OBJ_MISC" ref="ggacd37bb612667dc437d66bfb175a8dc55a19f8a6953fa91efc76bcbcdf2d22de4d" args="" -->HWLOC_OBJ_MISC</em>&nbsp;</td><td>
<p>Miscellaneous objects. Objects without particular meaning, that can e.g. be added by the application for its own use. </p>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gabd7da4f4ea12b420b8ecbde458b27805"></a><!-- doxytag: member="hwloc.h::hwloc_compare_types" ref="gabd7da4f4ea12b420b8ecbde458b27805" args="(hwloc_obj_type_t type1, hwloc_obj_type_t type2) __hwloc_attribute_const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_compare_types </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type2</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Compare the depth of two object types. </p>
<p>Types shouldn't be compared as they are, since newer ones may be added in the future. This function returns less than, equal to, or greater than zero respectively if <code>type1</code> objects usually include <code>type2</code> objects, are the same as <code>type2</code> objects, or are included in <code>type2</code> objects. If the types can not be compared (because neither is usually contained in the other), HWLOC_TYPE_UNORDERED is returned. Object types containing CPUs can always be compared (usually, a system contains machines which contain nodes which contain sockets which contain caches, which contain cores, which contain processors).</p>
<dl class="note"><dt><b>Note:</b></dt><dd>HWLOC_OBJ_PU will always be the deepest. </dd>
<dd>
This does not mean that the actual topology will respect that order: e.g. as of today cores may also contain caches, and sockets may also contain nodes. This is thus just to be seen as a fallback comparison method. </dd></dl>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Create and Destroy Topologies</title>
<title>Hardware Locality (hwloc): Topology Objects</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,123 +20,31 @@
</div>
</div>
<div class="contents">
<h1>Create and Destroy Topologies</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#ga5c2d6f476af87005c7bd0811d4548b9f">hwloc_topology_init</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> *topologyp)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocate a topology context. <a href="#ga5c2d6f476af87005c7bd0811d4548b9f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#ga91e2e6427b95fb7339c99dbbef996e71">hwloc_topology_load</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Build the actual topology. <a href="#ga91e2e6427b95fb7339c99dbbef996e71"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#ga6040925d3ee4bbb2647f2a321aca5f4b">hwloc_topology_destroy</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Terminate and free a topology context. <a href="#ga6040925d3ee4bbb2647f2a321aca5f4b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#gab3628b2a540a5a08e8cf724ef829e70a">hwloc_topology_check</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Run internal checks on a topology structure. <a href="#gab3628b2a540a5a08e8cf724ef829e70a"></a><br/></td></tr>
<h1>Topology Objects</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html">hwloc_obj_memory_s</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Object memory. <a href="a00014.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00011.html">hwloc_obj</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Structure of a topology object. <a href="a00011.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">union &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00012.html">hwloc_obj_attr_u</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Object type-specific Attributes. <a href="a00012.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="a00011.html">hwloc_obj</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00029.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience typedef; a pointer to a struct <a class="el" href="a00011.html" title="Structure of a topology object.">hwloc_obj</a>. <a href="#ga79b8ab56877ef99ac59b833203391c7d"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gab3628b2a540a5a08e8cf724ef829e70a"></a><!-- doxytag: member="hwloc.h::hwloc_topology_check" ref="gab3628b2a540a5a08e8cf724ef829e70a" args="(hwloc_topology_t topology)" -->
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga79b8ab56877ef99ac59b833203391c7d"></a><!-- doxytag: member="hwloc.h::hwloc_obj_t" ref="ga79b8ab56877ef99ac59b833203391c7d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC void hwloc_topology_check </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
<td class="memname">typedef struct <a class="el" href="a00011.html">hwloc_obj</a>* <a class="el" href="a00011.html">hwloc_obj_t</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Run internal checks on a topology structure. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>topology</em>&nbsp;</td><td>is the topology to be checked </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga6040925d3ee4bbb2647f2a321aca5f4b"></a><!-- doxytag: member="hwloc.h::hwloc_topology_destroy" ref="ga6040925d3ee4bbb2647f2a321aca5f4b" args="(hwloc_topology_t topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC void hwloc_topology_destroy </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Terminate and free a topology context. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>topology</em>&nbsp;</td><td>is the topology to be freed </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga5c2d6f476af87005c7bd0811d4548b9f"></a><!-- doxytag: member="hwloc.h::hwloc_topology_init" ref="ga5c2d6f476af87005c7bd0811d4548b9f" args="(hwloc_topology_t *topologyp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_init </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> *&nbsp;</td>
<td class="paramname"> <em>topologyp</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Allocate a topology context. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>topologyp</em>&nbsp;</td><td>is assigned a pointer to the new allocated context.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on error. </dd></dl>
</div>
</div>
<a class="anchor" id="ga91e2e6427b95fb7339c99dbbef996e71"></a><!-- doxytag: member="hwloc.h::hwloc_topology_load" ref="ga91e2e6427b95fb7339c99dbbef996e71" args="(hwloc_topology_t topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_load </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Build the actual topology. </p>
<p>Build the actual topology once initialized with <a class="el" href="a00029.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init()</a> and tuned with hwlocality_configuration routine. No other routine may be called earlier using this topology context.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>topology</em>&nbsp;</td><td>is the topology to be loaded with objects.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on error.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00030.html">Configure Topology Detection</a> </dd></dl>
<p>Convenience typedef; a pointer to a struct <a class="el" href="a00011.html" title="Structure of a topology object.">hwloc_obj</a>. </p>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Configure Topology Detection</title>
<title>Hardware Locality (hwloc): Create and Destroy Topologies</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,105 +20,52 @@
</div>
</div>
<div class="contents">
<h1>Configure Topology Detection</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html">hwloc_topology_discovery_support</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flags describing actual discovery support for this topology. <a href="a00015.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00014.html">hwloc_topology_cpubind_support</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flags describing actual binding support for this topology. <a href="a00014.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00016.html">hwloc_topology_support</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set of flags describing actual support for this topology. <a href="a00016.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#gada025d3ec20b4b420f8038d23d6e7bde">hwloc_topology_flags_e</a> { <a class="el" href="a00030.html#ggada025d3ec20b4b420f8038d23d6e7bdea129b4fea1300be22bbaf0bb0958994c8">HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM</a>,
<a class="el" href="a00030.html#ggada025d3ec20b4b420f8038d23d6e7bdea6ecb6abc6a0bb75e81564f8bca85783b">HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM</a>
}</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Flags to be set onto a topology context before load. </p>
<a href="a00030.html#gada025d3ec20b4b420f8038d23d6e7bde">More...</a><br/></td></tr>
<h1>Create and Destroy Topologies</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#gaf2071c8621fddc53649c245d87835b47">hwloc_topology_ignore_type</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ignore an object type. <a href="#gaf2071c8621fddc53649c245d87835b47"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#ga6ddd4213d95bd1c30555b294a60efa6b">hwloc_topology_ignore_type_keep_structure</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ignore an object type if it does not bring any structure. <a href="#ga6ddd4213d95bd1c30555b294a60efa6b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#gaec6fb00050f50cd41007f1ae580d2106">hwloc_topology_ignore_all_keep_structure</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ignore all objects that do not bring any structure. <a href="#gaec6fb00050f50cd41007f1ae580d2106"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#ga6d11e53db143ac39c32cdb3912b71f99">hwloc_topology_set_flags</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned long flags)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set OR'ed flags to non-yet-loaded topology. <a href="#ga6d11e53db143ac39c32cdb3912b71f99"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#ga2f6bfb6958d8b508ea1d7d5bb266432c">hwloc_topology_set_fsroot</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology, const char *__hwloc_restrict fsroot_path)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change the file-system root path when building the topology from sysfs/procfs. <a href="#ga2f6bfb6958d8b508ea1d7d5bb266432c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#gae1100de0162b3c6a9db750ac14629c05">hwloc_topology_set_pid</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology, hwloc_pid_t pid)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change which pid the topology is viewed from. <a href="#gae1100de0162b3c6a9db750ac14629c05"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#ga2fcb52181b586c20f001b7a999550324">hwloc_topology_set_synthetic</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology, const char *__hwloc_restrict description)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enable synthetic topology. <a href="#ga2fcb52181b586c20f001b7a999550324"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#ga93efcc8a962afe1ed23393700682173f">hwloc_topology_set_xml</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology, const char *__hwloc_restrict xmlpath)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enable XML-file based topology. <a href="#ga93efcc8a962afe1ed23393700682173f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC struct <br class="typebreak"/>
<a class="el" href="a00016.html">hwloc_topology_support</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#gac2126e105f3ae708efca2e90d612625a">hwloc_topology_get_support</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve the topology support. <a href="#gac2126e105f3ae708efca2e90d612625a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#ga5c2d6f476af87005c7bd0811d4548b9f">hwloc_topology_init</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> *topologyp)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocate a topology context. <a href="#ga5c2d6f476af87005c7bd0811d4548b9f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#ga91e2e6427b95fb7339c99dbbef996e71">hwloc_topology_load</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Build the actual topology. <a href="#ga91e2e6427b95fb7339c99dbbef996e71"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#ga6040925d3ee4bbb2647f2a321aca5f4b">hwloc_topology_destroy</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Terminate and free a topology context. <a href="#ga6040925d3ee4bbb2647f2a321aca5f4b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00030.html#gab3628b2a540a5a08e8cf724ef829e70a">hwloc_topology_check</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Run internal checks on a topology structure. <a href="#gab3628b2a540a5a08e8cf724ef829e70a"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>These functions can optionally be called between <a class="el" href="a00029.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init()</a> and <a class="el" href="a00029.html#ga91e2e6427b95fb7339c99dbbef996e71" title="Build the actual topology.">hwloc_topology_load()</a> to configure how the detection should be performed, e.g. to ignore some objects types, define a synthetic topology, etc.</p>
<p>If none of them is called, the default is to detect all the objects of the machine that the caller is allowed to access.</p>
<p>This default behavior may also be modified through environment variables if the application did not modify it already. Setting HWLOC_XMLFILE in the environment enforces the discovery from a XML file as if <a class="el" href="a00030.html#ga93efcc8a962afe1ed23393700682173f" title="Enable XML-file based topology.">hwloc_topology_set_xml()</a> had been called. HWLOC_FSROOT switches to reading the topology from the specified Linux filesystem root as if <a class="el" href="a00030.html#ga2f6bfb6958d8b508ea1d7d5bb266432c" title="Change the file-system root path when building the topology from sysfs/procfs.">hwloc_topology_set_fsroot()</a> had been called. Finally, HWLOC_THISSYSTEM enforces the return value of <a class="el" href="a00032.html#ga0d109e33fc7990f62f665d336e5e5111" title="Does the topology context come from this system?">hwloc_topology_is_thissystem()</a>. </p>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="gada025d3ec20b4b420f8038d23d6e7bde"></a><!-- doxytag: member="hwloc.h::hwloc_topology_flags_e" ref="gada025d3ec20b4b420f8038d23d6e7bde" args="" -->
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gab3628b2a540a5a08e8cf724ef829e70a"></a><!-- doxytag: member="hwloc.h::hwloc_topology_check" ref="gab3628b2a540a5a08e8cf724ef829e70a" args="(hwloc_topology_t topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="a00030.html#gada025d3ec20b4b420f8038d23d6e7bde">hwloc_topology_flags_e</a></td>
<td class="memname">HWLOC_DECLSPEC void hwloc_topology_check </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Flags to be set onto a topology context before load. </p>
<p>Flags should be given to <a class="el" href="a00030.html#ga6d11e53db143ac39c32cdb3912b71f99" title="Set OR&#39;ed flags to non-yet-loaded topology.">hwloc_topology_set_flags()</a>. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggada025d3ec20b4b420f8038d23d6e7bdea129b4fea1300be22bbaf0bb0958994c8"></a><!-- doxytag: member="HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM" ref="ggada025d3ec20b4b420f8038d23d6e7bdea129b4fea1300be22bbaf0bb0958994c8" args="" -->HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM</em>&nbsp;</td><td>
<p>Detect the whole system, ignore reservations and offline settings. </p>
<p>Gather all resources, even if some were disabled by the administrator. For instance, ignore Linux Cpusets and gather all processors and memory nodes, and ignore the fact that some resources may be offline. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggada025d3ec20b4b420f8038d23d6e7bdea6ecb6abc6a0bb75e81564f8bca85783b"></a><!-- doxytag: member="HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM" ref="ggada025d3ec20b4b420f8038d23d6e7bdea6ecb6abc6a0bb75e81564f8bca85783b" args="" -->HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM</em>&nbsp;</td><td>
<p>Assume that the selected backend provides the topology for the system on which we are running. </p>
<p>This forces hwloc_topology_is_thissystem to return 1, i.e. makes hwloc assume that the selected backend provides the topology for the system on which we are running, even if it is not the OS-specific backend but the XML backend for instance. This means making the binding functions actually call the OS-specific system calls and really do binding, while the XML backend would otherwise provide empty hooks just returning success.</p>
<p>Setting the environment variable HWLOC_THISSYSTEM may also result in the same behavior.</p>
<p>This can be used for efficiency reasons to first detect the topology once, save it to an XML file, and quickly reload it later through the XML backend, but still having binding functions actually do bind. </p>
</td></tr>
</table>
</dd>
<p>Run internal checks on a topology structure. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>topology</em>&nbsp;</td><td>is the topology to be checked </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gac2126e105f3ae708efca2e90d612625a"></a><!-- doxytag: member="hwloc.h::hwloc_topology_get_support" ref="gac2126e105f3ae708efca2e90d612625a" args="(hwloc_topology_t __hwloc_restrict topology)" -->
<a class="anchor" id="ga6040925d3ee4bbb2647f2a321aca5f4b"></a><!-- doxytag: member="hwloc.h::hwloc_topology_destroy" ref="ga6040925d3ee4bbb2647f2a321aca5f4b" args="(hwloc_topology_t topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC struct <a class="el" href="a00016.html">hwloc_topology_support</a>* hwloc_topology_get_support </td>
<td class="memname">HWLOC_DECLSPEC void hwloc_topology_destroy </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Retrieve the topology support. </p>
</div>
</div>
<a class="anchor" id="gaec6fb00050f50cd41007f1ae580d2106"></a><!-- doxytag: member="hwloc.h::hwloc_topology_ignore_all_keep_structure" ref="gaec6fb00050f50cd41007f1ae580d2106" args="(hwloc_topology_t topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_ignore_all_keep_structure </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
@ -127,224 +74,69 @@
</div>
<div class="memdoc">
<p>Ignore all objects that do not bring any structure. </p>
<p>Ignore all objects that do not bring any structure: Each ignored object should have a single children or be the only child of its parent. </p>
<p>Terminate and free a topology context. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>topology</em>&nbsp;</td><td>is the topology to be freed </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gaf2071c8621fddc53649c245d87835b47"></a><!-- doxytag: member="hwloc.h::hwloc_topology_ignore_type" ref="gaf2071c8621fddc53649c245d87835b47" args="(hwloc_topology_t topology, hwloc_obj_type_t type)" -->
<a class="anchor" id="ga5c2d6f476af87005c7bd0811d4548b9f"></a><!-- doxytag: member="hwloc.h::hwloc_topology_init" ref="ga5c2d6f476af87005c7bd0811d4548b9f" args="(hwloc_topology_t *topologyp)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_ignore_type </td>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_init </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> *&nbsp;</td>
<td class="paramname"> <em>topologyp</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Ignore an object type. </p>
<p>Ignore all objects from the given type. The bottom-level type HWLOC_OBJ_PU may not be ignored. The top-level object of the hierarchy will never be ignored, even if this function succeeds. </p>
<p>Allocate a topology context. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>topologyp</em>&nbsp;</td><td>is assigned a pointer to the new allocated context.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on error. </dd></dl>
</div>
</div>
<a class="anchor" id="ga6ddd4213d95bd1c30555b294a60efa6b"></a><!-- doxytag: member="hwloc.h::hwloc_topology_ignore_type_keep_structure" ref="ga6ddd4213d95bd1c30555b294a60efa6b" args="(hwloc_topology_t topology, hwloc_obj_type_t type)" -->
<a class="anchor" id="ga91e2e6427b95fb7339c99dbbef996e71"></a><!-- doxytag: member="hwloc.h::hwloc_topology_load" ref="ga91e2e6427b95fb7339c99dbbef996e71" args="(hwloc_topology_t topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_ignore_type_keep_structure </td>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_load </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Ignore an object type if it does not bring any structure. </p>
<p>Ignore all objects from the given type as long as they do not bring any structure: Each ignored object should have a single children or be the only child of its parent. The bottom-level type HWLOC_OBJ_PU may not be ignored. </p>
</div>
</div>
<a class="anchor" id="ga6d11e53db143ac39c32cdb3912b71f99"></a><!-- doxytag: member="hwloc.h::hwloc_topology_set_flags" ref="ga6d11e53db143ac39c32cdb3912b71f99" args="(hwloc_topology_t topology, unsigned long flags)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_set_flags </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned long&nbsp;</td>
<td class="paramname"> <em>flags</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set OR'ed flags to non-yet-loaded topology. </p>
<p>Set a OR'ed set of hwloc_topology_flags_e onto a topology that was not yet loaded. </p>
</div>
</div>
<a class="anchor" id="ga2f6bfb6958d8b508ea1d7d5bb266432c"></a><!-- doxytag: member="hwloc.h::hwloc_topology_set_fsroot" ref="ga2f6bfb6958d8b508ea1d7d5bb266432c" args="(hwloc_topology_t __hwloc_restrict topology, const char *__hwloc_restrict fsroot_path)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_set_fsroot </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>fsroot_path</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Change the file-system root path when building the topology from sysfs/procfs. </p>
<p>On Linux system, use sysfs and procfs files as if they were mounted on the given <code>fsroot_path</code> instead of the main file-system root. Setting the environment variable HWLOC_FSROOT may also result in this behavior. Not using the main file-system root causes <a class="el" href="a00032.html#ga0d109e33fc7990f62f665d336e5e5111" title="Does the topology context come from this system?">hwloc_topology_is_thissystem()</a> to return 0.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>For conveniency, this backend provides empty binding hooks which just return success. To have hwloc still actually call OS-specific hooks, the HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded file is really the underlying system. </dd></dl>
</div>
</div>
<a class="anchor" id="gae1100de0162b3c6a9db750ac14629c05"></a><!-- doxytag: member="hwloc.h::hwloc_topology_set_pid" ref="gae1100de0162b3c6a9db750ac14629c05" args="(hwloc_topology_t __hwloc_restrict topology, hwloc_pid_t pid)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_set_pid </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hwloc_pid_t&nbsp;</td>
<td class="paramname"> <em>pid</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Change which pid the topology is viewed from. </p>
<p>On some systems, processes may have different views of the machine, for instance the set of allowed CPUs. By default, hwloc exposes the view from the current process. Calling <a class="el" href="a00030.html#gae1100de0162b3c6a9db750ac14629c05" title="Change which pid the topology is viewed from.">hwloc_topology_set_pid()</a> permits to make it expose the topology of the machine from the point of view of another process.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>hwloc_pid_t is pid_t on unix platforms, and HANDLE on native Windows platforms </dd>
<dd>
The ENOSYS error is returned on platforms that does not support this feature. </dd></dl>
</div>
</div>
<a class="anchor" id="ga2fcb52181b586c20f001b7a999550324"></a><!-- doxytag: member="hwloc.h::hwloc_topology_set_synthetic" ref="ga2fcb52181b586c20f001b7a999550324" args="(hwloc_topology_t __hwloc_restrict topology, const char *__hwloc_restrict description)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_set_synthetic </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>description</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Enable synthetic topology. </p>
<p>Gather topology information from the given <code>description</code> which should be a comma separated string of numbers describing the arity of each level. Each number may be prefixed with a type and a colon to enforce the type of a level. If only some level types are enforced, hwloc will try to choose the other types according to usual topologies, but it may fail and you may have to specify more level types manually.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>For conveniency, this backend provides empty binding hooks which just return success. </dd></dl>
</div>
</div>
<a class="anchor" id="ga93efcc8a962afe1ed23393700682173f"></a><!-- doxytag: member="hwloc.h::hwloc_topology_set_xml" ref="ga93efcc8a962afe1ed23393700682173f" args="(hwloc_topology_t __hwloc_restrict topology, const char *__hwloc_restrict xmlpath)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_set_xml </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>xmlpath</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Enable XML-file based topology. </p>
<p>Gather topology information the XML file given at <code>xmlpath</code>. Setting the environment variable HWLOC_XMLFILE may also result in this behavior. This file may have been generated earlier with lstopo file.xml.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>For conveniency, this backend provides empty binding hooks which just return success. To have hwloc still actually call OS-specific hooks, the HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded file is really the underlying system. </dd></dl>
<p>Build the actual topology. </p>
<p>Build the actual topology once initialized with <a class="el" href="a00030.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init()</a> and tuned with hwlocality_configuration routine. No other routine may be called earlier using this topology context.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>topology</em>&nbsp;</td><td>is the topology to be loaded with objects.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on error.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00031.html">Configure Topology Detection</a> </dd></dl>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Tinker with topologies.</title>
<title>Hardware Locality (hwloc): Configure Topology Detection</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,30 +20,317 @@
</div>
</div>
<div class="contents">
<h1>Tinker with topologies.</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Configure Topology Detection</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00016.html">hwloc_topology_discovery_support</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flags describing actual discovery support for this topology. <a href="a00016.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00015.html">hwloc_topology_cpubind_support</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flags describing actual binding support for this topology. <a href="a00015.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00017.html">hwloc_topology_support</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set of flags describing actual support for this topology. <a href="a00017.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00031.html#gada025d3ec20b4b420f8038d23d6e7bde">hwloc_topology_flags_e</a> { <a class="el" href="a00031.html#ggada025d3ec20b4b420f8038d23d6e7bdea129b4fea1300be22bbaf0bb0958994c8">HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM</a>,
<a class="el" href="a00031.html#ggada025d3ec20b4b420f8038d23d6e7bdea6ecb6abc6a0bb75e81564f8bca85783b">HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM</a>
}</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Flags to be set onto a topology context before load. </p>
<a href="a00031.html#gada025d3ec20b4b420f8038d23d6e7bde">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00031.html#ga1c9d8e608232206ce2142fe806a6835b">hwloc_topology_export_xml</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, const char *xmlpath)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Export the topology into an XML file. <a href="#ga1c9d8e608232206ce2142fe806a6835b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC <a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00031.html#ga017a9ba16d554326c6e3812d545d7230">hwloc_topology_insert_misc_object_by_cpuset</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset, const char *name)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a MISC object to the topology. <a href="#ga017a9ba16d554326c6e3812d545d7230"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC <a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00031.html#gadacd7a3d21220fbb30c3256d8b22a294">hwloc_topology_insert_misc_object_by_parent</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00010.html">hwloc_obj_t</a> parent, const char *name)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a MISC object to the topology. <a href="#gadacd7a3d21220fbb30c3256d8b22a294"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00031.html#gaf2071c8621fddc53649c245d87835b47">hwloc_topology_ignore_type</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ignore an object type. <a href="#gaf2071c8621fddc53649c245d87835b47"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00031.html#ga6ddd4213d95bd1c30555b294a60efa6b">hwloc_topology_ignore_type_keep_structure</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ignore an object type if it does not bring any structure. <a href="#ga6ddd4213d95bd1c30555b294a60efa6b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00031.html#gaec6fb00050f50cd41007f1ae580d2106">hwloc_topology_ignore_all_keep_structure</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ignore all objects that do not bring any structure. <a href="#gaec6fb00050f50cd41007f1ae580d2106"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00031.html#ga6d11e53db143ac39c32cdb3912b71f99">hwloc_topology_set_flags</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned long flags)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set OR'ed flags to non-yet-loaded topology. <a href="#ga6d11e53db143ac39c32cdb3912b71f99"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00031.html#ga2f6bfb6958d8b508ea1d7d5bb266432c">hwloc_topology_set_fsroot</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology, const char *__hwloc_restrict fsroot_path)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change the file-system root path when building the topology from sysfs/procfs. <a href="#ga2f6bfb6958d8b508ea1d7d5bb266432c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00031.html#gae1100de0162b3c6a9db750ac14629c05">hwloc_topology_set_pid</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology, hwloc_pid_t pid)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Change which pid the topology is viewed from. <a href="#gae1100de0162b3c6a9db750ac14629c05"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00031.html#ga2fcb52181b586c20f001b7a999550324">hwloc_topology_set_synthetic</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology, const char *__hwloc_restrict description)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enable synthetic topology. <a href="#ga2fcb52181b586c20f001b7a999550324"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00031.html#ga93efcc8a962afe1ed23393700682173f">hwloc_topology_set_xml</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology, const char *__hwloc_restrict xmlpath)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enable XML-file based topology. <a href="#ga93efcc8a962afe1ed23393700682173f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC struct <br class="typebreak"/>
<a class="el" href="a00017.html">hwloc_topology_support</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00031.html#gac2126e105f3ae708efca2e90d612625a">hwloc_topology_get_support</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve the topology support. <a href="#gac2126e105f3ae708efca2e90d612625a"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga1c9d8e608232206ce2142fe806a6835b"></a><!-- doxytag: member="hwloc.h::hwloc_topology_export_xml" ref="ga1c9d8e608232206ce2142fe806a6835b" args="(hwloc_topology_t topology, const char *xmlpath)" -->
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>These functions can optionally be called between <a class="el" href="a00030.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init()</a> and <a class="el" href="a00030.html#ga91e2e6427b95fb7339c99dbbef996e71" title="Build the actual topology.">hwloc_topology_load()</a> to configure how the detection should be performed, e.g. to ignore some objects types, define a synthetic topology, etc.</p>
<p>If none of them is called, the default is to detect all the objects of the machine that the caller is allowed to access.</p>
<p>This default behavior may also be modified through environment variables if the application did not modify it already. Setting HWLOC_XMLFILE in the environment enforces the discovery from a XML file as if <a class="el" href="a00031.html#ga93efcc8a962afe1ed23393700682173f" title="Enable XML-file based topology.">hwloc_topology_set_xml()</a> had been called. HWLOC_FSROOT switches to reading the topology from the specified Linux filesystem root as if <a class="el" href="a00031.html#ga2f6bfb6958d8b508ea1d7d5bb266432c" title="Change the file-system root path when building the topology from sysfs/procfs.">hwloc_topology_set_fsroot()</a> had been called. Finally, HWLOC_THISSYSTEM enforces the return value of <a class="el" href="a00033.html#ga0d109e33fc7990f62f665d336e5e5111" title="Does the topology context come from this system?">hwloc_topology_is_thissystem()</a>. </p>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="gada025d3ec20b4b420f8038d23d6e7bde"></a><!-- doxytag: member="hwloc.h::hwloc_topology_flags_e" ref="gada025d3ec20b4b420f8038d23d6e7bde" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC void hwloc_topology_export_xml </td>
<td class="memname">enum <a class="el" href="a00031.html#gada025d3ec20b4b420f8038d23d6e7bde">hwloc_topology_flags_e</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Flags to be set onto a topology context before load. </p>
<p>Flags should be given to <a class="el" href="a00031.html#ga6d11e53db143ac39c32cdb3912b71f99" title="Set OR&#39;ed flags to non-yet-loaded topology.">hwloc_topology_set_flags()</a>. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggada025d3ec20b4b420f8038d23d6e7bdea129b4fea1300be22bbaf0bb0958994c8"></a><!-- doxytag: member="HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM" ref="ggada025d3ec20b4b420f8038d23d6e7bdea129b4fea1300be22bbaf0bb0958994c8" args="" -->HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM</em>&nbsp;</td><td>
<p>Detect the whole system, ignore reservations and offline settings. </p>
<p>Gather all resources, even if some were disabled by the administrator. For instance, ignore Linux Cpusets and gather all processors and memory nodes, and ignore the fact that some resources may be offline. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggada025d3ec20b4b420f8038d23d6e7bdea6ecb6abc6a0bb75e81564f8bca85783b"></a><!-- doxytag: member="HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM" ref="ggada025d3ec20b4b420f8038d23d6e7bdea6ecb6abc6a0bb75e81564f8bca85783b" args="" -->HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM</em>&nbsp;</td><td>
<p>Assume that the selected backend provides the topology for the system on which we are running. </p>
<p>This forces hwloc_topology_is_thissystem to return 1, i.e. makes hwloc assume that the selected backend provides the topology for the system on which we are running, even if it is not the OS-specific backend but the XML backend for instance. This means making the binding functions actually call the OS-specific system calls and really do binding, while the XML backend would otherwise provide empty hooks just returning success.</p>
<p>Setting the environment variable HWLOC_THISSYSTEM may also result in the same behavior.</p>
<p>This can be used for efficiency reasons to first detect the topology once, save it to an XML file, and quickly reload it later through the XML backend, but still having binding functions actually do bind. </p>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gac2126e105f3ae708efca2e90d612625a"></a><!-- doxytag: member="hwloc.h::hwloc_topology_get_support" ref="gac2126e105f3ae708efca2e90d612625a" args="(hwloc_topology_t __hwloc_restrict topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC struct <a class="el" href="a00017.html">hwloc_topology_support</a>* hwloc_topology_get_support </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Retrieve the topology support. </p>
</div>
</div>
<a class="anchor" id="gaec6fb00050f50cd41007f1ae580d2106"></a><!-- doxytag: member="hwloc.h::hwloc_topology_ignore_all_keep_structure" ref="gaec6fb00050f50cd41007f1ae580d2106" args="(hwloc_topology_t topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_ignore_all_keep_structure </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Ignore all objects that do not bring any structure. </p>
<p>Ignore all objects that do not bring any structure: Each ignored object should have a single children or be the only child of its parent. </p>
</div>
</div>
<a class="anchor" id="gaf2071c8621fddc53649c245d87835b47"></a><!-- doxytag: member="hwloc.h::hwloc_topology_ignore_type" ref="gaf2071c8621fddc53649c245d87835b47" args="(hwloc_topology_t topology, hwloc_obj_type_t type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_ignore_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Ignore an object type. </p>
<p>Ignore all objects from the given type. The bottom-level type HWLOC_OBJ_PU may not be ignored. The top-level object of the hierarchy will never be ignored, even if this function succeeds. </p>
</div>
</div>
<a class="anchor" id="ga6ddd4213d95bd1c30555b294a60efa6b"></a><!-- doxytag: member="hwloc.h::hwloc_topology_ignore_type_keep_structure" ref="ga6ddd4213d95bd1c30555b294a60efa6b" args="(hwloc_topology_t topology, hwloc_obj_type_t type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_ignore_type_keep_structure </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Ignore an object type if it does not bring any structure. </p>
<p>Ignore all objects from the given type as long as they do not bring any structure: Each ignored object should have a single children or be the only child of its parent. The bottom-level type HWLOC_OBJ_PU may not be ignored. </p>
</div>
</div>
<a class="anchor" id="ga6d11e53db143ac39c32cdb3912b71f99"></a><!-- doxytag: member="hwloc.h::hwloc_topology_set_flags" ref="ga6d11e53db143ac39c32cdb3912b71f99" args="(hwloc_topology_t topology, unsigned long flags)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_set_flags </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned long&nbsp;</td>
<td class="paramname"> <em>flags</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set OR'ed flags to non-yet-loaded topology. </p>
<p>Set a OR'ed set of hwloc_topology_flags_e onto a topology that was not yet loaded. </p>
</div>
</div>
<a class="anchor" id="ga2f6bfb6958d8b508ea1d7d5bb266432c"></a><!-- doxytag: member="hwloc.h::hwloc_topology_set_fsroot" ref="ga2f6bfb6958d8b508ea1d7d5bb266432c" args="(hwloc_topology_t __hwloc_restrict topology, const char *__hwloc_restrict fsroot_path)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_set_fsroot </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>fsroot_path</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Change the file-system root path when building the topology from sysfs/procfs. </p>
<p>On Linux system, use sysfs and procfs files as if they were mounted on the given <code>fsroot_path</code> instead of the main file-system root. Setting the environment variable HWLOC_FSROOT may also result in this behavior. Not using the main file-system root causes <a class="el" href="a00033.html#ga0d109e33fc7990f62f665d336e5e5111" title="Does the topology context come from this system?">hwloc_topology_is_thissystem()</a> to return 0.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>For conveniency, this backend provides empty binding hooks which just return success. To have hwloc still actually call OS-specific hooks, the HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded file is really the underlying system. </dd></dl>
</div>
</div>
<a class="anchor" id="gae1100de0162b3c6a9db750ac14629c05"></a><!-- doxytag: member="hwloc.h::hwloc_topology_set_pid" ref="gae1100de0162b3c6a9db750ac14629c05" args="(hwloc_topology_t __hwloc_restrict topology, hwloc_pid_t pid)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_set_pid </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hwloc_pid_t&nbsp;</td>
<td class="paramname"> <em>pid</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Change which pid the topology is viewed from. </p>
<p>On some systems, processes may have different views of the machine, for instance the set of allowed CPUs. By default, hwloc exposes the view from the current process. Calling <a class="el" href="a00031.html#gae1100de0162b3c6a9db750ac14629c05" title="Change which pid the topology is viewed from.">hwloc_topology_set_pid()</a> permits to make it expose the topology of the machine from the point of view of another process.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>hwloc_pid_t is pid_t on unix platforms, and HANDLE on native Windows platforms </dd>
<dd>
The ENOSYS error is returned on platforms that does not support this feature. </dd></dl>
</div>
</div>
<a class="anchor" id="ga2fcb52181b586c20f001b7a999550324"></a><!-- doxytag: member="hwloc.h::hwloc_topology_set_synthetic" ref="ga2fcb52181b586c20f001b7a999550324" args="(hwloc_topology_t __hwloc_restrict topology, const char *__hwloc_restrict description)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_set_synthetic </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>description</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Enable synthetic topology. </p>
<p>Gather topology information from the given <code>description</code> which should be a comma separated string of numbers describing the arity of each level. Each number may be prefixed with a type and a colon to enforce the type of a level. If only some level types are enforced, hwloc will try to choose the other types according to usual topologies, but it may fail and you may have to specify more level types manually.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>For conveniency, this backend provides empty binding hooks which just return success. </dd></dl>
</div>
</div>
<a class="anchor" id="ga93efcc8a962afe1ed23393700682173f"></a><!-- doxytag: member="hwloc.h::hwloc_topology_set_xml" ref="ga93efcc8a962afe1ed23393700682173f" args="(hwloc_topology_t __hwloc_restrict topology, const char *__hwloc_restrict xmlpath)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_set_xml </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>xmlpath</em></td><td>&nbsp;</td>
</tr>
<tr>
@ -55,84 +342,9 @@
</div>
<div class="memdoc">
<p>Export the topology into an XML file. </p>
<p>This file may be loaded later through <a class="el" href="a00030.html#ga93efcc8a962afe1ed23393700682173f" title="Enable XML-file based topology.">hwloc_topology_set_xml()</a>. </p>
</div>
</div>
<a class="anchor" id="ga017a9ba16d554326c6e3812d545d7230"></a><!-- doxytag: member="hwloc.h::hwloc_topology_insert_misc_object_by_cpuset" ref="ga017a9ba16d554326c6e3812d545d7230" args="(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset, const char *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC <a class="el" href="a00010.html">hwloc_obj_t</a> hwloc_topology_insert_misc_object_by_cpuset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>cpuset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>name</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Add a MISC object to the topology. </p>
<p>A new MISC object will be created and inserted into the topology at the position given by cpuset.</p>
<p>cpuset and name will be copied.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly-created object </dd></dl>
</div>
</div>
<a class="anchor" id="gadacd7a3d21220fbb30c3256d8b22a294"></a><!-- doxytag: member="hwloc.h::hwloc_topology_insert_misc_object_by_parent" ref="gadacd7a3d21220fbb30c3256d8b22a294" args="(hwloc_topology_t topology, hwloc_obj_t parent, const char *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC <a class="el" href="a00010.html">hwloc_obj_t</a> hwloc_topology_insert_misc_object_by_parent </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>parent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>name</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Add a MISC object to the topology. </p>
<p>A new MISC object will be created and inserted into the topology at the position given by parent.</p>
<p>name will be copied.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly-created object </dd></dl>
<p>Enable XML-file based topology. </p>
<p>Gather topology information the XML file given at <code>xmlpath</code>. Setting the environment variable HWLOC_XMLFILE may also result in this behavior. This file may have been generated earlier with lstopo file.xml.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>For conveniency, this backend provides empty binding hooks which just return success. To have hwloc still actually call OS-specific hooks, the HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM has to be set to assert that the loaded file is really the underlying system. </dd></dl>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Get some Topology Information</title>
<title>Hardware Locality (hwloc): Tinker with topologies.</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,66 +20,31 @@
</div>
</div>
<div class="contents">
<h1>Get some Topology Information</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#gaf4e663cf42bbe20756b849c6293ef575">hwloc_get_type_depth_e</a> { <a class="el" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad">HWLOC_TYPE_DEPTH_UNKNOWN</a>,
<a class="el" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c">HWLOC_TYPE_DEPTH_MULTIPLE</a>
}</td></tr>
<h1>Tinker with topologies.</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#ga8c30b0cec55074eb3ed34e4f2a1a9937">hwloc_topology_get_depth</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology) __hwloc_attribute_pure</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the depth of the hierachical tree of objects. <a href="#ga8c30b0cec55074eb3ed34e4f2a1a9937"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d">hwloc_get_type_depth</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the depth of objects of type <code>type</code>. <a href="#gaea7c64dd59467f5201ba87712710b14d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#gadd4964764ae7e49231065d58a553fd31">hwloc_get_depth_type</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned depth) __hwloc_attribute_pure</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the type of objects at depth <code>depth</code>. <a href="#gadd4964764ae7e49231065d58a553fd31"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#ga20cfe2456f4cfdd789c9aca6d2fdd69f">hwloc_get_nbobjs_by_depth</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned depth) __hwloc_attribute_pure</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the width of level at depth <code>depth</code>. <a href="#ga20cfe2456f4cfdd789c9aca6d2fdd69f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline int <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#ga4c23019de0a7679306059e490dceccd2">hwloc_get_nbobjs_by_type</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the width of level type <code>type</code>. <a href="#ga4c23019de0a7679306059e490dceccd2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#ga0d109e33fc7990f62f665d336e5e5111">hwloc_topology_is_thissystem</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology) __hwloc_attribute_pure</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Does the topology context come from this system? <a href="#ga0d109e33fc7990f62f665d336e5e5111"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#ga1c9d8e608232206ce2142fe806a6835b">hwloc_topology_export_xml</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, const char *xmlpath)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Export the topology into an XML file. <a href="#ga1c9d8e608232206ce2142fe806a6835b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC <a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#ga017a9ba16d554326c6e3812d545d7230">hwloc_topology_insert_misc_object_by_cpuset</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset, const char *name)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a MISC object to the topology. <a href="#ga017a9ba16d554326c6e3812d545d7230"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC <a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00032.html#gadacd7a3d21220fbb30c3256d8b22a294">hwloc_topology_insert_misc_object_by_parent</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00011.html">hwloc_obj_t</a> parent, const char *name)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a MISC object to the topology. <a href="#gadacd7a3d21220fbb30c3256d8b22a294"></a><br/></td></tr>
</table>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="gaf4e663cf42bbe20756b849c6293ef575"></a><!-- doxytag: member="hwloc.h::hwloc_get_type_depth_e" ref="gaf4e663cf42bbe20756b849c6293ef575" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="a00032.html#gaf4e663cf42bbe20756b849c6293ef575">hwloc_get_type_depth_e</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad"></a><!-- doxytag: member="HWLOC_TYPE_DEPTH_UNKNOWN" ref="ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" args="" -->HWLOC_TYPE_DEPTH_UNKNOWN</em>&nbsp;</td><td>
<p>No object of given type exists in the topology. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c"></a><!-- doxytag: member="HWLOC_TYPE_DEPTH_MULTIPLE" ref="ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" args="" -->HWLOC_TYPE_DEPTH_MULTIPLE</em>&nbsp;</td><td>
<p>Objects of given type exist at different depth in the topology. </p>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gadd4964764ae7e49231065d58a553fd31"></a><!-- doxytag: member="hwloc.h::hwloc_get_depth_type" ref="gadd4964764ae7e49231065d58a553fd31" args="(hwloc_topology_t topology, unsigned depth) __hwloc_attribute_pure" -->
<a class="anchor" id="ga1c9d8e608232206ce2142fe806a6835b"></a><!-- doxytag: member="hwloc.h::hwloc_topology_export_xml" ref="ga1c9d8e608232206ce2142fe806a6835b" args="(hwloc_topology_t topology, const char *xmlpath)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> hwloc_get_depth_type </td>
<td class="memname">HWLOC_DECLSPEC void hwloc_topology_export_xml </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em></td><td>&nbsp;</td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>xmlpath</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -90,26 +55,32 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Returns the type of objects at depth <code>depth</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>-1 if depth <code>depth</code> does not exist. </dd></dl>
<p>Export the topology into an XML file. </p>
<p>This file may be loaded later through <a class="el" href="a00031.html#ga93efcc8a962afe1ed23393700682173f" title="Enable XML-file based topology.">hwloc_topology_set_xml()</a>. </p>
</div>
</div>
<a class="anchor" id="ga20cfe2456f4cfdd789c9aca6d2fdd69f"></a><!-- doxytag: member="hwloc.h::hwloc_get_nbobjs_by_depth" ref="ga20cfe2456f4cfdd789c9aca6d2fdd69f" args="(hwloc_topology_t topology, unsigned depth) __hwloc_attribute_pure" -->
<a class="anchor" id="ga017a9ba16d554326c6e3812d545d7230"></a><!-- doxytag: member="hwloc.h::hwloc_topology_insert_misc_object_by_cpuset" ref="ga017a9ba16d554326c6e3812d545d7230" args="(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset, const char *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC unsigned hwloc_get_nbobjs_by_depth </td>
<td class="memname">HWLOC_DECLSPEC <a class="el" href="a00011.html">hwloc_obj_t</a> hwloc_topology_insert_misc_object_by_cpuset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>cpuset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>name</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -120,55 +91,34 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Returns the width of level at depth <code>depth</code>. </p>
<p>Add a MISC object to the topology. </p>
<p>A new MISC object will be created and inserted into the topology at the position given by cpuset.</p>
<p>cpuset and name will be copied.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly-created object </dd></dl>
</div>
</div>
<a class="anchor" id="ga4c23019de0a7679306059e490dceccd2"></a><!-- doxytag: member="hwloc.h::hwloc_get_nbobjs_by_type" ref="ga4c23019de0a7679306059e490dceccd2" args="(hwloc_topology_t topology, hwloc_obj_type_t type)" -->
<a class="anchor" id="gadacd7a3d21220fbb30c3256d8b22a294"></a><!-- doxytag: member="hwloc.h::hwloc_topology_insert_misc_object_by_parent" ref="gadacd7a3d21220fbb30c3256d8b22a294" args="(hwloc_topology_t topology, hwloc_obj_t parent, const char *name)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline int __hwloc_attribute_pure hwloc_get_nbobjs_by_type </td>
<td class="memname">HWLOC_DECLSPEC <a class="el" href="a00011.html">hwloc_obj_t</a> hwloc_topology_insert_misc_object_by_parent </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the width of level type <code>type</code>. </p>
<p>If no object for that type exists, 0 is returned. If there are several levels with objects of that type, -1 is returned. </p>
</div>
</div>
<a class="anchor" id="gaea7c64dd59467f5201ba87712710b14d"></a><!-- doxytag: member="hwloc.h::hwloc_get_type_depth" ref="gaea7c64dd59467f5201ba87712710b14d" args="(hwloc_topology_t topology, hwloc_obj_type_t type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_get_type_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>parent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>name</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -179,53 +129,10 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Returns the depth of objects of type <code>type</code>. </p>
<p>If no object of this type is present on the underlying architecture, or if the OS doesn't provide this kind of information, the function returns HWLOC_TYPE_DEPTH_UNKNOWN.</p>
<p>If type is absent but a similar type is acceptable, see also <a class="el" href="a00036.html#gaf324fdd1fcb895c32cc6540c92e9245a" title="Returns the depth of objects of type type or below.">hwloc_get_type_or_below_depth()</a> and <a class="el" href="a00036.html#ga4451dffe0bb068f597ec55403e8ed5b8" title="Returns the depth of objects of type type or above.">hwloc_get_type_or_above_depth()</a>. </p>
</div>
</div>
<a class="anchor" id="ga8c30b0cec55074eb3ed34e4f2a1a9937"></a><!-- doxytag: member="hwloc.h::hwloc_topology_get_depth" ref="ga8c30b0cec55074eb3ed34e4f2a1a9937" args="(hwloc_topology_t __hwloc_restrict topology) __hwloc_attribute_pure" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC unsigned hwloc_topology_get_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the depth of the hierachical tree of objects. </p>
<p>This is the depth of HWLOC_OBJ_PU objects plus one. </p>
</div>
</div>
<a class="anchor" id="ga0d109e33fc7990f62f665d336e5e5111"></a><!-- doxytag: member="hwloc.h::hwloc_topology_is_thissystem" ref="ga0d109e33fc7990f62f665d336e5e5111" args="(hwloc_topology_t __hwloc_restrict topology) __hwloc_attribute_pure" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_is_thissystem </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Does the topology context come from this system? </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 if this topology context was built using the system running this program. </dd>
<dd>
0 instead (for instance if using another file-system root, a XML topology file, or a synthetic topology). </dd></dl>
<p>Add a MISC object to the topology. </p>
<p>A new MISC object will be created and inserted into the topology at the position given by parent.</p>
<p>name will be copied.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly-created object </dd></dl>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Retrieve Objects</title>
<title>Hardware Locality (hwloc): Get some Topology Information</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,36 +20,66 @@
</div>
</div>
<div class="contents">
<h1>Retrieve Objects</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Get some Topology Information</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#gaf4e663cf42bbe20756b849c6293ef575">hwloc_get_type_depth_e</a> { <a class="el" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad">HWLOC_TYPE_DEPTH_UNKNOWN</a>,
<a class="el" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c">HWLOC_TYPE_DEPTH_MULTIPLE</a>
}</td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC <a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#gaedd78240b0c1108355586a268ec5a697">hwloc_get_obj_by_depth</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned depth, unsigned idx) __hwloc_attribute_pure</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the topology object at index <code>index</code> from depth <code>depth</code>. <a href="#gaedd78240b0c1108355586a268ec5a697"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#gaabd26357fea30ceb7754ad970b9a0aaa">hwloc_get_obj_by_type</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, unsigned idx)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the topology object at index <code>index</code> with type <code>type</code>. <a href="#gaabd26357fea30ceb7754ad970b9a0aaa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#ga8c30b0cec55074eb3ed34e4f2a1a9937">hwloc_topology_get_depth</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology) __hwloc_attribute_pure</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the depth of the hierachical tree of objects. <a href="#ga8c30b0cec55074eb3ed34e4f2a1a9937"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d">hwloc_get_type_depth</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the depth of objects of type <code>type</code>. <a href="#gaea7c64dd59467f5201ba87712710b14d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#gadd4964764ae7e49231065d58a553fd31">hwloc_get_depth_type</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned depth) __hwloc_attribute_pure</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the type of objects at depth <code>depth</code>. <a href="#gadd4964764ae7e49231065d58a553fd31"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#ga20cfe2456f4cfdd789c9aca6d2fdd69f">hwloc_get_nbobjs_by_depth</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned depth) __hwloc_attribute_pure</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the width of level at depth <code>depth</code>. <a href="#ga20cfe2456f4cfdd789c9aca6d2fdd69f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline int <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#ga0131ab1051011fabfa69d7c1853e716c">hwloc_get_nbobjs_by_type</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the width of level type <code>type</code>. <a href="#ga0131ab1051011fabfa69d7c1853e716c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#ga0d109e33fc7990f62f665d336e5e5111">hwloc_topology_is_thissystem</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict topology) __hwloc_attribute_pure</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Does the topology context come from this system? <a href="#ga0d109e33fc7990f62f665d336e5e5111"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gaedd78240b0c1108355586a268ec5a697"></a><!-- doxytag: member="hwloc.h::hwloc_get_obj_by_depth" ref="gaedd78240b0c1108355586a268ec5a697" args="(hwloc_topology_t topology, unsigned depth, unsigned idx) __hwloc_attribute_pure" -->
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="gaf4e663cf42bbe20756b849c6293ef575"></a><!-- doxytag: member="hwloc.h::hwloc_get_type_depth_e" ref="gaf4e663cf42bbe20756b849c6293ef575" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC <a class="el" href="a00010.html">hwloc_obj_t</a> hwloc_get_obj_by_depth </td>
<td class="memname">enum <a class="el" href="a00033.html#gaf4e663cf42bbe20756b849c6293ef575">hwloc_get_type_depth_e</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad"></a><!-- doxytag: member="HWLOC_TYPE_DEPTH_UNKNOWN" ref="ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" args="" -->HWLOC_TYPE_DEPTH_UNKNOWN</em>&nbsp;</td><td>
<p>No object of given type exists in the topology. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c"></a><!-- doxytag: member="HWLOC_TYPE_DEPTH_MULTIPLE" ref="ggaf4e663cf42bbe20756b849c6293ef575ae99465995cacde6c210d5fc2e409798c" args="" -->HWLOC_TYPE_DEPTH_MULTIPLE</em>&nbsp;</td><td>
<p>Objects of given type exist at different depth in the topology. </p>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gadd4964764ae7e49231065d58a553fd31"></a><!-- doxytag: member="hwloc.h::hwloc_get_depth_type" ref="gadd4964764ae7e49231065d58a553fd31" args="(hwloc_topology_t topology, unsigned depth) __hwloc_attribute_pure" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> hwloc_get_depth_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>idx</em></td><td>&nbsp;</td>
<td class="paramname"> <em>depth</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -60,31 +90,55 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Returns the topology object at index <code>index</code> from depth <code>depth</code>. </p>
<p>Returns the type of objects at depth <code>depth</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>-1 if depth <code>depth</code> does not exist. </dd></dl>
</div>
</div>
<a class="anchor" id="gaabd26357fea30ceb7754ad970b9a0aaa"></a><!-- doxytag: member="hwloc.h::hwloc_get_obj_by_type" ref="gaabd26357fea30ceb7754ad970b9a0aaa" args="(hwloc_topology_t topology, hwloc_obj_type_t type, unsigned idx)" -->
<a class="anchor" id="ga20cfe2456f4cfdd789c9aca6d2fdd69f"></a><!-- doxytag: member="hwloc.h::hwloc_get_nbobjs_by_depth" ref="ga20cfe2456f4cfdd789c9aca6d2fdd69f" args="(hwloc_topology_t topology, unsigned depth) __hwloc_attribute_pure" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_obj_by_type </td>
<td class="memname">HWLOC_DECLSPEC unsigned hwloc_get_nbobjs_by_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em>, </td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the width of level at depth <code>depth</code>. </p>
</div>
</div>
<a class="anchor" id="ga0131ab1051011fabfa69d7c1853e716c"></a><!-- doxytag: member="hwloc.h::hwloc_get_nbobjs_by_type" ref="ga0131ab1051011fabfa69d7c1853e716c" args="(hwloc_topology_t topology, hwloc_obj_type_t type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline int __hwloc_attribute_pure hwloc_get_nbobjs_by_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>idx</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -95,8 +149,83 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Returns the topology object at index <code>index</code> with type <code>type</code>. </p>
<p>If no object for that type exists, <code>NULL</code> is returned. If there are several levels with objects of that type, <code>NULL</code> is returned and ther caller may fallback to <a class="el" href="a00033.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth()</a>. </p>
<p>Returns the width of level type <code>type</code>. </p>
<p>If no object for that type exists, 0 is returned. If there are several levels with objects of that type, -1 is returned. </p>
</div>
</div>
<a class="anchor" id="gaea7c64dd59467f5201ba87712710b14d"></a><!-- doxytag: member="hwloc.h::hwloc_get_type_depth" ref="gaea7c64dd59467f5201ba87712710b14d" args="(hwloc_topology_t topology, hwloc_obj_type_t type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_get_type_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the depth of objects of type <code>type</code>. </p>
<p>If no object of this type is present on the underlying architecture, or if the OS doesn't provide this kind of information, the function returns HWLOC_TYPE_DEPTH_UNKNOWN.</p>
<p>If type is absent but a similar type is acceptable, see also <a class="el" href="a00037.html#ga0ffafb4c0ae13b9a7541ca820ca34883" title="Returns the depth of objects of type type or below.">hwloc_get_type_or_below_depth()</a> and <a class="el" href="a00037.html#ga24b9cd5917fcebac6e45ae38d0a6cda4" title="Returns the depth of objects of type type or above.">hwloc_get_type_or_above_depth()</a>. </p>
</div>
</div>
<a class="anchor" id="ga8c30b0cec55074eb3ed34e4f2a1a9937"></a><!-- doxytag: member="hwloc.h::hwloc_topology_get_depth" ref="ga8c30b0cec55074eb3ed34e4f2a1a9937" args="(hwloc_topology_t __hwloc_restrict topology) __hwloc_attribute_pure" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC unsigned hwloc_topology_get_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the depth of the hierachical tree of objects. </p>
<p>This is the depth of HWLOC_OBJ_PU objects plus one. </p>
</div>
</div>
<a class="anchor" id="ga0d109e33fc7990f62f665d336e5e5111"></a><!-- doxytag: member="hwloc.h::hwloc_topology_is_thissystem" ref="ga0d109e33fc7990f62f665d336e5e5111" args="(hwloc_topology_t __hwloc_restrict topology) __hwloc_attribute_pure" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_topology_is_thissystem </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> __hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Does the topology context come from this system? </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 if this topology context was built using the system running this program. </dd>
<dd>
0 instead (for instance if using another file-system root, a XML topology file, or a synthetic topology). </dd></dl>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Object/String Conversion</title>
<title>Hardware Locality (hwloc): Retrieve Objects</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,153 +20,37 @@
</div>
</div>
<div class="contents">
<h1>Object/String Conversion</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Retrieve Objects</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#ga7c61920feca6fd9006d930dabfc09058">hwloc_obj_type_string</a> (<a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type) __hwloc_attribute_const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a stringified topology object type. <a href="#ga7c61920feca6fd9006d930dabfc09058"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#gade722091ae392fdc79557e797a16c370">hwloc_obj_type_of_string</a> (const char *string) __hwloc_attribute_pure</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an object type from the string. <a href="#gade722091ae392fdc79557e797a16c370"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#ga3ad856e8f3487d340c82a23b8a2a0351">hwloc_obj_type_snprintf</a> (char *__hwloc_restrict string, size_t size, <a class="el" href="a00010.html">hwloc_obj_t</a> obj, int verbose)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stringify the type of a given topology object into a human-readable form. <a href="#ga3ad856e8f3487d340c82a23b8a2a0351"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#ga0db8286d7f3ceda8defd76e3e1e2b284">hwloc_obj_attr_snprintf</a> (char *__hwloc_restrict string, size_t size, <a class="el" href="a00010.html">hwloc_obj_t</a> obj, const char *__hwloc_restrict separator, int verbose)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stringify the attributes of a given topology object into a human-readable form. <a href="#ga0db8286d7f3ceda8defd76e3e1e2b284"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#ga5c6a61a83f4790b421e2f62e9088446f">hwloc_obj_snprintf</a> (char *__hwloc_restrict string, size_t size, <a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00010.html">hwloc_obj_t</a> obj, const char *__hwloc_restrict indexprefix, int verbose)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stringify a given topology object into a human-readable form. <a href="#ga5c6a61a83f4790b421e2f62e9088446f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#gabbfb92224c992c0e2ecef6b6e45260f2">hwloc_obj_cpuset_snprintf</a> (char *__hwloc_restrict str, size_t size, size_t nobj, const <a class="el" href="a00010.html">hwloc_obj_t</a> *__hwloc_restrict objs)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stringify the cpuset containing a set of objects. <a href="#gabbfb92224c992c0e2ecef6b6e45260f2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC <a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#gaedd78240b0c1108355586a268ec5a697">hwloc_get_obj_by_depth</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned depth, unsigned idx) __hwloc_attribute_pure</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the topology object at index <code>index</code> from depth <code>depth</code>. <a href="#gaedd78240b0c1108355586a268ec5a697"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00034.html#ga701f83b2cf0cb8e0acd58cd2dc1c67a2">hwloc_get_obj_by_type</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, unsigned idx)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the topology object at index <code>index</code> with type <code>type</code>. <a href="#ga701f83b2cf0cb8e0acd58cd2dc1c67a2"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga0db8286d7f3ceda8defd76e3e1e2b284"></a><!-- doxytag: member="hwloc.h::hwloc_obj_attr_snprintf" ref="ga0db8286d7f3ceda8defd76e3e1e2b284" args="(char *__hwloc_restrict string, size_t size, hwloc_obj_t obj, const char *__hwloc_restrict separator, int verbose)" -->
<a class="anchor" id="gaedd78240b0c1108355586a268ec5a697"></a><!-- doxytag: member="hwloc.h::hwloc_get_obj_by_depth" ref="gaedd78240b0c1108355586a268ec5a697" args="(hwloc_topology_t topology, unsigned depth, unsigned idx) __hwloc_attribute_pure" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_obj_attr_snprintf </td>
<td class="memname">HWLOC_DECLSPEC <a class="el" href="a00011.html">hwloc_obj_t</a> hwloc_get_obj_by_depth </td>
<td>(</td>
<td class="paramtype">char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>string</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>separator</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>verbose</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Stringify the attributes of a given topology object into a human-readable form. </p>
<p>Attribute values are separated by <code>separator</code>.</p>
<p>Only the major attributes are printed in non-verbose mode.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>how many characters were actually written (not including the ending \0). </dd></dl>
</div>
</div>
<a class="anchor" id="gabbfb92224c992c0e2ecef6b6e45260f2"></a><!-- doxytag: member="hwloc.h::hwloc_obj_cpuset_snprintf" ref="gabbfb92224c992c0e2ecef6b6e45260f2" args="(char *__hwloc_restrict str, size_t size, size_t nobj, const hwloc_obj_t *__hwloc_restrict objs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_obj_cpuset_snprintf </td>
<td>(</td>
<td class="paramtype">char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>str</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>nobj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="a00010.html">hwloc_obj_t</a> *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>objs</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Stringify the cpuset containing a set of objects. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>how many characters were actually written (not including the ending \0). </dd></dl>
</div>
</div>
<a class="anchor" id="ga5c6a61a83f4790b421e2f62e9088446f"></a><!-- doxytag: member="hwloc.h::hwloc_obj_snprintf" ref="ga5c6a61a83f4790b421e2f62e9088446f" args="(char *__hwloc_restrict string, size_t size, hwloc_topology_t topology, hwloc_obj_t obj, const char *__hwloc_restrict indexprefix, int verbose)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_obj_snprintf </td>
<td>(</td>
<td class="paramtype">char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>string</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em>, </td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>indexprefix</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>verbose</em></td><td>&nbsp;</td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>idx</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -177,96 +61,43 @@
</div>
<div class="memdoc">
<p>Stringify a given topology object into a human-readable form. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>This function is deprecated in favor of <a class="el" href="a00034.html#ga3ad856e8f3487d340c82a23b8a2a0351" title="Stringify the type of a given topology object into a human-readable form.">hwloc_obj_type_snprintf()</a> and <a class="el" href="a00034.html#ga0db8286d7f3ceda8defd76e3e1e2b284" title="Stringify the attributes of a given topology object into a human-readable form.">hwloc_obj_attr_snprintf()</a> since it is not very flexible and only prints physical/OS indexes.</dd></dl>
<p>Fill string <code>string</code> up to <code>size</code> characters with the description of topology object <code>obj</code> in topology <code>topology</code>.</p>
<p>If <code>verbose</code> is set, a longer description is used. Otherwise a short description is used.</p>
<p><code>indexprefix</code> is used to prefix the <code>os_index</code> attribute number of the object in the description. If <code>NULL</code>, the <code>#</code> character is used.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>how many characters were actually written (not including the ending \0). </dd></dl>
<p>Returns the topology object at index <code>index</code> from depth <code>depth</code>. </p>
</div>
</div>
<a class="anchor" id="gade722091ae392fdc79557e797a16c370"></a><!-- doxytag: member="hwloc.h::hwloc_obj_type_of_string" ref="gade722091ae392fdc79557e797a16c370" args="(const char *string) __hwloc_attribute_pure" -->
<a class="anchor" id="ga701f83b2cf0cb8e0acd58cd2dc1c67a2"></a><!-- doxytag: member="hwloc.h::hwloc_get_obj_by_type" ref="ga701f83b2cf0cb8e0acd58cd2dc1c67a2" args="(hwloc_topology_t topology, hwloc_obj_type_t type, unsigned idx)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> hwloc_obj_type_of_string </td>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_obj_by_type </td>
<td>(</td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>string</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return an object type from the string. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>-1 if unrecognized. </dd></dl>
</div>
</div>
<a class="anchor" id="ga3ad856e8f3487d340c82a23b8a2a0351"></a><!-- doxytag: member="hwloc.h::hwloc_obj_type_snprintf" ref="ga3ad856e8f3487d340c82a23b8a2a0351" args="(char *__hwloc_restrict string, size_t size, hwloc_obj_t obj, int verbose)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_obj_type_snprintf </td>
<td>(</td>
<td class="paramtype">char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>string</em>, </td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>size</em>, </td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>verbose</em></td><td>&nbsp;</td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>idx</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Stringify the type of a given topology object into a human-readable form. </p>
<p>It differs from <a class="el" href="a00034.html#ga7c61920feca6fd9006d930dabfc09058" title="Return a stringified topology object type.">hwloc_obj_type_string()</a> because it prints type attributes such as cache depth.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>how many characters were actually written (not including the ending \0). </dd></dl>
</div>
</div>
<a class="anchor" id="ga7c61920feca6fd9006d930dabfc09058"></a><!-- doxytag: member="hwloc.h::hwloc_obj_type_string" ref="ga7c61920feca6fd9006d930dabfc09058" args="(hwloc_obj_type_t type) __hwloc_attribute_const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC const char* hwloc_obj_type_string </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td>
<td>&nbsp;)&nbsp;</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return a stringified topology object type. </p>
<p>Returns the topology object at index <code>index</code> with type <code>type</code>. </p>
<p>If no object for that type exists, <code>NULL</code> is returned. If there are several levels with objects of that type, <code>NULL</code> is returned and ther caller may fallback to <a class="el" href="a00034.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth()</a>. </p>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Binding</title>
<title>Hardware Locality (hwloc): Object/String Conversion</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,94 +20,55 @@
</div>
</div>
<div class="contents">
<h1>Binding</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html#ga9b2de9a34a18edb39fb272adf9c33622">hwloc_cpubind_policy_t</a> { <a class="el" href="a00035.html#gga9b2de9a34a18edb39fb272adf9c33622a2e0dd0128dac6b03408c7dd170477fdc">HWLOC_CPUBIND_PROCESS</a>,
<a class="el" href="a00035.html#gga9b2de9a34a18edb39fb272adf9c33622af1b6bbad00d7b1017b918e3719f4d421">HWLOC_CPUBIND_THREAD</a>,
<a class="el" href="a00035.html#gga9b2de9a34a18edb39fb272adf9c33622a679a7e0f0c7ee06b123565f90d98e7fa">HWLOC_CPUBIND_STRICT</a>
}</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Process/Thread binding policy. </p>
<a href="a00035.html#ga9b2de9a34a18edb39fb272adf9c33622">More...</a><br/></td></tr>
<h1>Object/String Conversion</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html#ga42f02baaf7dc0c0f5a6bbeca731fd144">hwloc_set_cpubind</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, int policy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bind current process or thread on cpus given in cpuset <code>set</code>. <a href="#ga42f02baaf7dc0c0f5a6bbeca731fd144"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html#ga55427f8da8073ae16d0bab11f8137f1c">hwloc_get_cpubind</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> set, int policy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get current process or thread binding. <a href="#ga55427f8da8073ae16d0bab11f8137f1c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html#gac349497da8f4f738bad51b2861461dc3">hwloc_set_proc_cpubind</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, hwloc_pid_t pid, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, int policy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bind a process <code>pid</code> on cpus given in cpuset <code>set</code>. <a href="#gac349497da8f4f738bad51b2861461dc3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html#ga02141a2049739d63a5fa7a172d301f1c">hwloc_get_proc_cpubind</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, hwloc_pid_t pid, <a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> set, int policy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current binding of process <code>pid</code>. <a href="#ga02141a2049739d63a5fa7a172d301f1c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html#ga2be36e3ab9c9076ab5cca8fd57ae0dcf">hwloc_set_thread_cpubind</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, hwloc_thread_t tid, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, int policy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bind a thread <code>tid</code> on cpus given in cpuset <code>set</code>. <a href="#ga2be36e3ab9c9076ab5cca8fd57ae0dcf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html#ga5f265c78ea768372bae8e5d89d628c22">hwloc_get_thread_cpubind</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, hwloc_thread_t tid, <a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> set, int policy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current binding of thread <code>tid</code>. <a href="#ga5f265c78ea768372bae8e5d89d628c22"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html#ga7c61920feca6fd9006d930dabfc09058">hwloc_obj_type_string</a> (<a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type) __hwloc_attribute_const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a stringified topology object type. <a href="#ga7c61920feca6fd9006d930dabfc09058"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html#gade722091ae392fdc79557e797a16c370">hwloc_obj_type_of_string</a> (const char *string) __hwloc_attribute_pure</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an object type from the string. <a href="#gade722091ae392fdc79557e797a16c370"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html#ga3ad856e8f3487d340c82a23b8a2a0351">hwloc_obj_type_snprintf</a> (char *__hwloc_restrict string, size_t size, <a class="el" href="a00011.html">hwloc_obj_t</a> obj, int verbose)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stringify the type of a given topology object into a human-readable form. <a href="#ga3ad856e8f3487d340c82a23b8a2a0351"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html#ga0db8286d7f3ceda8defd76e3e1e2b284">hwloc_obj_attr_snprintf</a> (char *__hwloc_restrict string, size_t size, <a class="el" href="a00011.html">hwloc_obj_t</a> obj, const char *__hwloc_restrict separator, int verbose)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stringify the attributes of a given topology object into a human-readable form. <a href="#ga0db8286d7f3ceda8defd76e3e1e2b284"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html#ga5c6a61a83f4790b421e2f62e9088446f">hwloc_obj_snprintf</a> (char *__hwloc_restrict string, size_t size, <a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00011.html">hwloc_obj_t</a> obj, const char *__hwloc_restrict indexprefix, int verbose)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stringify a given topology object into a human-readable form. <a href="#ga5c6a61a83f4790b421e2f62e9088446f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00035.html#gabbfb92224c992c0e2ecef6b6e45260f2">hwloc_obj_cpuset_snprintf</a> (char *__hwloc_restrict str, size_t size, size_t nobj, const <a class="el" href="a00011.html">hwloc_obj_t</a> *__hwloc_restrict objs)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stringify the cpuset containing a set of objects. <a href="#gabbfb92224c992c0e2ecef6b6e45260f2"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>It is often useful to call <a class="el" href="a00045.html#gace7ad3d2a71d9884e7a28311228931af" title="Keep a single CPU among those set in CPU set set.">hwloc_cpuset_singlify()</a> first so that a single CPU remains in the set. This way, the process will not even migrate between different CPUs. Some OSes also only support that kind of binding.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Some OSes do not provide all ways to bind processes, threads, etc and the corresponding binding functions may fail. ENOSYS is returned when it is not possible to bind the requested kind of object processes/threads). EXDEV is returned when the requested cpuset can not be enforced (e.g. some systems only allow one CPU, and some other systems only allow one NUMA node)</dd></dl>
<p>The most portable version that should be preferred over the others, whenever possible, is</p>
<div class="fragment"><pre class="fragment"> <a class="code" href="a00035.html#ga42f02baaf7dc0c0f5a6bbeca731fd144" title="Bind current process or thread on cpus given in cpuset set.">hwloc_set_cpubind</a>(topology, <span class="keyword">set</span>, 0),
</pre></div><p>as it just binds the current program, assuming it is monothread, or</p>
<div class="fragment"><pre class="fragment"> <a class="code" href="a00035.html#ga42f02baaf7dc0c0f5a6bbeca731fd144" title="Bind current process or thread on cpus given in cpuset set.">hwloc_set_cpubind</a>(topology, <span class="keyword">set</span>, <a class="code" href="a00035.html#gga9b2de9a34a18edb39fb272adf9c33622af1b6bbad00d7b1017b918e3719f4d421" title="Bind current thread of current process.">HWLOC_CPUBIND_THREAD</a>),
</pre></div><p>which binds the current thread of the current program (which may be multithreaded).</p>
<dl class="note"><dt><b>Note:</b></dt><dd>To unbind, just call the binding function with either a full cpuset or a cpuset equal to the system cpuset. </dd></dl>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="ga9b2de9a34a18edb39fb272adf9c33622"></a><!-- doxytag: member="hwloc.h::hwloc_cpubind_policy_t" ref="ga9b2de9a34a18edb39fb272adf9c33622" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="a00035.html#ga9b2de9a34a18edb39fb272adf9c33622">hwloc_cpubind_policy_t</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Process/Thread binding policy. </p>
<p>These flags can be used to refine the binding policy.</p>
<p>The default (0) is to bind the current process, assumed to be mono-thread, in a non-strict way. This is the most portable way to bind as all OSes usually provide it. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga9b2de9a34a18edb39fb272adf9c33622a2e0dd0128dac6b03408c7dd170477fdc"></a><!-- doxytag: member="HWLOC_CPUBIND_PROCESS" ref="gga9b2de9a34a18edb39fb272adf9c33622a2e0dd0128dac6b03408c7dd170477fdc" args="" -->HWLOC_CPUBIND_PROCESS</em>&nbsp;</td><td>
<p>Bind all threads of the current multithreaded process. This may not be supported by some OSes (e.g. Linux). </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga9b2de9a34a18edb39fb272adf9c33622af1b6bbad00d7b1017b918e3719f4d421"></a><!-- doxytag: member="HWLOC_CPUBIND_THREAD" ref="gga9b2de9a34a18edb39fb272adf9c33622af1b6bbad00d7b1017b918e3719f4d421" args="" -->HWLOC_CPUBIND_THREAD</em>&nbsp;</td><td>
<p>Bind current thread of current process. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga9b2de9a34a18edb39fb272adf9c33622a679a7e0f0c7ee06b123565f90d98e7fa"></a><!-- doxytag: member="HWLOC_CPUBIND_STRICT" ref="gga9b2de9a34a18edb39fb272adf9c33622a679a7e0f0c7ee06b123565f90d98e7fa" args="" -->HWLOC_CPUBIND_STRICT</em>&nbsp;</td><td>
<p>Request for strict binding from the OS. </p>
<p>By default, when the designated CPUs are all busy while other CPUs are idle, OSes may execute the thread/process on those other CPUs instead of the designated CPUs, to let them progress anyway. Strict binding means that the thread/process will _never_ execute on other cpus than the designated CPUs, even when those are busy with other tasks and other CPUs are idle.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Depending on OSes and implementations, strict binding may not be possible (implementation reason) or not allowed (administrative reasons), and the function will fail in that case.</dd></dl>
<p>When retrieving the binding of a process, this flag checks whether all its threads actually have the same binding. If the flag is not given, the binding of each thread will be accumulated.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This flag is meaningless when retrieving the binding of a thread. </dd></dl>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga55427f8da8073ae16d0bab11f8137f1c"></a><!-- doxytag: member="hwloc.h::hwloc_get_cpubind" ref="ga55427f8da8073ae16d0bab11f8137f1c" args="(hwloc_topology_t topology, hwloc_cpuset_t set, int policy)" -->
<a class="anchor" id="ga0db8286d7f3ceda8defd76e3e1e2b284"></a><!-- doxytag: member="hwloc.h::hwloc_obj_attr_snprintf" ref="ga0db8286d7f3ceda8defd76e3e1e2b284" args="(char *__hwloc_restrict string, size_t size, hwloc_obj_t obj, const char *__hwloc_restrict separator, int verbose)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_get_cpubind </td>
<td class="memname">HWLOC_DECLSPEC int hwloc_obj_attr_snprintf </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
<td class="paramtype">char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>string</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>separator</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>policy</em></td><td>&nbsp;</td>
<td class="paramname"> <em>verbose</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -118,37 +79,40 @@
</div>
<div class="memdoc">
<p>Get current process or thread binding. </p>
<p>Stringify the attributes of a given topology object into a human-readable form. </p>
<p>Attribute values are separated by <code>separator</code>.</p>
<p>Only the major attributes are printed in non-verbose mode.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>how many characters were actually written (not including the ending \0). </dd></dl>
</div>
</div>
<a class="anchor" id="ga02141a2049739d63a5fa7a172d301f1c"></a><!-- doxytag: member="hwloc.h::hwloc_get_proc_cpubind" ref="ga02141a2049739d63a5fa7a172d301f1c" args="(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int policy)" -->
<a class="anchor" id="gabbfb92224c992c0e2ecef6b6e45260f2"></a><!-- doxytag: member="hwloc.h::hwloc_obj_cpuset_snprintf" ref="gabbfb92224c992c0e2ecef6b6e45260f2" args="(char *__hwloc_restrict str, size_t size, size_t nobj, const hwloc_obj_t *__hwloc_restrict objs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_get_proc_cpubind </td>
<td class="memname">HWLOC_DECLSPEC int hwloc_obj_cpuset_snprintf </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
<td class="paramtype">char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>str</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hwloc_pid_t&nbsp;</td>
<td class="paramname"> <em>pid</em>, </td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>nobj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>policy</em></td><td>&nbsp;</td>
<td class="paramtype">const <a class="el" href="a00011.html">hwloc_obj_t</a> *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>objs</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -159,40 +123,50 @@
</div>
<div class="memdoc">
<p>Get the current binding of process <code>pid</code>. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>hwloc_pid_t is pid_t on unix platforms, and HANDLE on native Windows platforms</dd>
<dd>
HWLOC_CPUBIND_THREAD can not be used in <code>policy</code>. </dd></dl>
<p>Stringify the cpuset containing a set of objects. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>how many characters were actually written (not including the ending \0). </dd></dl>
</div>
</div>
<a class="anchor" id="ga5f265c78ea768372bae8e5d89d628c22"></a><!-- doxytag: member="hwloc.h::hwloc_get_thread_cpubind" ref="ga5f265c78ea768372bae8e5d89d628c22" args="(hwloc_topology_t topology, hwloc_thread_t tid, hwloc_cpuset_t set, int policy)" -->
<a class="anchor" id="ga5c6a61a83f4790b421e2f62e9088446f"></a><!-- doxytag: member="hwloc.h::hwloc_obj_snprintf" ref="ga5c6a61a83f4790b421e2f62e9088446f" args="(char *__hwloc_restrict string, size_t size, hwloc_topology_t topology, hwloc_obj_t obj, const char *__hwloc_restrict indexprefix, int verbose)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_get_thread_cpubind </td>
<td class="memname">HWLOC_DECLSPEC int hwloc_obj_snprintf </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype">char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>string</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hwloc_thread_t&nbsp;</td>
<td class="paramname"> <em>tid</em>, </td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
<td class="paramtype">const char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>indexprefix</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>policy</em></td><td>&nbsp;</td>
<td class="paramname"> <em>verbose</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -203,34 +177,63 @@ HWLOC_CPUBIND_THREAD can not be used in <code>policy</code>. </dd></dl>
</div>
<div class="memdoc">
<p>Get the current binding of thread <code>tid</code>. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>hwloc_thread_t is pthread_t on unix platforms, and HANDLE on native Windows platforms</dd>
<dd>
HWLOC_CPUBIND_PROCESS can not be used in <code>policy</code>. </dd></dl>
<p>Stringify a given topology object into a human-readable form. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>This function is deprecated in favor of <a class="el" href="a00035.html#ga3ad856e8f3487d340c82a23b8a2a0351" title="Stringify the type of a given topology object into a human-readable form.">hwloc_obj_type_snprintf()</a> and <a class="el" href="a00035.html#ga0db8286d7f3ceda8defd76e3e1e2b284" title="Stringify the attributes of a given topology object into a human-readable form.">hwloc_obj_attr_snprintf()</a> since it is not very flexible and only prints physical/OS indexes.</dd></dl>
<p>Fill string <code>string</code> up to <code>size</code> characters with the description of topology object <code>obj</code> in topology <code>topology</code>.</p>
<p>If <code>verbose</code> is set, a longer description is used. Otherwise a short description is used.</p>
<p><code>indexprefix</code> is used to prefix the <code>os_index</code> attribute number of the object in the description. If <code>NULL</code>, the <code>#</code> character is used.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>how many characters were actually written (not including the ending \0). </dd></dl>
</div>
</div>
<a class="anchor" id="ga42f02baaf7dc0c0f5a6bbeca731fd144"></a><!-- doxytag: member="hwloc.h::hwloc_set_cpubind" ref="ga42f02baaf7dc0c0f5a6bbeca731fd144" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, int policy)" -->
<a class="anchor" id="gade722091ae392fdc79557e797a16c370"></a><!-- doxytag: member="hwloc.h::hwloc_obj_type_of_string" ref="gade722091ae392fdc79557e797a16c370" args="(const char *string) __hwloc_attribute_pure" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_set_cpubind </td>
<td class="memname">HWLOC_DECLSPEC <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> hwloc_obj_type_of_string </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>string</em></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return an object type from the string. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>-1 if unrecognized. </dd></dl>
</div>
</div>
<a class="anchor" id="ga3ad856e8f3487d340c82a23b8a2a0351"></a><!-- doxytag: member="hwloc.h::hwloc_obj_type_snprintf" ref="ga3ad856e8f3487d340c82a23b8a2a0351" args="(char *__hwloc_restrict string, size_t size, hwloc_obj_t obj, int verbose)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_obj_type_snprintf </td>
<td>(</td>
<td class="paramtype">char *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>string</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>policy</em></td><td>&nbsp;</td>
<td class="paramname"> <em>verbose</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -241,98 +244,29 @@ HWLOC_CPUBIND_PROCESS can not be used in <code>policy</code>. </dd></dl>
</div>
<div class="memdoc">
<p>Bind current process or thread on cpus given in cpuset <code>set</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>ENOSYS if the action is not supported </dd>
<dd>
EXDEV if the binding cannot be enforced </dd></dl>
<p>Stringify the type of a given topology object into a human-readable form. </p>
<p>It differs from <a class="el" href="a00035.html#ga7c61920feca6fd9006d930dabfc09058" title="Return a stringified topology object type.">hwloc_obj_type_string()</a> because it prints type attributes such as cache depth.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>how many characters were actually written (not including the ending \0). </dd></dl>
</div>
</div>
<a class="anchor" id="gac349497da8f4f738bad51b2861461dc3"></a><!-- doxytag: member="hwloc.h::hwloc_set_proc_cpubind" ref="gac349497da8f4f738bad51b2861461dc3" args="(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_cpuset_t set, int policy)" -->
<a class="anchor" id="ga7c61920feca6fd9006d930dabfc09058"></a><!-- doxytag: member="hwloc.h::hwloc_obj_type_string" ref="ga7c61920feca6fd9006d930dabfc09058" args="(hwloc_obj_type_t type) __hwloc_attribute_const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_set_proc_cpubind </td>
<td class="memname">HWLOC_DECLSPEC const char* hwloc_obj_type_string </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hwloc_pid_t&nbsp;</td>
<td class="paramname"> <em>pid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>policy</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td>
<td>&nbsp;)&nbsp;</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Bind a process <code>pid</code> on cpus given in cpuset <code>set</code>. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>hwloc_pid_t is pid_t on unix platforms, and HANDLE on native Windows platforms</dd>
<dd>
HWLOC_CPUBIND_THREAD can not be used in <code>policy</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="ga2be36e3ab9c9076ab5cca8fd57ae0dcf"></a><!-- doxytag: member="hwloc.h::hwloc_set_thread_cpubind" ref="ga2be36e3ab9c9076ab5cca8fd57ae0dcf" args="(hwloc_topology_t topology, hwloc_thread_t tid, hwloc_const_cpuset_t set, int policy)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_set_thread_cpubind </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hwloc_thread_t&nbsp;</td>
<td class="paramname"> <em>tid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>policy</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Bind a thread <code>tid</code> on cpus given in cpuset <code>set</code>. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>hwloc_thread_t is pthread_t on unix platforms, and HANDLE on native Windows platforms</dd>
<dd>
HWLOC_CPUBIND_PROCESS can not be used in <code>policy</code>. </dd></dl>
<p>Return a stringified topology object type. </p>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Object Type Helpers</title>
<title>Hardware Locality (hwloc): Binding</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,73 +20,319 @@
</div>
</div>
<div class="contents">
<h1>Object Type Helpers</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Binding</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00036.html#ga9b2de9a34a18edb39fb272adf9c33622">hwloc_cpubind_policy_t</a> { <a class="el" href="a00036.html#gga9b2de9a34a18edb39fb272adf9c33622a2e0dd0128dac6b03408c7dd170477fdc">HWLOC_CPUBIND_PROCESS</a>,
<a class="el" href="a00036.html#gga9b2de9a34a18edb39fb272adf9c33622af1b6bbad00d7b1017b918e3719f4d421">HWLOC_CPUBIND_THREAD</a>,
<a class="el" href="a00036.html#gga9b2de9a34a18edb39fb272adf9c33622a679a7e0f0c7ee06b123565f90d98e7fa">HWLOC_CPUBIND_STRICT</a>
}</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Process/Thread binding policy. </p>
<a href="a00036.html#ga9b2de9a34a18edb39fb272adf9c33622">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline int <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00036.html#gaf324fdd1fcb895c32cc6540c92e9245a">hwloc_get_type_or_below_depth</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the depth of objects of type <code>type</code> or below. <a href="#gaf324fdd1fcb895c32cc6540c92e9245a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline int <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00036.html#ga4451dffe0bb068f597ec55403e8ed5b8">hwloc_get_type_or_above_depth</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the depth of objects of type <code>type</code> or above. <a href="#ga4451dffe0bb068f597ec55403e8ed5b8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00036.html#ga42f02baaf7dc0c0f5a6bbeca731fd144">hwloc_set_cpubind</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, int policy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bind current process or thread on cpus given in cpuset <code>set</code>. <a href="#ga42f02baaf7dc0c0f5a6bbeca731fd144"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00036.html#ga55427f8da8073ae16d0bab11f8137f1c">hwloc_get_cpubind</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> set, int policy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get current process or thread binding. <a href="#ga55427f8da8073ae16d0bab11f8137f1c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00036.html#gac349497da8f4f738bad51b2861461dc3">hwloc_set_proc_cpubind</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, hwloc_pid_t pid, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, int policy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bind a process <code>pid</code> on cpus given in cpuset <code>set</code>. <a href="#gac349497da8f4f738bad51b2861461dc3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00036.html#ga02141a2049739d63a5fa7a172d301f1c">hwloc_get_proc_cpubind</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, hwloc_pid_t pid, <a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> set, int policy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current binding of process <code>pid</code>. <a href="#ga02141a2049739d63a5fa7a172d301f1c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00036.html#ga2be36e3ab9c9076ab5cca8fd57ae0dcf">hwloc_set_thread_cpubind</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, hwloc_thread_t tid, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, int policy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bind a thread <code>tid</code> on cpus given in cpuset <code>set</code>. <a href="#ga2be36e3ab9c9076ab5cca8fd57ae0dcf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00036.html#ga5f265c78ea768372bae8e5d89d628c22">hwloc_get_thread_cpubind</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, hwloc_thread_t tid, <a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> set, int policy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current binding of thread <code>tid</code>. <a href="#ga5f265c78ea768372bae8e5d89d628c22"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>It is often useful to call <a class="el" href="a00046.html#gace7ad3d2a71d9884e7a28311228931af" title="Keep a single CPU among those set in CPU set set.">hwloc_cpuset_singlify()</a> first so that a single CPU remains in the set. This way, the process will not even migrate between different CPUs. Some OSes also only support that kind of binding.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Some OSes do not provide all ways to bind processes, threads, etc and the corresponding binding functions may fail. ENOSYS is returned when it is not possible to bind the requested kind of object processes/threads). EXDEV is returned when the requested cpuset can not be enforced (e.g. some systems only allow one CPU, and some other systems only allow one NUMA node)</dd></dl>
<p>The most portable version that should be preferred over the others, whenever possible, is</p>
<div class="fragment"><pre class="fragment"> <a class="code" href="a00036.html#ga42f02baaf7dc0c0f5a6bbeca731fd144" title="Bind current process or thread on cpus given in cpuset set.">hwloc_set_cpubind</a>(topology, <span class="keyword">set</span>, 0),
</pre></div><p>as it just binds the current program, assuming it is monothread, or</p>
<div class="fragment"><pre class="fragment"> <a class="code" href="a00036.html#ga42f02baaf7dc0c0f5a6bbeca731fd144" title="Bind current process or thread on cpus given in cpuset set.">hwloc_set_cpubind</a>(topology, <span class="keyword">set</span>, <a class="code" href="a00036.html#gga9b2de9a34a18edb39fb272adf9c33622af1b6bbad00d7b1017b918e3719f4d421" title="Bind current thread of current process.">HWLOC_CPUBIND_THREAD</a>),
</pre></div><p>which binds the current thread of the current program (which may be multithreaded).</p>
<dl class="note"><dt><b>Note:</b></dt><dd>To unbind, just call the binding function with either a full cpuset or a cpuset equal to the system cpuset. </dd></dl>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="ga9b2de9a34a18edb39fb272adf9c33622"></a><!-- doxytag: member="hwloc.h::hwloc_cpubind_policy_t" ref="ga9b2de9a34a18edb39fb272adf9c33622" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="a00036.html#ga9b2de9a34a18edb39fb272adf9c33622">hwloc_cpubind_policy_t</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Process/Thread binding policy. </p>
<p>These flags can be used to refine the binding policy.</p>
<p>The default (0) is to bind the current process, assumed to be mono-thread, in a non-strict way. This is the most portable way to bind as all OSes usually provide it. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga9b2de9a34a18edb39fb272adf9c33622a2e0dd0128dac6b03408c7dd170477fdc"></a><!-- doxytag: member="HWLOC_CPUBIND_PROCESS" ref="gga9b2de9a34a18edb39fb272adf9c33622a2e0dd0128dac6b03408c7dd170477fdc" args="" -->HWLOC_CPUBIND_PROCESS</em>&nbsp;</td><td>
<p>Bind all threads of the current multithreaded process. This may not be supported by some OSes (e.g. Linux). </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga9b2de9a34a18edb39fb272adf9c33622af1b6bbad00d7b1017b918e3719f4d421"></a><!-- doxytag: member="HWLOC_CPUBIND_THREAD" ref="gga9b2de9a34a18edb39fb272adf9c33622af1b6bbad00d7b1017b918e3719f4d421" args="" -->HWLOC_CPUBIND_THREAD</em>&nbsp;</td><td>
<p>Bind current thread of current process. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga9b2de9a34a18edb39fb272adf9c33622a679a7e0f0c7ee06b123565f90d98e7fa"></a><!-- doxytag: member="HWLOC_CPUBIND_STRICT" ref="gga9b2de9a34a18edb39fb272adf9c33622a679a7e0f0c7ee06b123565f90d98e7fa" args="" -->HWLOC_CPUBIND_STRICT</em>&nbsp;</td><td>
<p>Request for strict binding from the OS. </p>
<p>By default, when the designated CPUs are all busy while other CPUs are idle, OSes may execute the thread/process on those other CPUs instead of the designated CPUs, to let them progress anyway. Strict binding means that the thread/process will _never_ execute on other cpus than the designated CPUs, even when those are busy with other tasks and other CPUs are idle.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Depending on OSes and implementations, strict binding may not be possible (implementation reason) or not allowed (administrative reasons), and the function will fail in that case.</dd></dl>
<p>When retrieving the binding of a process, this flag checks whether all its threads actually have the same binding. If the flag is not given, the binding of each thread will be accumulated.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This flag is meaningless when retrieving the binding of a thread. </dd></dl>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga4451dffe0bb068f597ec55403e8ed5b8"></a><!-- doxytag: member="helper.h::hwloc_get_type_or_above_depth" ref="ga4451dffe0bb068f597ec55403e8ed5b8" args="(hwloc_topology_t topology, hwloc_obj_type_t type)" -->
<a class="anchor" id="ga55427f8da8073ae16d0bab11f8137f1c"></a><!-- doxytag: member="hwloc.h::hwloc_get_cpubind" ref="ga55427f8da8073ae16d0bab11f8137f1c" args="(hwloc_topology_t topology, hwloc_cpuset_t set, int policy)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline int __hwloc_attribute_pure hwloc_get_type_or_above_depth </td>
<td class="memname">HWLOC_DECLSPEC int hwloc_get_cpubind </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>policy</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the depth of objects of type <code>type</code> or above. </p>
<p>If no object of this type is present on the underlying architecture, the function returns the depth of the first "present" object typically containing <code>type</code>. </p>
<p>Get current process or thread binding. </p>
</div>
</div>
<a class="anchor" id="gaf324fdd1fcb895c32cc6540c92e9245a"></a><!-- doxytag: member="helper.h::hwloc_get_type_or_below_depth" ref="gaf324fdd1fcb895c32cc6540c92e9245a" args="(hwloc_topology_t topology, hwloc_obj_type_t type)" -->
<a class="anchor" id="ga02141a2049739d63a5fa7a172d301f1c"></a><!-- doxytag: member="hwloc.h::hwloc_get_proc_cpubind" ref="ga02141a2049739d63a5fa7a172d301f1c" args="(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int policy)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline int __hwloc_attribute_pure hwloc_get_type_or_below_depth </td>
<td class="memname">HWLOC_DECLSPEC int hwloc_get_proc_cpubind </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
<td class="paramtype">hwloc_pid_t&nbsp;</td>
<td class="paramname"> <em>pid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>policy</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the depth of objects of type <code>type</code> or below. </p>
<p>If no object of this type is present on the underlying architecture, the function returns the depth of the first "present" object typically found inside <code>type</code>. </p>
<p>Get the current binding of process <code>pid</code>. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>hwloc_pid_t is pid_t on unix platforms, and HANDLE on native Windows platforms</dd>
<dd>
HWLOC_CPUBIND_THREAD can not be used in <code>policy</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="ga5f265c78ea768372bae8e5d89d628c22"></a><!-- doxytag: member="hwloc.h::hwloc_get_thread_cpubind" ref="ga5f265c78ea768372bae8e5d89d628c22" args="(hwloc_topology_t topology, hwloc_thread_t tid, hwloc_cpuset_t set, int policy)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_get_thread_cpubind </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hwloc_thread_t&nbsp;</td>
<td class="paramname"> <em>tid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>policy</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the current binding of thread <code>tid</code>. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>hwloc_thread_t is pthread_t on unix platforms, and HANDLE on native Windows platforms</dd>
<dd>
HWLOC_CPUBIND_PROCESS can not be used in <code>policy</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="ga42f02baaf7dc0c0f5a6bbeca731fd144"></a><!-- doxytag: member="hwloc.h::hwloc_set_cpubind" ref="ga42f02baaf7dc0c0f5a6bbeca731fd144" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, int policy)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_set_cpubind </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>policy</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Bind current process or thread on cpus given in cpuset <code>set</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>ENOSYS if the action is not supported </dd>
<dd>
EXDEV if the binding cannot be enforced </dd></dl>
</div>
</div>
<a class="anchor" id="gac349497da8f4f738bad51b2861461dc3"></a><!-- doxytag: member="hwloc.h::hwloc_set_proc_cpubind" ref="gac349497da8f4f738bad51b2861461dc3" args="(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_cpuset_t set, int policy)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_set_proc_cpubind </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hwloc_pid_t&nbsp;</td>
<td class="paramname"> <em>pid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>policy</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Bind a process <code>pid</code> on cpus given in cpuset <code>set</code>. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>hwloc_pid_t is pid_t on unix platforms, and HANDLE on native Windows platforms</dd>
<dd>
HWLOC_CPUBIND_THREAD can not be used in <code>policy</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="ga2be36e3ab9c9076ab5cca8fd57ae0dcf"></a><!-- doxytag: member="hwloc.h::hwloc_set_thread_cpubind" ref="ga2be36e3ab9c9076ab5cca8fd57ae0dcf" args="(hwloc_topology_t topology, hwloc_thread_t tid, hwloc_const_cpuset_t set, int policy)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_set_thread_cpubind </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">hwloc_thread_t&nbsp;</td>
<td class="paramname"> <em>tid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>policy</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Bind a thread <code>tid</code> on cpus given in cpuset <code>set</code>. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>hwloc_thread_t is pthread_t on unix platforms, and HANDLE on native Windows platforms</dd>
<dd>
HWLOC_CPUBIND_PROCESS can not be used in <code>policy</code>. </dd></dl>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Basic Traversal Helpers</title>
<title>Hardware Locality (hwloc): Object Type Helpers</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,198 +20,31 @@
</div>
</div>
<div class="contents">
<h1>Basic Traversal Helpers</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Object Type Helpers</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6">hwloc_get_root_obj</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the top-object of the topology-tree. <a href="#ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_deprecated&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#ga2cd3460755de499e238c95ba18b323b8">hwloc_get_system_obj</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#ga9cd80f27afd312569715528f3bc5c740">hwloc_get_ancestor_obj_by_depth</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, unsigned depth, <a class="el" href="a00010.html">hwloc_obj_t</a> obj)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the ancestor object of <code>obj</code> at depth <code>depth</code>. <a href="#ga9cd80f27afd312569715528f3bc5c740"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#gada9d7486d8d7a45d05aa5f2ce70c7ab1">hwloc_get_ancestor_obj_by_type</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, <a class="el" href="a00010.html">hwloc_obj_t</a> obj)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the ancestor object of <code>obj</code> with type <code>type</code>. <a href="#gada9d7486d8d7a45d05aa5f2ce70c7ab1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#ga5755cecb9124c5181642ac84dc5bc554">hwloc_get_next_obj_by_depth</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned depth, <a class="el" href="a00010.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the next object at depth <code>depth</code>. <a href="#ga5755cecb9124c5181642ac84dc5bc554"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#gad011fce572551516267de3c57241a326">hwloc_get_next_obj_by_type</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, <a class="el" href="a00010.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the next object of type <code>type</code>. <a href="#gad011fce572551516267de3c57241a326"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#ga8e939dd36f60110b8ce408f4b294a085">hwloc_get_pu_obj_by_os_index</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned os_index)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the object of type <a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a> with <code>os_index</code>. <a href="#ga8e939dd36f60110b8ce408f4b294a085"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#ga4b5f5ddd9bd1a4443a27453423829b06">hwloc_get_next_child</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00010.html">hwloc_obj_t</a> parent, <a class="el" href="a00010.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the next child. <a href="#ga4b5f5ddd9bd1a4443a27453423829b06"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#gac8fd7795061352cfb7013aee2462c592">hwloc_get_common_ancestor_obj</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00010.html">hwloc_obj_t</a> obj1, <a class="el" href="a00010.html">hwloc_obj_t</a> obj2)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the common parent object to objects lvl1 and lvl2. <a href="#gac8fd7795061352cfb7013aee2462c592"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline int <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#gadcdc48e34ad3f2fb90c7cc6c5950f06f">hwloc_obj_is_in_subtree</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00010.html">hwloc_obj_t</a> obj, <a class="el" href="a00010.html">hwloc_obj_t</a> subtree_root)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if _obj_ is inside the subtree beginning with <code>subtree_root</code>. <a href="#gadcdc48e34ad3f2fb90c7cc6c5950f06f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline int <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#ga0ffafb4c0ae13b9a7541ca820ca34883">hwloc_get_type_or_below_depth</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the depth of objects of type <code>type</code> or below. <a href="#ga0ffafb4c0ae13b9a7541ca820ca34883"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline int <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00037.html#ga24b9cd5917fcebac6e45ae38d0a6cda4">hwloc_get_type_or_above_depth</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the depth of objects of type <code>type</code> or above. <a href="#ga24b9cd5917fcebac6e45ae38d0a6cda4"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga9cd80f27afd312569715528f3bc5c740"></a><!-- doxytag: member="helper.h::hwloc_get_ancestor_obj_by_depth" ref="ga9cd80f27afd312569715528f3bc5c740" args="(hwloc_topology_t topology __hwloc_attribute_unused, unsigned depth, hwloc_obj_t obj)" -->
<a class="anchor" id="ga24b9cd5917fcebac6e45ae38d0a6cda4"></a><!-- doxytag: member="helper.h::hwloc_get_type_or_above_depth" ref="ga24b9cd5917fcebac6e45ae38d0a6cda4" args="(hwloc_topology_t topology, hwloc_obj_type_t type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_ancestor_obj_by_depth </td>
<td class="memname">static __hwloc_inline int __hwloc_attribute_pure hwloc_get_type_or_above_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the ancestor object of <code>obj</code> at depth <code>depth</code>. </p>
</div>
</div>
<a class="anchor" id="gada9d7486d8d7a45d05aa5f2ce70c7ab1"></a><!-- doxytag: member="helper.h::hwloc_get_ancestor_obj_by_type" ref="gada9d7486d8d7a45d05aa5f2ce70c7ab1" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_obj_type_t type, hwloc_obj_t obj)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_ancestor_obj_by_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the ancestor object of <code>obj</code> with type <code>type</code>. </p>
</div>
</div>
<a class="anchor" id="gac8fd7795061352cfb7013aee2462c592"></a><!-- doxytag: member="helper.h::hwloc_get_common_ancestor_obj" ref="gac8fd7795061352cfb7013aee2462c592" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_obj_t obj1, hwloc_obj_t obj2)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_common_ancestor_obj </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj2</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the common parent object to objects lvl1 and lvl2. </p>
</div>
</div>
<a class="anchor" id="ga4b5f5ddd9bd1a4443a27453423829b06"></a><!-- doxytag: member="helper.h::hwloc_get_next_child" ref="ga4b5f5ddd9bd1a4443a27453423829b06" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_obj_t parent, hwloc_obj_t prev)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> hwloc_get_next_child </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>parent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>prev</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the next child. </p>
<p>If <code>prev</code> is <code>NULL</code>, return the first child. </p>
</div>
</div>
<a class="anchor" id="ga5755cecb9124c5181642ac84dc5bc554"></a><!-- doxytag: member="helper.h::hwloc_get_next_obj_by_depth" ref="ga5755cecb9124c5181642ac84dc5bc554" args="(hwloc_topology_t topology, unsigned depth, hwloc_obj_t prev)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> hwloc_get_next_obj_by_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>prev</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -222,32 +55,26 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Returns the next object at depth <code>depth</code>. </p>
<p>If <code>prev</code> is <code>NULL</code>, return the first object at depth <code>depth</code>. </p>
<p>Returns the depth of objects of type <code>type</code> or above. </p>
<p>If no object of this type is present on the underlying architecture, the function returns the depth of the first "present" object typically containing <code>type</code>. </p>
</div>
</div>
<a class="anchor" id="gad011fce572551516267de3c57241a326"></a><!-- doxytag: member="helper.h::hwloc_get_next_obj_by_type" ref="gad011fce572551516267de3c57241a326" args="(hwloc_topology_t topology, hwloc_obj_type_t type, hwloc_obj_t prev)" -->
<a class="anchor" id="ga0ffafb4c0ae13b9a7541ca820ca34883"></a><!-- doxytag: member="helper.h::hwloc_get_type_or_below_depth" ref="ga0ffafb4c0ae13b9a7541ca820ca34883" args="(hwloc_topology_t topology, hwloc_obj_type_t type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> hwloc_get_next_obj_by_type </td>
<td class="memname">static __hwloc_inline int __hwloc_attribute_pure hwloc_get_type_or_below_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>prev</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -258,112 +85,8 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Returns the next object of type <code>type</code>. </p>
<p>If <code>prev</code> is <code>NULL</code>, return the first object at type <code>type</code>. If there are multiple or no depth for given type, return <code>NULL</code> and let the caller fallback to <a class="el" href="a00037.html#ga5755cecb9124c5181642ac84dc5bc554" title="Returns the next object at depth depth.">hwloc_get_next_obj_by_depth()</a>. </p>
</div>
</div>
<a class="anchor" id="ga8e939dd36f60110b8ce408f4b294a085"></a><!-- doxytag: member="helper.h::hwloc_get_pu_obj_by_os_index" ref="ga8e939dd36f60110b8ce408f4b294a085" args="(hwloc_topology_t topology, unsigned os_index)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_pu_obj_by_os_index </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>os_index</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the object of type <a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a> with <code>os_index</code>. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The <code>os_index</code> field of object should most of the times only be used for pretty-printing purpose. Type <a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a> is the only case where <code>os_index</code> could actually be useful, when manually binding to processors. However, using CPU sets to hide this complexity should often be preferred. </dd></dl>
</div>
</div>
<a class="anchor" id="ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6"></a><!-- doxytag: member="helper.h::hwloc_get_root_obj" ref="ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6" args="(hwloc_topology_t topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_root_obj </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the top-object of the topology-tree. </p>
<p>Its type is typically <a class="el" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a3f4e83ffc4a259354959ae8a9eaa2a80" title="Machine. The typical root object type. A set of processors and memory with cache...">HWLOC_OBJ_MACHINE</a> but it could be different for complex topologies. This function replaces the old deprecated <a class="el" href="a00037.html#ga2cd3460755de499e238c95ba18b323b8">hwloc_get_system_obj()</a>. </p>
</div>
</div>
<a class="anchor" id="ga2cd3460755de499e238c95ba18b323b8"></a><!-- doxytag: member="helper.h::hwloc_get_system_obj" ref="ga2cd3460755de499e238c95ba18b323b8" args="(hwloc_topology_t topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_deprecated hwloc_get_system_obj </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="gadcdc48e34ad3f2fb90c7cc6c5950f06f"></a><!-- doxytag: member="helper.h::hwloc_obj_is_in_subtree" ref="gadcdc48e34ad3f2fb90c7cc6c5950f06f" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_obj_t obj, hwloc_obj_t subtree_root)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline int __hwloc_attribute_pure hwloc_obj_is_in_subtree </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>subtree_root</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns true if _obj_ is inside the subtree beginning with <code>subtree_root</code>. </p>
<p>Returns the depth of objects of type <code>type</code> or below. </p>
<p>If no object of this type is present on the underlying architecture, the function returns the depth of the first "present" object typically found inside <code>type</code>. </p>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Finding Objects Inside a CPU set</title>
<title>Hardware Locality (hwloc): Basic Traversal Helpers</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,189 +20,48 @@
</div>
</div>
<div class="contents">
<h1>Finding Objects Inside a CPU set</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Basic Traversal Helpers</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ga14a384b43da1640e0a4f87252ebab7ce">hwloc_get_first_largest_obj_inside_cpuset</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the first largest object included in the given cpuset <code>set</code>. <a href="#ga14a384b43da1640e0a4f87252ebab7ce"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#gaab04c89623662e63a48ed2cd48eb601c">hwloc_get_largest_objs_inside_cpuset</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <a class="el" href="a00010.html">hwloc_obj_t</a> *__hwloc_restrict objs, int max)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the set of largest objects covering exactly a given cpuset <code>set</code>. <a href="#gaab04c89623662e63a48ed2cd48eb601c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ga0bf3f1e8e58c2a4561dceb2e261a1913">hwloc_get_next_obj_inside_cpuset_by_depth</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, unsigned depth, <a class="el" href="a00010.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the next object at depth <code>depth</code> included in CPU set <code>set</code>. <a href="#ga0bf3f1e8e58c2a4561dceb2e261a1913"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ga0e939b904fa1e255dde8b295e72b4f07">hwloc_get_next_obj_inside_cpuset_by_type</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, <a class="el" href="a00010.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the next object of type <code>type</code> included in CPU set <code>set</code>. <a href="#ga0e939b904fa1e255dde8b295e72b4f07"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ga7be828a425e78d155bd09aba5aaa3d51">hwloc_get_obj_inside_cpuset_by_depth</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, unsigned depth, unsigned idx)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the <code>index</code> -th object at depth <code>depth</code> included in CPU set <code>set</code>. <a href="#ga7be828a425e78d155bd09aba5aaa3d51"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ga1e4f92f59977be6f4d0f6e8219936a17">hwloc_get_obj_inside_cpuset_by_type</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, unsigned idx)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the <code>idx</code> -th object of type <code>type</code> included in CPU set <code>set</code>. <a href="#ga1e4f92f59977be6f4d0f6e8219936a17"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline unsigned <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#gada32f235ce6abb3ed1c7571221c52d89">hwloc_get_nbobjs_inside_cpuset_by_depth</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, unsigned depth)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of objects at depth <code>depth</code> included in CPU set <code>set</code>. <a href="#gada32f235ce6abb3ed1c7571221c52d89"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline int <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ga97c8ff5b2abff365a9833cb4d1740d15">hwloc_get_nbobjs_inside_cpuset_by_type</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of objects of type <code>type</code> included in CPU set <code>set</code>. <a href="#ga97c8ff5b2abff365a9833cb4d1740d15"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ga632edae4a651996895ebde85ea2c1264">hwloc_get_root_obj</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the top-object of the topology-tree. <a href="#ga632edae4a651996895ebde85ea2c1264"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#gafa813c4ff8d610b3e158224a56386b2f">hwloc_get_ancestor_obj_by_depth</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, unsigned depth, <a class="el" href="a00011.html">hwloc_obj_t</a> obj)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the ancestor object of <code>obj</code> at depth <code>depth</code>. <a href="#gafa813c4ff8d610b3e158224a56386b2f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ga20ade151cb33991b4cd960924a830764">hwloc_get_ancestor_obj_by_type</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, <a class="el" href="a00011.html">hwloc_obj_t</a> obj)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the ancestor object of <code>obj</code> with type <code>type</code>. <a href="#ga20ade151cb33991b4cd960924a830764"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#gab7c1dce3f42ece5bfa621e87cf332418">hwloc_get_next_obj_by_depth</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned depth, <a class="el" href="a00011.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the next object at depth <code>depth</code>. <a href="#gab7c1dce3f42ece5bfa621e87cf332418"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ga5f08ceb69375341e73563cfe2e77534e">hwloc_get_next_obj_by_type</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, <a class="el" href="a00011.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the next object of type <code>type</code>. <a href="#ga5f08ceb69375341e73563cfe2e77534e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ga61e00b83e7e0a1a946dc1bb29c49ccba">hwloc_get_pu_obj_by_os_index</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned os_index)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the object of type <a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a> with <code>os_index</code>. <a href="#ga61e00b83e7e0a1a946dc1bb29c49ccba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#gae5ef1af636849f77714e1584ba78cf9c">hwloc_get_next_child</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00011.html">hwloc_obj_t</a> parent, <a class="el" href="a00011.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the next child. <a href="#gae5ef1af636849f77714e1584ba78cf9c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#gac574b7b06d2d937002dd538e08dbd554">hwloc_get_common_ancestor_obj</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00011.html">hwloc_obj_t</a> obj1, <a class="el" href="a00011.html">hwloc_obj_t</a> obj2)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the common parent object to objects lvl1 and lvl2. <a href="#gac574b7b06d2d937002dd538e08dbd554"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline int <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00038.html#ga38d9bd3a7566d0e6b0ab95d652557707">hwloc_obj_is_in_subtree</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00011.html">hwloc_obj_t</a> obj, <a class="el" href="a00011.html">hwloc_obj_t</a> subtree_root)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if _obj_ is inside the subtree beginning with <code>subtree_root</code>. <a href="#ga38d9bd3a7566d0e6b0ab95d652557707"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga14a384b43da1640e0a4f87252ebab7ce"></a><!-- doxytag: member="helper.h::hwloc_get_first_largest_obj_inside_cpuset" ref="ga14a384b43da1640e0a4f87252ebab7ce" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set)" -->
<a class="anchor" id="gafa813c4ff8d610b3e158224a56386b2f"></a><!-- doxytag: member="helper.h::hwloc_get_ancestor_obj_by_depth" ref="gafa813c4ff8d610b3e158224a56386b2f" args="(hwloc_topology_t topology __hwloc_attribute_unused, unsigned depth, hwloc_obj_t obj)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> hwloc_get_first_largest_obj_inside_cpuset </td>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_ancestor_obj_by_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the first largest object included in the given cpuset <code>set</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the first object that is included in <code>set</code> and whose parent is not.</dd></dl>
<p>This is convenient for iterating over all largest objects within a CPU set by doing a loop getting the first largest object and clearing its CPU set from the remaining CPU set. </p>
</div>
</div>
<a class="anchor" id="gaab04c89623662e63a48ed2cd48eb601c"></a><!-- doxytag: member="helper.h::hwloc_get_largest_objs_inside_cpuset" ref="gaab04c89623662e63a48ed2cd48eb601c" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_t *__hwloc_restrict objs, int max)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_get_largest_objs_inside_cpuset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a> *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>objs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>max</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the set of largest objects covering exactly a given cpuset <code>set</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of objects returned in <code>objs</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="gada32f235ce6abb3ed1c7571221c52d89"></a><!-- doxytag: member="helper.h::hwloc_get_nbobjs_inside_cpuset_by_depth" ref="gada32f235ce6abb3ed1c7571221c52d89" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline unsigned __hwloc_attribute_pure hwloc_get_nbobjs_inside_cpuset_by_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the number of objects at depth <code>depth</code> included in CPU set <code>set</code>. </p>
</div>
</div>
<a class="anchor" id="ga97c8ff5b2abff365a9833cb4d1740d15"></a><!-- doxytag: member="helper.h::hwloc_get_nbobjs_inside_cpuset_by_type" ref="ga97c8ff5b2abff365a9833cb4d1740d15" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline int __hwloc_attribute_pure hwloc_get_nbobjs_inside_cpuset_by_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the number of objects of type <code>type</code> included in CPU set <code>set</code>. </p>
<p>If no object for that type exists inside CPU set <code>set</code>, 0 is returned. If there are several levels with objects of that type inside CPU set <code>set</code>, -1 is returned. </p>
</div>
</div>
<a class="anchor" id="ga0bf3f1e8e58c2a4561dceb2e261a1913"></a><!-- doxytag: member="helper.h::hwloc_get_next_obj_inside_cpuset_by_depth" ref="ga0bf3f1e8e58c2a4561dceb2e261a1913" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth, hwloc_obj_t prev)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> hwloc_get_next_obj_inside_cpuset_by_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
@ -213,7 +72,112 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the ancestor object of <code>obj</code> at depth <code>depth</code>. </p>
</div>
</div>
<a class="anchor" id="ga20ade151cb33991b4cd960924a830764"></a><!-- doxytag: member="helper.h::hwloc_get_ancestor_obj_by_type" ref="ga20ade151cb33991b4cd960924a830764" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_obj_type_t type, hwloc_obj_t obj)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_ancestor_obj_by_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the ancestor object of <code>obj</code> with type <code>type</code>. </p>
</div>
</div>
<a class="anchor" id="gac574b7b06d2d937002dd538e08dbd554"></a><!-- doxytag: member="helper.h::hwloc_get_common_ancestor_obj" ref="gac574b7b06d2d937002dd538e08dbd554" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_obj_t obj1, hwloc_obj_t obj2)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_common_ancestor_obj </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj2</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the common parent object to objects lvl1 and lvl2. </p>
</div>
</div>
<a class="anchor" id="gae5ef1af636849f77714e1584ba78cf9c"></a><!-- doxytag: member="helper.h::hwloc_get_next_child" ref="gae5ef1af636849f77714e1584ba78cf9c" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_obj_t parent, hwloc_obj_t prev)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> hwloc_get_next_child </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>parent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>prev</em></td><td>&nbsp;</td>
</tr>
<tr>
@ -225,37 +189,31 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Return the next object at depth <code>depth</code> included in CPU set <code>set</code>. </p>
<p>If <code>prev</code> is <code>NULL</code>, return the first object at depth <code>depth</code> included in <code>set</code>. The next invokation should pass the previous return value in <code>prev</code> so as to obtain the next object in <code>set</code>. </p>
<p>Return the next child. </p>
<p>If <code>prev</code> is <code>NULL</code>, return the first child. </p>
</div>
</div>
<a class="anchor" id="ga0e939b904fa1e255dde8b295e72b4f07"></a><!-- doxytag: member="helper.h::hwloc_get_next_obj_inside_cpuset_by_type" ref="ga0e939b904fa1e255dde8b295e72b4f07" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, hwloc_obj_t prev)" -->
<a class="anchor" id="gab7c1dce3f42ece5bfa621e87cf332418"></a><!-- doxytag: member="helper.h::hwloc_get_next_obj_by_depth" ref="gab7c1dce3f42ece5bfa621e87cf332418" args="(hwloc_topology_t topology, unsigned depth, hwloc_obj_t prev)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> hwloc_get_next_obj_inside_cpuset_by_type </td>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> hwloc_get_next_obj_by_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>prev</em></td><td>&nbsp;</td>
</tr>
<tr>
@ -267,79 +225,32 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Return the next object of type <code>type</code> included in CPU set <code>set</code>. </p>
<p>If there are multiple or no depth for given type, return <code>NULL</code> and let the caller fallback to <a class="el" href="a00038.html#ga0bf3f1e8e58c2a4561dceb2e261a1913" title="Return the next object at depth depth included in CPU set set.">hwloc_get_next_obj_inside_cpuset_by_depth()</a>. </p>
<p>Returns the next object at depth <code>depth</code>. </p>
<p>If <code>prev</code> is <code>NULL</code>, return the first object at depth <code>depth</code>. </p>
</div>
</div>
<a class="anchor" id="ga7be828a425e78d155bd09aba5aaa3d51"></a><!-- doxytag: member="helper.h::hwloc_get_obj_inside_cpuset_by_depth" ref="ga7be828a425e78d155bd09aba5aaa3d51" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth, unsigned idx)" -->
<a class="anchor" id="ga5f08ceb69375341e73563cfe2e77534e"></a><!-- doxytag: member="helper.h::hwloc_get_next_obj_by_type" ref="ga5f08ceb69375341e73563cfe2e77534e" args="(hwloc_topology_t topology, hwloc_obj_type_t type, hwloc_obj_t prev)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_obj_inside_cpuset_by_depth </td>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> hwloc_get_next_obj_by_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>idx</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the <code>index</code> -th object at depth <code>depth</code> included in CPU set <code>set</code>. </p>
</div>
</div>
<a class="anchor" id="ga1e4f92f59977be6f4d0f6e8219936a17"></a><!-- doxytag: member="helper.h::hwloc_get_obj_inside_cpuset_by_type" ref="ga1e4f92f59977be6f4d0f6e8219936a17" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, unsigned idx)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_obj_inside_cpuset_by_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>idx</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>prev</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -350,8 +261,94 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Return the <code>idx</code> -th object of type <code>type</code> included in CPU set <code>set</code>. </p>
<p>If there are multiple or no depth for given type, return <code>NULL</code> and let the caller fallback to <a class="el" href="a00038.html#ga7be828a425e78d155bd09aba5aaa3d51" title="Return the index -th object at depth depth included in CPU set set.">hwloc_get_obj_inside_cpuset_by_depth()</a>. </p>
<p>Returns the next object of type <code>type</code>. </p>
<p>If <code>prev</code> is <code>NULL</code>, return the first object at type <code>type</code>. If there are multiple or no depth for given type, return <code>NULL</code> and let the caller fallback to <a class="el" href="a00038.html#gab7c1dce3f42ece5bfa621e87cf332418" title="Returns the next object at depth depth.">hwloc_get_next_obj_by_depth()</a>. </p>
</div>
</div>
<a class="anchor" id="ga61e00b83e7e0a1a946dc1bb29c49ccba"></a><!-- doxytag: member="helper.h::hwloc_get_pu_obj_by_os_index" ref="ga61e00b83e7e0a1a946dc1bb29c49ccba" args="(hwloc_topology_t topology, unsigned os_index)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_pu_obj_by_os_index </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>os_index</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the object of type <a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a> with <code>os_index</code>. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The <code>os_index</code> field of object should most of the times only be used for pretty-printing purpose. Type <a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a> is the only case where <code>os_index</code> could actually be useful, when manually binding to processors. However, using CPU sets to hide this complexity should often be preferred. </dd></dl>
</div>
</div>
<a class="anchor" id="ga632edae4a651996895ebde85ea2c1264"></a><!-- doxytag: member="helper.h::hwloc_get_root_obj" ref="ga632edae4a651996895ebde85ea2c1264" args="(hwloc_topology_t topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_root_obj </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the top-object of the topology-tree. </p>
<p>Its type is typically <a class="el" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a3f4e83ffc4a259354959ae8a9eaa2a80" title="Machine. The typical root object type. A set of processors and memory with cache...">HWLOC_OBJ_MACHINE</a> but it could be different for complex topologies. This function replaces the old deprecated hwloc_get_system_obj(). </p>
</div>
</div>
<a class="anchor" id="ga38d9bd3a7566d0e6b0ab95d652557707"></a><!-- doxytag: member="helper.h::hwloc_obj_is_in_subtree" ref="ga38d9bd3a7566d0e6b0ab95d652557707" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_obj_t obj, hwloc_obj_t subtree_root)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline int __hwloc_attribute_pure hwloc_obj_is_in_subtree </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>subtree_root</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns true if _obj_ is inside the subtree beginning with <code>subtree_root</code>. </p>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Finding a single Object covering at least CPU set</title>
<title>Hardware Locality (hwloc): Finding Objects Inside a CPU set</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,66 +20,46 @@
</div>
</div>
<div class="contents">
<h1>Finding a single Object covering at least CPU set</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Finding Objects Inside a CPU set</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00039.html#gaa6d0c687617638dae76058c00832d936">hwloc_get_child_covering_cpuset</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <a class="el" href="a00010.html">hwloc_obj_t</a> parent)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the child covering at least CPU set <code>set</code>. <a href="#gaa6d0c687617638dae76058c00832d936"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00039.html#ga5967ce4cd1c3194b46d57d25598e697a">hwloc_get_obj_covering_cpuset</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the lowest object covering at least CPU set <code>set</code>. <a href="#ga5967ce4cd1c3194b46d57d25598e697a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00039.html#gabcd5fa81a95fa5335950cae092277d5b">hwloc_get_first_largest_obj_inside_cpuset</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the first largest object included in the given cpuset <code>set</code>. <a href="#gabcd5fa81a95fa5335950cae092277d5b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00039.html#gaab04c89623662e63a48ed2cd48eb601c">hwloc_get_largest_objs_inside_cpuset</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <a class="el" href="a00011.html">hwloc_obj_t</a> *__hwloc_restrict objs, int max)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the set of largest objects covering exactly a given cpuset <code>set</code>. <a href="#gaab04c89623662e63a48ed2cd48eb601c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00039.html#ga8af256c2572f16520f95440b884c1bd6">hwloc_get_next_obj_inside_cpuset_by_depth</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, unsigned depth, <a class="el" href="a00011.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the next object at depth <code>depth</code> included in CPU set <code>set</code>. <a href="#ga8af256c2572f16520f95440b884c1bd6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00039.html#ga934e7ecd68b33403e0c0be779d9ed1e6">hwloc_get_next_obj_inside_cpuset_by_type</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, <a class="el" href="a00011.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the next object of type <code>type</code> included in CPU set <code>set</code>. <a href="#ga934e7ecd68b33403e0c0be779d9ed1e6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00039.html#ga20703980008f82379f98f56857611a1a">hwloc_get_obj_inside_cpuset_by_depth</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, unsigned depth, unsigned idx)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the <code>index</code> -th object at depth <code>depth</code> included in CPU set <code>set</code>. <a href="#ga20703980008f82379f98f56857611a1a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00039.html#ga50a80a0021e5843d968c3b97aebaad9b">hwloc_get_obj_inside_cpuset_by_type</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, unsigned idx)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the <code>idx</code> -th object of type <code>type</code> included in CPU set <code>set</code>. <a href="#ga50a80a0021e5843d968c3b97aebaad9b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline unsigned <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00039.html#ga6807db0012369efe19b8d3dcee235493">hwloc_get_nbobjs_inside_cpuset_by_depth</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, unsigned depth)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of objects at depth <code>depth</code> included in CPU set <code>set</code>. <a href="#ga6807db0012369efe19b8d3dcee235493"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline int <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00039.html#ga72c5bc4317a4c3938e32447b769813a0">hwloc_get_nbobjs_inside_cpuset_by_type</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of objects of type <code>type</code> included in CPU set <code>set</code>. <a href="#ga72c5bc4317a4c3938e32447b769813a0"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gaa6d0c687617638dae76058c00832d936"></a><!-- doxytag: member="helper.h::hwloc_get_child_covering_cpuset" ref="gaa6d0c687617638dae76058c00832d936" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_const_cpuset_t set, hwloc_obj_t parent)" -->
<a class="anchor" id="gabcd5fa81a95fa5335950cae092277d5b"></a><!-- doxytag: member="helper.h::hwloc_get_first_largest_obj_inside_cpuset" ref="gabcd5fa81a95fa5335950cae092277d5b" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_child_covering_cpuset </td>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> hwloc_get_first_largest_obj_inside_cpuset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>parent</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the child covering at least CPU set <code>set</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>NULL</code> if no child matches or if <code>set</code> is empty. </dd></dl>
</div>
</div>
<a class="anchor" id="ga5967ce4cd1c3194b46d57d25598e697a"></a><!-- doxytag: member="helper.h::hwloc_get_obj_covering_cpuset" ref="ga5967ce4cd1c3194b46d57d25598e697a" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_obj_covering_cpuset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em></td><td>&nbsp;</td>
</tr>
<tr>
@ -91,8 +71,289 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Get the lowest object covering at least CPU set <code>set</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>NULL</code> if no object matches or if <code>set</code> is empty. </dd></dl>
<p>Get the first largest object included in the given cpuset <code>set</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the first object that is included in <code>set</code> and whose parent is not.</dd></dl>
<p>This is convenient for iterating over all largest objects within a CPU set by doing a loop getting the first largest object and clearing its CPU set from the remaining CPU set. </p>
</div>
</div>
<a class="anchor" id="gaab04c89623662e63a48ed2cd48eb601c"></a><!-- doxytag: member="helper.h::hwloc_get_largest_objs_inside_cpuset" ref="gaab04c89623662e63a48ed2cd48eb601c" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_t *__hwloc_restrict objs, int max)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_get_largest_objs_inside_cpuset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a> *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>objs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>max</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the set of largest objects covering exactly a given cpuset <code>set</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of objects returned in <code>objs</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="ga6807db0012369efe19b8d3dcee235493"></a><!-- doxytag: member="helper.h::hwloc_get_nbobjs_inside_cpuset_by_depth" ref="ga6807db0012369efe19b8d3dcee235493" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline unsigned __hwloc_attribute_pure hwloc_get_nbobjs_inside_cpuset_by_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the number of objects at depth <code>depth</code> included in CPU set <code>set</code>. </p>
</div>
</div>
<a class="anchor" id="ga72c5bc4317a4c3938e32447b769813a0"></a><!-- doxytag: member="helper.h::hwloc_get_nbobjs_inside_cpuset_by_type" ref="ga72c5bc4317a4c3938e32447b769813a0" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline int __hwloc_attribute_pure hwloc_get_nbobjs_inside_cpuset_by_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the number of objects of type <code>type</code> included in CPU set <code>set</code>. </p>
<p>If no object for that type exists inside CPU set <code>set</code>, 0 is returned. If there are several levels with objects of that type inside CPU set <code>set</code>, -1 is returned. </p>
</div>
</div>
<a class="anchor" id="ga8af256c2572f16520f95440b884c1bd6"></a><!-- doxytag: member="helper.h::hwloc_get_next_obj_inside_cpuset_by_depth" ref="ga8af256c2572f16520f95440b884c1bd6" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth, hwloc_obj_t prev)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> hwloc_get_next_obj_inside_cpuset_by_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>prev</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the next object at depth <code>depth</code> included in CPU set <code>set</code>. </p>
<p>If <code>prev</code> is <code>NULL</code>, return the first object at depth <code>depth</code> included in <code>set</code>. The next invokation should pass the previous return value in <code>prev</code> so as to obtain the next object in <code>set</code>. </p>
</div>
</div>
<a class="anchor" id="ga934e7ecd68b33403e0c0be779d9ed1e6"></a><!-- doxytag: member="helper.h::hwloc_get_next_obj_inside_cpuset_by_type" ref="ga934e7ecd68b33403e0c0be779d9ed1e6" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, hwloc_obj_t prev)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> hwloc_get_next_obj_inside_cpuset_by_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>prev</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the next object of type <code>type</code> included in CPU set <code>set</code>. </p>
<p>If there are multiple or no depth for given type, return <code>NULL</code> and let the caller fallback to <a class="el" href="a00039.html#ga8af256c2572f16520f95440b884c1bd6" title="Return the next object at depth depth included in CPU set set.">hwloc_get_next_obj_inside_cpuset_by_depth()</a>. </p>
</div>
</div>
<a class="anchor" id="ga20703980008f82379f98f56857611a1a"></a><!-- doxytag: member="helper.h::hwloc_get_obj_inside_cpuset_by_depth" ref="ga20703980008f82379f98f56857611a1a" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth, unsigned idx)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_obj_inside_cpuset_by_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>idx</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the <code>index</code> -th object at depth <code>depth</code> included in CPU set <code>set</code>. </p>
</div>
</div>
<a class="anchor" id="ga50a80a0021e5843d968c3b97aebaad9b"></a><!-- doxytag: member="helper.h::hwloc_get_obj_inside_cpuset_by_type" ref="ga50a80a0021e5843d968c3b97aebaad9b" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, unsigned idx)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_obj_inside_cpuset_by_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>idx</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the <code>idx</code> -th object of type <code>type</code> included in CPU set <code>set</code>. </p>
<p>If there are multiple or no depth for given type, return <code>NULL</code> and let the caller fallback to <a class="el" href="a00039.html#ga20703980008f82379f98f56857611a1a" title="Return the index -th object at depth depth included in CPU set set.">hwloc_get_obj_inside_cpuset_by_depth()</a>. </p>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Finding a set of similar Objects covering at least a CPU set</title>
<title>Hardware Locality (hwloc): Finding a single Object covering at least CPU set</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,41 +20,39 @@
</div>
</div>
<div class="contents">
<h1>Finding a set of similar Objects covering at least a CPU set</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Finding a single Object covering at least CPU set</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00040.html#ga7668a9bba346a87d12bcc522a12ab27b">hwloc_get_next_obj_covering_cpuset_by_depth</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, unsigned depth, <a class="el" href="a00010.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Iterate through same-depth objects covering at least CPU set <code>set</code>. <a href="#ga7668a9bba346a87d12bcc522a12ab27b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00040.html#gad5d1927258d0297cb064ecda6d038f71">hwloc_get_next_obj_covering_cpuset_by_type</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, <a class="el" href="a00010.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Iterate through same-type objects covering at least CPU set <code>set</code>. <a href="#gad5d1927258d0297cb064ecda6d038f71"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00040.html#gab56b99460194bbcb36016d36d55132a7">hwloc_get_child_covering_cpuset</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <a class="el" href="a00011.html">hwloc_obj_t</a> parent)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the child covering at least CPU set <code>set</code>. <a href="#gab56b99460194bbcb36016d36d55132a7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00040.html#ga2a0de36ea0c3c70fb5f4cba0bb192582">hwloc_get_obj_covering_cpuset</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the lowest object covering at least CPU set <code>set</code>. <a href="#ga2a0de36ea0c3c70fb5f4cba0bb192582"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga7668a9bba346a87d12bcc522a12ab27b"></a><!-- doxytag: member="helper.h::hwloc_get_next_obj_covering_cpuset_by_depth" ref="ga7668a9bba346a87d12bcc522a12ab27b" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth, hwloc_obj_t prev)" -->
<a class="anchor" id="gab56b99460194bbcb36016d36d55132a7"></a><!-- doxytag: member="helper.h::hwloc_get_child_covering_cpuset" ref="gab56b99460194bbcb36016d36d55132a7" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_const_cpuset_t set, hwloc_obj_t parent)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> hwloc_get_next_obj_covering_cpuset_by_depth </td>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_child_covering_cpuset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>prev</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>parent</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -65,38 +63,26 @@
</div>
<div class="memdoc">
<p>Iterate through same-depth objects covering at least CPU set <code>set</code>. </p>
<p>If object <code>prev</code> is <code>NULL</code>, return the first object at depth <code>depth</code> covering at least part of CPU set <code>set</code>. The next invokation should pass the previous return value in <code>prev</code> so as to obtain the next object covering at least another part of <code>set</code>. </p>
<p>Get the child covering at least CPU set <code>set</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>NULL</code> if no child matches or if <code>set</code> is empty. </dd></dl>
</div>
</div>
<a class="anchor" id="gad5d1927258d0297cb064ecda6d038f71"></a><!-- doxytag: member="helper.h::hwloc_get_next_obj_covering_cpuset_by_type" ref="gad5d1927258d0297cb064ecda6d038f71" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, hwloc_obj_t prev)" -->
<a class="anchor" id="ga2a0de36ea0c3c70fb5f4cba0bb192582"></a><!-- doxytag: member="helper.h::hwloc_get_obj_covering_cpuset" ref="ga2a0de36ea0c3c70fb5f4cba0bb192582" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> hwloc_get_next_obj_covering_cpuset_by_type </td>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_obj_covering_cpuset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>prev</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -107,9 +93,8 @@
</div>
<div class="memdoc">
<p>Iterate through same-type objects covering at least CPU set <code>set</code>. </p>
<p>If object <code>prev</code> is <code>NULL</code>, return the first object of type <code>type</code> covering at least part of CPU set <code>set</code>. The next invokation should pass the previous return value in <code>prev</code> so as to obtain the next object of type <code>type</code> covering at least another part of <code>set</code>.</p>
<p>If there are no or multiple depths for type <code>type</code>, <code>NULL</code> is returned. The caller may fallback to <a class="el" href="a00040.html#ga7668a9bba346a87d12bcc522a12ab27b" title="Iterate through same-depth objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_depth()</a> for each depth. </p>
<p>Get the lowest object covering at least CPU set <code>set</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>NULL</code> if no object matches or if <code>set</code> is empty. </dd></dl>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Cache-specific Finding Helpers</title>
<title>Hardware Locality (hwloc): Finding a set of similar Objects covering at least a CPU set</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,61 +20,41 @@
</div>
</div>
<div class="contents">
<h1>Cache-specific Finding Helpers</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Finding a set of similar Objects covering at least a CPU set</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00041.html#ga4a4388252d02388ff2803e5975af4005">hwloc_get_cache_covering_cpuset</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the first cache covering a cpuset <code>set</code>. <a href="#ga4a4388252d02388ff2803e5975af4005"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00041.html#ga2d7258b849d9def604e8967b713dd5ff">hwloc_get_shared_cache_covering_obj</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00010.html">hwloc_obj_t</a> obj)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the first cache shared between an object and somebody else. <a href="#ga2d7258b849d9def604e8967b713dd5ff"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00041.html#ga2f9a4ec15e9cfae8c21501257a51ce5b">hwloc_get_next_obj_covering_cpuset_by_depth</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, unsigned depth, <a class="el" href="a00011.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Iterate through same-depth objects covering at least CPU set <code>set</code>. <a href="#ga2f9a4ec15e9cfae8c21501257a51ce5b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00041.html#ga5915ea30f326676b3a4cfff371ce04d1">hwloc_get_next_obj_covering_cpuset_by_type</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type, <a class="el" href="a00011.html">hwloc_obj_t</a> prev)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Iterate through same-type objects covering at least CPU set <code>set</code>. <a href="#ga5915ea30f326676b3a4cfff371ce04d1"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga4a4388252d02388ff2803e5975af4005"></a><!-- doxytag: member="helper.h::hwloc_get_cache_covering_cpuset" ref="ga4a4388252d02388ff2803e5975af4005" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set)" -->
<a class="anchor" id="ga2f9a4ec15e9cfae8c21501257a51ce5b"></a><!-- doxytag: member="helper.h::hwloc_get_next_obj_covering_cpuset_by_depth" ref="ga2f9a4ec15e9cfae8c21501257a51ce5b" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, unsigned depth, hwloc_obj_t prev)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_cache_covering_cpuset </td>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> hwloc_get_next_obj_covering_cpuset_by_depth </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the first cache covering a cpuset <code>set</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>NULL</code> if no cache matches </dd></dl>
</div>
</div>
<a class="anchor" id="ga2d7258b849d9def604e8967b713dd5ff"></a><!-- doxytag: member="helper.h::hwloc_get_shared_cache_covering_obj" ref="ga2d7258b849d9def604e8967b713dd5ff" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_obj_t obj)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_shared_cache_covering_obj </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em></td><td>&nbsp;</td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>depth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>prev</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -85,8 +65,51 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Get the first cache shared between an object and somebody else. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>NULL</code> if no cache matches </dd></dl>
<p>Iterate through same-depth objects covering at least CPU set <code>set</code>. </p>
<p>If object <code>prev</code> is <code>NULL</code>, return the first object at depth <code>depth</code> covering at least part of CPU set <code>set</code>. The next invokation should pass the previous return value in <code>prev</code> so as to obtain the next object covering at least another part of <code>set</code>. </p>
</div>
</div>
<a class="anchor" id="ga5915ea30f326676b3a4cfff371ce04d1"></a><!-- doxytag: member="helper.h::hwloc_get_next_obj_covering_cpuset_by_type" ref="ga5915ea30f326676b3a4cfff371ce04d1" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set, hwloc_obj_type_t type, hwloc_obj_t prev)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> hwloc_get_next_obj_covering_cpuset_by_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>prev</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Iterate through same-type objects covering at least CPU set <code>set</code>. </p>
<p>If object <code>prev</code> is <code>NULL</code>, return the first object of type <code>type</code> covering at least part of CPU set <code>set</code>. The next invokation should pass the previous return value in <code>prev</code> so as to obtain the next object of type <code>type</code> covering at least another part of <code>set</code>.</p>
<p>If there are no or multiple depths for type <code>type</code>, <code>NULL</code> is returned. The caller may fallback to <a class="el" href="a00041.html#ga2f9a4ec15e9cfae8c21501257a51ce5b" title="Iterate through same-depth objects covering at least CPU set set.">hwloc_get_next_obj_covering_cpuset_by_depth()</a> for each depth. </p>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Advanced Traversal Helpers</title>
<title>Hardware Locality (hwloc): Cache-specific Finding Helpers</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,88 +20,33 @@
</div>
</div>
<div class="contents">
<h1>Advanced Traversal Helpers</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Cache-specific Finding Helpers</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#ga26c2ac4f25b1ed293249c88e232f1bea">hwloc_get_closest_objs</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00010.html">hwloc_obj_t</a> src, <a class="el" href="a00010.html">hwloc_obj_t</a> *__hwloc_restrict objs, unsigned max)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Do a depth-first traversal of the topology to find and sort. <a href="#ga26c2ac4f25b1ed293249c88e232f1bea"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#ga80af44c7616bd27eb15949543e12cc9c">hwloc_get_obj_below_by_type</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type1, unsigned idx1, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type2, unsigned idx2)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find an object below another object, both specified by types and indexes. <a href="#ga80af44c7616bd27eb15949543e12cc9c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#ga9af0c03238ebcd4b0e174656890a67dc">hwloc_get_obj_below_array_by_type</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, int nr, <a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> *typev, unsigned *idxv)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find an object below a chain of objects specified by types and indexes. <a href="#ga9af0c03238ebcd4b0e174656890a67dc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#gae744419648117cbd613a038074aa0627">hwloc_get_cache_covering_cpuset</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the first cache covering a cpuset <code>set</code>. <a href="#gae744419648117cbd613a038074aa0627"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00042.html#ga75e961873d4b976ab10bc4739248c96d">hwloc_get_shared_cache_covering_obj</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00011.html">hwloc_obj_t</a> obj)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the first cache shared between an object and somebody else. <a href="#ga75e961873d4b976ab10bc4739248c96d"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga26c2ac4f25b1ed293249c88e232f1bea"></a><!-- doxytag: member="helper.h::hwloc_get_closest_objs" ref="ga26c2ac4f25b1ed293249c88e232f1bea" args="(hwloc_topology_t topology, hwloc_obj_t src, hwloc_obj_t *__hwloc_restrict objs, unsigned max)" -->
<a class="anchor" id="gae744419648117cbd613a038074aa0627"></a><!-- doxytag: member="helper.h::hwloc_get_cache_covering_cpuset" ref="gae744419648117cbd613a038074aa0627" args="(hwloc_topology_t topology, hwloc_const_cpuset_t set)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC unsigned hwloc_get_closest_objs </td>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_cache_covering_cpuset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>src</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a> *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>objs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>max</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Do a depth-first traversal of the topology to find and sort. </p>
<p>all objects that are at the same depth than <code>src</code>. Report in <code>objs</code> up to <code>max</code> physically closest ones to <code>src</code>.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of objects returned in <code>objs</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="ga9af0c03238ebcd4b0e174656890a67dc"></a><!-- doxytag: member="helper.h::hwloc_get_obj_below_array_by_type" ref="ga9af0c03238ebcd4b0e174656890a67dc" args="(hwloc_topology_t topology, int nr, hwloc_obj_type_t *typev, unsigned *idxv)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_obj_below_array_by_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>nr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> *&nbsp;</td>
<td class="paramname"> <em>typev</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned *&nbsp;</td>
<td class="paramname"> <em>idxv</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -112,47 +57,26 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Find an object below a chain of objects specified by types and indexes. </p>
<p>This is a generalized version of <a class="el" href="a00042.html#ga80af44c7616bd27eb15949543e12cc9c" title="Find an object below another object, both specified by types and indexes.">hwloc_get_obj_below_by_type()</a>.</p>
<p>Arrays <code>typev</code> and <code>idxv</code> must contain <code>nr</code> types and indexes.</p>
<p>Start from the top system object and walk the arrays <code>typev</code> and <code>idxv</code>. For each type and index couple in the arrays, look under the previously found object to find the index-th object of the given type. Indexes are specified within the parent, not withing the entire system.</p>
<p>For instance, if nr is 3, typev contains NODE, SOCKET and CORE, and idxv contains 0, 1 and 2, return the third core object below the second socket below the first NUMA node. </p>
<p>Get the first cache covering a cpuset <code>set</code>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>NULL</code> if no cache matches </dd></dl>
</div>
</div>
<a class="anchor" id="ga80af44c7616bd27eb15949543e12cc9c"></a><!-- doxytag: member="helper.h::hwloc_get_obj_below_by_type" ref="ga80af44c7616bd27eb15949543e12cc9c" args="(hwloc_topology_t topology, hwloc_obj_type_t type1, unsigned idx1, hwloc_obj_type_t type2, unsigned idx2)" -->
<a class="anchor" id="ga75e961873d4b976ab10bc4739248c96d"></a><!-- doxytag: member="helper.h::hwloc_get_shared_cache_covering_obj" ref="ga75e961873d4b976ab10bc4739248c96d" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_obj_t obj)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00010.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_obj_below_by_type </td>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_shared_cache_covering_obj </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>idx1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00027.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>idx2</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>obj</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -163,9 +87,8 @@ __hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a cla
</div>
<div class="memdoc">
<p>Find an object below another object, both specified by types and indexes. </p>
<p>Start from the top system object and find object of type <code>type1</code> and index <code>idx1</code>. Then look below this object and find another object of type <code>type2</code> and index <code>idx2</code>. Indexes are specified within the parent, not withing the entire system.</p>
<p>For instance, if type1 is SOCKET, idx1 is 2, type2 is CORE and idx2 is 3, return the fourth core object below the third socket. </p>
<p>Get the first cache shared between an object and somebody else. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>NULL</code> if no cache matches </dd></dl>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Binding Helpers</title>
<title>Hardware Locality (hwloc): Advanced Traversal Helpers</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,39 +20,90 @@
</div>
</div>
<div class="contents">
<h1>Binding Helpers</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Advanced Traversal Helpers</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00043.html#gadbea5d9e892dfb5f1fcacd00ba14def9">hwloc_distribute</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00010.html">hwloc_obj_t</a> root, <a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> *cpuset, unsigned n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Distribute <code>n</code> items over the topology under <code>root</code>. <a href="#gadbea5d9e892dfb5f1fcacd00ba14def9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00043.html#ga26c2ac4f25b1ed293249c88e232f1bea">hwloc_get_closest_objs</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00011.html">hwloc_obj_t</a> src, <a class="el" href="a00011.html">hwloc_obj_t</a> *__hwloc_restrict objs, unsigned max)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Do a depth-first traversal of the topology to find and sort. <a href="#ga26c2ac4f25b1ed293249c88e232f1bea"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00043.html#ga3d32c128aa36b5c9d56f6bf9e70d0e78">hwloc_get_obj_below_by_type</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type1, unsigned idx1, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> type2, unsigned idx2)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find an object below another object, both specified by types and indexes. <a href="#ga3d32c128aa36b5c9d56f6bf9e70d0e78"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline <br class="typebreak"/>
<a class="el" href="a00011.html">hwloc_obj_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00043.html#ga340bb7021204078c30382ea77d38bde9">hwloc_get_obj_below_array_by_type</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, int nr, <a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> *typev, unsigned *idxv)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find an object below a chain of objects specified by types and indexes. <a href="#ga340bb7021204078c30382ea77d38bde9"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gadbea5d9e892dfb5f1fcacd00ba14def9"></a><!-- doxytag: member="helper.h::hwloc_distribute" ref="gadbea5d9e892dfb5f1fcacd00ba14def9" args="(hwloc_topology_t topology, hwloc_obj_t root, hwloc_cpuset_t *cpuset, unsigned n)" -->
<a class="anchor" id="ga26c2ac4f25b1ed293249c88e232f1bea"></a><!-- doxytag: member="helper.h::hwloc_get_closest_objs" ref="ga26c2ac4f25b1ed293249c88e232f1bea" args="(hwloc_topology_t topology, hwloc_obj_t src, hwloc_obj_t *__hwloc_restrict objs, unsigned max)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline void hwloc_distribute </td>
<td class="memname">HWLOC_DECLSPEC unsigned hwloc_get_closest_objs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00010.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>root</em>, </td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>src</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> *&nbsp;</td>
<td class="paramname"> <em>cpuset</em>, </td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a> *__hwloc_restrict&nbsp;</td>
<td class="paramname"> <em>objs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>n</em></td><td>&nbsp;</td>
<td class="paramname"> <em>max</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Do a depth-first traversal of the topology to find and sort. </p>
<p>all objects that are at the same depth than <code>src</code>. Report in <code>objs</code> up to <code>max</code> physically closest ones to <code>src</code>.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of objects returned in <code>objs</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="ga340bb7021204078c30382ea77d38bde9"></a><!-- doxytag: member="helper.h::hwloc_get_obj_below_array_by_type" ref="ga340bb7021204078c30382ea77d38bde9" args="(hwloc_topology_t topology, int nr, hwloc_obj_type_t *typev, unsigned *idxv)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_obj_below_array_by_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>nr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a> *&nbsp;</td>
<td class="paramname"> <em>typev</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned *&nbsp;</td>
<td class="paramname"> <em>idxv</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -63,10 +114,60 @@
</div>
<div class="memdoc">
<p>Distribute <code>n</code> items over the topology under <code>root</code>. </p>
<p>Array <code>cpuset</code> will be filled with <code>n</code> cpusets distributed linearly over the topology under <code>root</code> .</p>
<p>This is typically useful when an application wants to distribute <code>n</code> threads over a machine, giving each of them as much private cache as possible and keeping them locally in number order.</p>
<p>The caller may typically want to also call <a class="el" href="a00045.html#gace7ad3d2a71d9884e7a28311228931af" title="Keep a single CPU among those set in CPU set set.">hwloc_cpuset_singlify()</a> before binding a thread so that it does not move at all. </p>
<p>Find an object below a chain of objects specified by types and indexes. </p>
<p>This is a generalized version of <a class="el" href="a00043.html#ga3d32c128aa36b5c9d56f6bf9e70d0e78" title="Find an object below another object, both specified by types and indexes.">hwloc_get_obj_below_by_type()</a>.</p>
<p>Arrays <code>typev</code> and <code>idxv</code> must contain <code>nr</code> types and indexes.</p>
<p>Start from the top system object and walk the arrays <code>typev</code> and <code>idxv</code>. For each type and index couple in the arrays, look under the previously found object to find the index-th object of the given type. Indexes are specified within the parent, not withing the entire system.</p>
<p>For instance, if nr is 3, typev contains NODE, SOCKET and CORE, and idxv contains 0, 1 and 2, return the third core object below the second socket below the first NUMA node. </p>
</div>
</div>
<a class="anchor" id="ga3d32c128aa36b5c9d56f6bf9e70d0e78"></a><!-- doxytag: member="helper.h::hwloc_get_obj_below_by_type" ref="ga3d32c128aa36b5c9d56f6bf9e70d0e78" args="(hwloc_topology_t topology, hwloc_obj_type_t type1, unsigned idx1, hwloc_obj_type_t type2, unsigned idx2)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline <a class="el" href="a00011.html">hwloc_obj_t</a> __hwloc_attribute_pure hwloc_get_obj_below_by_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>idx1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00028.html#gacd37bb612667dc437d66bfb175a8dc55">hwloc_obj_type_t</a>&nbsp;</td>
<td class="paramname"> <em>type2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>idx2</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Find an object below another object, both specified by types and indexes. </p>
<p>Start from the top system object and find object of type <code>type1</code> and index <code>idx1</code>. Then look below this object and find another object of type <code>type2</code> and index <code>idx2</code>. Indexes are specified within the parent, not withing the entire system.</p>
<p>For instance, if type1 is SOCKET, idx1 is 2, type2 is CORE and idx2 is 3, return the fourth core object below the third socket. </p>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Cpuset Helpers</title>
<title>Hardware Locality (hwloc): Binding Helpers</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,101 +20,53 @@
</div>
</div>
<div class="contents">
<h1>Cpuset Helpers</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Binding Helpers</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <br class="typebreak"/>
<a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00044.html#ga0361003cb1e41f6f3e9fc485135a0950">hwloc_topology_get_complete_cpuset</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <br class="typebreak"/>
<a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00044.html#gaa1305cd39c6afd68652f2c6e68759381">hwloc_topology_get_topology_cpuset</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <br class="typebreak"/>
<a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00044.html#gac3626396192ce01ad6a4811d9d29306b">hwloc_topology_get_online_cpuset</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get online CPU set. <a href="#gac3626396192ce01ad6a4811d9d29306b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline <br class="typebreak"/>
<a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> <br class="typebreak"/>
__hwloc_attribute_pure&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00044.html#ga3374bb25a01c5cd447b097eaa6f77c6f">hwloc_topology_get_allowed_cpuset</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get allowed CPU set. <a href="#ga3374bb25a01c5cd447b097eaa6f77c6f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00044.html#gaa03a77c4c210a95989ef803ebd9c4524">hwloc_distribute</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00011.html">hwloc_obj_t</a> root, <a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> *cpuset, unsigned n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Distribute <code>n</code> items over the topology under <code>root</code>. <a href="#gaa03a77c4c210a95989ef803ebd9c4524"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga3374bb25a01c5cd447b097eaa6f77c6f"></a><!-- doxytag: member="helper.h::hwloc_topology_get_allowed_cpuset" ref="ga3374bb25a01c5cd447b097eaa6f77c6f" args="(hwloc_topology_t topology)" -->
<a class="anchor" id="gaa03a77c4c210a95989ef803ebd9c4524"></a><!-- doxytag: member="helper.h::hwloc_distribute" ref="gaa03a77c4c210a95989ef803ebd9c4524" args="(hwloc_topology_t topology, hwloc_obj_t root, hwloc_cpuset_t *cpuset, unsigned n)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> __hwloc_attribute_pure hwloc_topology_get_allowed_cpuset </td>
<td class="memname">static __hwloc_inline void hwloc_distribute </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [static]</code></td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00011.html">hwloc_obj_t</a>&nbsp;</td>
<td class="paramname"> <em>root</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> *&nbsp;</td>
<td class="paramname"> <em>cpuset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&nbsp;</td>
<td class="paramname"> <em>n</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get allowed CPU set. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the CPU set of allowed logical processors of the system. If the topology is the result of a combination of several systems, NULL is returned.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The returned cpuset is not newly allocated and should thus not be changed or freed, hwloc_cpuset_dup must be used to obtain a local copy. </dd></dl>
</div>
</div>
<a class="anchor" id="ga0361003cb1e41f6f3e9fc485135a0950"></a><!-- doxytag: member="helper.h::hwloc_topology_get_complete_cpuset" ref="ga0361003cb1e41f6f3e9fc485135a0950" args="(hwloc_topology_t topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> __hwloc_attribute_pure hwloc_topology_get_complete_cpuset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="gac3626396192ce01ad6a4811d9d29306b"></a><!-- doxytag: member="helper.h::hwloc_topology_get_online_cpuset" ref="gac3626396192ce01ad6a4811d9d29306b" args="(hwloc_topology_t topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> __hwloc_attribute_pure hwloc_topology_get_online_cpuset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get online CPU set. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the CPU set of online logical processors of the system. If the topology is the result of a combination of several systems, NULL is returned.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The returned cpuset is not newly allocated and should thus not be changed or freed; hwloc_cpuset_dup must be used to obtain a local copy. </dd></dl>
</div>
</div>
<a class="anchor" id="gaa1305cd39c6afd68652f2c6e68759381"></a><!-- doxytag: member="helper.h::hwloc_topology_get_topology_cpuset" ref="gaa1305cd39c6afd68652f2c6e68759381" args="(hwloc_topology_t topology)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> __hwloc_attribute_pure hwloc_topology_get_topology_cpuset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em></td>
<td>&nbsp;)&nbsp;</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Distribute <code>n</code> items over the topology under <code>root</code>. </p>
<p>Array <code>cpuset</code> will be filled with <code>n</code> cpusets distributed linearly over the topology under <code>root</code> .</p>
<p>This is typically useful when an application wants to distribute <code>n</code> threads over a machine, giving each of them as much private cache as possible and keeping them locally in number order.</p>
<p>The caller may typically want to also call <a class="el" href="a00046.html#gace7ad3d2a71d9884e7a28311228931af" title="Keep a single CPU among those set in CPU set set.">hwloc_cpuset_singlify()</a> before binding a thread so that it does not move at all. </p>
</div>
</div>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Linux-only helpers</title>
<title>Hardware Locality (hwloc): Helpers for manipulating glibc sched affinity</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,117 +20,97 @@
</div>
</div>
<div class="contents">
<h1>Linux-only helpers</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Helpers for manipulating glibc sched affinity</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00047.html#gaeacad897c30dbea284948374ad4b010c">hwloc_linux_parse_cpumap_file</a> (FILE *file, <a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert a linux kernel cpumap file <code>file</code> into hwloc CPU set. <a href="#gaeacad897c30dbea284948374ad4b010c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00047.html#gaaaca5d1687053b6c3326b2c165bd6530">hwloc_linux_set_tid_cpubind</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, pid_t tid, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bind a thread <code>tid</code> on cpus given in cpuset <code>set</code>. <a href="#gaaaca5d1687053b6c3326b2c165bd6530"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00047.html#gaf36a9211a21eb930f59090eb5d460b8e">hwloc_linux_get_tid_cpubind</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, pid_t tid, <a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current binding of thread <code>tid</code>. <a href="#gaf36a9211a21eb930f59090eb5d460b8e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00047.html#ga39454e6013441d32e58ef4c4fcba7e4b">hwloc_cpuset_to_glibc_sched_affinity</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> hwlocset, cpu_set_t *schedset, size_t schedsetsize)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert hwloc CPU set <code>toposet</code> into glibc sched affinity CPU set <code>schedset</code>. <a href="#ga39454e6013441d32e58ef4c4fcba7e4b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00047.html#ga6df504b2f5440b527be05cdad6b1655e">hwloc_cpuset_from_glibc_sched_affinity</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, <a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> hwlocset, const cpu_set_t *schedset, size_t schedsetsize)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert glibc sched affinity CPU set <code>schedset</code> into hwloc CPU set. <a href="#ga6df504b2f5440b527be05cdad6b1655e"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This includes helpers for manipulating linux kernel cpumap files, and hwloc equivalents of the Linux sched_setaffinity and sched_getaffinity system calls. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gaf36a9211a21eb930f59090eb5d460b8e"></a><!-- doxytag: member="linux.h::hwloc_linux_get_tid_cpubind" ref="gaf36a9211a21eb930f59090eb5d460b8e" args="(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set)" -->
<a class="anchor" id="ga6df504b2f5440b527be05cdad6b1655e"></a><!-- doxytag: member="glibc&#45;sched.h::hwloc_cpuset_from_glibc_sched_affinity" ref="ga6df504b2f5440b527be05cdad6b1655e" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_cpuset_t hwlocset, const cpu_set_t *schedset, size_t schedsetsize)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_linux_get_tid_cpubind </td>
<td class="memname">static __hwloc_inline int hwloc_cpuset_from_glibc_sched_affinity </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">pid_t&nbsp;</td>
<td class="paramname"> <em>tid</em>, </td>
<td class="paramtype"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>hwlocset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em></td><td>&nbsp;</td>
<td class="paramtype">const cpu_set_t *&nbsp;</td>
<td class="paramname"> <em>schedset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>schedsetsize</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the current binding of thread <code>tid</code>. </p>
<p>The behavior is exactly the same as the Linux sched_setaffinity system call, but uses a hwloc cpuset. </p>
<p>Convert glibc sched affinity CPU set <code>schedset</code> into hwloc CPU set. </p>
<p>This function may be used before calling sched_setaffinity or any other function that takes a cpu_set_t as input parameter.</p>
<p><code>schedsetsize</code> should be sizeof(cpu_set_t) unless <code>schedset</code> was dynamically allocated with CPU_ALLOC </p>
</div>
</div>
<a class="anchor" id="gaeacad897c30dbea284948374ad4b010c"></a><!-- doxytag: member="linux.h::hwloc_linux_parse_cpumap_file" ref="gaeacad897c30dbea284948374ad4b010c" args="(FILE *file, hwloc_cpuset_t set)" -->
<a class="anchor" id="ga39454e6013441d32e58ef4c4fcba7e4b"></a><!-- doxytag: member="glibc&#45;sched.h::hwloc_cpuset_to_glibc_sched_affinity" ref="ga39454e6013441d32e58ef4c4fcba7e4b" args="(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_const_cpuset_t hwlocset, cpu_set_t *schedset, size_t schedsetsize)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_linux_parse_cpumap_file </td>
<td class="memname">static __hwloc_inline int hwloc_cpuset_to_glibc_sched_affinity </td>
<td>(</td>
<td class="paramtype">FILE *&nbsp;</td>
<td class="paramname"> <em>file</em>, </td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>hwlocset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">cpu_set_t *&nbsp;</td>
<td class="paramname"> <em>schedset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>schedsetsize</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Convert a linux kernel cpumap file <code>file</code> into hwloc CPU set. </p>
<p>Might be used when reading CPU set from sysfs attributes such as topology and caches for processors, or local_cpus for devices. </p>
</div>
</div>
<a class="anchor" id="gaaaca5d1687053b6c3326b2c165bd6530"></a><!-- doxytag: member="linux.h::hwloc_linux_set_tid_cpubind" ref="gaaaca5d1687053b6c3326b2c165bd6530" args="(hwloc_topology_t topology, pid_t tid, hwloc_const_cpuset_t set)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">pid_t&nbsp;</td>
<td class="paramname"> <em>tid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Bind a thread <code>tid</code> on cpus given in cpuset <code>set</code>. </p>
<p>The behavior is exactly the same as the Linux sched_setaffinity system call, but uses a hwloc cpuset. </p>
<p>Convert hwloc CPU set <code>toposet</code> into glibc sched affinity CPU set <code>schedset</code>. </p>
<p>This function may be used before calling sched_setaffinity or any other function that takes a cpu_set_t as input parameter.</p>
<p><code>schedsetsize</code> should be sizeof(cpu_set_t) unless <code>schedset</code> was dynamically allocated with CPU_ALLOC </p>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Helpers for manipulating Linux libnuma unsigned long masks</title>
<title>Hardware Locality (hwloc): Linux-only helpers</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,97 +20,117 @@
</div>
</div>
<div class="contents">
<h1>Helpers for manipulating Linux libnuma unsigned long masks</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Linux-only helpers</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00048.html#gab728b8eeaa8a79fa2c6f88a4494d3333">hwloc_cpuset_to_linux_libnuma_ulongs</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset, unsigned long *mask, unsigned long *maxnode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert hwloc CPU set <code>cpuset</code> into the array of unsigned long <code>mask</code>. <a href="#gab728b8eeaa8a79fa2c6f88a4494d3333"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00048.html#gaa23cfc12b367b1c5da2ffb6efdf083a8">hwloc_cpuset_from_linux_libnuma_ulongs</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> cpuset, const unsigned long *mask, unsigned long maxnode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the array of unsigned long <code>mask</code> into hwloc CPU set. <a href="#gaa23cfc12b367b1c5da2ffb6efdf083a8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00048.html#gaeacad897c30dbea284948374ad4b010c">hwloc_linux_parse_cpumap_file</a> (FILE *file, <a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert a linux kernel cpumap file <code>file</code> into hwloc CPU set. <a href="#gaeacad897c30dbea284948374ad4b010c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00048.html#gaaaca5d1687053b6c3326b2c165bd6530">hwloc_linux_set_tid_cpubind</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, pid_t tid, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bind a thread <code>tid</code> on cpus given in cpuset <code>set</code>. <a href="#gaaaca5d1687053b6c3326b2c165bd6530"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">HWLOC_DECLSPEC int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00048.html#gaf36a9211a21eb930f59090eb5d460b8e">hwloc_linux_get_tid_cpubind</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, pid_t tid, <a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current binding of thread <code>tid</code>. <a href="#gaf36a9211a21eb930f59090eb5d460b8e"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This includes helpers for manipulating linux kernel cpumap files, and hwloc equivalents of the Linux sched_setaffinity and sched_getaffinity system calls. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gaa23cfc12b367b1c5da2ffb6efdf083a8"></a><!-- doxytag: member="linux&#45;libnuma.h::hwloc_cpuset_from_linux_libnuma_ulongs" ref="gaa23cfc12b367b1c5da2ffb6efdf083a8" args="(hwloc_topology_t topology, hwloc_cpuset_t cpuset, const unsigned long *mask, unsigned long maxnode)" -->
<a class="anchor" id="gaf36a9211a21eb930f59090eb5d460b8e"></a><!-- doxytag: member="linux.h::hwloc_linux_get_tid_cpubind" ref="gaf36a9211a21eb930f59090eb5d460b8e" args="(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline int hwloc_cpuset_from_linux_libnuma_ulongs </td>
<td class="memname">HWLOC_DECLSPEC int hwloc_linux_get_tid_cpubind </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>cpuset</em>, </td>
<td class="paramtype">pid_t&nbsp;</td>
<td class="paramname"> <em>tid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const unsigned long *&nbsp;</td>
<td class="paramname"> <em>mask</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned long&nbsp;</td>
<td class="paramname"> <em>maxnode</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Convert the array of unsigned long <code>mask</code> into hwloc CPU set. </p>
<p><code>mask</code> is a array of unsigned long that will be read. <code>maxnode</code> contains the maximal node number that may be read in <code>mask</code>.</p>
<p>This function may be used after calling get_mempolicy or any other function that takes an array of unsigned long as output parameter (and possibly a maximal node number as input parameter). </p>
<p>Get the current binding of thread <code>tid</code>. </p>
<p>The behavior is exactly the same as the Linux sched_setaffinity system call, but uses a hwloc cpuset. </p>
</div>
</div>
<a class="anchor" id="gab728b8eeaa8a79fa2c6f88a4494d3333"></a><!-- doxytag: member="linux&#45;libnuma.h::hwloc_cpuset_to_linux_libnuma_ulongs" ref="gab728b8eeaa8a79fa2c6f88a4494d3333" args="(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset, unsigned long *mask, unsigned long *maxnode)" -->
<a class="anchor" id="gaeacad897c30dbea284948374ad4b010c"></a><!-- doxytag: member="linux.h::hwloc_linux_parse_cpumap_file" ref="gaeacad897c30dbea284948374ad4b010c" args="(FILE *file, hwloc_cpuset_t set)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline int hwloc_cpuset_to_linux_libnuma_ulongs </td>
<td class="memname">HWLOC_DECLSPEC int hwloc_linux_parse_cpumap_file </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype">FILE *&nbsp;</td>
<td class="paramname"> <em>file</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Convert a linux kernel cpumap file <code>file</code> into hwloc CPU set. </p>
<p>Might be used when reading CPU set from sysfs attributes such as topology and caches for processors, or local_cpus for devices. </p>
</div>
</div>
<a class="anchor" id="gaaaca5d1687053b6c3326b2c165bd6530"></a><!-- doxytag: member="linux.h::hwloc_linux_set_tid_cpubind" ref="gaaaca5d1687053b6c3326b2c165bd6530" args="(hwloc_topology_t topology, pid_t tid, hwloc_const_cpuset_t set)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>cpuset</em>, </td>
<td class="paramtype">pid_t&nbsp;</td>
<td class="paramname"> <em>tid</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned long *&nbsp;</td>
<td class="paramname"> <em>mask</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned long *&nbsp;</td>
<td class="paramname"> <em>maxnode</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Convert hwloc CPU set <code>cpuset</code> into the array of unsigned long <code>mask</code>. </p>
<p><code>mask</code> is the array of unsigned long that will be filled. <code>maxnode</code> contains the maximal node number that may be stored in <code>mask</code>. <code>maxnode</code> will be set to the maximal node number that was found, plus one.</p>
<p>This function may be used before calling set_mempolicy, mbind, migrate_pages or any other function that takes an array of unsigned long and a maximal node number as input parameter. </p>
<p>Bind a thread <code>tid</code> on cpus given in cpuset <code>set</code>. </p>
<p>The behavior is exactly the same as the Linux sched_setaffinity system call, but uses a hwloc cpuset. </p>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Helpers for manipulating Linux libnuma bitmask</title>
<title>Hardware Locality (hwloc): Helpers for manipulating Linux libnuma unsigned long masks</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,36 +20,41 @@
</div>
</div>
<div class="contents">
<h1>Helpers for manipulating Linux libnuma bitmask</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Helpers for manipulating Linux libnuma unsigned long masks</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline struct bitmask <br class="typebreak"/>
*__hwloc_attribute_malloc&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00049.html#ga80bea6f05af929fbaf50557225ddd927">hwloc_cpuset_to_linux_libnuma_bitmask</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert hwloc CPU set <code>cpuset</code> into the returned libnuma bitmask. <a href="#ga80bea6f05af929fbaf50557225ddd927"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00049.html#gaa92103c3051e8ee3aa4a8a483143e85e">hwloc_cpuset_from_linux_libnuma_bitmask</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> cpuset, const struct bitmask *bitmask)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert libnuma bitmask <code>bitmask</code> into hwloc CPU set <code>cpuset</code>. <a href="#gaa92103c3051e8ee3aa4a8a483143e85e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00049.html#ga018e57a42a780ce2ba2e35ef975d8888">hwloc_cpuset_to_linux_libnuma_ulongs</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset, unsigned long *mask, unsigned long *maxnode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert hwloc CPU set <code>cpuset</code> into the array of unsigned long <code>mask</code>. <a href="#ga018e57a42a780ce2ba2e35ef975d8888"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00049.html#gafa60816dde33d69149497bcf6c7818e0">hwloc_cpuset_from_linux_libnuma_ulongs</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> cpuset, const unsigned long *mask, unsigned long maxnode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert the array of unsigned long <code>mask</code> into hwloc CPU set. <a href="#gafa60816dde33d69149497bcf6c7818e0"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gaa92103c3051e8ee3aa4a8a483143e85e"></a><!-- doxytag: member="linux&#45;libnuma.h::hwloc_cpuset_from_linux_libnuma_bitmask" ref="gaa92103c3051e8ee3aa4a8a483143e85e" args="(hwloc_topology_t topology, hwloc_cpuset_t cpuset, const struct bitmask *bitmask)" -->
<a class="anchor" id="gafa60816dde33d69149497bcf6c7818e0"></a><!-- doxytag: member="linux&#45;libnuma.h::hwloc_cpuset_from_linux_libnuma_ulongs" ref="gafa60816dde33d69149497bcf6c7818e0" args="(hwloc_topology_t topology, hwloc_cpuset_t cpuset, const unsigned long *mask, unsigned long maxnode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline int hwloc_cpuset_from_linux_libnuma_bitmask </td>
<td class="memname">static __hwloc_inline int hwloc_cpuset_from_linux_libnuma_ulongs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>cpuset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const struct bitmask *&nbsp;</td>
<td class="paramname"> <em>bitmask</em></td><td>&nbsp;</td>
<td class="paramtype">const unsigned long *&nbsp;</td>
<td class="paramname"> <em>mask</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned long&nbsp;</td>
<td class="paramname"> <em>maxnode</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -60,40 +65,52 @@
</div>
<div class="memdoc">
<p>Convert libnuma bitmask <code>bitmask</code> into hwloc CPU set <code>cpuset</code>. </p>
<p>This function may be used after calling many numa_ functions that use a struct bitmask as an output parameter. </p>
<p>Convert the array of unsigned long <code>mask</code> into hwloc CPU set. </p>
<p><code>mask</code> is a array of unsigned long that will be read. <code>maxnode</code> contains the maximal node number that may be read in <code>mask</code>.</p>
<p>This function may be used after calling get_mempolicy or any other function that takes an array of unsigned long as output parameter (and possibly a maximal node number as input parameter). </p>
</div>
</div>
<a class="anchor" id="ga80bea6f05af929fbaf50557225ddd927"></a><!-- doxytag: member="linux&#45;libnuma.h::hwloc_cpuset_to_linux_libnuma_bitmask" ref="ga80bea6f05af929fbaf50557225ddd927" args="(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset)" -->
<a class="anchor" id="ga018e57a42a780ce2ba2e35ef975d8888"></a><!-- doxytag: member="linux&#45;libnuma.h::hwloc_cpuset_to_linux_libnuma_ulongs" ref="ga018e57a42a780ce2ba2e35ef975d8888" args="(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset, unsigned long *mask, unsigned long *maxnode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline struct bitmask* __hwloc_attribute_malloc hwloc_cpuset_to_linux_libnuma_bitmask </td>
<td class="memname">static __hwloc_inline int hwloc_cpuset_to_linux_libnuma_ulongs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>cpuset</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>cpuset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned long *&nbsp;</td>
<td class="paramname"> <em>mask</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned long *&nbsp;</td>
<td class="paramname"> <em>maxnode</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static, read]</code></td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Convert hwloc CPU set <code>cpuset</code> into the returned libnuma bitmask. </p>
<p>The returned bitmask should later be freed with numa_bitmask_free.</p>
<p>This function may be used before calling many numa_ functions that use a struct bitmask as an input parameter.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>newly allocated struct bitmask. </dd></dl>
<p>Convert hwloc CPU set <code>cpuset</code> into the array of unsigned long <code>mask</code>. </p>
<p><code>mask</code> is the array of unsigned long that will be filled. <code>maxnode</code> contains the maximal node number that may be stored in <code>mask</code>. <code>maxnode</code> will be set to the maximal node number that was found, plus one.</p>
<p>This function may be used before calling set_mempolicy, mbind, migrate_pages or any other function that takes an array of unsigned long and a maximal node number as input parameter. </p>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): Helpers for manipulating Linux libnuma nodemask_t</title>
<title>Hardware Locality (hwloc): Helpers for manipulating Linux libnuma bitmask</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,35 +20,37 @@
</div>
</div>
<div class="contents">
<h1>Helpers for manipulating Linux libnuma nodemask_t</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Helpers for manipulating Linux libnuma bitmask</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00050.html#gaac14df7a9821f2a29391f01556bd2af3">hwloc_cpuset_to_linux_libnuma_nodemask</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset, nodemask_t *nodemask)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert hwloc CPU set <code>cpuset</code> into libnuma nodemask <code>nodemask</code>. <a href="#gaac14df7a9821f2a29391f01556bd2af3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00050.html#ga1a887850b8fa7bbf7c4a92742c150a1a">hwloc_cpuset_from_linux_libnuma_nodemask</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> cpuset, const nodemask_t *nodemask)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert libnuma nodemask <code>nodemask</code> into hwloc CPU set <code>cpuset</code>. <a href="#ga1a887850b8fa7bbf7c4a92742c150a1a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline struct <br class="typebreak"/>
bitmask <br class="typebreak"/>
*__hwloc_attribute_malloc&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00050.html#ga067ec565345a346bfd9d721cff5901ae">hwloc_cpuset_to_linux_libnuma_bitmask</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert hwloc CPU set <code>cpuset</code> into the returned libnuma bitmask. <a href="#ga067ec565345a346bfd9d721cff5901ae"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00050.html#ga47747968f12c2674d2840dfbacce4940">hwloc_cpuset_from_linux_libnuma_bitmask</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> cpuset, const struct bitmask *bitmask)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert libnuma bitmask <code>bitmask</code> into hwloc CPU set <code>cpuset</code>. <a href="#ga47747968f12c2674d2840dfbacce4940"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga1a887850b8fa7bbf7c4a92742c150a1a"></a><!-- doxytag: member="linux&#45;libnuma.h::hwloc_cpuset_from_linux_libnuma_nodemask" ref="ga1a887850b8fa7bbf7c4a92742c150a1a" args="(hwloc_topology_t topology, hwloc_cpuset_t cpuset, const nodemask_t *nodemask)" -->
<a class="anchor" id="ga47747968f12c2674d2840dfbacce4940"></a><!-- doxytag: member="linux&#45;libnuma.h::hwloc_cpuset_from_linux_libnuma_bitmask" ref="ga47747968f12c2674d2840dfbacce4940" args="(hwloc_topology_t topology, hwloc_cpuset_t cpuset, const struct bitmask *bitmask)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline int hwloc_cpuset_from_linux_libnuma_nodemask </td>
<td class="memname">static __hwloc_inline int hwloc_cpuset_from_linux_libnuma_bitmask </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>cpuset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const nodemask_t *&nbsp;</td>
<td class="paramname"> <em>nodemask</em></td><td>&nbsp;</td>
<td class="paramtype">const struct bitmask *&nbsp;</td>
<td class="paramname"> <em>bitmask</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -59,44 +61,40 @@
</div>
<div class="memdoc">
<p>Convert libnuma nodemask <code>nodemask</code> into hwloc CPU set <code>cpuset</code>. </p>
<p>This function may be used before calling some old libnuma functions that use a nodemask_t as an output parameter. </p>
<p>Convert libnuma bitmask <code>bitmask</code> into hwloc CPU set <code>cpuset</code>. </p>
<p>This function may be used after calling many numa_ functions that use a struct bitmask as an output parameter. </p>
</div>
</div>
<a class="anchor" id="gaac14df7a9821f2a29391f01556bd2af3"></a><!-- doxytag: member="linux&#45;libnuma.h::hwloc_cpuset_to_linux_libnuma_nodemask" ref="gaac14df7a9821f2a29391f01556bd2af3" args="(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset, nodemask_t *nodemask)" -->
<a class="anchor" id="ga067ec565345a346bfd9d721cff5901ae"></a><!-- doxytag: member="linux&#45;libnuma.h::hwloc_cpuset_to_linux_libnuma_bitmask" ref="ga067ec565345a346bfd9d721cff5901ae" args="(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline int hwloc_cpuset_to_linux_libnuma_nodemask </td>
<td class="memname">static __hwloc_inline struct bitmask* __hwloc_attribute_malloc hwloc_cpuset_to_linux_libnuma_bitmask </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>cpuset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">nodemask_t *&nbsp;</td>
<td class="paramname"> <em>nodemask</em></td><td>&nbsp;</td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>cpuset</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
<td></td><td></td><td><code> [static, read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Convert hwloc CPU set <code>cpuset</code> into libnuma nodemask <code>nodemask</code>. </p>
<p>This function may be used before calling some old libnuma functions that use a nodemask_t as an input parameter. </p>
<p>Convert hwloc CPU set <code>cpuset</code> into the returned libnuma bitmask. </p>
<p>The returned bitmask should later be freed with numa_bitmask_free.</p>
<p>This function may be used before calling many numa_ functions that use a struct bitmask as an input parameter.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>newly allocated struct bitmask. </dd></dl>
</div>
</div>

Просмотреть файл

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): OpenFabrics-Specific Functions</title>
<title>Hardware Locality (hwloc): Helpers for manipulating Linux libnuma nodemask_t</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
@ -20,33 +20,35 @@
</div>
</div>
<div class="contents">
<h1>OpenFabrics-Specific Functions</h1><table border="0" cellpadding="0" cellspacing="0">
<h1>Helpers for manipulating Linux libnuma nodemask_t</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00051.html#gaa8e3405c00a4b46991336549c461974c">hwloc_ibv_get_device_cpuset</a> (<a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, struct ibv_device *ibdev, <a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the CPU set of logical processors that are physically close to device <code>ibdev</code>. <a href="#gaa8e3405c00a4b46991336549c461974c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00051.html#ga36feb81315de87ce11d9a5aa2b4c6e6d">hwloc_cpuset_to_linux_libnuma_nodemask</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a> cpuset, nodemask_t *nodemask)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert hwloc CPU set <code>cpuset</code> into libnuma nodemask <code>nodemask</code>. <a href="#ga36feb81315de87ce11d9a5aa2b4c6e6d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00051.html#gac24c9e4bb2eab3e23b2039559adc9df8">hwloc_cpuset_from_linux_libnuma_nodemask</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, <a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> cpuset, const nodemask_t *nodemask)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert libnuma nodemask <code>nodemask</code> into hwloc CPU set <code>cpuset</code>. <a href="#gac24c9e4bb2eab3e23b2039559adc9df8"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gaa8e3405c00a4b46991336549c461974c"></a><!-- doxytag: member="openfabrics&#45;verbs.h::hwloc_ibv_get_device_cpuset" ref="gaa8e3405c00a4b46991336549c461974c" args="(hwloc_topology_t topology __hwloc_attribute_unused, struct ibv_device *ibdev, hwloc_cpuset_t set)" -->
<a class="anchor" id="gac24c9e4bb2eab3e23b2039559adc9df8"></a><!-- doxytag: member="linux&#45;libnuma.h::hwloc_cpuset_from_linux_libnuma_nodemask" ref="gac24c9e4bb2eab3e23b2039559adc9df8" args="(hwloc_topology_t topology, hwloc_cpuset_t cpuset, const nodemask_t *nodemask)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __inline int hwloc_ibv_get_device_cpuset </td>
<td class="memname">static __hwloc_inline int hwloc_cpuset_from_linux_libnuma_nodemask </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct ibv_device *&nbsp;</td>
<td class="paramname"> <em>ibdev</em>, </td>
<td class="paramtype"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>cpuset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em></td><td>&nbsp;</td>
<td class="paramtype">const nodemask_t *&nbsp;</td>
<td class="paramname"> <em>nodemask</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
@ -57,8 +59,44 @@
</div>
<div class="memdoc">
<p>Get the CPU set of logical processors that are physically close to device <code>ibdev</code>. </p>
<p>For the given OpenFabrics device <code>ibdev</code>, read the corresponding kernel-provided cpumap file and return the corresponding CPU set. This function is currently only implemented in a meaningful way for Linux; other systems will simply get a full cpuset. </p>
<p>Convert libnuma nodemask <code>nodemask</code> into hwloc CPU set <code>cpuset</code>. </p>
<p>This function may be used before calling some old libnuma functions that use a nodemask_t as an output parameter. </p>
</div>
</div>
<a class="anchor" id="ga36feb81315de87ce11d9a5aa2b4c6e6d"></a><!-- doxytag: member="linux&#45;libnuma.h::hwloc_cpuset_to_linux_libnuma_nodemask" ref="ga36feb81315de87ce11d9a5aa2b4c6e6d" args="(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset, nodemask_t *nodemask)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline int hwloc_cpuset_to_linux_libnuma_nodemask </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a>&nbsp;</td>
<td class="paramname"> <em>topology</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#gad2f7833583d020af31e01554251dbe11">hwloc_const_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>cpuset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">nodemask_t *&nbsp;</td>
<td class="paramname"> <em>nodemask</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Convert hwloc CPU set <code>cpuset</code> into libnuma nodemask <code>nodemask</code>. </p>
<p>This function may be used before calling some old libnuma functions that use a nodemask_t as an input parameter. </p>
</div>
</div>

Просмотреть файл

@ -0,0 +1,70 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Hardware Locality (hwloc): OpenFabrics-Specific Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>OpenFabrics-Specific Functions</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __hwloc_inline int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052.html#gaa8ea979ce3a9b8c70ae80bc5716a0fbe">hwloc_ibv_get_device_cpuset</a> (<a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology __hwloc_attribute_unused, struct ibv_device *ibdev, <a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a> set)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the CPU set of logical processors that are physically close to device <code>ibdev</code>. <a href="#gaa8ea979ce3a9b8c70ae80bc5716a0fbe"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gaa8ea979ce3a9b8c70ae80bc5716a0fbe"></a><!-- doxytag: member="openfabrics&#45;verbs.h::hwloc_ibv_get_device_cpuset" ref="gaa8ea979ce3a9b8c70ae80bc5716a0fbe" args="(hwloc_topology_t topology __hwloc_attribute_unused, struct ibv_device *ibdev, hwloc_cpuset_t set)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static __hwloc_inline int hwloc_ibv_get_device_cpuset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology&nbsp;</td>
<td class="paramname"> <em>__hwloc_attribute_unused</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct ibv_device *&nbsp;</td>
<td class="paramname"> <em>ibdev</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411">hwloc_cpuset_t</a>&nbsp;</td>
<td class="paramname"> <em>set</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the CPU set of logical processors that are physically close to device <code>ibdev</code>. </p>
<p>For the given OpenFabrics device <code>ibdev</code>, read the corresponding kernel-provided cpumap file and return the corresponding CPU set. This function is currently only implemented in a meaningful way for Linux; other systems will simply get a full cpuset. </p>
</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>

Просмотреть файл

@ -27,16 +27,16 @@
</div>
<div class="contents">
<h1>Data Structures</h1>Here are the data structures with brief descriptions:<table>
<tr><td class="indexkey"><a class="el" href="a00007.html">hwloc_obj_attr_u::hwloc_cache_attr_s</a></td><td class="indexvalue">Cache-specific Object Attributes </td></tr>
<tr><td class="indexkey"><a class="el" href="a00008.html">hwloc_obj_attr_u::hwloc_group_attr_s</a></td><td class="indexvalue">Group-specific Object Attributes </td></tr>
<tr><td class="indexkey"><a class="el" href="a00009.html">hwloc_obj_attr_u::hwloc_machine_attr_s</a></td><td class="indexvalue">Machine-specific Object Attributes </td></tr>
<tr><td class="indexkey"><a class="el" href="a00010.html">hwloc_obj</a></td><td class="indexvalue">Structure of a topology object </td></tr>
<tr><td class="indexkey"><a class="el" href="a00011.html">hwloc_obj_attr_u</a></td><td class="indexvalue">Object type-specific Attributes </td></tr>
<tr><td class="indexkey"><a class="el" href="a00012.html">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a></td><td class="indexvalue">Array of local memory page types, <code>NULL</code> if no local memory and <code>page_types</code> is 0 </td></tr>
<tr><td class="indexkey"><a class="el" href="a00013.html">hwloc_obj_memory_s</a></td><td class="indexvalue">Object memory </td></tr>
<tr><td class="indexkey"><a class="el" href="a00014.html">hwloc_topology_cpubind_support</a></td><td class="indexvalue">Flags describing actual binding support for this topology </td></tr>
<tr><td class="indexkey"><a class="el" href="a00015.html">hwloc_topology_discovery_support</a></td><td class="indexvalue">Flags describing actual discovery support for this topology </td></tr>
<tr><td class="indexkey"><a class="el" href="a00016.html">hwloc_topology_support</a></td><td class="indexvalue">Set of flags describing actual support for this topology </td></tr>
<tr><td class="indexkey"><a class="el" href="a00008.html">hwloc_obj_attr_u::hwloc_cache_attr_s</a></td><td class="indexvalue">Cache-specific Object Attributes </td></tr>
<tr><td class="indexkey"><a class="el" href="a00009.html">hwloc_obj_attr_u::hwloc_group_attr_s</a></td><td class="indexvalue">Group-specific Object Attributes </td></tr>
<tr><td class="indexkey"><a class="el" href="a00010.html">hwloc_obj_attr_u::hwloc_machine_attr_s</a></td><td class="indexvalue">Machine-specific Object Attributes </td></tr>
<tr><td class="indexkey"><a class="el" href="a00011.html">hwloc_obj</a></td><td class="indexvalue">Structure of a topology object </td></tr>
<tr><td class="indexkey"><a class="el" href="a00012.html">hwloc_obj_attr_u</a></td><td class="indexvalue">Object type-specific Attributes </td></tr>
<tr><td class="indexkey"><a class="el" href="a00013.html">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a></td><td class="indexvalue">Array of local memory page types, <code>NULL</code> if no local memory and <code>page_types</code> is 0 </td></tr>
<tr><td class="indexkey"><a class="el" href="a00014.html">hwloc_obj_memory_s</a></td><td class="indexvalue">Object memory </td></tr>
<tr><td class="indexkey"><a class="el" href="a00015.html">hwloc_topology_cpubind_support</a></td><td class="indexvalue">Flags describing actual binding support for this topology </td></tr>
<tr><td class="indexkey"><a class="el" href="a00016.html">hwloc_topology_discovery_support</a></td><td class="indexvalue">Flags describing actual discovery support for this topology </td></tr>
<tr><td class="indexkey"><a class="el" href="a00017.html">hwloc_topology_support</a></td><td class="indexvalue">Set of flags describing actual support for this topology </td></tr>
</table>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;

Просмотреть файл

@ -29,7 +29,7 @@
<h1>Data Structure Index</h1><div class="qindex"><a class="qindex" href="#letter_H">H</a></div>
<table align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
<tr><td><a name="letter_H"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;H&nbsp;&nbsp;</div></td></tr></table>
</td><td><a class="el" href="a00009.html">hwloc_obj_attr_u::hwloc_machine_attr_s</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00011.html">hwloc_obj_attr_u</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00013.html">hwloc_obj_memory_s</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00015.html">hwloc_topology_discovery_support</a>&nbsp;&nbsp;&nbsp;</td></tr><tr><td><a class="el" href="a00007.html">hwloc_obj_attr_u::hwloc_cache_attr_s</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00010.html">hwloc_obj</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00012.html">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00014.html">hwloc_topology_cpubind_support</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00016.html">hwloc_topology_support</a>&nbsp;&nbsp;&nbsp;</td></tr><tr><td><a class="el" href="a00008.html">hwloc_obj_attr_u::hwloc_group_attr_s</a>&nbsp;&nbsp;&nbsp;</td></tr></table><div class="qindex"><a class="qindex" href="#letter_H">H</a></div>
</td><td><a class="el" href="a00010.html">hwloc_obj_attr_u::hwloc_machine_attr_s</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00012.html">hwloc_obj_attr_u</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00014.html">hwloc_obj_memory_s</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00016.html">hwloc_topology_discovery_support</a>&nbsp;&nbsp;&nbsp;</td></tr><tr><td><a class="el" href="a00008.html">hwloc_obj_attr_u::hwloc_cache_attr_s</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00011.html">hwloc_obj</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00013.html">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00015.html">hwloc_topology_cpubind_support</a>&nbsp;&nbsp;&nbsp;</td><td><a class="el" href="a00017.html">hwloc_topology_support</a>&nbsp;&nbsp;&nbsp;</td></tr><tr><td><a class="el" href="a00009.html">hwloc_obj_attr_u::hwloc_group_attr_s</a>&nbsp;&nbsp;&nbsp;</td></tr></table><div class="qindex"><a class="qindex" href="#letter_H">H</a></div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">

Просмотреть файл

@ -26,13 +26,13 @@
</div>
<div class="contents">
<h1>File List</h1>Here is a list of all files with brief descriptions:<table>
<tr><td class="indexkey"><b>cpuset.h</b> <a href="a00017_source.html">[code]</a></td><td class="indexvalue">The Cpuset API, for use in hwloc itself </td></tr>
<tr><td class="indexkey"><b>glibc-sched.h</b> <a href="a00018_source.html">[code]</a></td><td class="indexvalue">Macros to help interaction between hwloc and glibc scheduling routines </td></tr>
<tr><td class="indexkey"><b>helper.h</b> <a href="a00019_source.html">[code]</a></td><td class="indexvalue">High-level hwloc traversal helpers </td></tr>
<tr><td class="indexkey"><b>hwloc.h</b> <a href="a00021_source.html">[code]</a></td><td class="indexvalue">The hwloc API </td></tr>
<tr><td class="indexkey"><b>linux-libnuma.h</b> <a href="a00022_source.html">[code]</a></td><td class="indexvalue">Macros to help interaction between hwloc and Linux libnuma </td></tr>
<tr><td class="indexkey"><b>linux.h</b> <a href="a00023_source.html">[code]</a></td><td class="indexvalue">Macros to help interaction between hwloc and Linux </td></tr>
<tr><td class="indexkey"><b>openfabrics-verbs.h</b> <a href="a00024_source.html">[code]</a></td><td class="indexvalue">Macros to help interaction between hwloc and OpenFabrics verbs </td></tr>
<tr><td class="indexkey"><b>cpuset.h</b> <a href="a00018_source.html">[code]</a></td><td class="indexvalue">The Cpuset API, for use in hwloc itself </td></tr>
<tr><td class="indexkey"><b>glibc-sched.h</b> <a href="a00019_source.html">[code]</a></td><td class="indexvalue">Macros to help interaction between hwloc and glibc scheduling routines </td></tr>
<tr><td class="indexkey"><b>helper.h</b> <a href="a00020_source.html">[code]</a></td><td class="indexvalue">High-level hwloc traversal helpers </td></tr>
<tr><td class="indexkey"><b>hwloc.h</b> <a href="a00022_source.html">[code]</a></td><td class="indexvalue">The hwloc API </td></tr>
<tr><td class="indexkey"><b>linux-libnuma.h</b> <a href="a00023_source.html">[code]</a></td><td class="indexvalue">Macros to help interaction between hwloc and Linux libnuma </td></tr>
<tr><td class="indexkey"><b>linux.h</b> <a href="a00024_source.html">[code]</a></td><td class="indexvalue">Macros to help interaction between hwloc and Linux </td></tr>
<tr><td class="indexkey"><b>openfabrics-verbs.h</b> <a href="a00025_source.html">[code]</a></td><td class="indexvalue">Macros to help interaction between hwloc and OpenFabrics verbs </td></tr>
</table>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;

Просмотреть файл

@ -53,199 +53,199 @@ Here is a list of all struct and union fields with links to the structures/union
<h3><a class="anchor" id="index_a">- a -</a></h3><ul>
<li>allowed_cpuset
: <a class="el" href="a00010.html#afa3c59a6dd3da8ffa48710780a1bfb34">hwloc_obj</a>
: <a class="el" href="a00011.html#afa3c59a6dd3da8ffa48710780a1bfb34">hwloc_obj</a>
</li>
<li>allowed_nodeset
: <a class="el" href="a00010.html#a9c1af614e0978a65ce309f921a822c8b">hwloc_obj</a>
: <a class="el" href="a00011.html#a9c1af614e0978a65ce309f921a822c8b">hwloc_obj</a>
</li>
<li>arity
: <a class="el" href="a00010.html#aac3f6da35c9b57599909a44ce2b716c1">hwloc_obj</a>
: <a class="el" href="a00011.html#aac3f6da35c9b57599909a44ce2b716c1">hwloc_obj</a>
</li>
<li>attr
: <a class="el" href="a00010.html#accd40e29f71f19e88db62ea3df02adc8">hwloc_obj</a>
: <a class="el" href="a00011.html#accd40e29f71f19e88db62ea3df02adc8">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_c">- c -</a></h3><ul>
<li>cache
: <a class="el" href="a00011.html#ab5a8ae3bf490e6b1071fea53f7382836">hwloc_obj_attr_u</a>
: <a class="el" href="a00012.html#ab5a8ae3bf490e6b1071fea53f7382836">hwloc_obj_attr_u</a>
</li>
<li>children
: <a class="el" href="a00010.html#a04d05403da37bfe17cd63b7c7dd07b1f">hwloc_obj</a>
: <a class="el" href="a00011.html#a04d05403da37bfe17cd63b7c7dd07b1f">hwloc_obj</a>
</li>
<li>complete_cpuset
: <a class="el" href="a00010.html#a91788a9da687beb7224cc1fd7b75208c">hwloc_obj</a>
: <a class="el" href="a00011.html#a91788a9da687beb7224cc1fd7b75208c">hwloc_obj</a>
</li>
<li>complete_nodeset
: <a class="el" href="a00010.html#adc473a52c071d7fd49e659ac90467a0f">hwloc_obj</a>
: <a class="el" href="a00011.html#adc473a52c071d7fd49e659ac90467a0f">hwloc_obj</a>
</li>
<li>count
: <a class="el" href="a00012.html#ab5d01db7b26177a6b5361107cad152c3">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a>
: <a class="el" href="a00013.html#ab5d01db7b26177a6b5361107cad152c3">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a>
</li>
<li>cpubind
: <a class="el" href="a00016.html#adef2bb91f74c3e70a2a071393caf5f56">hwloc_topology_support</a>
: <a class="el" href="a00017.html#adef2bb91f74c3e70a2a071393caf5f56">hwloc_topology_support</a>
</li>
<li>cpuset
: <a class="el" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f">hwloc_obj</a>
: <a class="el" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_d">- d -</a></h3><ul>
<li>depth
: <a class="el" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5">hwloc_obj</a>
, <a class="el" href="a00007.html#a5c8f7f39193736c2187ed626940835d5">hwloc_obj_attr_u::hwloc_cache_attr_s</a>
, <a class="el" href="a00008.html#ad914eac61c77481e1b7037877bcc5579">hwloc_obj_attr_u::hwloc_group_attr_s</a>
: <a class="el" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5">hwloc_obj</a>
, <a class="el" href="a00008.html#a5c8f7f39193736c2187ed626940835d5">hwloc_obj_attr_u::hwloc_cache_attr_s</a>
, <a class="el" href="a00009.html#ad914eac61c77481e1b7037877bcc5579">hwloc_obj_attr_u::hwloc_group_attr_s</a>
</li>
<li>discovery
: <a class="el" href="a00016.html#aea3fbd7653d987d81f848636c420504d">hwloc_topology_support</a>
: <a class="el" href="a00017.html#aea3fbd7653d987d81f848636c420504d">hwloc_topology_support</a>
</li>
<li>dmi_board_name
: <a class="el" href="a00009.html#a8b99af84fd38753a91c861f0e856b461">hwloc_obj_attr_u::hwloc_machine_attr_s</a>
: <a class="el" href="a00010.html#a8b99af84fd38753a91c861f0e856b461">hwloc_obj_attr_u::hwloc_machine_attr_s</a>
</li>
<li>dmi_board_vendor
: <a class="el" href="a00009.html#aae85be0b4ebb86501718c4b460df5167">hwloc_obj_attr_u::hwloc_machine_attr_s</a>
: <a class="el" href="a00010.html#aae85be0b4ebb86501718c4b460df5167">hwloc_obj_attr_u::hwloc_machine_attr_s</a>
</li>
</ul>
<h3><a class="anchor" id="index_f">- f -</a></h3><ul>
<li>first_child
: <a class="el" href="a00010.html#af51d08a0a79dba517c06c5afedc8d2dc">hwloc_obj</a>
: <a class="el" href="a00011.html#af51d08a0a79dba517c06c5afedc8d2dc">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_g">- g -</a></h3><ul>
<li>get_proc_cpubind
: <a class="el" href="a00014.html#aae705bc447adc163ead377362c4dfe9f">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#aae705bc447adc163ead377362c4dfe9f">hwloc_topology_cpubind_support</a>
</li>
<li>get_thisproc_cpubind
: <a class="el" href="a00014.html#a77a09ddd78ee3e9ff5f532a6ac74f7eb">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#a77a09ddd78ee3e9ff5f532a6ac74f7eb">hwloc_topology_cpubind_support</a>
</li>
<li>get_thisthread_cpubind
: <a class="el" href="a00014.html#a80d762e532d677dff262d83cc7bb1c60">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#a80d762e532d677dff262d83cc7bb1c60">hwloc_topology_cpubind_support</a>
</li>
<li>get_thread_cpubind
: <a class="el" href="a00014.html#a8dd4d8531ed2eebdce1507e7d104154e">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#a8dd4d8531ed2eebdce1507e7d104154e">hwloc_topology_cpubind_support</a>
</li>
<li>group
: <a class="el" href="a00011.html#ae4ba157cc313e2cdd9a82f1c1df7aaa6">hwloc_obj_attr_u</a>
: <a class="el" href="a00012.html#ae4ba157cc313e2cdd9a82f1c1df7aaa6">hwloc_obj_attr_u</a>
</li>
</ul>
<h3><a class="anchor" id="index_l">- l -</a></h3><ul>
<li>last_child
: <a class="el" href="a00010.html#a84bd65634dbc55f4158b74443a9bd04f">hwloc_obj</a>
: <a class="el" href="a00011.html#a84bd65634dbc55f4158b74443a9bd04f">hwloc_obj</a>
</li>
<li>local_memory
: <a class="el" href="a00013.html#a27043a3150660f44ed84916c2d0d7e0e">hwloc_obj_memory_s</a>
: <a class="el" href="a00014.html#a27043a3150660f44ed84916c2d0d7e0e">hwloc_obj_memory_s</a>
</li>
<li>logical_index
: <a class="el" href="a00010.html#a0d07fb7b8935e137c94d75a3eb492ae9">hwloc_obj</a>
: <a class="el" href="a00011.html#a0d07fb7b8935e137c94d75a3eb492ae9">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_m">- m -</a></h3><ul>
<li>machine
: <a class="el" href="a00011.html#a5b42966df7c5bfdc36891e414cc31607">hwloc_obj_attr_u</a>
: <a class="el" href="a00012.html#a5b42966df7c5bfdc36891e414cc31607">hwloc_obj_attr_u</a>
</li>
<li>memory
: <a class="el" href="a00010.html#a1dc830816716213b5f797e4052487864">hwloc_obj</a>
: <a class="el" href="a00011.html#a1dc830816716213b5f797e4052487864">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_n">- n -</a></h3><ul>
<li>name
: <a class="el" href="a00010.html#abb709ec38f2970677e4e57d1d30be96d">hwloc_obj</a>
: <a class="el" href="a00011.html#abb709ec38f2970677e4e57d1d30be96d">hwloc_obj</a>
</li>
<li>next_cousin
: <a class="el" href="a00010.html#a85a788017457129589318b6c39451acf">hwloc_obj</a>
: <a class="el" href="a00011.html#a85a788017457129589318b6c39451acf">hwloc_obj</a>
</li>
<li>next_sibling
: <a class="el" href="a00010.html#a7f2343ed476fe4942e6fffd4cade1b40">hwloc_obj</a>
: <a class="el" href="a00011.html#a7f2343ed476fe4942e6fffd4cade1b40">hwloc_obj</a>
</li>
<li>nodeset
: <a class="el" href="a00010.html#a79982ede313c2190505fc5e3714a16fb">hwloc_obj</a>
: <a class="el" href="a00011.html#a79982ede313c2190505fc5e3714a16fb">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_o">- o -</a></h3><ul>
<li>online_cpuset
: <a class="el" href="a00010.html#a8842d56c2975380f327ea401c5f53564">hwloc_obj</a>
: <a class="el" href="a00011.html#a8842d56c2975380f327ea401c5f53564">hwloc_obj</a>
</li>
<li>os_index
: <a class="el" href="a00010.html#a61a7a80a68eaccbaaa28269e678c81a9">hwloc_obj</a>
: <a class="el" href="a00011.html#a61a7a80a68eaccbaaa28269e678c81a9">hwloc_obj</a>
</li>
<li>os_level
: <a class="el" href="a00010.html#a68766f0b1c4d61b5bad87e3b81dacfde">hwloc_obj</a>
: <a class="el" href="a00011.html#a68766f0b1c4d61b5bad87e3b81dacfde">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_p">- p -</a></h3><ul>
<li>page_types
: <a class="el" href="a00013.html#a865eba7b12b986d72dbe7a2cfd97c50d">hwloc_obj_memory_s</a>
: <a class="el" href="a00014.html#a865eba7b12b986d72dbe7a2cfd97c50d">hwloc_obj_memory_s</a>
</li>
<li>page_types_len
: <a class="el" href="a00013.html#a208c27f4491077d7fb9ba5db8b29cb57">hwloc_obj_memory_s</a>
: <a class="el" href="a00014.html#a208c27f4491077d7fb9ba5db8b29cb57">hwloc_obj_memory_s</a>
</li>
<li>parent
: <a class="el" href="a00010.html#adc494f6aed939992be1c55cca5822900">hwloc_obj</a>
: <a class="el" href="a00011.html#adc494f6aed939992be1c55cca5822900">hwloc_obj</a>
</li>
<li>prev_cousin
: <a class="el" href="a00010.html#ac715989f55ff5a0eb6be2969ee477ec0">hwloc_obj</a>
: <a class="el" href="a00011.html#ac715989f55ff5a0eb6be2969ee477ec0">hwloc_obj</a>
</li>
<li>prev_sibling
: <a class="el" href="a00010.html#a7b89e8c189876c0158a9282aaaf17f50">hwloc_obj</a>
: <a class="el" href="a00011.html#a7b89e8c189876c0158a9282aaaf17f50">hwloc_obj</a>
</li>
<li>pu
: <a class="el" href="a00015.html#ad7bb4ecf7a82f5a04fc632e9592ad3ab">hwloc_topology_discovery_support</a>
: <a class="el" href="a00016.html#ad7bb4ecf7a82f5a04fc632e9592ad3ab">hwloc_topology_discovery_support</a>
</li>
</ul>
<h3><a class="anchor" id="index_s">- s -</a></h3><ul>
<li>set_proc_cpubind
: <a class="el" href="a00014.html#aa166223d1c2a6de7256ab2d8b675a87e">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#aa166223d1c2a6de7256ab2d8b675a87e">hwloc_topology_cpubind_support</a>
</li>
<li>set_thisproc_cpubind
: <a class="el" href="a00014.html#a9403d51657a4d546b3ea9553a2973a27">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#a9403d51657a4d546b3ea9553a2973a27">hwloc_topology_cpubind_support</a>
</li>
<li>set_thisthread_cpubind
: <a class="el" href="a00014.html#a57a89a4b5f1f74fa6cfe176f1e8b0798">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#a57a89a4b5f1f74fa6cfe176f1e8b0798">hwloc_topology_cpubind_support</a>
</li>
<li>set_thread_cpubind
: <a class="el" href="a00014.html#a46fba33e307909ce256624687799dd6d">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#a46fba33e307909ce256624687799dd6d">hwloc_topology_cpubind_support</a>
</li>
<li>sibling_rank
: <a class="el" href="a00010.html#aaa6043eee6f55869933c1d974efd9acd">hwloc_obj</a>
: <a class="el" href="a00011.html#aaa6043eee6f55869933c1d974efd9acd">hwloc_obj</a>
</li>
<li>size
: <a class="el" href="a00012.html#af0619463fb5d10052b7fe3495a66d74b">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a>
, <a class="el" href="a00007.html#a3c68235220554308f89768f281ad1e62">hwloc_obj_attr_u::hwloc_cache_attr_s</a>
: <a class="el" href="a00013.html#af0619463fb5d10052b7fe3495a66d74b">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a>
, <a class="el" href="a00008.html#a3c68235220554308f89768f281ad1e62">hwloc_obj_attr_u::hwloc_cache_attr_s</a>
</li>
</ul>
<h3><a class="anchor" id="index_t">- t -</a></h3><ul>
<li>total_memory
: <a class="el" href="a00013.html#a68c3323d2d0a248d1b7fec7af44bebe3">hwloc_obj_memory_s</a>
: <a class="el" href="a00014.html#a68c3323d2d0a248d1b7fec7af44bebe3">hwloc_obj_memory_s</a>
</li>
<li>type
: <a class="el" href="a00010.html#acc4f0803f244867e68fe0036800be5de">hwloc_obj</a>
: <a class="el" href="a00011.html#acc4f0803f244867e68fe0036800be5de">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_u">- u -</a></h3><ul>
<li>userdata
: <a class="el" href="a00010.html#a76fd3ac94401cf32dfccc3a3a8de68a5">hwloc_obj</a>
: <a class="el" href="a00011.html#a76fd3ac94401cf32dfccc3a3a8de68a5">hwloc_obj</a>
</li>
</ul>
</div>

Просмотреть файл

@ -53,199 +53,199 @@
<h3><a class="anchor" id="index_a">- a -</a></h3><ul>
<li>allowed_cpuset
: <a class="el" href="a00010.html#afa3c59a6dd3da8ffa48710780a1bfb34">hwloc_obj</a>
: <a class="el" href="a00011.html#afa3c59a6dd3da8ffa48710780a1bfb34">hwloc_obj</a>
</li>
<li>allowed_nodeset
: <a class="el" href="a00010.html#a9c1af614e0978a65ce309f921a822c8b">hwloc_obj</a>
: <a class="el" href="a00011.html#a9c1af614e0978a65ce309f921a822c8b">hwloc_obj</a>
</li>
<li>arity
: <a class="el" href="a00010.html#aac3f6da35c9b57599909a44ce2b716c1">hwloc_obj</a>
: <a class="el" href="a00011.html#aac3f6da35c9b57599909a44ce2b716c1">hwloc_obj</a>
</li>
<li>attr
: <a class="el" href="a00010.html#accd40e29f71f19e88db62ea3df02adc8">hwloc_obj</a>
: <a class="el" href="a00011.html#accd40e29f71f19e88db62ea3df02adc8">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_c">- c -</a></h3><ul>
<li>cache
: <a class="el" href="a00011.html#ab5a8ae3bf490e6b1071fea53f7382836">hwloc_obj_attr_u</a>
: <a class="el" href="a00012.html#ab5a8ae3bf490e6b1071fea53f7382836">hwloc_obj_attr_u</a>
</li>
<li>children
: <a class="el" href="a00010.html#a04d05403da37bfe17cd63b7c7dd07b1f">hwloc_obj</a>
: <a class="el" href="a00011.html#a04d05403da37bfe17cd63b7c7dd07b1f">hwloc_obj</a>
</li>
<li>complete_cpuset
: <a class="el" href="a00010.html#a91788a9da687beb7224cc1fd7b75208c">hwloc_obj</a>
: <a class="el" href="a00011.html#a91788a9da687beb7224cc1fd7b75208c">hwloc_obj</a>
</li>
<li>complete_nodeset
: <a class="el" href="a00010.html#adc473a52c071d7fd49e659ac90467a0f">hwloc_obj</a>
: <a class="el" href="a00011.html#adc473a52c071d7fd49e659ac90467a0f">hwloc_obj</a>
</li>
<li>count
: <a class="el" href="a00012.html#ab5d01db7b26177a6b5361107cad152c3">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a>
: <a class="el" href="a00013.html#ab5d01db7b26177a6b5361107cad152c3">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a>
</li>
<li>cpubind
: <a class="el" href="a00016.html#adef2bb91f74c3e70a2a071393caf5f56">hwloc_topology_support</a>
: <a class="el" href="a00017.html#adef2bb91f74c3e70a2a071393caf5f56">hwloc_topology_support</a>
</li>
<li>cpuset
: <a class="el" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f">hwloc_obj</a>
: <a class="el" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_d">- d -</a></h3><ul>
<li>depth
: <a class="el" href="a00010.html#a9d82690370275d42d652eccdea5d3ee5">hwloc_obj</a>
, <a class="el" href="a00007.html#a5c8f7f39193736c2187ed626940835d5">hwloc_obj_attr_u::hwloc_cache_attr_s</a>
, <a class="el" href="a00008.html#ad914eac61c77481e1b7037877bcc5579">hwloc_obj_attr_u::hwloc_group_attr_s</a>
: <a class="el" href="a00011.html#a9d82690370275d42d652eccdea5d3ee5">hwloc_obj</a>
, <a class="el" href="a00008.html#a5c8f7f39193736c2187ed626940835d5">hwloc_obj_attr_u::hwloc_cache_attr_s</a>
, <a class="el" href="a00009.html#ad914eac61c77481e1b7037877bcc5579">hwloc_obj_attr_u::hwloc_group_attr_s</a>
</li>
<li>discovery
: <a class="el" href="a00016.html#aea3fbd7653d987d81f848636c420504d">hwloc_topology_support</a>
: <a class="el" href="a00017.html#aea3fbd7653d987d81f848636c420504d">hwloc_topology_support</a>
</li>
<li>dmi_board_name
: <a class="el" href="a00009.html#a8b99af84fd38753a91c861f0e856b461">hwloc_obj_attr_u::hwloc_machine_attr_s</a>
: <a class="el" href="a00010.html#a8b99af84fd38753a91c861f0e856b461">hwloc_obj_attr_u::hwloc_machine_attr_s</a>
</li>
<li>dmi_board_vendor
: <a class="el" href="a00009.html#aae85be0b4ebb86501718c4b460df5167">hwloc_obj_attr_u::hwloc_machine_attr_s</a>
: <a class="el" href="a00010.html#aae85be0b4ebb86501718c4b460df5167">hwloc_obj_attr_u::hwloc_machine_attr_s</a>
</li>
</ul>
<h3><a class="anchor" id="index_f">- f -</a></h3><ul>
<li>first_child
: <a class="el" href="a00010.html#af51d08a0a79dba517c06c5afedc8d2dc">hwloc_obj</a>
: <a class="el" href="a00011.html#af51d08a0a79dba517c06c5afedc8d2dc">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_g">- g -</a></h3><ul>
<li>get_proc_cpubind
: <a class="el" href="a00014.html#aae705bc447adc163ead377362c4dfe9f">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#aae705bc447adc163ead377362c4dfe9f">hwloc_topology_cpubind_support</a>
</li>
<li>get_thisproc_cpubind
: <a class="el" href="a00014.html#a77a09ddd78ee3e9ff5f532a6ac74f7eb">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#a77a09ddd78ee3e9ff5f532a6ac74f7eb">hwloc_topology_cpubind_support</a>
</li>
<li>get_thisthread_cpubind
: <a class="el" href="a00014.html#a80d762e532d677dff262d83cc7bb1c60">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#a80d762e532d677dff262d83cc7bb1c60">hwloc_topology_cpubind_support</a>
</li>
<li>get_thread_cpubind
: <a class="el" href="a00014.html#a8dd4d8531ed2eebdce1507e7d104154e">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#a8dd4d8531ed2eebdce1507e7d104154e">hwloc_topology_cpubind_support</a>
</li>
<li>group
: <a class="el" href="a00011.html#ae4ba157cc313e2cdd9a82f1c1df7aaa6">hwloc_obj_attr_u</a>
: <a class="el" href="a00012.html#ae4ba157cc313e2cdd9a82f1c1df7aaa6">hwloc_obj_attr_u</a>
</li>
</ul>
<h3><a class="anchor" id="index_l">- l -</a></h3><ul>
<li>last_child
: <a class="el" href="a00010.html#a84bd65634dbc55f4158b74443a9bd04f">hwloc_obj</a>
: <a class="el" href="a00011.html#a84bd65634dbc55f4158b74443a9bd04f">hwloc_obj</a>
</li>
<li>local_memory
: <a class="el" href="a00013.html#a27043a3150660f44ed84916c2d0d7e0e">hwloc_obj_memory_s</a>
: <a class="el" href="a00014.html#a27043a3150660f44ed84916c2d0d7e0e">hwloc_obj_memory_s</a>
</li>
<li>logical_index
: <a class="el" href="a00010.html#a0d07fb7b8935e137c94d75a3eb492ae9">hwloc_obj</a>
: <a class="el" href="a00011.html#a0d07fb7b8935e137c94d75a3eb492ae9">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_m">- m -</a></h3><ul>
<li>machine
: <a class="el" href="a00011.html#a5b42966df7c5bfdc36891e414cc31607">hwloc_obj_attr_u</a>
: <a class="el" href="a00012.html#a5b42966df7c5bfdc36891e414cc31607">hwloc_obj_attr_u</a>
</li>
<li>memory
: <a class="el" href="a00010.html#a1dc830816716213b5f797e4052487864">hwloc_obj</a>
: <a class="el" href="a00011.html#a1dc830816716213b5f797e4052487864">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_n">- n -</a></h3><ul>
<li>name
: <a class="el" href="a00010.html#abb709ec38f2970677e4e57d1d30be96d">hwloc_obj</a>
: <a class="el" href="a00011.html#abb709ec38f2970677e4e57d1d30be96d">hwloc_obj</a>
</li>
<li>next_cousin
: <a class="el" href="a00010.html#a85a788017457129589318b6c39451acf">hwloc_obj</a>
: <a class="el" href="a00011.html#a85a788017457129589318b6c39451acf">hwloc_obj</a>
</li>
<li>next_sibling
: <a class="el" href="a00010.html#a7f2343ed476fe4942e6fffd4cade1b40">hwloc_obj</a>
: <a class="el" href="a00011.html#a7f2343ed476fe4942e6fffd4cade1b40">hwloc_obj</a>
</li>
<li>nodeset
: <a class="el" href="a00010.html#a79982ede313c2190505fc5e3714a16fb">hwloc_obj</a>
: <a class="el" href="a00011.html#a79982ede313c2190505fc5e3714a16fb">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_o">- o -</a></h3><ul>
<li>online_cpuset
: <a class="el" href="a00010.html#a8842d56c2975380f327ea401c5f53564">hwloc_obj</a>
: <a class="el" href="a00011.html#a8842d56c2975380f327ea401c5f53564">hwloc_obj</a>
</li>
<li>os_index
: <a class="el" href="a00010.html#a61a7a80a68eaccbaaa28269e678c81a9">hwloc_obj</a>
: <a class="el" href="a00011.html#a61a7a80a68eaccbaaa28269e678c81a9">hwloc_obj</a>
</li>
<li>os_level
: <a class="el" href="a00010.html#a68766f0b1c4d61b5bad87e3b81dacfde">hwloc_obj</a>
: <a class="el" href="a00011.html#a68766f0b1c4d61b5bad87e3b81dacfde">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_p">- p -</a></h3><ul>
<li>page_types
: <a class="el" href="a00013.html#a865eba7b12b986d72dbe7a2cfd97c50d">hwloc_obj_memory_s</a>
: <a class="el" href="a00014.html#a865eba7b12b986d72dbe7a2cfd97c50d">hwloc_obj_memory_s</a>
</li>
<li>page_types_len
: <a class="el" href="a00013.html#a208c27f4491077d7fb9ba5db8b29cb57">hwloc_obj_memory_s</a>
: <a class="el" href="a00014.html#a208c27f4491077d7fb9ba5db8b29cb57">hwloc_obj_memory_s</a>
</li>
<li>parent
: <a class="el" href="a00010.html#adc494f6aed939992be1c55cca5822900">hwloc_obj</a>
: <a class="el" href="a00011.html#adc494f6aed939992be1c55cca5822900">hwloc_obj</a>
</li>
<li>prev_cousin
: <a class="el" href="a00010.html#ac715989f55ff5a0eb6be2969ee477ec0">hwloc_obj</a>
: <a class="el" href="a00011.html#ac715989f55ff5a0eb6be2969ee477ec0">hwloc_obj</a>
</li>
<li>prev_sibling
: <a class="el" href="a00010.html#a7b89e8c189876c0158a9282aaaf17f50">hwloc_obj</a>
: <a class="el" href="a00011.html#a7b89e8c189876c0158a9282aaaf17f50">hwloc_obj</a>
</li>
<li>pu
: <a class="el" href="a00015.html#ad7bb4ecf7a82f5a04fc632e9592ad3ab">hwloc_topology_discovery_support</a>
: <a class="el" href="a00016.html#ad7bb4ecf7a82f5a04fc632e9592ad3ab">hwloc_topology_discovery_support</a>
</li>
</ul>
<h3><a class="anchor" id="index_s">- s -</a></h3><ul>
<li>set_proc_cpubind
: <a class="el" href="a00014.html#aa166223d1c2a6de7256ab2d8b675a87e">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#aa166223d1c2a6de7256ab2d8b675a87e">hwloc_topology_cpubind_support</a>
</li>
<li>set_thisproc_cpubind
: <a class="el" href="a00014.html#a9403d51657a4d546b3ea9553a2973a27">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#a9403d51657a4d546b3ea9553a2973a27">hwloc_topology_cpubind_support</a>
</li>
<li>set_thisthread_cpubind
: <a class="el" href="a00014.html#a57a89a4b5f1f74fa6cfe176f1e8b0798">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#a57a89a4b5f1f74fa6cfe176f1e8b0798">hwloc_topology_cpubind_support</a>
</li>
<li>set_thread_cpubind
: <a class="el" href="a00014.html#a46fba33e307909ce256624687799dd6d">hwloc_topology_cpubind_support</a>
: <a class="el" href="a00015.html#a46fba33e307909ce256624687799dd6d">hwloc_topology_cpubind_support</a>
</li>
<li>sibling_rank
: <a class="el" href="a00010.html#aaa6043eee6f55869933c1d974efd9acd">hwloc_obj</a>
: <a class="el" href="a00011.html#aaa6043eee6f55869933c1d974efd9acd">hwloc_obj</a>
</li>
<li>size
: <a class="el" href="a00012.html#af0619463fb5d10052b7fe3495a66d74b">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a>
, <a class="el" href="a00007.html#a3c68235220554308f89768f281ad1e62">hwloc_obj_attr_u::hwloc_cache_attr_s</a>
: <a class="el" href="a00013.html#af0619463fb5d10052b7fe3495a66d74b">hwloc_obj_memory_s::hwloc_obj_memory_page_type_s</a>
, <a class="el" href="a00008.html#a3c68235220554308f89768f281ad1e62">hwloc_obj_attr_u::hwloc_cache_attr_s</a>
</li>
</ul>
<h3><a class="anchor" id="index_t">- t -</a></h3><ul>
<li>total_memory
: <a class="el" href="a00013.html#a68c3323d2d0a248d1b7fec7af44bebe3">hwloc_obj_memory_s</a>
: <a class="el" href="a00014.html#a68c3323d2d0a248d1b7fec7af44bebe3">hwloc_obj_memory_s</a>
</li>
<li>type
: <a class="el" href="a00010.html#acc4f0803f244867e68fe0036800be5de">hwloc_obj</a>
: <a class="el" href="a00011.html#acc4f0803f244867e68fe0036800be5de">hwloc_obj</a>
</li>
</ul>
<h3><a class="anchor" id="index_u">- u -</a></h3><ul>
<li>userdata
: <a class="el" href="a00010.html#a76fd3ac94401cf32dfccc3a3a8de68a5">hwloc_obj</a>
: <a class="el" href="a00011.html#a76fd3ac94401cf32dfccc3a3a8de68a5">hwloc_obj</a>
</li>
</ul>
</div>

Просмотреть файл

@ -20,7 +20,7 @@
</div>
</div>
<div class="contents">
<h1>Hardware Locality </h1><h3 class="version">1.0rc1 </h3><h1 class="sub">Portable abstraction of hierarchical architectures for high-performance computing</h1>
<h1>Hardware Locality </h1><h3 class="version">1.0rc2 </h3><h1 class="sub">Portable abstraction of hierarchical architectures for high-performance computing</h1>
<hr/>
<div class="section" id="introduction">
@ -28,7 +28,7 @@
Introduction</a></h2>
<p>hwloc provides command line tools and a C API to obtain the hierarchical map of key computing elements, such as: NUMA memory nodes, shared caches, processor sockets, processor cores, and processing units (logical processors or "threads"). hwloc also gathers various attributes such as cache and memory information, and is portable across a variety of different operating systems and platforms.</p>
<p>hwloc primarily aims at helping high-performance computing (HPC) applications, but is also applicable to any project seeking to exploit code and/or data locality on modern computing platforms.</p>
<p>Note that the hwloc project represents the merger of the libtopology project from INRIA and the Portable Linux Processor Affinity (PLPA) sub-project from Open MPI. <em>Both of these prior projects are now deprecated.</em> The first hwloc release is essentially a "re-branding" of the libtopology code base, but with both a few genuinely new features and a few PLPA-like features added in. More new features and more PLPA-like features will be added to hwloc over time. See <a class="el" href="a00006.html">Switching from PLPA to hwloc</a> for more details about converting your application from PLPA to hwloc.</p>
<p>Note that the hwloc project represents the merger of the libtopology project from INRIA and the Portable Linux Processor Affinity (PLPA) sub-project from Open MPI. <em>Both of these prior projects are now deprecated.</em> The first hwloc release is essentially a "re-branding" of the libtopology code base, but with both a few genuinely new features and a few PLPA-like features added in. More new features and more PLPA-like features will be added to hwloc over time. See <a class="el" href="a00007.html">Switching from PLPA to hwloc</a> for more details about converting your application from PLPA to hwloc.</p>
<p>hwloc supports the following operating systems:</p>
<ul>
<li>
@ -165,9 +165,9 @@ Machine (16GB)
</div><div class="section" id="interface">
<h2><a class="anchor" id="interface">
Programming interface</a></h2>
<p>The basic interface is available in <a class="el" href="a00021_source.html" title="The hwloc API.">hwloc.h</a>. It mostly offers low-level routines for advanced programmers that want to manually manipulate objects and follow links between them. Developers should look at <a class="el" href="a00019_source.html" title="High-level hwloc traversal helpers.">hwloc/helper.h</a>, which provides good higher-level topology traversal examples.</p>
<p>Each object contains a cpuset describing the list of processing units that it contains. These cpusets may be used for <a class="el" href="a00035.html">Binding</a>. hwloc offers an extensive cpuset manipulation interface in <a class="el" href="a00017_source.html" title="The Cpuset API, for use in hwloc itself.">hwloc/cpuset.h</a>.</p>
<p>Moreover, hwloc also comes with additional helpers for interoperability with several commonly used environments. For Linux, some specific helpers are available in <a class="el" href="a00023_source.html" title="Macros to help interaction between hwloc and Linux.">hwloc/linux.h</a>, and <a class="el" href="a00022_source.html" title="Macros to help interaction between hwloc and Linux libnuma.">hwloc/linux-libnuma.h</a> if using libnuma. On glibc-based systems, additional helpers are available in <a class="el" href="a00018_source.html" title="Macros to help interaction between hwloc and glibc scheduling routines.">hwloc/glibc-sched.h</a>. For Linux systems with the OpenFabrics verbs library, some dedicated helpers are provided in <a class="el" href="a00024_source.html" title="Macros to help interaction between hwloc and OpenFabrics verbs.">hwloc/openfabrics-verbs.h</a> (this helper file is not yet useful on non-Linux systems with the OpenFabrics verbs library).</p>
<p>The basic interface is available in <a class="el" href="a00022_source.html" title="The hwloc API.">hwloc.h</a>. It essentially offers low-level routines for advanced programmers that want to manually manipulate objects and follow links between them. Developers should also look at <a class="el" href="a00020_source.html" title="High-level hwloc traversal helpers.">hwloc/helper.h</a>, which provides good higher-level topology traversal examples.</p>
<p>Each object contains a cpuset describing the list of processing units that it contains. These cpusets may be used for <a class="el" href="a00036.html">Binding</a>. hwloc offers an extensive cpuset manipulation interface in <a class="el" href="a00018_source.html" title="The Cpuset API, for use in hwloc itself.">hwloc/cpuset.h</a>.</p>
<p>Moreover, hwloc also comes with additional helpers for interoperability with several commonly used environments. See the <a class="el" href="a00004.html">Interoperability with other software</a> section for details.</p>
<p>To precisely define the vocabulary used by hwloc, a <a class="el" href="a00001.html">Terms and Definitions</a> section is available and should probably be read first.</p>
<p>Further documentation is available in a full set of HTML pages, man pages, and self-contained PDF files (formatted for both both US letter and A4 formats) in the source tarball in doc/doxygen-doc/. If you are building from a Subversion checkout, you will need to have Doxygen and pdflatex installed -- the documentation will be built during the normal "make" process. The documentation is installed during "make
install" to $prefix/share/doc/hwloc/ and your systems default man page tree (under $prefix, of course).</p>
@ -185,16 +185,16 @@ API example</a></h2>
<span class="preprocessor">#include &lt;hwloc.h&gt;</span>
<span class="keyword">static</span> <span class="keywordtype">void</span> print_children(<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj,
<span class="keyword">static</span> <span class="keywordtype">void</span> print_children(<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology, <a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj,
<span class="keywordtype">int</span> depth)
{
<span class="keywordtype">char</span> <span class="keywordtype">string</span>[128];
<span class="keywordtype">unsigned</span> i;
<a class="code" href="a00034.html#ga5c6a61a83f4790b421e2f62e9088446f" title="Stringify a given topology object into a human-readable form.">hwloc_obj_snprintf</a>(<span class="keywordtype">string</span>, <span class="keyword">sizeof</span>(<span class="keywordtype">string</span>), topology, obj, <span class="stringliteral">&quot;#&quot;</span>, 0);
<a class="code" href="a00035.html#ga5c6a61a83f4790b421e2f62e9088446f" title="Stringify a given topology object into a human-readable form.">hwloc_obj_snprintf</a>(<span class="keywordtype">string</span>, <span class="keyword">sizeof</span>(<span class="keywordtype">string</span>), topology, obj, <span class="stringliteral">&quot;#&quot;</span>, 0);
printf(<span class="stringliteral">&quot;%*s%s\n&quot;</span>, 2*depth, <span class="stringliteral">&quot;&quot;</span>, <span class="keywordtype">string</span>);
<span class="keywordflow">for</span> (i = 0; i &lt; obj-&gt;<a class="code" href="a00010.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a>; i++) {
print_children(topology, obj-&gt;<a class="code" href="a00010.html#a04d05403da37bfe17cd63b7c7dd07b1f" title="Children, children[0 .. arity -1].">children</a>[i], depth + 1);
<span class="keywordflow">for</span> (i = 0; i &lt; obj-&gt;<a class="code" href="a00011.html#aac3f6da35c9b57599909a44ce2b716c1" title="Number of children.">arity</a>; i++) {
print_children(topology, obj-&gt;<a class="code" href="a00011.html#a04d05403da37bfe17cd63b7c7dd07b1f" title="Children, children[0 .. arity -1].">children</a>[i], depth + 1);
}
}
@ -206,12 +206,12 @@ API example</a></h2>
<span class="keywordtype">int</span> levels;
<span class="keywordtype">char</span> <span class="keywordtype">string</span>[128];
<span class="keywordtype">int</span> topodepth;
<a class="code" href="a00026.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology;
<a class="code" href="a00045.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> cpuset;
<a class="code" href="a00010.html" title="Structure of a topology object.">hwloc_obj_t</a> obj;
<a class="code" href="a00027.html#ga9d1e76ee15a7dee158b786c30b6a6e38" title="Topology context.">hwloc_topology_t</a> topology;
<a class="code" href="a00046.html#ga7366332f7090f5b54d4b25a0c2c4b411" title="Set of CPUs represented as an opaque pointer to an internal bitmask.">hwloc_cpuset_t</a> cpuset;
<a class="code" href="a00011.html" title="Structure of a topology object.">hwloc_obj_t</a> obj;
<span class="comment">/* Allocate and initialize topology object. */</span>
<a class="code" href="a00029.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init</a>(&amp;topology);
<a class="code" href="a00030.html#ga5c2d6f476af87005c7bd0811d4548b9f" title="Allocate a topology context.">hwloc_topology_init</a>(&amp;topology);
<span class="comment">/* ... Optionally, put detection configuration here to ignore</span>
<span class="comment"> some objects types, define a synthetic topology, etc.... </span>
@ -221,11 +221,11 @@ API example</a></h2>
<span class="comment"> Detection. */</span>
<span class="comment">/* Perform the topology detection. */</span>
<a class="code" href="a00029.html#ga91e2e6427b95fb7339c99dbbef996e71" title="Build the actual topology.">hwloc_topology_load</a>(topology);
<a class="code" href="a00030.html#ga91e2e6427b95fb7339c99dbbef996e71" title="Build the actual topology.">hwloc_topology_load</a>(topology);
<span class="comment">/* Optionally, get some additional topology information</span>
<span class="comment"> in case we need the topology depth later. */</span>
topodepth = <a class="code" href="a00032.html#ga8c30b0cec55074eb3ed34e4f2a1a9937" title="Get the depth of the hierachical tree of objects.">hwloc_topology_get_depth</a>(topology);
topodepth = <a class="code" href="a00033.html#ga8c30b0cec55074eb3ed34e4f2a1a9937" title="Get the depth of the hierachical tree of objects.">hwloc_topology_get_depth</a>(topology);
<span class="comment">/*****************************************************************</span>
<span class="comment"> * First example:</span>
@ -234,10 +234,10 @@ API example</a></h2>
<span class="comment"> *****************************************************************/</span>
<span class="keywordflow">for</span> (depth = 0; depth &lt; topodepth; depth++) {
printf(<span class="stringliteral">&quot;*** Objects at level %d\n&quot;</span>, depth);
<span class="keywordflow">for</span> (i = 0; i &lt; <a class="code" href="a00032.html#ga20cfe2456f4cfdd789c9aca6d2fdd69f" title="Returns the width of level at depth depth.">hwloc_get_nbobjs_by_depth</a>(topology, depth);
<span class="keywordflow">for</span> (i = 0; i &lt; <a class="code" href="a00033.html#ga20cfe2456f4cfdd789c9aca6d2fdd69f" title="Returns the width of level at depth depth.">hwloc_get_nbobjs_by_depth</a>(topology, depth);
i++) {
<a class="code" href="a00034.html#ga5c6a61a83f4790b421e2f62e9088446f" title="Stringify a given topology object into a human-readable form.">hwloc_obj_snprintf</a>(<span class="keywordtype">string</span>, <span class="keyword">sizeof</span>(<span class="keywordtype">string</span>), topology,
<a class="code" href="a00033.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a>(topology, depth, i),
<a class="code" href="a00035.html#ga5c6a61a83f4790b421e2f62e9088446f" title="Stringify a given topology object into a human-readable form.">hwloc_obj_snprintf</a>(<span class="keywordtype">string</span>, <span class="keyword">sizeof</span>(<span class="keywordtype">string</span>), topology,
<a class="code" href="a00034.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a>(topology, depth, i),
<span class="stringliteral">&quot;#&quot;</span>, 0);
printf(<span class="stringliteral">&quot;Index %u: %s\n&quot;</span>, i, <span class="keywordtype">string</span>);
}
@ -248,18 +248,18 @@ API example</a></h2>
<span class="comment"> * Walk the topology with a tree style.</span>
<span class="comment"> *****************************************************************/</span>
printf(<span class="stringliteral">&quot;*** Printing overall tree\n&quot;</span>);
print_children(topology, <a class="code" href="a00037.html#ga643d25c9fa7e0ca3ac7e0c74f1b0bdc6" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology), 0);
print_children(topology, <a class="code" href="a00038.html#ga632edae4a651996895ebde85ea2c1264" title="Returns the top-object of the topology-tree.">hwloc_get_root_obj</a>(topology), 0);
<span class="comment">/*****************************************************************</span>
<span class="comment"> * Third example:</span>
<span class="comment"> * Print the number of sockets.</span>
<span class="comment"> *****************************************************************/</span>
depth = <a class="code" href="a00032.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a1ac6e07775ae4324b3fe9dbd72c785ec" title="Socket, physical package, or chip. In the physical meaning, i.e. that you can add...">HWLOC_OBJ_SOCKET</a>);
<span class="keywordflow">if</span> (depth == <a class="code" href="a00032.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>) {
depth = <a class="code" href="a00033.html#gaea7c64dd59467f5201ba87712710b14d" title="Returns the depth of objects of type type.">hwloc_get_type_depth</a>(topology, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a1ac6e07775ae4324b3fe9dbd72c785ec" title="Socket, physical package, or chip. In the physical meaning, i.e. that you can add...">HWLOC_OBJ_SOCKET</a>);
<span class="keywordflow">if</span> (depth == <a class="code" href="a00033.html#ggaf4e663cf42bbe20756b849c6293ef575a0565ab92ab72cb0cec91e23003294aad" title="No object of given type exists in the topology.">HWLOC_TYPE_DEPTH_UNKNOWN</a>) {
printf(<span class="stringliteral">&quot;*** The number of sockets is unknown\n&quot;</span>);
} <span class="keywordflow">else</span> {
printf(<span class="stringliteral">&quot;*** %u socket(s)\n&quot;</span>,
<a class="code" href="a00032.html#ga20cfe2456f4cfdd789c9aca6d2fdd69f" title="Returns the width of level at depth depth.">hwloc_get_nbobjs_by_depth</a>(topology, depth));
<a class="code" href="a00033.html#ga20cfe2456f4cfdd789c9aca6d2fdd69f" title="Returns the width of level at depth depth.">hwloc_get_nbobjs_by_depth</a>(topology, depth));
}
<span class="comment">/*****************************************************************</span>
@ -269,12 +269,12 @@ API example</a></h2>
<span class="comment"> *****************************************************************/</span>
levels = 0;
size = 0;
<span class="keywordflow">for</span> (obj = <a class="code" href="a00033.html#gaabd26357fea30ceb7754ad970b9a0aaa" title="Returns the topology object at index index with type type.">hwloc_get_obj_by_type</a>(topology, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a>, 0);
<span class="keywordflow">for</span> (obj = <a class="code" href="a00034.html#ga701f83b2cf0cb8e0acd58cd2dc1c67a2" title="Returns the topology object at index index with type type.">hwloc_get_obj_by_type</a>(topology, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55abca6887e80cb291353b0a0c1da83f661" title="Processing Unit, or (Logical) Processor. An execution unit (may share a core with...">HWLOC_OBJ_PU</a>, 0);
obj;
obj = obj-&gt;<a class="code" href="a00010.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>)
<span class="keywordflow">if</span> (obj-&gt;<a class="code" href="a00010.html#acc4f0803f244867e68fe0036800be5de" title="Type of object.">type</a> == <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc" title="Data cache. Can be L1, L2, L3, ...">HWLOC_OBJ_CACHE</a>) {
obj = obj-&gt;<a class="code" href="a00011.html#adc494f6aed939992be1c55cca5822900" title="Parent, NULL if root (system object).">parent</a>)
<span class="keywordflow">if</span> (obj-&gt;<a class="code" href="a00011.html#acc4f0803f244867e68fe0036800be5de" title="Type of object.">type</a> == <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55a56ee0b7eca88f363b75b34fdde8c9ddc" title="Data cache. Can be L1, L2, L3, ...">HWLOC_OBJ_CACHE</a>) {
levels++;
size += obj-&gt;<a class="code" href="a00010.html#accd40e29f71f19e88db62ea3df02adc8" title="Object type-specific Attributes.">attr</a>-&gt;<a class="code" href="a00011.html#ab5a8ae3bf490e6b1071fea53f7382836" title="Cache-specific Object Attributes.">cache</a>.<a class="code" href="a00007.html#a3c68235220554308f89768f281ad1e62" title="Size of cache in bytes.">size</a>;
size += obj-&gt;<a class="code" href="a00011.html#accd40e29f71f19e88db62ea3df02adc8" title="Object type-specific Attributes.">attr</a>-&gt;<a class="code" href="a00012.html#ab5a8ae3bf490e6b1071fea53f7382836" title="Cache-specific Object Attributes.">cache</a>.<a class="code" href="a00008.html#a3c68235220554308f89768f281ad1e62" title="Size of cache in bytes.">size</a>;
}
printf(<span class="stringliteral">&quot;*** Logical processor 0 has %u caches totaling %luKB\n&quot;</span>,
levels, size / 1024);
@ -286,33 +286,33 @@ API example</a></h2>
<span class="comment"> * First find out where cores are, or else smaller sets of CPUs if</span>
<span class="comment"> * the OS doesn&#39;t have the notion of a &quot;core&quot;.</span>
<span class="comment"> *****************************************************************/</span>
depth = <a class="code" href="a00036.html#gaf324fdd1fcb895c32cc6540c92e9245a" title="Returns the depth of objects of type type or below.">hwloc_get_type_or_below_depth</a>(topology, <a class="code" href="a00027.html#ggacd37bb612667dc437d66bfb175a8dc55ac793958f330bca371aa1535de8aff45f" title="Core. A computation unit (may be shared by several logical processors).">HWLOC_OBJ_CORE</a>);
depth = <a class="code" href="a00037.html#ga0ffafb4c0ae13b9a7541ca820ca34883" title="Returns the depth of objects of type type or below.">hwloc_get_type_or_below_depth</a>(topology, <a class="code" href="a00028.html#ggacd37bb612667dc437d66bfb175a8dc55ac793958f330bca371aa1535de8aff45f" title="Core. A computation unit (may be shared by several logical processors).">HWLOC_OBJ_CORE</a>);
<span class="comment">/* Get last core. */</span>
obj = <a class="code" href="a00033.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a>(topology, depth,
<a class="code" href="a00032.html#ga20cfe2456f4cfdd789c9aca6d2fdd69f" title="Returns the width of level at depth depth.">hwloc_get_nbobjs_by_depth</a>(topology, depth) - 1);
obj = <a class="code" href="a00034.html#gaedd78240b0c1108355586a268ec5a697" title="Returns the topology object at index index from depth depth.">hwloc_get_obj_by_depth</a>(topology, depth,
<a class="code" href="a00033.html#ga20cfe2456f4cfdd789c9aca6d2fdd69f" title="Returns the width of level at depth depth.">hwloc_get_nbobjs_by_depth</a>(topology, depth) - 1);
<span class="keywordflow">if</span> (obj) {
<span class="comment">/* Get a copy of its cpuset that we may modify. */</span>
cpuset = <a class="code" href="a00045.html#ga468c6e3fd92a9d0db1fb56634a851be3" title="Duplicate CPU set set by allocating a new CPU set and copying set&amp;#39;s contents...">hwloc_cpuset_dup</a>(obj-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
cpuset = <a class="code" href="a00046.html#ga468c6e3fd92a9d0db1fb56634a851be3" title="Duplicate CPU set set by allocating a new CPU set and copying set&amp;#39;s contents...">hwloc_cpuset_dup</a>(obj-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
<span class="comment">/* Get only one logical processor (in case the core is</span>
<span class="comment"> SMT/hyperthreaded). */</span>
<a class="code" href="a00045.html#gace7ad3d2a71d9884e7a28311228931af" title="Keep a single CPU among those set in CPU set set.">hwloc_cpuset_singlify</a>(cpuset);
<a class="code" href="a00046.html#gace7ad3d2a71d9884e7a28311228931af" title="Keep a single CPU among those set in CPU set set.">hwloc_cpuset_singlify</a>(cpuset);
<span class="comment">/* And try to bind ourself there. */</span>
<span class="keywordflow">if</span> (<a class="code" href="a00035.html#ga42f02baaf7dc0c0f5a6bbeca731fd144" title="Bind current process or thread on cpus given in cpuset set.">hwloc_set_cpubind</a>(topology, cpuset, 0)) {
<span class="keywordflow">if</span> (<a class="code" href="a00036.html#ga42f02baaf7dc0c0f5a6bbeca731fd144" title="Bind current process or thread on cpus given in cpuset set.">hwloc_set_cpubind</a>(topology, cpuset, 0)) {
<span class="keywordtype">char</span> *str;
<a class="code" href="a00045.html#ga7a89398cbc58c9095aa094b9aeacbf00" title="Stringify a cpuset into a newly allocated string.">hwloc_cpuset_asprintf</a>(&amp;str, obj-&gt;<a class="code" href="a00010.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
<a class="code" href="a00046.html#ga7a89398cbc58c9095aa094b9aeacbf00" title="Stringify a cpuset into a newly allocated string.">hwloc_cpuset_asprintf</a>(&amp;str, obj-&gt;<a class="code" href="a00011.html#a67925e0f2c47f50408fbdb9bddd0790f" title="CPUs covered by this object.">cpuset</a>);
printf(<span class="stringliteral">&quot;Couldn&#39;t bind to cpuset %s\n&quot;</span>, str);
free(str);
}
<span class="comment">/* Free our cpuset copy */</span>
<a class="code" href="a00045.html#gaaac6c1536cdcc35f1a1a3a9ab84da80d" title="Free CPU set set.">hwloc_cpuset_free</a>(cpuset);
<a class="code" href="a00046.html#gaaac6c1536cdcc35f1a1a3a9ab84da80d" title="Free CPU set set.">hwloc_cpuset_free</a>(cpuset);
}
<span class="comment">/* Destroy topology object. */</span>
<a class="code" href="a00029.html#ga6040925d3ee4bbb2647f2a321aca5f4b" title="Terminate and free a topology context.">hwloc_topology_destroy</a>(topology);
<a class="code" href="a00030.html#ga6040925d3ee4bbb2647f2a321aca5f4b" title="Terminate and free a topology context.">hwloc_topology_destroy</a>(topology);
<span class="keywordflow">return</span> 0;
}

Просмотреть файл

@ -21,33 +21,33 @@
</div>
<div class="contents">
<h1>Modules</h1>Here is a list of all modules:<ul>
<li><a class="el" href="a00025.html">API version</a></li>
<li><a class="el" href="a00026.html">Topology context</a></li>
<li><a class="el" href="a00027.html">Topology Object Types</a></li>
<li><a class="el" href="a00028.html">Topology Objects</a></li>
<li><a class="el" href="a00029.html">Create and Destroy Topologies</a></li>
<li><a class="el" href="a00030.html">Configure Topology Detection</a></li>
<li><a class="el" href="a00031.html">Tinker with topologies.</a></li>
<li><a class="el" href="a00032.html">Get some Topology Information</a></li>
<li><a class="el" href="a00033.html">Retrieve Objects</a></li>
<li><a class="el" href="a00034.html">Object/String Conversion</a></li>
<li><a class="el" href="a00035.html">Binding</a></li>
<li><a class="el" href="a00036.html">Object Type Helpers</a></li>
<li><a class="el" href="a00037.html">Basic Traversal Helpers</a></li>
<li><a class="el" href="a00038.html">Finding Objects Inside a CPU set</a></li>
<li><a class="el" href="a00039.html">Finding a single Object covering at least CPU set</a></li>
<li><a class="el" href="a00040.html">Finding a set of similar Objects covering at least a CPU set</a></li>
<li><a class="el" href="a00041.html">Cache-specific Finding Helpers</a></li>
<li><a class="el" href="a00042.html">Advanced Traversal Helpers</a></li>
<li><a class="el" href="a00043.html">Binding Helpers</a></li>
<li><a class="el" href="a00044.html">Cpuset Helpers</a></li>
<li><a class="el" href="a00045.html">The Cpuset API</a></li>
<li><a class="el" href="a00046.html">Helpers for manipulating glibc sched affinity</a></li>
<li><a class="el" href="a00047.html">Linux-only helpers</a></li>
<li><a class="el" href="a00048.html">Helpers for manipulating Linux libnuma unsigned long masks</a></li>
<li><a class="el" href="a00049.html">Helpers for manipulating Linux libnuma bitmask</a></li>
<li><a class="el" href="a00050.html">Helpers for manipulating Linux libnuma nodemask_t</a></li>
<li><a class="el" href="a00051.html">OpenFabrics-Specific Functions</a></li>
<li><a class="el" href="a00026.html">API version</a></li>
<li><a class="el" href="a00027.html">Topology context</a></li>
<li><a class="el" href="a00028.html">Topology Object Types</a></li>
<li><a class="el" href="a00029.html">Topology Objects</a></li>
<li><a class="el" href="a00030.html">Create and Destroy Topologies</a></li>
<li><a class="el" href="a00031.html">Configure Topology Detection</a></li>
<li><a class="el" href="a00032.html">Tinker with topologies.</a></li>
<li><a class="el" href="a00033.html">Get some Topology Information</a></li>
<li><a class="el" href="a00034.html">Retrieve Objects</a></li>
<li><a class="el" href="a00035.html">Object/String Conversion</a></li>
<li><a class="el" href="a00036.html">Binding</a></li>
<li><a class="el" href="a00037.html">Object Type Helpers</a></li>
<li><a class="el" href="a00038.html">Basic Traversal Helpers</a></li>
<li><a class="el" href="a00039.html">Finding Objects Inside a CPU set</a></li>
<li><a class="el" href="a00040.html">Finding a single Object covering at least CPU set</a></li>
<li><a class="el" href="a00041.html">Finding a set of similar Objects covering at least a CPU set</a></li>
<li><a class="el" href="a00042.html">Cache-specific Finding Helpers</a></li>
<li><a class="el" href="a00043.html">Advanced Traversal Helpers</a></li>
<li><a class="el" href="a00044.html">Binding Helpers</a></li>
<li><a class="el" href="a00045.html">Cpuset Helpers</a></li>
<li><a class="el" href="a00046.html">The Cpuset API</a></li>
<li><a class="el" href="a00047.html">Helpers for manipulating glibc sched affinity</a></li>
<li><a class="el" href="a00048.html">Linux-only helpers</a></li>
<li><a class="el" href="a00049.html">Helpers for manipulating Linux libnuma unsigned long masks</a></li>
<li><a class="el" href="a00050.html">Helpers for manipulating Linux libnuma bitmask</a></li>
<li><a class="el" href="a00051.html">Helpers for manipulating Linux libnuma nodemask_t</a></li>
<li><a class="el" href="a00052.html">OpenFabrics-Specific Functions</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;

Просмотреть файл

@ -27,11 +27,13 @@
</li>
<li><a class="el" href="a00003.html">Environment variables</a>
</li>
<li><a class="el" href="a00004.html">Thread safety</a>
<li><a class="el" href="a00004.html">Interoperability with other software</a>
</li>
<li><a class="el" href="a00005.html">Embedding hwloc in other software</a>
<li><a class="el" href="a00005.html">Thread safety</a>
</li>
<li><a class="el" href="a00006.html">Switching from PLPA to hwloc</a>
<li><a class="el" href="a00006.html">Embedding hwloc in other software</a>
</li>
<li><a class="el" href="a00007.html">Switching from PLPA to hwloc</a>
</li>
</ul>
</div>

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,4 +1,4 @@
.TH "hwloc_obj" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "hwloc_obj" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "hwloc_obj_attr_u" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "hwloc_obj_attr_u" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "hwloc_obj_attr_u::hwloc_cache_attr_s" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "hwloc_obj_attr_u::hwloc_cache_attr_s" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "hwloc_obj_attr_u::hwloc_group_attr_s" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "hwloc_obj_attr_u::hwloc_group_attr_s" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "hwloc_obj_attr_u::hwloc_machine_attr_s" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "hwloc_obj_attr_u::hwloc_machine_attr_s" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "hwloc_obj_memory_s" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "hwloc_obj_memory_s" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "hwloc_topology_cpubind_support" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "hwloc_topology_cpubind_support" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "hwloc_topology_discovery_support" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "hwloc_topology_discovery_support" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "hwloc_topology_support" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "hwloc_topology_support" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Binding" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Binding" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Configure Topology Detection" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Configure Topology Detection" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Object/String Conversion" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Object/String Conversion" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "The Cpuset API" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "The Cpuset API" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Create and Destroy Topologies" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Create and Destroy Topologies" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Helpers for manipulating glibc sched affinity" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Helpers for manipulating glibc sched affinity" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@ -7,22 +7,22 @@ Helpers for manipulating glibc sched affinity \-
.in +1c
.ti -1c
.RI "static __inline int \fBhwloc_cpuset_to_glibc_sched_affinity\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_const_cpuset_t\fP hwlocset, cpu_set_t *schedset, size_t schedsetsize)"
.RI "static __hwloc_inline int \fBhwloc_cpuset_to_glibc_sched_affinity\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_const_cpuset_t\fP hwlocset, cpu_set_t *schedset, size_t schedsetsize)"
.br
.RI "\fIConvert hwloc CPU set \fCtoposet\fP into glibc sched affinity CPU set \fCschedset\fP. \fP"
.ti -1c
.RI "static __inline int \fBhwloc_cpuset_from_glibc_sched_affinity\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_cpuset_t\fP hwlocset, const cpu_set_t *schedset, size_t schedsetsize)"
.RI "static __hwloc_inline int \fBhwloc_cpuset_from_glibc_sched_affinity\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_cpuset_t\fP hwlocset, const cpu_set_t *schedset, size_t schedsetsize)"
.br
.RI "\fIConvert glibc sched affinity CPU set \fCschedset\fP into hwloc CPU set. \fP"
.in -1c
.SH "Function Documentation"
.PP
.SS "static __inline int hwloc_cpuset_from_glibc_sched_affinity (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_cpuset_t\fP hwlocset, const cpu_set_t * schedset, size_t schedsetsize)\fC [static]\fP"
.SS "static __hwloc_inline int hwloc_cpuset_from_glibc_sched_affinity (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_cpuset_t\fP hwlocset, const cpu_set_t * schedset, size_t schedsetsize)\fC [static]\fP"
.PP
Convert glibc sched affinity CPU set \fCschedset\fP into hwloc CPU set. This function may be used before calling sched_setaffinity or any other function that takes a cpu_set_t as input parameter.
.PP
\fCschedsetsize\fP should be sizeof(cpu_set_t) unless \fCschedset\fP was dynamically allocated with CPU_ALLOC
.SS "static __inline int hwloc_cpuset_to_glibc_sched_affinity (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_const_cpuset_t\fP hwlocset, cpu_set_t * schedset, size_t schedsetsize)\fC [static]\fP"
.SS "static __hwloc_inline int hwloc_cpuset_to_glibc_sched_affinity (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_const_cpuset_t\fP hwlocset, cpu_set_t * schedset, size_t schedsetsize)\fC [static]\fP"
.PP
Convert hwloc CPU set \fCtoposet\fP into glibc sched affinity CPU set \fCschedset\fP. This function may be used before calling sched_setaffinity or any other function that takes a cpu_set_t as input parameter.
.PP

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Binding Helpers" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Binding Helpers" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@ -7,13 +7,13 @@ Binding Helpers \-
.in +1c
.ti -1c
.RI "static __inline void \fBhwloc_distribute\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP root, \fBhwloc_cpuset_t\fP *cpuset, unsigned n)"
.RI "static __hwloc_inline void \fBhwloc_distribute\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP root, \fBhwloc_cpuset_t\fP *cpuset, unsigned n)"
.br
.RI "\fIDistribute \fCn\fP items over the topology under \fCroot\fP. \fP"
.in -1c
.SH "Function Documentation"
.PP
.SS "static __inline void hwloc_distribute (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP root, \fBhwloc_cpuset_t\fP * cpuset, unsigned n)\fC [static]\fP"
.SS "static __hwloc_inline void hwloc_distribute (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_t\fP root, \fBhwloc_cpuset_t\fP * cpuset, unsigned n)\fC [static]\fP"
.PP
Distribute \fCn\fP items over the topology under \fCroot\fP. Array \fCcpuset\fP will be filled with \fCn\fP cpusets distributed linearly over the topology under \fCroot\fP .
.PP

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Cache-specific Finding Helpers" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Cache-specific Finding Helpers" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@ -7,17 +7,17 @@ Cache-specific Finding Helpers \-
.in +1c
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_cache_covering_cpuset\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_cache_covering_cpuset\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)"
.br
.RI "\fIGet the first cache covering a cpuset \fCset\fP. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_shared_cache_covering_obj\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP obj)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_shared_cache_covering_obj\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP obj)"
.br
.RI "\fIGet the first cache shared between an object and somebody else. \fP"
.in -1c
.SH "Function Documentation"
.PP
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_cache_covering_cpuset (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_cache_covering_cpuset (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)\fC [static]\fP"
.PP
Get the first cache covering a cpuset \fCset\fP. \fBReturns:\fP
.RS 4
@ -25,7 +25,7 @@ Get the first cache covering a cpuset \fCset\fP. \fBReturns:\fP
.RE
.PP
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_shared_cache_covering_obj (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP obj)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_shared_cache_covering_obj (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP obj)\fC [static]\fP"
.PP
Get the first cache shared between an object and somebody else. \fBReturns:\fP
.RS 4

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Finding a single Object covering at least CPU set" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Finding a single Object covering at least CPU set" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@ -7,17 +7,17 @@ Finding a single Object covering at least CPU set \-
.in +1c
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_child_covering_cpuset\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_t\fP parent)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_child_covering_cpuset\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_t\fP parent)"
.br
.RI "\fIGet the child covering at least CPU set \fCset\fP. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_obj_covering_cpuset\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_obj_covering_cpuset\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)"
.br
.RI "\fIGet the lowest object covering at least CPU set \fCset\fP. \fP"
.in -1c
.SH "Function Documentation"
.PP
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_child_covering_cpuset (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_t\fP parent)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_child_covering_cpuset (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_t\fP parent)\fC [static]\fP"
.PP
Get the child covering at least CPU set \fCset\fP. \fBReturns:\fP
.RS 4
@ -25,7 +25,7 @@ Get the child covering at least CPU set \fCset\fP. \fBReturns:\fP
.RE
.PP
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_obj_covering_cpuset (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_obj_covering_cpuset (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)\fC [static]\fP"
.PP
Get the lowest object covering at least CPU set \fCset\fP. \fBReturns:\fP
.RS 4

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Finding a set of similar Objects covering at least a CPU set" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Finding a set of similar Objects covering at least a CPU set" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@ -7,20 +7,20 @@ Finding a set of similar Objects covering at least a CPU set \-
.in +1c
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_covering_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, \fBhwloc_obj_t\fP prev)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_covering_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, \fBhwloc_obj_t\fP prev)"
.br
.RI "\fIIterate through same-depth objects covering at least CPU set \fCset\fP. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_covering_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_covering_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)"
.br
.RI "\fIIterate through same-type objects covering at least CPU set \fCset\fP. \fP"
.in -1c
.SH "Function Documentation"
.PP
.SS "static __inline \fBhwloc_obj_t\fP hwloc_get_next_obj_covering_cpuset_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP hwloc_get_next_obj_covering_cpuset_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.PP
Iterate through same-depth objects covering at least CPU set \fCset\fP. If object \fCprev\fP is \fCNULL\fP, return the first object at depth \fCdepth\fP covering at least part of CPU set \fCset\fP. The next invokation should pass the previous return value in \fCprev\fP so as to obtain the next object covering at least another part of \fCset\fP.
.SS "static __inline \fBhwloc_obj_t\fP hwloc_get_next_obj_covering_cpuset_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP hwloc_get_next_obj_covering_cpuset_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.PP
Iterate through same-type objects covering at least CPU set \fCset\fP. If object \fCprev\fP is \fCNULL\fP, return the first object of type \fCtype\fP covering at least part of CPU set \fCset\fP. The next invokation should pass the previous return value in \fCprev\fP so as to obtain the next object of type \fCtype\fP covering at least another part of \fCset\fP.
.PP

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Finding Objects Inside a CPU set" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Finding Objects Inside a CPU set" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@ -7,7 +7,7 @@ Finding Objects Inside a CPU set \-
.in +1c
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP \fBhwloc_get_first_largest_obj_inside_cpuset\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP \fBhwloc_get_first_largest_obj_inside_cpuset\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)"
.br
.RI "\fIGet the first largest object included in the given cpuset \fCset\fP. \fP"
.ti -1c
@ -15,33 +15,33 @@ Finding Objects Inside a CPU set \-
.br
.RI "\fIGet the set of largest objects covering exactly a given cpuset \fCset\fP. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_inside_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, \fBhwloc_obj_t\fP prev)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_inside_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, \fBhwloc_obj_t\fP prev)"
.br
.RI "\fIReturn the next object at depth \fCdepth\fP included in CPU set \fCset\fP. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_inside_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_inside_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)"
.br
.RI "\fIReturn the next object of type \fCtype\fP included in CPU set \fCset\fP. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_obj_inside_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, unsigned idx)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_obj_inside_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, unsigned idx)"
.br
.RI "\fIReturn the \fCindex\fP -th object at depth \fCdepth\fP included in CPU set \fCset\fP. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_obj_inside_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, unsigned idx)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_obj_inside_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, unsigned idx)"
.br
.RI "\fIReturn the \fCidx\fP -th object of type \fCtype\fP included in CPU set \fCset\fP. \fP"
.ti -1c
.RI "static __inline unsigned __hwloc_attribute_pure \fBhwloc_get_nbobjs_inside_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth)"
.RI "static __hwloc_inline unsigned __hwloc_attribute_pure \fBhwloc_get_nbobjs_inside_cpuset_by_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth)"
.br
.RI "\fIReturn the number of objects at depth \fCdepth\fP included in CPU set \fCset\fP. \fP"
.ti -1c
.RI "static __inline int __hwloc_attribute_pure \fBhwloc_get_nbobjs_inside_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type)"
.RI "static __hwloc_inline int __hwloc_attribute_pure \fBhwloc_get_nbobjs_inside_cpuset_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type)"
.br
.RI "\fIReturn the number of objects of type \fCtype\fP included in CPU set \fCset\fP. \fP"
.in -1c
.SH "Function Documentation"
.PP
.SS "static __inline \fBhwloc_obj_t\fP hwloc_get_first_largest_obj_inside_cpuset (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP hwloc_get_first_largest_obj_inside_cpuset (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set)\fC [static]\fP"
.PP
Get the first largest object included in the given cpuset \fCset\fP. \fBReturns:\fP
.RS 4
@ -57,22 +57,22 @@ the number of objects returned in \fCobjs\fP.
.RE
.PP
.SS "static __inline unsigned __hwloc_attribute_pure hwloc_get_nbobjs_inside_cpuset_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth)\fC [static]\fP"
.SS "static __hwloc_inline unsigned __hwloc_attribute_pure hwloc_get_nbobjs_inside_cpuset_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth)\fC [static]\fP"
.PP
Return the number of objects at depth \fCdepth\fP included in CPU set \fCset\fP.
.SS "static __inline int __hwloc_attribute_pure hwloc_get_nbobjs_inside_cpuset_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type)\fC [static]\fP"
.SS "static __hwloc_inline int __hwloc_attribute_pure hwloc_get_nbobjs_inside_cpuset_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type)\fC [static]\fP"
.PP
Return the number of objects of type \fCtype\fP included in CPU set \fCset\fP. If no object for that type exists inside CPU set \fCset\fP, 0 is returned. If there are several levels with objects of that type inside CPU set \fCset\fP, -1 is returned.
.SS "static __inline \fBhwloc_obj_t\fP hwloc_get_next_obj_inside_cpuset_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP hwloc_get_next_obj_inside_cpuset_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.PP
Return the next object at depth \fCdepth\fP included in CPU set \fCset\fP. If \fCprev\fP is \fCNULL\fP, return the first object at depth \fCdepth\fP included in \fCset\fP. The next invokation should pass the previous return value in \fCprev\fP so as to obtain the next object in \fCset\fP.
.SS "static __inline \fBhwloc_obj_t\fP hwloc_get_next_obj_inside_cpuset_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP hwloc_get_next_obj_inside_cpuset_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.PP
Return the next object of type \fCtype\fP included in CPU set \fCset\fP. If there are multiple or no depth for given type, return \fCNULL\fP and let the caller fallback to \fBhwloc_get_next_obj_inside_cpuset_by_depth()\fP.
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_obj_inside_cpuset_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, unsigned idx)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_obj_inside_cpuset_by_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, unsigned depth, unsigned idx)\fC [static]\fP"
.PP
Return the \fCindex\fP -th object at depth \fCdepth\fP included in CPU set \fCset\fP.
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_obj_inside_cpuset_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, unsigned idx)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_obj_inside_cpuset_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP set, \fBhwloc_obj_type_t\fP type, unsigned idx)\fC [static]\fP"
.PP
Return the \fCidx\fP -th object of type \fCtype\fP included in CPU set \fCset\fP. If there are multiple or no depth for given type, return \fCNULL\fP and let the caller fallback to \fBhwloc_get_obj_inside_cpuset_by_depth()\fP.
.SH "Author"

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Advanced Traversal Helpers" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Advanced Traversal Helpers" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@ -11,11 +11,11 @@ Advanced Traversal Helpers \-
.br
.RI "\fIDo a depth-first traversal of the topology to find and sort. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_obj_below_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type1, unsigned idx1, \fBhwloc_obj_type_t\fP type2, unsigned idx2)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_obj_below_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type1, unsigned idx1, \fBhwloc_obj_type_t\fP type2, unsigned idx2)"
.br
.RI "\fIFind an object below another object, both specified by types and indexes. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_obj_below_array_by_type\fP (\fBhwloc_topology_t\fP topology, int nr, \fBhwloc_obj_type_t\fP *typev, unsigned *idxv)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_obj_below_array_by_type\fP (\fBhwloc_topology_t\fP topology, int nr, \fBhwloc_obj_type_t\fP *typev, unsigned *idxv)"
.br
.RI "\fIFind an object below a chain of objects specified by types and indexes. \fP"
.in -1c
@ -31,7 +31,7 @@ the number of objects returned in \fCobjs\fP.
.RE
.PP
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_obj_below_array_by_type (\fBhwloc_topology_t\fP topology, int nr, \fBhwloc_obj_type_t\fP * typev, unsigned * idxv)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_obj_below_array_by_type (\fBhwloc_topology_t\fP topology, int nr, \fBhwloc_obj_type_t\fP * typev, unsigned * idxv)\fC [static]\fP"
.PP
Find an object below a chain of objects specified by types and indexes. This is a generalized version of \fBhwloc_get_obj_below_by_type()\fP.
.PP
@ -40,7 +40,7 @@ Arrays \fCtypev\fP and \fCidxv\fP must contain \fCnr\fP types and indexes.
Start from the top system object and walk the arrays \fCtypev\fP and \fCidxv\fP. For each type and index couple in the arrays, look under the previously found object to find the index-th object of the given type. Indexes are specified within the parent, not withing the entire system.
.PP
For instance, if nr is 3, typev contains NODE, SOCKET and CORE, and idxv contains 0, 1 and 2, return the third core object below the second socket below the first NUMA node.
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_obj_below_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type1, unsigned idx1, \fBhwloc_obj_type_t\fP type2, unsigned idx2)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_obj_below_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type1, unsigned idx1, \fBhwloc_obj_type_t\fP type2, unsigned idx2)\fC [static]\fP"
.PP
Find an object below another object, both specified by types and indexes. Start from the top system object and find object of type \fCtype1\fP and index \fCidx1\fP. Then look below this object and find another object of type \fCtype2\fP and index \fCidx2\fP. Indexes are specified within the parent, not withing the entire system.
.PP

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Basic Traversal Helpers" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Basic Traversal Helpers" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@ -7,66 +7,63 @@ Basic Traversal Helpers \-
.in +1c
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_root_obj\fP (\fBhwloc_topology_t\fP topology)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_root_obj\fP (\fBhwloc_topology_t\fP topology)"
.br
.RI "\fIReturns the top-object of the topology-tree. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_deprecated \fBhwloc_get_system_obj\fP (\fBhwloc_topology_t\fP topology)"
.br
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_ancestor_obj_by_depth\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, unsigned depth, \fBhwloc_obj_t\fP obj)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_ancestor_obj_by_depth\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, unsigned depth, \fBhwloc_obj_t\fP obj)"
.br
.RI "\fIReturns the ancestor object of \fCobj\fP at depth \fCdepth\fP. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_ancestor_obj_by_type\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP obj)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_ancestor_obj_by_type\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP obj)"
.br
.RI "\fIReturns the ancestor object of \fCobj\fP with type \fCtype\fP. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_by_depth\fP (\fBhwloc_topology_t\fP topology, unsigned depth, \fBhwloc_obj_t\fP prev)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_by_depth\fP (\fBhwloc_topology_t\fP topology, unsigned depth, \fBhwloc_obj_t\fP prev)"
.br
.RI "\fIReturns the next object at depth \fCdepth\fP. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP \fBhwloc_get_next_obj_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)"
.br
.RI "\fIReturns the next object of type \fCtype\fP. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_pu_obj_by_os_index\fP (\fBhwloc_topology_t\fP topology, unsigned os_index)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_pu_obj_by_os_index\fP (\fBhwloc_topology_t\fP topology, unsigned os_index)"
.br
.RI "\fIReturns the object of type \fBHWLOC_OBJ_PU\fP with \fCos_index\fP. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP \fBhwloc_get_next_child\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP parent, \fBhwloc_obj_t\fP prev)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP \fBhwloc_get_next_child\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP parent, \fBhwloc_obj_t\fP prev)"
.br
.RI "\fIReturn the next child. \fP"
.ti -1c
.RI "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_common_ancestor_obj\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP obj1, \fBhwloc_obj_t\fP obj2)"
.RI "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure \fBhwloc_get_common_ancestor_obj\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP obj1, \fBhwloc_obj_t\fP obj2)"
.br
.RI "\fIReturns the common parent object to objects lvl1 and lvl2. \fP"
.ti -1c
.RI "static __inline int __hwloc_attribute_pure \fBhwloc_obj_is_in_subtree\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP obj, \fBhwloc_obj_t\fP subtree_root)"
.RI "static __hwloc_inline int __hwloc_attribute_pure \fBhwloc_obj_is_in_subtree\fP (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP obj, \fBhwloc_obj_t\fP subtree_root)"
.br
.RI "\fIReturns true if _obj_ is inside the subtree beginning with \fCsubtree_root\fP. \fP"
.in -1c
.SH "Function Documentation"
.PP
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_ancestor_obj_by_depth (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, unsigned depth, \fBhwloc_obj_t\fP obj)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_ancestor_obj_by_depth (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, unsigned depth, \fBhwloc_obj_t\fP obj)\fC [static]\fP"
.PP
Returns the ancestor object of \fCobj\fP at depth \fCdepth\fP.
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_ancestor_obj_by_type (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP obj)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_ancestor_obj_by_type (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP obj)\fC [static]\fP"
.PP
Returns the ancestor object of \fCobj\fP with type \fCtype\fP.
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_common_ancestor_obj (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP obj1, \fBhwloc_obj_t\fP obj2)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_common_ancestor_obj (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP obj1, \fBhwloc_obj_t\fP obj2)\fC [static]\fP"
.PP
Returns the common parent object to objects lvl1 and lvl2.
.SS "static __inline \fBhwloc_obj_t\fP hwloc_get_next_child (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP parent, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP hwloc_get_next_child (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP parent, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.PP
Return the next child. If \fCprev\fP is \fCNULL\fP, return the first child.
.SS "static __inline \fBhwloc_obj_t\fP hwloc_get_next_obj_by_depth (\fBhwloc_topology_t\fP topology, unsigned depth, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP hwloc_get_next_obj_by_depth (\fBhwloc_topology_t\fP topology, unsigned depth, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.PP
Returns the next object at depth \fCdepth\fP. If \fCprev\fP is \fCNULL\fP, return the first object at depth \fCdepth\fP.
.SS "static __inline \fBhwloc_obj_t\fP hwloc_get_next_obj_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP hwloc_get_next_obj_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type, \fBhwloc_obj_t\fP prev)\fC [static]\fP"
.PP
Returns the next object of type \fCtype\fP. If \fCprev\fP is \fCNULL\fP, return the first object at type \fCtype\fP. If there are multiple or no depth for given type, return \fCNULL\fP and let the caller fallback to \fBhwloc_get_next_obj_by_depth()\fP.
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_pu_obj_by_os_index (\fBhwloc_topology_t\fP topology, unsigned os_index)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_pu_obj_by_os_index (\fBhwloc_topology_t\fP topology, unsigned os_index)\fC [static]\fP"
.PP
Returns the object of type \fBHWLOC_OBJ_PU\fP with \fCos_index\fP. \fBNote:\fP
.RS 4
@ -74,11 +71,10 @@ The \fCos_index\fP field of object should most of the times only be used for pre
.RE
.PP
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_root_obj (\fBhwloc_topology_t\fP topology)\fC [static]\fP"
.SS "static __hwloc_inline \fBhwloc_obj_t\fP __hwloc_attribute_pure hwloc_get_root_obj (\fBhwloc_topology_t\fP topology)\fC [static]\fP"
.PP
Returns the top-object of the topology-tree. Its type is typically \fBHWLOC_OBJ_MACHINE\fP but it could be different for complex topologies. This function replaces the old deprecated \fBhwloc_get_system_obj()\fP.
.SS "static __inline \fBhwloc_obj_t\fP __hwloc_attribute_deprecated hwloc_get_system_obj (\fBhwloc_topology_t\fP topology)\fC [static]\fP"
.SS "static __inline int __hwloc_attribute_pure hwloc_obj_is_in_subtree (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP obj, \fBhwloc_obj_t\fP subtree_root)\fC [static]\fP"
Returns the top-object of the topology-tree. Its type is typically \fBHWLOC_OBJ_MACHINE\fP but it could be different for complex topologies. This function replaces the old deprecated hwloc_get_system_obj().
.SS "static __hwloc_inline int __hwloc_attribute_pure hwloc_obj_is_in_subtree (\fBhwloc_topology_t\fP topology __hwloc_attribute_unused, \fBhwloc_obj_t\fP obj, \fBhwloc_obj_t\fP subtree_root)\fC [static]\fP"
.PP
Returns true if _obj_ is inside the subtree beginning with \fCsubtree_root\fP.
.SH "Author"

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Object Type Helpers" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Object Type Helpers" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@ -7,20 +7,20 @@ Object Type Helpers \-
.in +1c
.ti -1c
.RI "static __inline int __hwloc_attribute_pure \fBhwloc_get_type_or_below_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
.RI "static __hwloc_inline int __hwloc_attribute_pure \fBhwloc_get_type_or_below_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
.br
.RI "\fIReturns the depth of objects of type \fCtype\fP or below. \fP"
.ti -1c
.RI "static __inline int __hwloc_attribute_pure \fBhwloc_get_type_or_above_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
.RI "static __hwloc_inline int __hwloc_attribute_pure \fBhwloc_get_type_or_above_depth\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
.br
.RI "\fIReturns the depth of objects of type \fCtype\fP or above. \fP"
.in -1c
.SH "Function Documentation"
.PP
.SS "static __inline int __hwloc_attribute_pure hwloc_get_type_or_above_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fC [static]\fP"
.SS "static __hwloc_inline int __hwloc_attribute_pure hwloc_get_type_or_above_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fC [static]\fP"
.PP
Returns the depth of objects of type \fCtype\fP or above. If no object of this type is present on the underlying architecture, the function returns the depth of the first 'present' object typically containing \fCtype\fP.
.SS "static __inline int __hwloc_attribute_pure hwloc_get_type_or_below_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fC [static]\fP"
.SS "static __hwloc_inline int __hwloc_attribute_pure hwloc_get_type_or_below_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fC [static]\fP"
.PP
Returns the depth of objects of type \fCtype\fP or below. If no object of this type is present on the underlying architecture, the function returns the depth of the first 'present' object typically found inside \fCtype\fP.
.SH "Author"

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Get some Topology Information" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Get some Topology Information" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@ -30,7 +30,7 @@ Get some Topology Information \-
.br
.RI "\fIReturns the width of level at depth \fCdepth\fP. \fP"
.ti -1c
.RI "static __inline int __hwloc_attribute_pure \fBhwloc_get_nbobjs_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
.RI "static __hwloc_inline int __hwloc_attribute_pure \fBhwloc_get_nbobjs_by_type\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"
.br
.RI "\fIReturns the width of level type \fCtype\fP. \fP"
.ti -1c
@ -63,7 +63,7 @@ Returns the type of objects at depth \fCdepth\fP. \fBReturns:\fP
.SS "HWLOC_DECLSPEC unsigned hwloc_get_nbobjs_by_depth (\fBhwloc_topology_t\fP topology, unsigned depth)"
.PP
Returns the width of level at depth \fCdepth\fP.
.SS "static __inline int __hwloc_attribute_pure hwloc_get_nbobjs_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fC [static]\fP"
.SS "static __hwloc_inline int __hwloc_attribute_pure hwloc_get_nbobjs_by_type (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)\fC [static]\fP"
.PP
Returns the width of level type \fCtype\fP. If no object for that type exists, 0 is returned. If there are several levels with objects of that type, -1 is returned.
.SS "HWLOC_DECLSPEC int hwloc_get_type_depth (\fBhwloc_topology_t\fP topology, \fBhwloc_obj_type_t\fP type)"

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Helpers for manipulating Linux libnuma bitmask" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Helpers for manipulating Linux libnuma bitmask" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@ -7,20 +7,20 @@ Helpers for manipulating Linux libnuma bitmask \-
.in +1c
.ti -1c
.RI "static __inline struct bitmask *__hwloc_attribute_malloc \fBhwloc_cpuset_to_linux_libnuma_bitmask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset)"
.RI "static __hwloc_inline struct bitmask *__hwloc_attribute_malloc \fBhwloc_cpuset_to_linux_libnuma_bitmask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset)"
.br
.RI "\fIConvert hwloc CPU set \fCcpuset\fP into the returned libnuma bitmask. \fP"
.ti -1c
.RI "static __inline int \fBhwloc_cpuset_from_linux_libnuma_bitmask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const struct bitmask *bitmask)"
.RI "static __hwloc_inline int \fBhwloc_cpuset_from_linux_libnuma_bitmask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const struct bitmask *bitmask)"
.br
.RI "\fIConvert libnuma bitmask \fCbitmask\fP into hwloc CPU set \fCcpuset\fP. \fP"
.in -1c
.SH "Function Documentation"
.PP
.SS "static __inline int hwloc_cpuset_from_linux_libnuma_bitmask (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const struct bitmask * bitmask)\fC [static]\fP"
.SS "static __hwloc_inline int hwloc_cpuset_from_linux_libnuma_bitmask (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const struct bitmask * bitmask)\fC [static]\fP"
.PP
Convert libnuma bitmask \fCbitmask\fP into hwloc CPU set \fCcpuset\fP. This function may be used after calling many numa_ functions that use a struct bitmask as an output parameter.
.SS "static __inline struct bitmask* __hwloc_attribute_malloc hwloc_cpuset_to_linux_libnuma_bitmask (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset)\fC [static, read]\fP"
.SS "static __hwloc_inline struct bitmask* __hwloc_attribute_malloc hwloc_cpuset_to_linux_libnuma_bitmask (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset)\fC [static, read]\fP"
.PP
Convert hwloc CPU set \fCcpuset\fP into the returned libnuma bitmask. The returned bitmask should later be freed with numa_bitmask_free.
.PP

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Helpers for manipulating Linux libnuma nodemask_t" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Helpers for manipulating Linux libnuma nodemask_t" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@ -7,20 +7,20 @@ Helpers for manipulating Linux libnuma nodemask_t \-
.in +1c
.ti -1c
.RI "static __inline int \fBhwloc_cpuset_to_linux_libnuma_nodemask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset, nodemask_t *nodemask)"
.RI "static __hwloc_inline int \fBhwloc_cpuset_to_linux_libnuma_nodemask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset, nodemask_t *nodemask)"
.br
.RI "\fIConvert hwloc CPU set \fCcpuset\fP into libnuma nodemask \fCnodemask\fP. \fP"
.ti -1c
.RI "static __inline int \fBhwloc_cpuset_from_linux_libnuma_nodemask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const nodemask_t *nodemask)"
.RI "static __hwloc_inline int \fBhwloc_cpuset_from_linux_libnuma_nodemask\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const nodemask_t *nodemask)"
.br
.RI "\fIConvert libnuma nodemask \fCnodemask\fP into hwloc CPU set \fCcpuset\fP. \fP"
.in -1c
.SH "Function Documentation"
.PP
.SS "static __inline int hwloc_cpuset_from_linux_libnuma_nodemask (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const nodemask_t * nodemask)\fC [static]\fP"
.SS "static __hwloc_inline int hwloc_cpuset_from_linux_libnuma_nodemask (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const nodemask_t * nodemask)\fC [static]\fP"
.PP
Convert libnuma nodemask \fCnodemask\fP into hwloc CPU set \fCcpuset\fP. This function may be used before calling some old libnuma functions that use a nodemask_t as an output parameter.
.SS "static __inline int hwloc_cpuset_to_linux_libnuma_nodemask (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset, nodemask_t * nodemask)\fC [static]\fP"
.SS "static __hwloc_inline int hwloc_cpuset_to_linux_libnuma_nodemask (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset, nodemask_t * nodemask)\fC [static]\fP"
.PP
Convert hwloc CPU set \fCcpuset\fP into libnuma nodemask \fCnodemask\fP. This function may be used before calling some old libnuma functions that use a nodemask_t as an input parameter.
.SH "Author"

Просмотреть файл

@ -1,4 +1,4 @@
.TH "Helpers for manipulating Linux libnuma unsigned long masks" 3 "17 Apr 2010" "Version 1.0rc1" "Hardware Locality (hwloc)" \" -*- nroff -*-
.TH "Helpers for manipulating Linux libnuma unsigned long masks" 3 "26 Apr 2010" "Version 1.0rc2" "Hardware Locality (hwloc)" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@ -7,22 +7,22 @@ Helpers for manipulating Linux libnuma unsigned long masks \-
.in +1c
.ti -1c
.RI "static __inline int \fBhwloc_cpuset_to_linux_libnuma_ulongs\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset, unsigned long *mask, unsigned long *maxnode)"
.RI "static __hwloc_inline int \fBhwloc_cpuset_to_linux_libnuma_ulongs\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset, unsigned long *mask, unsigned long *maxnode)"
.br
.RI "\fIConvert hwloc CPU set \fCcpuset\fP into the array of unsigned long \fCmask\fP. \fP"
.ti -1c
.RI "static __inline int \fBhwloc_cpuset_from_linux_libnuma_ulongs\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const unsigned long *mask, unsigned long maxnode)"
.RI "static __hwloc_inline int \fBhwloc_cpuset_from_linux_libnuma_ulongs\fP (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const unsigned long *mask, unsigned long maxnode)"
.br
.RI "\fIConvert the array of unsigned long \fCmask\fP into hwloc CPU set. \fP"
.in -1c
.SH "Function Documentation"
.PP
.SS "static __inline int hwloc_cpuset_from_linux_libnuma_ulongs (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const unsigned long * mask, unsigned long maxnode)\fC [static]\fP"
.SS "static __hwloc_inline int hwloc_cpuset_from_linux_libnuma_ulongs (\fBhwloc_topology_t\fP topology, \fBhwloc_cpuset_t\fP cpuset, const unsigned long * mask, unsigned long maxnode)\fC [static]\fP"
.PP
Convert the array of unsigned long \fCmask\fP into hwloc CPU set. \fCmask\fP is a array of unsigned long that will be read. \fCmaxnode\fP contains the maximal node number that may be read in \fCmask\fP.
.PP
This function may be used after calling get_mempolicy or any other function that takes an array of unsigned long as output parameter (and possibly a maximal node number as input parameter).
.SS "static __inline int hwloc_cpuset_to_linux_libnuma_ulongs (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset, unsigned long * mask, unsigned long * maxnode)\fC [static]\fP"
.SS "static __hwloc_inline int hwloc_cpuset_to_linux_libnuma_ulongs (\fBhwloc_topology_t\fP topology, \fBhwloc_const_cpuset_t\fP cpuset, unsigned long * mask, unsigned long * maxnode)\fC [static]\fP"
.PP
Convert hwloc CPU set \fCcpuset\fP into the array of unsigned long \fCmask\fP. \fCmask\fP is the array of unsigned long that will be filled. \fCmaxnode\fP contains the maximal node number that may be stored in \fCmask\fP. \fCmaxnode\fP will be set to the maximal node number that was found, plus one.
.PP

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше