Convert affinity control from the deprecated PLPA to HWLOC

This commit is contained in:
Hisham Muhammad
2011-09-24 00:30:47 +00:00
parent d07b043ee0
commit ec17b7029a
108 changed files with 72722 additions and 3299 deletions

View File

@ -0,0 +1,40 @@
# Copyright © 2009-2010 INRIA. All rights reserved.
# Copyright © 2009-2010 Université Bordeaux 1
# Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
# See COPYING in top-level directory.
# Only install the headers if we're in standalone mode (meaning:
# *don't* install the headers if we're in embedded mode).
if HWLOC_BUILD_STANDALONE
include_HEADERS = hwloc.h
include_hwlocdir = $(includedir)/hwloc
include_hwloc_HEADERS = \
hwloc/bitmap.h \
hwloc/cpuset.h \
hwloc/helper.h \
hwloc/myriexpress.h \
hwloc/openfabrics-verbs.h \
hwloc/cuda.h \
hwloc/cudart.h \
hwloc/rename.h
include_hwloc_autogendir = $(includedir)/hwloc/autogen
nodist_include_hwloc_autogen_HEADERS = hwloc/autogen/config.h
noinst_HEADERS = \
private/private.h \
private/debug.h \
private/misc.h \
private/cpuid.h
if HWLOC_HAVE_LINUX
include_hwloc_HEADERS += \
hwloc/linux.h \
hwloc/linux-libnuma.h
endif HWLOC_HAVE_LINUX
if HWLOC_HAVE_SCHED_SETAFFINITY
include_hwloc_HEADERS += hwloc/glibc-sched.h
endif HWLOC_HAVE_SCHED_SETAFFINITY
endif HWLOC_BUILD_STANDALONE

View File

@ -0,0 +1,566 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Copyright © 2009-2010 INRIA. All rights reserved.
# Copyright © 2009-2010 Université Bordeaux 1
# Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
# See COPYING in top-level directory.
# Only install the headers if we're in standalone mode (meaning:
# *don't* install the headers if we're in embedded mode).
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
@HWLOC_BUILD_STANDALONE_TRUE@@HWLOC_HAVE_LINUX_TRUE@am__append_1 = \
@HWLOC_BUILD_STANDALONE_TRUE@@HWLOC_HAVE_LINUX_TRUE@ hwloc/linux.h \
@HWLOC_BUILD_STANDALONE_TRUE@@HWLOC_HAVE_LINUX_TRUE@ hwloc/linux-libnuma.h
@HWLOC_BUILD_STANDALONE_TRUE@@HWLOC_HAVE_SCHED_SETAFFINITY_TRUE@am__append_2 = hwloc/glibc-sched.h
subdir = hwloc-1.2.1/include
DIST_COMMON = $(am__include_HEADERS_DIST) \
$(am__include_hwloc_HEADERS_DIST) $(am__noinst_HEADERS_DIST) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = \
$(top_srcdir)/hwloc-1.2.1/config/hwloc_check_attributes.m4 \
$(top_srcdir)/hwloc-1.2.1/config/hwloc_check_visibility.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/hwloc-1.2.1/config/hwloc.m4 \
$(top_srcdir)/hwloc-1.2.1/config/hwloc_pkg.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/hwloc-1.2.1/include/private/autogen/config.h \
$(top_builddir)/hwloc-1.2.1/include/hwloc/autogen/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__include_HEADERS_DIST = hwloc.h
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(includedir)" \
"$(DESTDIR)$(include_hwlocdir)" \
"$(DESTDIR)$(include_hwloc_autogendir)"
am__include_hwloc_HEADERS_DIST = hwloc/bitmap.h hwloc/cpuset.h \
hwloc/helper.h hwloc/myriexpress.h hwloc/openfabrics-verbs.h \
hwloc/cuda.h hwloc/cudart.h hwloc/rename.h hwloc/linux.h \
hwloc/linux-libnuma.h hwloc/glibc-sched.h
am__noinst_HEADERS_DIST = private/private.h private/debug.h \
private/misc.h private/cpuid.h
HEADERS = $(include_HEADERS) $(include_hwloc_HEADERS) \
$(nodist_include_hwloc_autogen_HEADERS) $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASH = @BASH@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
HWLOC_CFLAGS = @HWLOC_CFLAGS@
HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@
HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@
HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@
HWLOC_EMBEDDED_LDADD = @HWLOC_EMBEDDED_LDADD@
HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@
HWLOC_HAVE_XML = @HWLOC_HAVE_XML@
HWLOC_KERRIGHED_CFLAGS = @HWLOC_KERRIGHED_CFLAGS@
HWLOC_KERRIGHED_LIBS = @HWLOC_KERRIGHED_LIBS@
HWLOC_LDFLAGS = @HWLOC_LDFLAGS@
HWLOC_LIBS = @HWLOC_LIBS@
HWLOC_LINUX_LIBNUMA_LIBS = @HWLOC_LINUX_LIBNUMA_LIBS@
HWLOC_MS_LIB = @HWLOC_MS_LIB@
HWLOC_PKG_CONFIG = @HWLOC_PKG_CONFIG@
HWLOC_REQUIRES = @HWLOC_REQUIRES@
HWLOC_XML_CFLAGS = @HWLOC_XML_CFLAGS@
HWLOC_XML_LIBS = @HWLOC_XML_LIBS@
HWLOC_top_builddir = @HWLOC_top_builddir@
HWLOC_top_srcdir = @HWLOC_top_srcdir@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@HWLOC_BUILD_STANDALONE_TRUE@include_HEADERS = hwloc.h
@HWLOC_BUILD_STANDALONE_TRUE@include_hwlocdir = $(includedir)/hwloc
@HWLOC_BUILD_STANDALONE_TRUE@include_hwloc_HEADERS = hwloc/bitmap.h \
@HWLOC_BUILD_STANDALONE_TRUE@ hwloc/cpuset.h hwloc/helper.h \
@HWLOC_BUILD_STANDALONE_TRUE@ hwloc/myriexpress.h \
@HWLOC_BUILD_STANDALONE_TRUE@ hwloc/openfabrics-verbs.h \
@HWLOC_BUILD_STANDALONE_TRUE@ hwloc/cuda.h hwloc/cudart.h \
@HWLOC_BUILD_STANDALONE_TRUE@ hwloc/rename.h $(am__append_1) \
@HWLOC_BUILD_STANDALONE_TRUE@ $(am__append_2)
@HWLOC_BUILD_STANDALONE_TRUE@include_hwloc_autogendir = $(includedir)/hwloc/autogen
@HWLOC_BUILD_STANDALONE_TRUE@nodist_include_hwloc_autogen_HEADERS = hwloc/autogen/config.h
@HWLOC_BUILD_STANDALONE_TRUE@noinst_HEADERS = \
@HWLOC_BUILD_STANDALONE_TRUE@ private/private.h \
@HWLOC_BUILD_STANDALONE_TRUE@ private/debug.h \
@HWLOC_BUILD_STANDALONE_TRUE@ private/misc.h \
@HWLOC_BUILD_STANDALONE_TRUE@ private/cpuid.h
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu hwloc-1.2.1/include/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu hwloc-1.2.1/include/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
done
uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(includedir)" && rm -f $$files
install-include_hwlocHEADERS: $(include_hwloc_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(include_hwlocdir)" || $(MKDIR_P) "$(DESTDIR)$(include_hwlocdir)"
@list='$(include_hwloc_HEADERS)'; test -n "$(include_hwlocdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(include_hwlocdir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(include_hwlocdir)" || exit $$?; \
done
uninstall-include_hwlocHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(include_hwloc_HEADERS)'; test -n "$(include_hwlocdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(include_hwlocdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(include_hwlocdir)" && rm -f $$files
install-nodist_include_hwloc_autogenHEADERS: $(nodist_include_hwloc_autogen_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(include_hwloc_autogendir)" || $(MKDIR_P) "$(DESTDIR)$(include_hwloc_autogendir)"
@list='$(nodist_include_hwloc_autogen_HEADERS)'; test -n "$(include_hwloc_autogendir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(include_hwloc_autogendir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(include_hwloc_autogendir)" || exit $$?; \
done
uninstall-nodist_include_hwloc_autogenHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(nodist_include_hwloc_autogen_HEADERS)'; test -n "$(include_hwloc_autogendir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(include_hwloc_autogendir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(include_hwloc_autogendir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(includedir)" "$(DESTDIR)$(include_hwlocdir)" "$(DESTDIR)$(include_hwloc_autogendir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-includeHEADERS install-include_hwlocHEADERS \
install-nodist_include_hwloc_autogenHEADERS
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-includeHEADERS uninstall-include_hwlocHEADERS \
uninstall-nodist_include_hwloc_autogenHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am \
install-includeHEADERS install-include_hwlocHEADERS \
install-info install-info-am install-man \
install-nodist_include_hwloc_autogenHEADERS install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-includeHEADERS \
uninstall-include_hwlocHEADERS \
uninstall-nodist_include_hwloc_autogenHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

1707
hwloc-1.2.1/include/hwloc.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,137 @@
/* hwloc-1.2.1/include/hwloc/autogen/config.h. Generated from config.h.in by configure. */
/* -*- c -*-
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA. All rights reserved.
* Copyright © 2009-2011 Université Bordeaux 1
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
/* The configuration file */
#ifndef HWLOC_CONFIG_H
#define HWLOC_CONFIG_H
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
# define __hwloc_restrict __restrict
#else
# if __STDC_VERSION__ >= 199901L
# define __hwloc_restrict restrict
# else
# define __hwloc_restrict
# endif
#endif
#define __hwloc_inline __inline__
/*
* Note: this is public. We can not assume anything from the compiler used
* by the application and thus the HWLOC_HAVE_* macros below are not
* fetched from the autoconf result here. We only automatically use a few
* well-known easy cases.
*/
/* Maybe before gcc 2.95 too */
#if defined(HWLOC_HAVE_ATTRIBUTE_UNUSED) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
# if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) || HWLOC_HAVE_ATTRIBUTE_UNUSED
# define __hwloc_attribute_unused __attribute__((__unused__))
# else
# define __hwloc_attribute_unused
# endif
#else
# define __hwloc_attribute_unused
#endif
#if defined(HWLOC_HAVE_ATTRIBUTE_MALLOC) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
# if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) || HWLOC_HAVE_ATTRIBUTE_MALLOC
# define __hwloc_attribute_malloc __attribute__((__malloc__))
# else
# define __hwloc_attribute_malloc
# endif
#else
# define __hwloc_attribute_malloc
#endif
#if defined(HWLOC_HAVE_ATTRIBUTE_CONST) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
# if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) || HWLOC_HAVE_ATTRIBUTE_CONST
# define __hwloc_attribute_const __attribute__((__const__))
# else
# define __hwloc_attribute_const
# endif
#else
# define __hwloc_attribute_const
#endif
#if defined(HWLOC_HAVE_ATTRIBUTE_PURE) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
# if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) || HWLOC_HAVE_ATTRIBUTE_PURE
# define __hwloc_attribute_pure __attribute__((__pure__))
# else
# define __hwloc_attribute_pure
# endif
#else
# define __hwloc_attribute_pure
#endif
#if defined(HWLOC_HAVE_ATTRIBUTE_DEPRECATED) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) || HWLOC_HAVE_ATTRIBUTE_DEPRECATED
# define __hwloc_attribute_deprecated __attribute__((__deprecated__))
# else
# define __hwloc_attribute_deprecated
# endif
#else
# define __hwloc_attribute_deprecated
#endif
#ifdef HWLOC_C_HAVE_VISIBILITY
# if HWLOC_C_HAVE_VISIBILITY
# define HWLOC_DECLSPEC __attribute__((__visibility__("default")))
# else
# define HWLOC_DECLSPEC
# endif
#else
# define HWLOC_DECLSPEC
#endif
/* Defined to 1 on Linux */
#define HWLOC_LINUX_SYS 1
/* Defined to 1 if the CPU_SET macro works */
#define HWLOC_HAVE_CPU_SET 1
/* Defined to 1 if you have the `windows.h' header. */
/* #undef HWLOC_HAVE_WINDOWS_H */
#define hwloc_pid_t pid_t
#define hwloc_thread_t pthread_t
#ifdef HWLOC_HAVE_WINDOWS_H
# include <windows.h>
typedef DWORDLONG hwloc_uint64_t;
#else /* HWLOC_HAVE_WINDOWS_H */
# ifdef hwloc_thread_t
# include <pthread.h>
# endif /* hwloc_thread_t */
/* Defined to 1 if you have the <stdint.h> header file. */
# define HWLOC_HAVE_STDINT_H 1
# include <unistd.h>
# ifdef HWLOC_HAVE_STDINT_H
# include <stdint.h>
# endif
typedef uint64_t hwloc_uint64_t;
#endif /* HWLOC_HAVE_WINDOWS_H */
/* Whether we need to re-define all the hwloc public symbols or not */
#define HWLOC_SYM_TRANSFORM 0
/* The hwloc symbol prefix */
#define HWLOC_SYM_PREFIX hwloc_
/* The hwloc symbol prefix in all caps */
#define HWLOC_SYM_PREFIX_CAPS HWLOC_
#endif /* HWLOC_CONFIG_H */

View File

@ -0,0 +1,136 @@
/* -*- c -*-
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA. All rights reserved.
* Copyright © 2009-2011 Université Bordeaux 1
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
/* The configuration file */
#ifndef HWLOC_CONFIG_H
#define HWLOC_CONFIG_H
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
# define __hwloc_restrict __restrict
#else
# if __STDC_VERSION__ >= 199901L
# define __hwloc_restrict restrict
# else
# define __hwloc_restrict
# endif
#endif
#undef __hwloc_inline
/*
* Note: this is public. We can not assume anything from the compiler used
* by the application and thus the HWLOC_HAVE_* macros below are not
* fetched from the autoconf result here. We only automatically use a few
* well-known easy cases.
*/
/* Maybe before gcc 2.95 too */
#if defined(HWLOC_HAVE_ATTRIBUTE_UNUSED) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
# if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) || HWLOC_HAVE_ATTRIBUTE_UNUSED
# define __hwloc_attribute_unused __attribute__((__unused__))
# else
# define __hwloc_attribute_unused
# endif
#else
# define __hwloc_attribute_unused
#endif
#if defined(HWLOC_HAVE_ATTRIBUTE_MALLOC) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
# if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) || HWLOC_HAVE_ATTRIBUTE_MALLOC
# define __hwloc_attribute_malloc __attribute__((__malloc__))
# else
# define __hwloc_attribute_malloc
# endif
#else
# define __hwloc_attribute_malloc
#endif
#if defined(HWLOC_HAVE_ATTRIBUTE_CONST) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
# if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) || HWLOC_HAVE_ATTRIBUTE_CONST
# define __hwloc_attribute_const __attribute__((__const__))
# else
# define __hwloc_attribute_const
# endif
#else
# define __hwloc_attribute_const
#endif
#if defined(HWLOC_HAVE_ATTRIBUTE_PURE) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
# if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) || HWLOC_HAVE_ATTRIBUTE_PURE
# define __hwloc_attribute_pure __attribute__((__pure__))
# else
# define __hwloc_attribute_pure
# endif
#else
# define __hwloc_attribute_pure
#endif
#if defined(HWLOC_HAVE_ATTRIBUTE_DEPRECATED) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) || HWLOC_HAVE_ATTRIBUTE_DEPRECATED
# define __hwloc_attribute_deprecated __attribute__((__deprecated__))
# else
# define __hwloc_attribute_deprecated
# endif
#else
# define __hwloc_attribute_deprecated
#endif
#ifdef HWLOC_C_HAVE_VISIBILITY
# if HWLOC_C_HAVE_VISIBILITY
# define HWLOC_DECLSPEC __attribute__((__visibility__("default")))
# else
# define HWLOC_DECLSPEC
# endif
#else
# define HWLOC_DECLSPEC
#endif
/* Defined to 1 on Linux */
#undef HWLOC_LINUX_SYS
/* Defined to 1 if the CPU_SET macro works */
#undef HWLOC_HAVE_CPU_SET
/* Defined to 1 if you have the `windows.h' header. */
#undef HWLOC_HAVE_WINDOWS_H
#undef hwloc_pid_t
#undef hwloc_thread_t
#ifdef HWLOC_HAVE_WINDOWS_H
# include <windows.h>
typedef DWORDLONG hwloc_uint64_t;
#else /* HWLOC_HAVE_WINDOWS_H */
# ifdef hwloc_thread_t
# include <pthread.h>
# endif /* hwloc_thread_t */
/* Defined to 1 if you have the <stdint.h> header file. */
# undef HWLOC_HAVE_STDINT_H
# include <unistd.h>
# ifdef HWLOC_HAVE_STDINT_H
# include <stdint.h>
# endif
typedef uint64_t hwloc_uint64_t;
#endif /* HWLOC_HAVE_WINDOWS_H */
/* Whether we need to re-define all the hwloc public symbols or not */
#undef HWLOC_SYM_TRANSFORM
/* The hwloc symbol prefix */
#undef HWLOC_SYM_PREFIX
/* The hwloc symbol prefix in all caps */
#undef HWLOC_SYM_PREFIX_CAPS
#endif /* HWLOC_CONFIG_H */

View File

@ -0,0 +1 @@
timestamp for hwloc-1.2.1/include/hwloc/autogen/config.h

View File

@ -0,0 +1,335 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2011 INRIA. All rights reserved.
* Copyright © 2009-2011 Université Bordeaux 1
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
/** \file
* \brief The bitmap API, for use in hwloc itself.
*/
#ifndef HWLOC_BITMAP_H
#define HWLOC_BITMAP_H
#include <hwloc/autogen/config.h>
#include <assert.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \defgroup hwlocality_bitmap The bitmap API
*
* The ::hwloc_bitmap_t type represents a set of objects, typically OS
* processors -- which may actually be hardware threads (represented
* by ::hwloc_cpuset_t, which is a typedef for ::hwloc_bitmap_t) -- or
* memory nodes (represented by ::hwloc_nodeset_t, which is also a
* typedef for ::hwloc_bitmap_t).
*
* <em>Both CPU and node sets are always indexed by OS physical number.</em>
*
* \note CPU sets and nodesets are described in \ref hwlocality_sets.
*
* A bitmap may be of infinite size.
* @{
*/
/** \brief
* Set of bits represented as an opaque pointer to an internal bitmap.
*/
typedef struct hwloc_bitmap_s * hwloc_bitmap_t;
/** \brief a non-modifiable ::hwloc_bitmap_t */
typedef const struct hwloc_bitmap_s * hwloc_const_bitmap_t;
/*
* Bitmap allocation, freeing and copying.
*/
/** \brief Allocate a new empty bitmap.
*
* \returns A valid bitmap or \c NULL.
*
* The bitmap should be freed by a corresponding call to
* hwloc_bitmap_free().
*/
HWLOC_DECLSPEC hwloc_bitmap_t hwloc_bitmap_alloc(void) __hwloc_attribute_malloc;
/** \brief Allocate a new full bitmap. */
HWLOC_DECLSPEC hwloc_bitmap_t hwloc_bitmap_alloc_full(void) __hwloc_attribute_malloc;
/** \brief Free bitmap \p bitmap.
*
* If \p bitmap is \c NULL, no operation is performed.
*/
HWLOC_DECLSPEC void hwloc_bitmap_free(hwloc_bitmap_t bitmap);
/** \brief Duplicate bitmap \p bitmap by allocating a new bitmap and copying \p bitmap contents.
*
* If \p bitmap is \c NULL, \c NULL is returned.
*/
HWLOC_DECLSPEC hwloc_bitmap_t hwloc_bitmap_dup(hwloc_const_bitmap_t bitmap) __hwloc_attribute_malloc;
/** \brief Copy the contents of bitmap \p src into the already allocated bitmap \p dst */
HWLOC_DECLSPEC void hwloc_bitmap_copy(hwloc_bitmap_t dst, hwloc_const_bitmap_t src);
/*
* Bitmap/String Conversion
*/
/** \brief Stringify a bitmap.
*
* Up to \p buflen characters may be written in buffer \p buf.
*
* If \p buflen is 0, \p buf may safely be \c NULL.
*
* \return the number of character that were actually written if not truncating,
* or that would have been written (not including the ending \\0).
*/
HWLOC_DECLSPEC int hwloc_bitmap_snprintf(char * __hwloc_restrict buf, size_t buflen, hwloc_const_bitmap_t bitmap);
/** \brief Stringify a bitmap into a newly allocated string.
*/
HWLOC_DECLSPEC int hwloc_bitmap_asprintf(char ** strp, hwloc_const_bitmap_t bitmap);
/** \brief Parse a bitmap string and stores it in bitmap \p bitmap.
*/
HWLOC_DECLSPEC int hwloc_bitmap_sscanf(hwloc_bitmap_t bitmap, const char * __hwloc_restrict string);
/** \brief Stringify a bitmap in the list format.
*
* Lists are comma-separated indexes or ranges.
* Ranges are dash separated indexes.
* The last range may not have a ending indexes if the bitmap is infinite.
*
* Up to \p buflen characters may be written in buffer \p buf.
*
* If \p buflen is 0, \p buf may safely be \c NULL.
*
* \return the number of character that were actually written if not truncating,
* or that would have been written (not including the ending \\0).
*/
HWLOC_DECLSPEC int hwloc_bitmap_list_snprintf(char * __hwloc_restrict buf, size_t buflen, hwloc_const_bitmap_t bitmap);
/** \brief Stringify a bitmap into a newly allocated list string.
*/
HWLOC_DECLSPEC int hwloc_bitmap_list_asprintf(char ** strp, hwloc_const_bitmap_t bitmap);
/** \brief Parse a list string and stores it in bitmap \p bitmap.
*/
HWLOC_DECLSPEC int hwloc_bitmap_list_sscanf(hwloc_bitmap_t bitmap, const char * __hwloc_restrict string);
/** \brief Stringify a bitmap in the taskset-specific format.
*
* The taskset command manipulates bitmap strings that contain a single
* (possible very long) hexadecimal number starting with 0x.
*
* Up to \p buflen characters may be written in buffer \p buf.
*
* If \p buflen is 0, \p buf may safely be \c NULL.
*
* \return the number of character that were actually written if not truncating,
* or that would have been written (not including the ending \\0).
*/
HWLOC_DECLSPEC int hwloc_bitmap_taskset_snprintf(char * __hwloc_restrict buf, size_t buflen, hwloc_const_bitmap_t bitmap);
/** \brief Stringify a bitmap into a newly allocated taskset-specific string.
*/
HWLOC_DECLSPEC int hwloc_bitmap_taskset_asprintf(char ** strp, hwloc_const_bitmap_t bitmap);
/** \brief Parse a taskset-specific bitmap string and stores it in bitmap \p bitmap.
*/
HWLOC_DECLSPEC int hwloc_bitmap_taskset_sscanf(hwloc_bitmap_t bitmap, const char * __hwloc_restrict string);
/*
* Building bitmaps.
*/
/** \brief Empty the bitmap \p bitmap */
HWLOC_DECLSPEC void hwloc_bitmap_zero(hwloc_bitmap_t bitmap);
/** \brief Fill bitmap \p bitmap with all possible indexes (even if those objects don't exist or are otherwise unavailable) */
HWLOC_DECLSPEC void hwloc_bitmap_fill(hwloc_bitmap_t bitmap);
/** \brief Empty the bitmap \p bitmap and add bit \p id */
HWLOC_DECLSPEC void hwloc_bitmap_only(hwloc_bitmap_t bitmap, unsigned id);
/** \brief Fill the bitmap \p and clear the index \p id */
HWLOC_DECLSPEC void hwloc_bitmap_allbut(hwloc_bitmap_t bitmap, unsigned id);
/** \brief Setup bitmap \p bitmap from unsigned long \p mask */
HWLOC_DECLSPEC void hwloc_bitmap_from_ulong(hwloc_bitmap_t bitmap, unsigned long mask);
/** \brief Setup bitmap \p bitmap from unsigned long \p mask used as \p i -th subset */
HWLOC_DECLSPEC void hwloc_bitmap_from_ith_ulong(hwloc_bitmap_t bitmap, unsigned i, unsigned long mask);
/*
* Modifying bitmaps.
*/
/** \brief Add index \p id in bitmap \p bitmap */
HWLOC_DECLSPEC void hwloc_bitmap_set(hwloc_bitmap_t bitmap, unsigned id);
/** \brief Add indexes from \p begin to \p end in bitmap \p bitmap.
*
* If \p end is \c -1, the range is infinite.
*/
HWLOC_DECLSPEC void hwloc_bitmap_set_range(hwloc_bitmap_t bitmap, unsigned begin, int end);
/** \brief Replace \p i -th subset of bitmap \p bitmap with unsigned long \p mask */
HWLOC_DECLSPEC void hwloc_bitmap_set_ith_ulong(hwloc_bitmap_t bitmap, unsigned i, unsigned long mask);
/** \brief Remove index \p id from bitmap \p bitmap */
HWLOC_DECLSPEC void hwloc_bitmap_clr(hwloc_bitmap_t bitmap, unsigned id);
/** \brief Remove indexes from \p begin to \p end in bitmap \p bitmap.
*
* If \p end is \c -1, the range is infinite.
*/
HWLOC_DECLSPEC void hwloc_bitmap_clr_range(hwloc_bitmap_t bitmap, unsigned begin, int end);
/** \brief Keep a single index among those set in bitmap \p bitmap
*
* May be useful before binding so that the process does not
* have a chance of migrating between multiple logical CPUs
* in the original mask.
*/
HWLOC_DECLSPEC void hwloc_bitmap_singlify(hwloc_bitmap_t bitmap);
/*
* Consulting bitmaps.
*/
/** \brief Convert the beginning part of bitmap \p bitmap into unsigned long \p mask */
HWLOC_DECLSPEC unsigned long hwloc_bitmap_to_ulong(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
/** \brief Convert the \p i -th subset of bitmap \p bitmap into unsigned long mask */
HWLOC_DECLSPEC unsigned long hwloc_bitmap_to_ith_ulong(hwloc_const_bitmap_t bitmap, unsigned i) __hwloc_attribute_pure;
/** \brief Test whether index \p id is part of bitmap \p bitmap */
HWLOC_DECLSPEC int hwloc_bitmap_isset(hwloc_const_bitmap_t bitmap, unsigned id) __hwloc_attribute_pure;
/** \brief Test whether bitmap \p bitmap is empty */
HWLOC_DECLSPEC int hwloc_bitmap_iszero(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
/** \brief Test whether bitmap \p bitmap is completely full */
HWLOC_DECLSPEC int hwloc_bitmap_isfull(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
/** \brief Compute the first index (least significant bit) in bitmap \p bitmap
*
* \return -1 if no index is set.
*/
HWLOC_DECLSPEC int hwloc_bitmap_first(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
/** \brief Compute the next index in bitmap \p bitmap which is after index \p prev
*
* If \p prev is -1, the first index is returned.
*
* \return -1 if no index with higher index is bitmap.
*/
HWLOC_DECLSPEC int hwloc_bitmap_next(hwloc_const_bitmap_t bitmap, int prev) __hwloc_attribute_pure;
/** \brief Compute the last index (most significant bit) in bitmap \p bitmap
*
* \return -1 if no index is bitmap, or if the index bitmap is infinite.
*/
HWLOC_DECLSPEC int hwloc_bitmap_last(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
/** \brief Compute the "weight" of bitmap \p bitmap (i.e., number of
* indexes that are in the bitmap).
*
* \return the number of indexes that are in the bitmap.
*/
HWLOC_DECLSPEC int hwloc_bitmap_weight(hwloc_const_bitmap_t bitmap) __hwloc_attribute_pure;
/** \brief Loop macro iterating on bitmap \p bitmap
* \hideinitializer
*
* \p index is the loop variable; it should be an unsigned int. The
* first iteration will set \p index to the lowest index in the bitmap.
* Successive iterations will iterate through, in order, all remaining
* indexes that in the bitmap. To be specific: each iteration will return a
* value for \p index such that hwloc_bitmap_isset(bitmap, index) is true.
*
* The assert prevents the loop from being infinite if the bitmap is infinite.
*/
#define hwloc_bitmap_foreach_begin(id, bitmap) \
do { \
assert(hwloc_bitmap_weight(bitmap) != -1); \
for (id = hwloc_bitmap_first(bitmap); \
(unsigned) id != (unsigned) -1; \
id = hwloc_bitmap_next(bitmap, id)) { \
/** \brief End of loop. Needs a terminating ';'.
* \hideinitializer
*
* \sa hwloc_bitmap_foreach_begin */
#define hwloc_bitmap_foreach_end() \
} \
} while (0)
/*
* Combining bitmaps.
*/
/** \brief Or bitmaps \p bitmap1 and \p bitmap2 and store the result in bitmap \p res */
HWLOC_DECLSPEC void hwloc_bitmap_or (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2);
/** \brief And bitmaps \p bitmap1 and \p bitmap2 and store the result in bitmap \p res */
HWLOC_DECLSPEC void hwloc_bitmap_and (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2);
/** \brief And bitmap \p bitmap1 and the negation of \p bitmap2 and store the result in bitmap \p res */
HWLOC_DECLSPEC void hwloc_bitmap_andnot (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2);
/** \brief Xor bitmaps \p bitmap1 and \p bitmap2 and store the result in bitmap \p res */
HWLOC_DECLSPEC void hwloc_bitmap_xor (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2);
/** \brief Negate bitmap \p bitmap and store the result in bitmap \p res */
HWLOC_DECLSPEC void hwloc_bitmap_not (hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap);
/*
* Comparing bitmaps.
*/
/** \brief Test whether bitmaps \p bitmap1 and \p bitmap2 intersects */
HWLOC_DECLSPEC int hwloc_bitmap_intersects (hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) __hwloc_attribute_pure;
/** \brief Test whether bitmap \p sub_bitmap is part of bitmap \p super_bitmap */
HWLOC_DECLSPEC int hwloc_bitmap_isincluded (hwloc_const_bitmap_t sub_bitmap, hwloc_const_bitmap_t super_bitmap) __hwloc_attribute_pure;
/** \brief Test whether bitmap \p bitmap1 is equal to bitmap \p bitmap2 */
HWLOC_DECLSPEC int hwloc_bitmap_isequal (hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) __hwloc_attribute_pure;
/** \brief Compare bitmaps \p bitmap1 and \p bitmap2 using their lowest index.
*
* Smaller least significant bit is smaller.
* The empty bitmap is considered higher than anything.
*/
HWLOC_DECLSPEC int hwloc_bitmap_compare_first(hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) __hwloc_attribute_pure;
/** \brief Compare bitmaps \p bitmap1 and \p bitmap2 using their highest index.
*
* Higher most significant bit is higher.
* The empty bitmap is considered lower than anything.
*/
HWLOC_DECLSPEC int hwloc_bitmap_compare(hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) __hwloc_attribute_pure;
/** @} */
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* HWLOC_BITMAP_H */

View File

@ -0,0 +1,75 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA. All rights reserved.
* Copyright © 2009-2010 Université Bordeaux 1
* Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
/** \file
* \brief The old deprecated Cpuset API.
* This interface should not be used anymore, it will be dropped in a later release.
*
* hwloc/bitmap.h should be used instead. Most hwloc_cpuset_foo functions are
* replaced with hwloc_bitmap_foo. The only exceptions are:
* - hwloc_cpuset_from_string -> hwloc_bitmap_sscanf
* - hwloc_cpuset_cpu -> hwloc_bitmap_only
* - hwloc_cpuset_all_but_cpu -> hwloc_bitmap_allbut
*/
#ifndef HWLOC_CPUSET_H
#define HWLOC_CPUSET_H
#ifdef __cplusplus
extern "C" {
#endif
#include "hwloc/bitmap.h"
static __hwloc_inline hwloc_bitmap_t __hwloc_attribute_deprecated hwloc_cpuset_alloc(void) { return hwloc_bitmap_alloc(); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_free(hwloc_bitmap_t bitmap) { hwloc_bitmap_free(bitmap); }
static __hwloc_inline hwloc_bitmap_t __hwloc_attribute_deprecated hwloc_cpuset_dup(hwloc_const_bitmap_t bitmap) { return hwloc_bitmap_dup(bitmap); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_copy(hwloc_bitmap_t dst, hwloc_const_bitmap_t src) { hwloc_bitmap_copy(dst, src); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_snprintf(char * __hwloc_restrict buf, size_t buflen, hwloc_const_bitmap_t bitmap) { return hwloc_bitmap_snprintf(buf, buflen, bitmap); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_asprintf(char ** strp, hwloc_const_bitmap_t bitmap) { return hwloc_bitmap_asprintf(strp, bitmap); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_from_string(hwloc_bitmap_t bitmap, const char * __hwloc_restrict string) { return hwloc_bitmap_sscanf(bitmap, string); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_zero(hwloc_bitmap_t bitmap) { hwloc_bitmap_zero(bitmap); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_fill(hwloc_bitmap_t bitmap) { hwloc_bitmap_fill(bitmap); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_from_ulong(hwloc_bitmap_t bitmap, unsigned long mask) { hwloc_bitmap_from_ulong(bitmap, mask); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_from_ith_ulong(hwloc_bitmap_t bitmap, unsigned i, unsigned long mask) { hwloc_bitmap_from_ith_ulong(bitmap, i, mask); }
static __hwloc_inline unsigned __hwloc_attribute_deprecated long hwloc_cpuset_to_ulong(hwloc_const_bitmap_t bitmap) { return hwloc_bitmap_to_ulong(bitmap); }
static __hwloc_inline unsigned __hwloc_attribute_deprecated long hwloc_cpuset_to_ith_ulong(hwloc_const_bitmap_t bitmap, unsigned i) { return hwloc_bitmap_to_ith_ulong(bitmap, i); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_cpu(hwloc_bitmap_t bitmap, unsigned index_) { hwloc_bitmap_only(bitmap, index_); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_all_but_cpu(hwloc_bitmap_t bitmap, unsigned index_) { hwloc_bitmap_allbut(bitmap, index_); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_set(hwloc_bitmap_t bitmap, unsigned index_) { hwloc_bitmap_set(bitmap, index_); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_set_range(hwloc_bitmap_t bitmap, unsigned begin, unsigned end) { hwloc_bitmap_set_range(bitmap, begin, end); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_set_ith_ulong(hwloc_bitmap_t bitmap, unsigned i, unsigned long mask) { hwloc_bitmap_set_ith_ulong(bitmap, i, mask); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_clr(hwloc_bitmap_t bitmap, unsigned index_) { hwloc_bitmap_clr(bitmap, index_); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_clr_range(hwloc_bitmap_t bitmap, unsigned begin, unsigned end) { hwloc_bitmap_clr_range(bitmap, begin, end); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_isset(hwloc_const_bitmap_t bitmap, unsigned index_) { return hwloc_bitmap_isset(bitmap, index_); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_iszero(hwloc_const_bitmap_t bitmap) { return hwloc_bitmap_iszero(bitmap); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_isfull(hwloc_const_bitmap_t bitmap) { return hwloc_bitmap_isfull(bitmap); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_isequal(hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) { return hwloc_bitmap_isequal(bitmap1, bitmap2); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_intersects(hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) { return hwloc_bitmap_intersects(bitmap1, bitmap2); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_isincluded(hwloc_const_bitmap_t sub_bitmap, hwloc_const_bitmap_t super_bitmap) { return hwloc_bitmap_isincluded(sub_bitmap, super_bitmap); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_or(hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) { hwloc_bitmap_or(res, bitmap1, bitmap2); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_and(hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) { hwloc_bitmap_and(res, bitmap1, bitmap2); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_andnot(hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) { hwloc_bitmap_andnot(res, bitmap1, bitmap2); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_xor(hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) { hwloc_bitmap_xor(res, bitmap1, bitmap2); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_not(hwloc_bitmap_t res, hwloc_const_bitmap_t bitmap) { hwloc_bitmap_not(res, bitmap); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_first(hwloc_const_bitmap_t bitmap) { return hwloc_bitmap_first(bitmap); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_last(hwloc_const_bitmap_t bitmap) { return hwloc_bitmap_last(bitmap); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_next(hwloc_const_bitmap_t bitmap, unsigned prev) { return hwloc_bitmap_next(bitmap, prev); }
static __hwloc_inline void __hwloc_attribute_deprecated hwloc_cpuset_singlify(hwloc_bitmap_t bitmap) { hwloc_bitmap_singlify(bitmap); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_compare_first(hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) { return hwloc_bitmap_compare_first(bitmap1, bitmap2); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_compare(hwloc_const_bitmap_t bitmap1, hwloc_const_bitmap_t bitmap2) { return hwloc_bitmap_compare(bitmap1, bitmap2); }
static __hwloc_inline int __hwloc_attribute_deprecated hwloc_cpuset_weight(hwloc_const_bitmap_t bitmap) { return hwloc_bitmap_weight(bitmap); }
#define hwloc_cpuset_foreach_begin hwloc_bitmap_foreach_begin
#define hwloc_cpuset_foreach_end hwloc_bitmap_foreach_end
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* HWLOC_CPUSET_H */

View File

@ -0,0 +1,90 @@
/*
* Copyright © 2010 INRIA. All rights reserved.
* Copyright © 2010 Université Bordeaux 1
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
/** \file
* \brief Macros to help interaction between hwloc and the CUDA Driver API.
*
* Applications that use both hwloc and the CUDA Driver API may want to
* include this file so as to get topology information for CUDA devices.
*
*/
#ifndef HWLOC_CUDA_H
#define HWLOC_CUDA_H
#include <hwloc.h>
#include <hwloc/autogen/config.h>
#include <hwloc/linux.h>
#include <cuda.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \defgroup hwlocality_cuda CUDA Driver API Specific Functions
* @{
*/
/** \brief Get the CPU set of logical processors that are physically
* close to device \p cudevice.
*
* For the given CUDA Driver API device \p cudevice, 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.
*/
static __hwloc_inline int
hwloc_cuda_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
CUdevice cudevice, hwloc_cpuset_t set)
{
#ifdef HWLOC_LINUX_SYS
/* If we're on Linux, use the sysfs mechanism to get the local cpus */
#define HWLOC_CUDA_DEVICE_SYSFS_PATH_MAX 128
CUresult cres;
int deviceid;
int busid;
char path[HWLOC_CUDA_DEVICE_SYSFS_PATH_MAX];
FILE *sysfile = NULL;
cres = cuDeviceGetAttribute(&busid, CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, cudevice);
if (cres != CUDA_SUCCESS) {
errno = ENOSYS;
return -1;
}
cres = cuDeviceGetAttribute(&deviceid, CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, cudevice);
if (cres != CUDA_SUCCESS) {
errno = ENOSYS;
return -1;
}
sprintf(path, "/sys/bus/pci/devices/0000:%02x:%02x.0/local_cpus", busid, deviceid);
sysfile = fopen(path, "r");
if (!sysfile)
return -1;
hwloc_linux_parse_cpumap_file(sysfile, set);
fclose(sysfile);
#else
/* Non-Linux systems simply get a full cpuset */
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
#endif
return 0;
}
/** @} */
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* HWLOC_CUDA_H */

View File

@ -0,0 +1,84 @@
/*
* Copyright © 2010 INRIA. All rights reserved.
* Copyright © 2010 Université Bordeaux 1
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
/** \file
* \brief Macros to help interaction between hwloc and the CUDA Runtime API.
*
* Applications that use both hwloc and the CUDA Runtime API may want to
* include this file so as to get topology information for CUDA devices.
*
*/
#ifndef HWLOC_CUDART_H
#define HWLOC_CUDART_H
#include <hwloc.h>
#include <hwloc/autogen/config.h>
#include <hwloc/linux.h>
#include <cuda_runtime_api.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \defgroup hwlocality_cudart CUDA Runtime API Specific Functions
* @{
*/
/** \brief Get the CPU set of logical processors that are physically
* close to device \p cudevice.
*
* For the given CUDA Runtime API device \p cudevice, 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.
*/
static __hwloc_inline int
hwloc_cudart_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
int device, hwloc_cpuset_t set)
{
#ifdef HWLOC_LINUX_SYS
/* If we're on Linux, use the sysfs mechanism to get the local cpus */
#define HWLOC_CUDART_DEVICE_SYSFS_PATH_MAX 128
cudaError_t cerr;
struct cudaDeviceProp prop;
char path[HWLOC_CUDART_DEVICE_SYSFS_PATH_MAX];
FILE *sysfile = NULL;
cerr = cudaGetDeviceProperties(&prop, device);
if (cerr) {
errno = ENOSYS;
return -1;
}
sprintf(path, "/sys/bus/pci/devices/0000:%02x:%02x.0/local_cpus", prop.pciBusID, prop.pciDeviceID);
sysfile = fopen(path, "r");
if (!sysfile)
return -1;
hwloc_linux_parse_cpumap_file(sysfile, set);
fclose(sysfile);
#else
/* Non-Linux systems simply get a full cpuset */
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
#endif
return 0;
}
/** @} */
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* HWLOC_CUDART_H */

View File

@ -0,0 +1,119 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA. All rights reserved.
* Copyright © 2009-2011 Université Bordeaux 1
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
/** \file
* \brief Macros to help interaction between hwloc and glibc scheduling routines.
*
* Applications that use both hwloc and glibc scheduling routines such as
* sched_getaffinity may want to include this file so as to ease conversion
* between their respective types.
*/
#ifndef HWLOC_GLIBC_SCHED_H
#define HWLOC_GLIBC_SCHED_H
#include <hwloc.h>
#include <hwloc/helper.h>
#include <assert.h>
#if !defined _GNU_SOURCE || !defined _SCHED_H || !defined CPU_SETSIZE
#error Please make sure to include sched.h before including glibc-sched.h, and define _GNU_SOURCE before any inclusion of sched.h
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef HWLOC_HAVE_CPU_SET
/** \defgroup hwlocality_glibc_sched Helpers for manipulating glibc sched affinity
* @{
*/
/** \brief Convert hwloc CPU set \p toposet into glibc sched affinity CPU set \p schedset
*
* This function may be used before calling sched_setaffinity or any other function
* that takes a cpu_set_t as input parameter.
*
* \p schedsetsize should be sizeof(cpu_set_t) unless \p schedset was dynamically allocated with CPU_ALLOC
*/
static __hwloc_inline int
hwloc_cpuset_to_glibc_sched_affinity(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_const_cpuset_t hwlocset,
cpu_set_t *schedset, size_t schedsetsize)
{
#ifdef CPU_ZERO_S
unsigned cpu;
CPU_ZERO_S(schedsetsize, schedset);
hwloc_bitmap_foreach_begin(cpu, hwlocset)
CPU_SET_S(cpu, schedsetsize, schedset);
hwloc_bitmap_foreach_end();
#else /* !CPU_ZERO_S */
unsigned cpu;
CPU_ZERO(schedset);
assert(schedsetsize == sizeof(cpu_set_t));
hwloc_bitmap_foreach_begin(cpu, hwlocset)
CPU_SET(cpu, schedset);
hwloc_bitmap_foreach_end();
#endif /* !CPU_ZERO_S */
return 0;
}
/** \brief Convert glibc sched affinity CPU set \p schedset 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.
*
* \p schedsetsize should be sizeof(cpu_set_t) unless \p schedset was dynamically allocated with CPU_ALLOC
*/
static __hwloc_inline int
hwloc_cpuset_from_glibc_sched_affinity(hwloc_topology_t topology __hwloc_attribute_unused, hwloc_cpuset_t hwlocset,
const cpu_set_t *schedset, size_t schedsetsize)
{
#ifdef CPU_ZERO_S
int cpu, count;
#endif
hwloc_bitmap_zero(hwlocset);
#ifdef CPU_ZERO_S
count = CPU_COUNT_S(schedsetsize, schedset);
cpu = 0;
while (count) {
if (CPU_ISSET_S(cpu, schedsetsize, schedset)) {
hwloc_bitmap_set(hwlocset, cpu);
count--;
}
cpu++;
}
#else /* !CPU_ZERO_S */
/* sched.h does not support dynamic cpu_set_t (introduced in glibc 2.7),
* assume we have a very old interface without CPU_COUNT (added in 2.6)
*/
int cpu;
assert(schedsetsize == sizeof(cpu_set_t));
for(cpu=0; cpu<CPU_SETSIZE; cpu++)
if (CPU_ISSET(cpu, schedset))
hwloc_bitmap_set(hwlocset, cpu);
#endif /* !CPU_ZERO_S */
return 0;
}
/** @} */
#endif /* CPU_SET */
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* HWLOC_GLIBC_SCHED_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,462 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA. All rights reserved.
* Copyright © 2009-2010 Université Bordeaux 1
* See COPYING in top-level directory.
*/
/** \file
* \brief Macros to help interaction between hwloc and Linux libnuma.
*
* Applications that use both Linux libnuma and hwloc may want to
* include this file so as to ease conversion between their respective types.
*/
#ifndef HWLOC_LINUX_LIBNUMA_H
#define HWLOC_LINUX_LIBNUMA_H
#include <hwloc.h>
#include <numa.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \defgroup hwlocality_linux_libnuma_ulongs Helpers for manipulating Linux libnuma unsigned long masks
* @{
*/
/** \brief Convert hwloc CPU set \p cpuset into the array of unsigned long \p mask
*
* \p mask is the array of unsigned long that will be filled.
* \p maxnode contains the maximal node number that may be stored in \p mask.
* \p maxnode will be set to the maximal node number that was found, plus one.
*
* 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.
*/
static __hwloc_inline int
hwloc_cpuset_to_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset,
unsigned long *mask, unsigned long *maxnode)
{
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
unsigned long outmaxnode = -1;
/* round-up to the next ulong and clear all bytes */
*maxnode = (*maxnode + 8*sizeof(*mask) - 1) & ~(8*sizeof(*mask) - 1);
memset(mask, 0, *maxnode/8);
if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
hwloc_obj_t node = NULL;
while ((node = hwloc_get_next_obj_covering_cpuset_by_type(topology, cpuset, HWLOC_OBJ_NODE, node)) != NULL) {
if (node->os_index >= *maxnode)
continue;
mask[node->os_index/sizeof(*mask)/8] |= 1UL << (node->os_index % (sizeof(*mask)*8));
if (outmaxnode == (unsigned long) -1 || outmaxnode < node->os_index)
outmaxnode = node->os_index;
}
} else {
/* if no numa, libnuma assumes we have a single node */
if (!hwloc_bitmap_iszero(cpuset)) {
mask[0] = 1;
outmaxnode = 0;
}
}
*maxnode = outmaxnode+1;
return 0;
}
/** \brief Convert hwloc NUMA node set \p nodeset into the array of unsigned long \p mask
*
* \p mask is the array of unsigned long that will be filled.
* \p maxnode contains the maximal node number that may be stored in \p mask.
* \p maxnode will be set to the maximal node number that was found, plus one.
*
* 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.
*/
static __hwloc_inline int
hwloc_nodeset_to_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset,
unsigned long *mask, unsigned long *maxnode)
{
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
unsigned long outmaxnode = -1;
/* round-up to the next ulong and clear all bytes */
*maxnode = (*maxnode + 8*sizeof(*mask) - 1) & ~(8*sizeof(*mask) - 1);
memset(mask, 0, *maxnode/8);
if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
hwloc_obj_t node = NULL;
while ((node = hwloc_get_next_obj_by_type(topology, HWLOC_OBJ_NODE, node)) != NULL) {
if (node->os_index >= *maxnode)
continue;
if (!hwloc_bitmap_isset(nodeset, node->os_index))
continue;
mask[node->os_index/sizeof(*mask)/8] |= 1UL << (node->os_index % (sizeof(*mask)*8));
if (outmaxnode == (unsigned long) -1 || outmaxnode < node->os_index)
outmaxnode = node->os_index;
}
} else {
/* if no numa, libnuma assumes we have a single node */
if (!hwloc_bitmap_iszero(nodeset)) {
mask[0] = 1;
outmaxnode = 0;
}
}
*maxnode = outmaxnode+1;
return 0;
}
/** \brief Convert the array of unsigned long \p mask into hwloc CPU set
*
* \p mask is a array of unsigned long that will be read.
* \p maxnode contains the maximal node number that may be read in \p mask.
*
* 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).
*/
static __hwloc_inline int
hwloc_cpuset_from_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_cpuset_t cpuset,
const unsigned long *mask, unsigned long maxnode)
{
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
hwloc_obj_t node;
unsigned i;
hwloc_bitmap_zero(cpuset);
for(i=0; i<maxnode; i++)
if (mask[i/sizeof(*mask)/8] & (1UL << (i% (sizeof(*mask)*8)))) {
node = hwloc_get_obj_by_depth(topology, depth, i);
if (node)
hwloc_bitmap_or(cpuset, cpuset, node->cpuset);
}
} else {
/* if no numa, libnuma assumes we have a single node */
if (mask[0] & 1)
hwloc_bitmap_copy(cpuset, hwloc_topology_get_complete_cpuset(topology));
else
hwloc_bitmap_zero(cpuset);
}
return 0;
}
/** \brief Convert the array of unsigned long \p mask into hwloc NUMA node set
*
* \p mask is a array of unsigned long that will be read.
* \p maxnode contains the maximal node number that may be read in \p mask.
*
* 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).
*/
static __hwloc_inline int
hwloc_nodeset_from_linux_libnuma_ulongs(hwloc_topology_t topology, hwloc_nodeset_t nodeset,
const unsigned long *mask, unsigned long maxnode)
{
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
hwloc_obj_t node;
unsigned i;
hwloc_bitmap_zero(nodeset);
for(i=0; i<maxnode; i++)
if (mask[i/sizeof(*mask)/8] & (1UL << (i% (sizeof(*mask)*8)))) {
node = hwloc_get_obj_by_depth(topology, depth, i);
if (node)
hwloc_bitmap_set(nodeset, node->os_index);
}
} else {
/* if no numa, libnuma assumes we have a single node */
if (mask[0] & 1)
hwloc_bitmap_fill(nodeset);
else
hwloc_bitmap_zero(nodeset);
}
return 0;
}
/** @} */
/** \defgroup hwlocality_linux_libnuma_bitmask Helpers for manipulating Linux libnuma bitmask
* @{
*/
/** \brief Convert hwloc CPU set \p cpuset into the returned libnuma bitmask
*
* The returned bitmask should later be freed with numa_bitmask_free.
*
* This function may be used before calling many numa_ functions
* that use a struct bitmask as an input parameter.
*
* \return newly allocated struct bitmask.
*/
static __hwloc_inline struct bitmask * __hwloc_attribute_malloc
hwloc_cpuset_to_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset)
{
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
struct bitmask *bitmask = numa_allocate_cpumask();
if (!bitmask)
return NULL;
if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
hwloc_obj_t node = NULL;
while ((node = hwloc_get_next_obj_covering_cpuset_by_type(topology, cpuset, HWLOC_OBJ_NODE, node)) != NULL)
numa_bitmask_setbit(bitmask, node->os_index);
} else {
/* if no numa, libnuma assumes we have a single node */
if (!hwloc_bitmap_iszero(cpuset))
numa_bitmask_setbit(bitmask, 0);
}
return bitmask;
}
/** \brief Convert hwloc NUMA node set \p nodeset into the returned libnuma bitmask
*
* The returned bitmask should later be freed with numa_bitmask_free.
*
* This function may be used before calling many numa_ functions
* that use a struct bitmask as an input parameter.
*
* \return newly allocated struct bitmask.
*/
static __hwloc_inline struct bitmask * __hwloc_attribute_malloc
hwloc_nodeset_to_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset)
{
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
struct bitmask *bitmask = numa_allocate_cpumask();
if (!bitmask)
return NULL;
if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
hwloc_obj_t node = NULL;
while ((node = hwloc_get_next_obj_by_type(topology, HWLOC_OBJ_NODE, node)) != NULL)
if (hwloc_bitmap_isset(nodeset, node->os_index))
numa_bitmask_setbit(bitmask, node->os_index);
} else {
/* if no numa, libnuma assumes we have a single node */
if (!hwloc_bitmap_iszero(nodeset))
numa_bitmask_setbit(bitmask, 0);
}
return bitmask;
}
/** \brief Convert libnuma bitmask \p bitmask into hwloc CPU set \p cpuset
*
* This function may be used after calling many numa_ functions
* that use a struct bitmask as an output parameter.
*/
static __hwloc_inline int
hwloc_cpuset_from_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_cpuset_t cpuset,
const struct bitmask *bitmask)
{
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
hwloc_obj_t node;
int i;
hwloc_bitmap_zero(cpuset);
for(i=0; i<NUMA_NUM_NODES; i++)
if (numa_bitmask_isbitset(bitmask, i)) {
node = hwloc_get_obj_by_depth(topology, depth, i);
if (node)
hwloc_bitmap_or(cpuset, cpuset, node->cpuset);
}
} else {
/* if no numa, libnuma assumes we have a single node */
if (numa_bitmask_isbitset(bitmask, 0))
hwloc_bitmap_copy(cpuset, hwloc_topology_get_complete_cpuset(topology));
else
hwloc_bitmap_zero(cpuset);
}
return 0;
}
/** \brief Convert libnuma bitmask \p bitmask into hwloc NUMA node set \p nodeset
*
* This function may be used after calling many numa_ functions
* that use a struct bitmask as an output parameter.
*/
static __hwloc_inline int
hwloc_nodeset_from_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_nodeset_t nodeset,
const struct bitmask *bitmask)
{
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
hwloc_obj_t node;
int i;
hwloc_bitmap_zero(nodeset);
for(i=0; i<NUMA_NUM_NODES; i++)
if (numa_bitmask_isbitset(bitmask, i)) {
node = hwloc_get_obj_by_depth(topology, depth, i);
if (node)
hwloc_bitmap_set(nodeset, node->os_index);
}
} else {
/* if no numa, libnuma assumes we have a single node */
if (numa_bitmask_isbitset(bitmask, 0))
hwloc_bitmap_fill(nodeset);
else
hwloc_bitmap_zero(nodeset);
}
return 0;
}
/** @} */
#ifdef NUMA_VERSION1_COMPATIBILITY
/** \defgroup hwlocality_linux_libnuma_nodemask Helpers for manipulating Linux libnuma nodemask_t
* @{
*/
/** \brief Convert hwloc CPU set \p cpuset into libnuma nodemask \p nodemask
*
* This function may be used before calling some old libnuma functions
* that use a nodemask_t as an input parameter.
*/
static __hwloc_inline int
hwloc_cpuset_to_linux_libnuma_nodemask(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset,
nodemask_t *nodemask)
{
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
nodemask_zero(nodemask);
if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
hwloc_obj_t node = NULL;
while ((node = hwloc_get_next_obj_covering_cpuset_by_type(topology, cpuset, HWLOC_OBJ_NODE, node)) != NULL)
nodemask_set(nodemask, node->os_index);
} else {
/* if no numa, libnuma assumes we have a single node */
if (!hwloc_bitmap_iszero(cpuset))
nodemask_set(nodemask, 0);
}
return 0;
}
/** \brief Convert hwloc NUMA node set \p nodeset into libnuma nodemask \p nodemask
*
* This function may be used before calling some old libnuma functions
* that use a nodemask_t as an input parameter.
*/
static __hwloc_inline int
hwloc_nodeset_to_linux_libnuma_nodemask(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset,
nodemask_t *nodemask)
{
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
nodemask_zero(nodemask);
if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
hwloc_obj_t node = NULL;
while ((node = hwloc_get_next_obj_by_type(topology, HWLOC_OBJ_NODE, node)) != NULL)
if (hwloc_bitmap_isset(nodeset, node->os_index))
nodemask_set(nodemask, node->os_index);
} else {
/* if no numa, libnuma assumes we have a single node */
if (!hwloc_bitmap_iszero(nodeset))
nodemask_set(nodemask, 0);
}
return 0;
}
/** \brief Convert libnuma nodemask \p nodemask into hwloc CPU set \p cpuset
*
* This function may be used before calling some old libnuma functions
* that use a nodemask_t as an output parameter.
*/
static __hwloc_inline int
hwloc_cpuset_from_linux_libnuma_nodemask(hwloc_topology_t topology, hwloc_cpuset_t cpuset,
const nodemask_t *nodemask)
{
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
hwloc_obj_t node;
int i;
hwloc_bitmap_zero(cpuset);
for(i=0; i<NUMA_NUM_NODES; i++)
if (nodemask_isset(nodemask, i)) {
node = hwloc_get_obj_by_depth(topology, depth, i);
if (node)
hwloc_bitmap_or(cpuset, cpuset, node->cpuset);
}
} else {
/* if no numa, libnuma assumes we have a single node */
if (nodemask_isset(nodemask, 0))
hwloc_bitmap_copy(cpuset, hwloc_topology_get_complete_cpuset(topology));
else
hwloc_bitmap_zero(cpuset);
}
return 0;
}
/** \brief Convert libnuma nodemask \p nodemask into hwloc NUMA node set \p nodeset
*
* This function may be used before calling some old libnuma functions
* that use a nodemask_t as an output parameter.
*/
static __hwloc_inline int
hwloc_nodeset_from_linux_libnuma_nodemask(hwloc_topology_t topology, hwloc_nodeset_t nodeset,
const nodemask_t *nodemask)
{
int depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) {
hwloc_obj_t node;
int i;
hwloc_bitmap_zero(nodeset);
for(i=0; i<NUMA_NUM_NODES; i++)
if (nodemask_isset(nodemask, i)) {
node = hwloc_get_obj_by_depth(topology, depth, i);
if (node)
hwloc_bitmap_set(nodeset, node->os_index);
}
} else {
/* if no numa, libnuma assumes we have a single node */
if (nodemask_isset(nodemask, 0))
hwloc_bitmap_fill(nodeset);
else
hwloc_bitmap_zero(nodeset);
}
return 0;
}
/** @} */
#endif /* NUMA_VERSION1_COMPATIBILITY */
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* HWLOC_LINUX_NUMA_H */

View File

@ -0,0 +1,64 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA. All rights reserved.
* Copyright © 2009-2011 Université Bordeaux 1
* See COPYING in top-level directory.
*/
/** \file
* \brief Macros to help interaction between hwloc and Linux.
*
* Applications that use hwloc on Linux may want to include this file
* if using some low-level Linux features.
*/
#ifndef HWLOC_LINUX_H
#define HWLOC_LINUX_H
#include <hwloc.h>
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \defgroup hwlocality_linux Linux-only helpers
*
* This includes helpers for manipulating linux kernel cpumap files, and hwloc
* equivalents of the Linux sched_setaffinity and sched_getaffinity system calls.
*
* @{
*/
/** \brief Convert a linux kernel cpumap file \p file into hwloc CPU set.
*
* Might be used when reading CPU set from sysfs attributes such as topology
* and caches for processors, or local_cpus for devices.
*/
HWLOC_DECLSPEC int hwloc_linux_parse_cpumap_file(FILE *file, hwloc_cpuset_t set);
/** \brief Bind a thread \p tid on cpus given in cpuset \p set
*
* The behavior is exactly the same as the Linux sched_setaffinity system call,
* but uses a hwloc cpuset.
*/
HWLOC_DECLSPEC int hwloc_linux_set_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_const_cpuset_t set);
/** \brief Get the current binding of thread \p tid
*
* The behavior is exactly the same as the Linux sched_getaffinity system call,
* but uses a hwloc cpuset.
*/
HWLOC_DECLSPEC int hwloc_linux_get_tid_cpubind(hwloc_topology_t topology, pid_t tid, hwloc_cpuset_t set);
/** @} */
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* HWLOC_GLIBC_SCHED_H */

View File

@ -0,0 +1,107 @@
/*
* Copyright © 2010 INRIA. All rights reserved.
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
/** \file
* \brief Macros to help interaction between hwloc and Myrinet Express.
*
* Applications that use both hwloc and Myrinet Express verbs may want to
* include this file so as to get topology information for Myrinet hardware.
*
*/
#ifndef HWLOC_MYRIEXPRESS_H
#define HWLOC_MYRIEXPRESS_H
#include <hwloc.h>
#include <hwloc/autogen/config.h>
#include <hwloc/linux.h>
#include <myriexpress.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \defgroup hwlocality_myriexpress Myrinet Express-Specific Functions
* @{
*/
/** \brief Get the CPU set of logical processors that are physically
* close the MX board \p id.
*
* For the given Myrinet Express board index \p id, read the
* OS-provided NUMA node and return the corresponding CPU set.
*/
static __hwloc_inline int
hwloc_mx_board_get_device_cpuset(hwloc_topology_t topology,
unsigned id, hwloc_cpuset_t set)
{
uint32_t in, out;
in = id;
if (mx_get_info(NULL, MX_NUMA_NODE, &in, sizeof(in), &out, sizeof(out)) != MX_SUCCESS) {
errno = EINVAL;
return -1;
}
if (out != (uint32_t) -1) {
hwloc_obj_t obj = NULL;
while ((obj = hwloc_get_next_obj_by_type(topology, HWLOC_OBJ_NODE, obj)) != NULL)
if (obj->os_index == out) {
hwloc_bitmap_copy(set, obj->cpuset);
goto out;
}
}
/* fallback to the full topology cpuset */
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
out:
return 0;
}
/** \brief Get the CPU set of logical processors that are physically
* close to endpoint \p endpoint.
*
* For the given Myrinet Express endpoint \p endpoint, read the
* OS-provided NUMA node and return the corresponding CPU set.
*/
static __hwloc_inline int
hwloc_mx_endpoint_get_device_cpuset(hwloc_topology_t topology,
mx_endpoint_t endpoint, hwloc_cpuset_t set)
{
uint64_t nid;
uint32_t nindex, eid;
mx_endpoint_addr_t eaddr;
if (mx_get_endpoint_addr(endpoint, &eaddr) != MX_SUCCESS) {
errno = EINVAL;
return -1;
}
if (mx_decompose_endpoint_addr(eaddr, &nid, &eid) != MX_SUCCESS) {
errno = EINVAL;
return -1;
}
if (mx_nic_id_to_board_number(nid, &nindex) != MX_SUCCESS) {
errno = EINVAL;
return -1;
}
return hwloc_mx_board_get_device_cpuset(topology, nindex, set);
}
/** @} */
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* HWLOC_MYRIEXPRESS_H */

View File

@ -0,0 +1,81 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA. All rights reserved.
* Copyright © 2009-2010 Université Bordeaux 1
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
/** \file
* \brief Macros to help interaction between hwloc and OpenFabrics
* verbs.
*
* Applications that use both hwloc and OpenFabrics verbs may want to
* include this file so as to get topology information for OpenFabrics
* hardware.
*
*/
#ifndef HWLOC_OPENFABRICS_VERBS_H
#define HWLOC_OPENFABRICS_VERBS_H
#include <hwloc.h>
#include <hwloc/autogen/config.h>
#include <hwloc/linux.h>
#include <infiniband/verbs.h>
#ifdef __cplusplus
extern "C" {
#endif
/** \defgroup hwlocality_openfabrics OpenFabrics-Specific Functions
* @{
*/
/** \brief Get the CPU set of logical processors that are physically
* close to device \p ibdev.
*
* For the given OpenFabrics device \p ibdev, 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.
*/
static __hwloc_inline int
hwloc_ibv_get_device_cpuset(hwloc_topology_t topology __hwloc_attribute_unused,
struct ibv_device *ibdev, hwloc_cpuset_t set)
{
#ifdef HWLOC_LINUX_SYS
/* If we're on Linux, use the verbs-provided sysfs mechanism to
get the local cpus */
#define HWLOC_OPENFABRICS_VERBS_SYSFS_PATH_MAX 128
char path[HWLOC_OPENFABRICS_VERBS_SYSFS_PATH_MAX];
FILE *sysfile = NULL;
sprintf(path, "/sys/class/infiniband/%s/device/local_cpus",
ibv_get_device_name(ibdev));
sysfile = fopen(path, "r");
if (!sysfile)
return -1;
hwloc_linux_parse_cpumap_file(sysfile, set);
fclose(sysfile);
#else
/* Non-Linux systems simply get a full cpuset */
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
#endif
return 0;
}
/** @} */
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* HWLOC_OPENFABRICS_VERBS_H */

View File

@ -0,0 +1,513 @@
/*
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* Copyright © 2010-2011 INRIA. All rights reserved.
* See COPYING in top-level directory.
*/
#ifndef HWLOC_RENAME_H
#define HWLOC_RENAME_H
#include <hwloc/autogen/config.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Only enact these defines if we're actually renaming the symbols
(i.e., avoid trying to have no-op defines if we're *not*
renaming). */
#if HWLOC_SYM_TRANSFORM
/* Use a preprocessor two-step in order to get the prefixing right.
Make 2 macros: HWLOC_NAME and HWLOC_NAME_CAPS for renaming
things. */
#define HWLOC_MUNGE_NAME(a, b) HWLOC_MUNGE_NAME2(a, b)
#define HWLOC_MUNGE_NAME2(a, b) a ## b
#define HWLOC_NAME(name) HWLOC_MUNGE_NAME(HWLOC_SYM_PREFIX, hwloc_ ## name)
#define HWLOC_NAME_CAPS(name) HWLOC_MUNGE_NAME(HWLOC_SYM_PREFIX_CAPS, hwloc_ ## name)
/* Now define all the "real" names to be the prefixed names. This
allows us to use the real names throughout the code base (i.e.,
"hwloc_<foo>"); the preprocessor will adjust to have the prefixed
name under the covers. */
/* Names from hwloc.h */
#define hwloc_get_api_version HWLOC_NAME(get_api_version)
#define hwloc_topology HWLOC_NAME(topology)
#define hwloc_topology_t HWLOC_NAME(topology_t)
#define hwloc_cpuset_t HWLOC_NAME(cpuset_t)
#define hwloc_const_cpuset_t HWLOC_NAME(const_cpuset_t)
#define hwloc_nodeset_t HWLOC_NAME(nodeset_t)
#define hwloc_const_nodeset_t HWLOC_NAME(const_nodeset_t)
#define HWLOC_OBJ_SYSTEM HWLOC_NAME_CAPS(OBJ_SYSTEM)
#define HWLOC_OBJ_MACHINE HWLOC_NAME_CAPS(OBJ_MACHINE)
#define HWLOC_OBJ_NODE HWLOC_NAME_CAPS(OBJ_NODE)
#define HWLOC_OBJ_SOCKET HWLOC_NAME_CAPS(OBJ_SOCKET)
#define HWLOC_OBJ_CACHE HWLOC_NAME_CAPS(OBJ_CACHE)
#define HWLOC_OBJ_CORE HWLOC_NAME_CAPS(OBJ_CORE)
#define HWLOC_OBJ_PU HWLOC_NAME_CAPS(OBJ_PU)
#define HWLOC_OBJ_MISC HWLOC_NAME_CAPS(OBJ_MISC)
#define HWLOC_OBJ_GROUP HWLOC_NAME_CAPS(OBJ_GROUP)
#define HWLOC_OBJ_TYPE_MAX HWLOC_NAME_CAPS(OBJ_TYPE_MAX)
#define hwloc_obj_type_t HWLOC_NAME(obj_type_t)
#define hwloc_compare_types HWLOC_NAME(compare_types)
#define hwloc_compare_types_e HWLOC_NAME(compare_types_e)
#define HWLOC_TYPE_UNORDERED HWLOC_NAME_CAPS(TYPE_UNORDERED)
#define hwloc_obj_memory_s HWLOC_NAME(obj_memory_s)
#define hwloc_obj_memory_page_type_s HWLOC_NAME(obj_memory_page_type_s)
#define hwloc_obj HWLOC_NAME(obj)
#define hwloc_obj_t HWLOC_NAME(obj_t)
#define hwloc_distances_s HWLOC_NAME(distances_s)
#define hwloc_obj_info_s HWLOC_NAME(obj_info_s)
#define hwloc_obj_attr_u HWLOC_NAME(obj_attr_u)
#define hwloc_cache_attr_s HWLOC_NAME(cache_attr_s)
#define hwloc_group_attr_s HWLOC_NAME(group_attr_s)
#define hwloc_topology_init HWLOC_NAME(topology_init)
#define hwloc_topology_load HWLOC_NAME(topology_load)
#define hwloc_topology_destroy HWLOC_NAME(topology_destroy)
#define hwloc_topology_check HWLOC_NAME(topology_check)
#define hwloc_topology_ignore_type HWLOC_NAME(topology_ignore_type)
#define hwloc_topology_ignore_type_keep_structure HWLOC_NAME(topology_ignore_type_keep_structure)
#define hwloc_topology_ignore_all_keep_structure HWLOC_NAME(topology_ignore_all_keep_structure)
#define hwloc_topology_flags_e HWLOC_NAME(topology_flags_e)
#define HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM HWLOC_NAME_CAPS(TOPOLOGY_FLAG_WHOLE_SYSTEM)
#define HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM HWLOC_NAME_CAPS(TOPOLOGY_FLAG_IS_THISSYSTEM)
#define hwloc_topology_set_flags HWLOC_NAME(topology_set_flags)
#define hwloc_topology_set_fsroot HWLOC_NAME(topology_set_fsroot)
#define hwloc_topology_set_pid HWLOC_NAME(topology_set_pid)
#define hwloc_topology_set_synthetic HWLOC_NAME(topology_set_synthetic)
#define hwloc_topology_set_xml HWLOC_NAME(topology_set_xml)
#define hwloc_topology_set_xmlbuffer HWLOC_NAME(topology_set_xmlbuffer)
#define hwloc_topology_set_distance_matrix HWLOC_NAME(topology_set_distance_matrix)
#define hwloc_topology_discovery_support HWLOC_NAME(topology_discovery_support)
#define hwloc_topology_cpubind_support HWLOC_NAME(topology_cpubind_support)
#define hwloc_topology_membind_support HWLOC_NAME(topology_membind_support)
#define hwloc_topology_support HWLOC_NAME(topology_support)
#define hwloc_topology_get_support HWLOC_NAME(topology_get_support)
#define hwloc_topology_export_xml HWLOC_NAME(topology_export_xml)
#define hwloc_topology_export_xmlbuffer HWLOC_NAME(topology_export_xmlbuffer)
#define hwloc_topology_insert_misc_object_by_cpuset HWLOC_NAME(topology_insert_misc_object_by_cpuset)
#define hwloc_topology_insert_misc_object_by_parent HWLOC_NAME(topology_insert_misc_object_by_parent)
#define hwloc_restrict_flags_e HWLOC_NAME(restrict_flags_e)
#define HWLOC_RESTRICT_FLAG_ADAPT_DISTANCES HWLOC_NAME_CAPS(RESTRICT_FLAG_ADAPT_DISTANCES)
#define HWLOC_RESTRICT_FLAG_ADAPT_MISC HWLOC_NAME_CAPS(RESTRICT_FLAG_ADAPT_MISC)
#define hwloc_topology_restrict HWLOC_NAME(topology_restrict)
#define hwloc_topology_get_depth HWLOC_NAME(topology_get_depth)
#define hwloc_get_type_depth HWLOC_NAME(get_type_depth)
#define hwloc_get_type_depth_e HWLOC_NAME(get_type_depth_e)
#define HWLOC_TYPE_DEPTH_UNKNOWN HWLOC_NAME_CAPS(TYPE_DEPTH_UNKNOWN)
#define HWLOC_TYPE_DEPTH_MULTIPLE HWLOC_NAME_CAPS(TYPE_DEPTH_MULTIPLE)
#define hwloc_get_depth_type HWLOC_NAME(get_depth_type)
#define hwloc_get_nbobjs_by_depth HWLOC_NAME(get_nbobjs_by_depth)
#define hwloc_get_nbobjs_by_type HWLOC_NAME(get_nbobjs_by_type)
#define hwloc_topology_is_thissystem HWLOC_NAME(topology_is_thissystem)
#define hwloc_get_obj_by_depth HWLOC_NAME(get_obj_by_depth )
#define hwloc_get_obj_by_type HWLOC_NAME(get_obj_by_type )
#define hwloc_obj_type_string HWLOC_NAME(obj_type_string )
#define hwloc_obj_type_of_string HWLOC_NAME(obj_type_of_string )
#define hwloc_obj_type_snprintf HWLOC_NAME(obj_type_snprintf )
#define hwloc_obj_attr_snprintf HWLOC_NAME(obj_attr_snprintf )
#define hwloc_obj_snprintf HWLOC_NAME(obj_snprintf)
#define hwloc_obj_cpuset_snprintf HWLOC_NAME(obj_cpuset_snprintf)
#define hwloc_obj_get_info_by_name HWLOC_NAME(obj_get_info_by_name)
#define HWLOC_CPUBIND_PROCESS HWLOC_NAME_CAPS(CPUBIND_PROCESS)
#define HWLOC_CPUBIND_THREAD HWLOC_NAME_CAPS(CPUBIND_THREAD)
#define HWLOC_CPUBIND_STRICT HWLOC_NAME_CAPS(CPUBIND_STRICT)
#define HWLOC_CPUBIND_NOMEMBIND HWLOC_NAME_CAPS(CPUBIND_NOMEMBIND)
#define hwloc_cpubind_flags_t HWLOC_NAME(cpubind_flags_t)
#define hwloc_set_cpubind HWLOC_NAME(set_cpubind)
#define hwloc_get_cpubind HWLOC_NAME(get_cpubind)
#define hwloc_set_proc_cpubind HWLOC_NAME(set_proc_cpubind)
#define hwloc_get_proc_cpubind HWLOC_NAME(get_proc_cpubind)
#define hwloc_set_thread_cpubind HWLOC_NAME(set_thread_cpubind)
#define hwloc_get_thread_cpubind HWLOC_NAME(get_thread_cpubind)
#define hwloc_get_last_cpu_location HWLOC_NAME(get_last_cpu_location)
#define hwloc_get_proc_last_cpu_location HWLOC_NAME(get_proc_last_cpu_location)
#define HWLOC_MEMBIND_DEFAULT HWLOC_NAME_CAPS(MEMBIND_DEFAULT)
#define HWLOC_MEMBIND_FIRSTTOUCH HWLOC_NAME_CAPS(MEMBIND_FIRSTTOUCH)
#define HWLOC_MEMBIND_BIND HWLOC_NAME_CAPS(MEMBIND_BIND)
#define HWLOC_MEMBIND_INTERLEAVE HWLOC_NAME_CAPS(MEMBIND_INTERLEAVE)
#define HWLOC_MEMBIND_REPLICATE HWLOC_NAME_CAPS(MEMBIND_REPLICATE)
#define HWLOC_MEMBIND_NEXTTOUCH HWLOC_NAME_CAPS(MEMBIND_NEXTTOUCH)
#define HWLOC_MEMBIND_MIXED HWLOC_NAME_CAPS(MEMBIND_MIXED)
#define hwloc_membind_policy_t HWLOC_NAME(membind_policy_t)
#define HWLOC_MEMBIND_PROCESS HWLOC_NAME_CAPS(MEMBIND_PROCESS)
#define HWLOC_MEMBIND_THREAD HWLOC_NAME_CAPS(MEMBIND_THREAD)
#define HWLOC_MEMBIND_STRICT HWLOC_NAME_CAPS(MEMBIND_STRICT)
#define HWLOC_MEMBIND_MIGRATE HWLOC_NAME_CAPS(MEMBIND_MIGRATE)
#define HWLOC_MEMBIND_NOCPUBIND HWLOC_NAME_CAPS(MEMBIND_NOCPUBIND)
#define hwloc_membind_flags_t HWLOC_NAME(membind_flags_t)
#define hwloc_set_membind_nodeset HWLOC_NAME(set_membind_nodeset)
#define hwloc_set_membind HWLOC_NAME(set_membind)
#define hwloc_get_membind_nodeset HWLOC_NAME(get_membind_nodeset)
#define hwloc_get_membind HWLOC_NAME(get_membind)
#define hwloc_set_proc_membind_nodeset HWLOC_NAME(set_proc_membind_nodeset)
#define hwloc_set_proc_membind HWLOC_NAME(set_proc_membind)
#define hwloc_get_proc_membind_nodeset HWLOC_NAME(get_proc_membind_nodeset)
#define hwloc_get_proc_membind HWLOC_NAME(get_proc_membind)
#define hwloc_set_area_membind_nodeset HWLOC_NAME(set_area_membind_nodeset)
#define hwloc_set_area_membind HWLOC_NAME(set_area_membind)
#define hwloc_get_area_membind_nodeset HWLOC_NAME(get_area_membind_nodeset)
#define hwloc_get_area_membind HWLOC_NAME(get_area_membind)
#define hwloc_alloc_membind_nodeset HWLOC_NAME(alloc_membind_nodeset)
#define hwloc_alloc_membind HWLOC_NAME(alloc_membind)
#define hwloc_alloc HWLOC_NAME(alloc)
#define hwloc_free HWLOC_NAME(free)
/* hwloc/bitmap.h */
#define hwloc_bitmap HWLOC_NAME(bitmap)
#define hwloc_bitmap_s HWLOC_NAME(bitmap_s)
#define hwloc_bitmap_t HWLOC_NAME(bitmap_t)
#define hwloc_const_bitmap_t HWLOC_NAME(const_bitmap_t)
#define hwloc_bitmap_alloc HWLOC_NAME(bitmap_alloc)
#define hwloc_bitmap_alloc_full HWLOC_NAME(bitmap_alloc_full)
#define hwloc_bitmap_free HWLOC_NAME(bitmap_free)
#define hwloc_bitmap_dup HWLOC_NAME(bitmap_dup)
#define hwloc_bitmap_copy HWLOC_NAME(bitmap_copy)
#define hwloc_bitmap_snprintf HWLOC_NAME(bitmap_snprintf)
#define hwloc_bitmap_asprintf HWLOC_NAME(bitmap_asprintf)
#define hwloc_bitmap_sscanf HWLOC_NAME(bitmap_sscanf)
#define hwloc_bitmap_list_snprintf HWLOC_NAME(bitmap_list_snprintf)
#define hwloc_bitmap_list_asprintf HWLOC_NAME(bitmap_list_asprintf)
#define hwloc_bitmap_list_sscanf HWLOC_NAME(bitmap_list_sscanf)
#define hwloc_bitmap_taskset_snprintf HWLOC_NAME(bitmap_taskset_snprintf)
#define hwloc_bitmap_taskset_asprintf HWLOC_NAME(bitmap_taskset_asprintf)
#define hwloc_bitmap_taskset_sscanf HWLOC_NAME(bitmap_taskset_sscanf)
#define hwloc_bitmap_zero HWLOC_NAME(bitmap_zero)
#define hwloc_bitmap_fill HWLOC_NAME(bitmap_fill)
#define hwloc_bitmap_from_ulong HWLOC_NAME(bitmap_from_ulong)
#define hwloc_bitmap_from_ith_ulong HWLOC_NAME(bitmap_from_ith_ulong)
#define hwloc_bitmap_to_ulong HWLOC_NAME(bitmap_to_ulong)
#define hwloc_bitmap_to_ith_ulong HWLOC_NAME(bitmap_to_ith_ulong)
#define hwloc_bitmap_only HWLOC_NAME(bitmap_only)
#define hwloc_bitmap_allbut HWLOC_NAME(bitmap_allbut)
#define hwloc_bitmap_set HWLOC_NAME(bitmap_set)
#define hwloc_bitmap_set_range HWLOC_NAME(bitmap_set_range)
#define hwloc_bitmap_set_ith_ulong HWLOC_NAME(bitmap_set_ith_ulong)
#define hwloc_bitmap_clr HWLOC_NAME(bitmap_clr)
#define hwloc_bitmap_clr_range HWLOC_NAME(bitmap_clr_range)
#define hwloc_bitmap_isset HWLOC_NAME(bitmap_isset)
#define hwloc_bitmap_iszero HWLOC_NAME(bitmap_iszero)
#define hwloc_bitmap_isfull HWLOC_NAME(bitmap_isfull)
#define hwloc_bitmap_isequal HWLOC_NAME(bitmap_isequal)
#define hwloc_bitmap_intersects HWLOC_NAME(bitmap_intersects)
#define hwloc_bitmap_isincluded HWLOC_NAME(bitmap_isincluded)
#define hwloc_bitmap_or HWLOC_NAME(bitmap_or)
#define hwloc_bitmap_and HWLOC_NAME(bitmap_and)
#define hwloc_bitmap_andnot HWLOC_NAME(bitmap_andnot)
#define hwloc_bitmap_xor HWLOC_NAME(bitmap_xor)
#define hwloc_bitmap_not HWLOC_NAME(bitmap_not)
#define hwloc_bitmap_first HWLOC_NAME(bitmap_first)
#define hwloc_bitmap_last HWLOC_NAME(bitmap_last)
#define hwloc_bitmap_next HWLOC_NAME(bitmap_next)
#define hwloc_bitmap_singlify HWLOC_NAME(bitmap_singlify)
#define hwloc_bitmap_compare_first HWLOC_NAME(bitmap_compare_first)
#define hwloc_bitmap_compare HWLOC_NAME(bitmap_compare)
#define hwloc_bitmap_weight HWLOC_NAME(bitmap_weight)
/* hwloc/cpuset.h -- deprecated but still available */
#define hwloc_cpuset HWLOC_NAME(cpuset)
#define hwloc_cpuset_s HWLOC_NAME(cpuset_s)
#define hwloc_cpuset_t HWLOC_NAME(cpuset_t)
#define hwloc_const_cpuset_t HWLOC_NAME(const_cpuset_t)
#define hwloc_cpuset_alloc HWLOC_NAME(cpuset_alloc)
#define hwloc_cpuset_free HWLOC_NAME(cpuset_free)
#define hwloc_cpuset_dup HWLOC_NAME(cpuset_dup)
#define hwloc_cpuset_copy HWLOC_NAME(cpuset_copy)
#define hwloc_cpuset_snprintf HWLOC_NAME(cpuset_snprintf)
#define hwloc_cpuset_asprintf HWLOC_NAME(cpuset_asprintf)
#define hwloc_cpuset_from_string HWLOC_NAME(cpuset_from_string)
#define hwloc_cpuset_zero HWLOC_NAME(cpuset_zero)
#define hwloc_cpuset_fill HWLOC_NAME(cpuset_fill)
#define hwloc_cpuset_from_ulong HWLOC_NAME(cpuset_from_ulong)
#define hwloc_cpuset_from_ith_ulong HWLOC_NAME(cpuset_from_ith_ulong)
#define hwloc_cpuset_to_ulong HWLOC_NAME(cpuset_to_ulong)
#define hwloc_cpuset_to_ith_ulong HWLOC_NAME(cpuset_to_ith_ulong)
#define hwloc_cpuset_cpu HWLOC_NAME(cpuset_cpu)
#define hwloc_cpuset_all_but_cpu HWLOC_NAME(cpuset_all_but_cpu)
#define hwloc_cpuset_set HWLOC_NAME(cpuset_set)
#define hwloc_cpuset_set_range HWLOC_NAME(cpuset_set_range)
#define hwloc_cpuset_set_ith_ulong HWLOC_NAME(cpuset_set_ith_ulong)
#define hwloc_cpuset_clr HWLOC_NAME(cpuset_clr)
#define hwloc_cpuset_clr_range HWLOC_NAME(cpuset_clr_range)
#define hwloc_cpuset_isset HWLOC_NAME(cpuset_isset)
#define hwloc_cpuset_iszero HWLOC_NAME(cpuset_iszero)
#define hwloc_cpuset_isfull HWLOC_NAME(cpuset_isfull)
#define hwloc_cpuset_isequal HWLOC_NAME(cpuset_isequal)
#define hwloc_cpuset_intersects HWLOC_NAME(cpuset_intersects)
#define hwloc_cpuset_isincluded HWLOC_NAME(cpuset_isincluded)
#define hwloc_cpuset_or HWLOC_NAME(cpuset_or)
#define hwloc_cpuset_and HWLOC_NAME(cpuset_and)
#define hwloc_cpuset_andnot HWLOC_NAME(cpuset_andnot)
#define hwloc_cpuset_xor HWLOC_NAME(cpuset_xor)
#define hwloc_cpuset_not HWLOC_NAME(cpuset_not)
#define hwloc_cpuset_first HWLOC_NAME(cpuset_first)
#define hwloc_cpuset_last HWLOC_NAME(cpuset_last)
#define hwloc_cpuset_next HWLOC_NAME(cpuset_next)
#define hwloc_cpuset_singlify HWLOC_NAME(cpuset_singlify)
#define hwloc_cpuset_compare_first HWLOC_NAME(cpuset_compare_first)
#define hwloc_cpuset_compare HWLOC_NAME(cpuset_compare)
#define hwloc_cpuset_weight HWLOC_NAME(cpuset_weight)
/* hwloc/helper.h */
#define hwloc_get_type_or_below_depth HWLOC_NAME(get_type_or_below_depth)
#define hwloc_get_type_or_above_depth HWLOC_NAME(get_type_or_above_depth)
#define hwloc_get_root_obj HWLOC_NAME(get_root_obj)
#define hwloc_get_system_obj HWLOC_NAME(get_system_obj)
#define hwloc_get_ancestor_obj_by_depth HWLOC_NAME(get_ancestor_obj_by_depth)
#define hwloc_get_ancestor_obj_by_type HWLOC_NAME(get_ancestor_obj_by_type)
#define hwloc_get_next_obj_by_depth HWLOC_NAME(get_next_obj_by_depth)
#define hwloc_get_next_obj_by_type HWLOC_NAME(get_next_obj_by_type)
#define hwloc_get_pu_obj_by_os_index HWLOC_NAME(get_pu_obj_by_os_index)
#define hwloc_get_next_child HWLOC_NAME(get_next_child)
#define hwloc_get_common_ancestor_obj HWLOC_NAME(get_common_ancestor_obj)
#define hwloc_obj_is_in_subtree HWLOC_NAME(obj_is_in_subtree)
#define hwloc_get_first_largest_obj_inside_cpuset HWLOC_NAME(get_first_largest_obj_inside_cpuset)
#define hwloc_get_largest_objs_inside_cpuset HWLOC_NAME(get_largest_objs_inside_cpuset)
#define hwloc_get_next_obj_inside_cpuset_by_depth HWLOC_NAME(get_next_obj_inside_cpuset_by_depth)
#define hwloc_get_next_obj_inside_cpuset_by_type HWLOC_NAME(get_next_obj_inside_cpuset_by_type)
#define hwloc_get_obj_inside_cpuset_by_depth HWLOC_NAME(get_obj_inside_cpuset_by_depth)
#define hwloc_get_obj_inside_cpuset_by_type HWLOC_NAME(get_obj_inside_cpuset_by_type)
#define hwloc_get_nbobjs_inside_cpuset_by_depth HWLOC_NAME(get_nbobjs_inside_cpuset_by_depth)
#define hwloc_get_nbobjs_inside_cpuset_by_type HWLOC_NAME(get_nbobjs_inside_cpuset_by_type)
#define hwloc_get_child_covering_cpuset HWLOC_NAME(get_child_covering_cpuset)
#define hwloc_get_obj_covering_cpuset HWLOC_NAME(get_obj_covering_cpuset)
#define hwloc_get_next_obj_covering_cpuset_by_depth HWLOC_NAME(get_next_obj_covering_cpuset_by_depth)
#define hwloc_get_next_obj_covering_cpuset_by_type HWLOC_NAME(get_next_obj_covering_cpuset_by_type)
#define hwloc_get_cache_covering_cpuset HWLOC_NAME(get_cache_covering_cpuset)
#define hwloc_get_shared_cache_covering_obj HWLOC_NAME(get_shared_cache_covering_obj)
#define hwloc_get_closest_objs HWLOC_NAME(get_closest_objs)
#define hwloc_get_obj_below_by_type HWLOC_NAME(get_obj_below_by_type)
#define hwloc_get_obj_below_array_by_type HWLOC_NAME(get_obj_below_array_by_type)
#define hwloc_distributev HWLOC_NAME(distributev)
#define hwloc_distribute HWLOC_NAME(distribute)
#define hwloc_alloc_membind_policy HWLOC_NAME(alloc_membind_policy)
#define hwloc_alloc_membind_policy_nodeset HWLOC_NAME(alloc_membind_policy_nodeset)
#define hwloc_topology_get_complete_cpuset HWLOC_NAME(topology_get_complete_cpuset)
#define hwloc_topology_get_topology_cpuset HWLOC_NAME(topology_get_topology_cpuset)
#define hwloc_topology_get_online_cpuset HWLOC_NAME(topology_get_online_cpuset)
#define hwloc_topology_get_allowed_cpuset HWLOC_NAME(topology_get_allowed_cpuset)
#define hwloc_topology_get_complete_nodeset HWLOC_NAME(topology_get_complete_nodeset)
#define hwloc_topology_get_topology_nodeset HWLOC_NAME(topology_get_topology_nodeset)
#define hwloc_topology_get_allowed_nodeset HWLOC_NAME(topology_get_allowed_nodeset)
#define hwloc_cpuset_to_nodeset HWLOC_NAME(cpuset_to_nodeset)
#define hwloc_cpuset_to_nodeset_strict HWLOC_NAME(cpuset_to_nodeset_strict)
#define hwloc_cpuset_from_nodeset HWLOC_NAME(cpuset_from_nodeset)
#define hwloc_cpuset_from_nodeset_strict HWLOC_NAME(cpuset_from_nodeset_strict)
#define hwloc_get_whole_distance_matrix_by_depth HWLOC_NAME(get_whole_distance_matrix_by_depth)
#define hwloc_get_whole_distance_matrix_by_type HWLOC_NAME(get_whole_distance_matrix_by_type)
#define hwloc_get_distance_matrix_covering_obj_by_depth HWLOC_NAME(get_distance_matrix_covering_obj_by_depth)
#define hwloc_get_latency HWLOC_NAME(get_latency)
/* glibc-sched.h */
#define hwloc_cpuset_to_glibc_sched_affinity HWLOC_NAME(cpuset_to_glibc_sched_affinity)
#define hwloc_cpuset_from_glibc_sched_affinity HWLOC_NAME(cpuset_from_glibc_sched_affinity)
/* linux-libnuma.h */
#define hwloc_cpuset_to_linux_libnuma_ulongs HWLOC_NAME(cpuset_to_linux_libnuma_ulongs)
#define hwloc_nodeset_to_linux_libnuma_ulongs HWLOC_NAME(nodeset_to_linux_libnuma_ulongs)
#define hwloc_cpuset_from_linux_libnuma_ulongs HWLOC_NAME(cpuset_from_linux_libnuma_ulongs)
#define hwloc_nodeset_from_linux_libnuma_ulongs HWLOC_NAME(nodeset_from_linux_libnuma_ulongs)
#define hwloc_cpuset_to_linux_libnuma_bitmask HWLOC_NAME(cpuset_to_linux_libnuma_bitmask)
#define hwloc_nodeset_to_linux_libnuma_bitmask HWLOC_NAME(nodeset_to_linux_libnuma_bitmask)
#define hwloc_cpuset_from_linux_libnuma_bitmask HWLOC_NAME(cpuset_from_linux_libnuma_bitmask)
#define hwloc_nodeset_from_linux_libnuma_bitmask HWLOC_NAME(nodeset_from_linux_libnuma_bitmask)
#define hwloc_cpuset_to_linux_libnuma_nodemask HWLOC_NAME(cpuset_to_linux_libnuma_nodemask)
#define hwloc_nodeset_to_linux_libnuma_nodemask HWLOC_NAME(nodeset_to_linux_libnuma_nodemask)
#define hwloc_cpuset_from_linux_libnuma_nodemask HWLOC_NAME(cpuset_from_linux_libnuma_nodemask)
#define hwloc_nodeset_from_linux_libnuma_nodemask HWLOC_NAME(nodeset_from_linux_libnuma_nodemask)
/* linux.h */
#define hwloc_linux_parse_cpumap_file HWLOC_NAME(linux_parse_cpumap_file)
#define hwloc_linux_set_tid_cpubind HWLOC_NAME(linux_set_tid_cpubind)
#define hwloc_linux_get_tid_cpubind HWLOC_NAME(linux_get_tid_cpubind)
/* openfabrics-verbs.h */
#define hwloc_ibv_get_device_cpuset HWLOC_NAME(ibv_get_device_cpuset)
/* myriexpress.h */
#define hwloc_mx_board_get_device_cpuset HWLOC_NAME(mx_board_get_device_cpuset)
#define hwloc_mx_endpoint_get_device_cpuset HWLOC_NAME(mx_endpoint_get_device_cpuset)
/* cuda.h */
#define hwloc_cuda_get_device_cpuset HWLOC_NAME(cuda_get_device_cpuset)
/* cudart.h */
#define hwloc_cudart_get_device_cpuset HWLOC_NAME(cudart_get_device_cpuset)
/* private/debug.h */
#define hwloc_debug HWLOC_NAME(debug)
/* private/misc.h */
#define hwloc_snprintf HWLOC_NAME(snprintf)
#define hwloc_namecoloncmp HWLOC_NAME(namecoloncmp)
/* FIXME: hwloc_ffsl may be a macro, but it may not be defined yet */
#define hwloc_ffs32 HWLOC_NAME(ffs32)
/* FIXME: hwloc_flsl may be a macro, but it may not be defined yet */
#define hwloc_fls32 HWLOC_NAME(fls32)
#define hwloc_weight_long HWLOC_NAME(weight_long)
/* private/cpuid.h */
#define hwloc_have_cpuid HWLOC_NAME(have_cpuid)
#define hwloc_cpuid HWLOC_NAME(cpuid)
/* private/private.h */
#define hwloc_ignore_type_e HWLOC_NAME(ignore_type_e)
#define HWLOC_IGNORE_TYPE_NEVER HWLOC_NAME_CAPS(IGNORE_TYPE_NEVER)
#define HWLOC_IGNORE_TYPE_KEEP_STRUCTURE HWLOC_NAME_CAPS(IGNORE_TYPE_KEEP_STRUCTURE)
#define HWLOC_IGNORE_TYPE_ALWAYS HWLOC_NAME_CAPS(IGNORE_TYPE_ALWAYS)
#define hwloc_os_distances_s HWLOC_NAME(os_distances_s)
#define hwloc_backend_e HWLOC_NAME(backend_e)
#define hwloc_backend_t HWLOC_NAME(backend_t)
#define HWLOC_BACKEND_NONE HWLOC_NAME_CAPS(BACKEND_NONE)
#define HWLOC_BACKEND_SYNTHETIC HWLOC_NAME_CAPS(BACKEND_SYNTHETIC)
#define HWLOC_BACKEND_SYSFS HWLOC_NAME_CAPS(BACKEND_SYSFS)
#define HWLOC_BACKEND_XML HWLOC_NAME_CAPS(BACKEND_XML)
#define HWLOC_BACKEND_MAX HWLOC_NAME_CAPS(BACKEND_MAX)
#define hwloc_backend_params_u HWLOC_NAME(backend_params_u)
#define hwloc_backend_params_sysfs_s HWLOC_NAME(backend_params_sysfs_s)
#define hwloc_backend_params_osf HWLOC_NAME(backend_params_osf)
#define hwloc_backend_params_xml_s HWLOC_NAME(backend_params_xml_s)
#define hwloc_backend_params_synthetic_s HWLOC_NAME(backend_params_synthetic_s)
#define hwloc_setup_pu_level HWLOC_NAME(setup_pu_level)
#define hwloc_setup_misc_level_from_distances HWLOC_NAME(setup_misc_level_from_distances)
#define hwloc_get_sysctlbyname HWLOC_NAME(get_sysctlbyname)
#define hwloc_get_sysctl HWLOC_NAME(get_sysctl)
#define hwloc_fallback_nbprocessors HWLOC_NAME(fallback_nbprocessors)
#define hwloc_look_linux HWLOC_NAME(look_linux)
#define hwloc_set_linux_hooks HWLOC_NAME(set_linux_hooks)
#define hwloc_backend_sysfs_init HWLOC_NAME(backend_sysfs_init)
#define hwloc_backend_sysfs_exit HWLOC_NAME(backend_sysfs_exit)
#define hwloc_backend_xml_init HWLOC_NAME(backend_xml_init)
#define hwloc_xml_check_distances HWLOC_NAME(xml_check_distances)
#define hwloc_look_xml HWLOC_NAME(look_xml)
#define hwloc_backend_xml_exit HWLOC_NAME(backend_xml_exit)
#define hwloc_look_solaris HWLOC_NAME(look_solaris)
#define hwloc_set_solaris_hooks HWLOC_NAME(set_solaris_hooks)
#define hwloc_look_aix HWLOC_NAME(look_aix)
#define hwloc_set_aix_hooks HWLOC_NAME(set_aix_hooks)
#define hwloc_look_osf HWLOC_NAME(look_osf)
#define hwloc_set_osf_hooks HWLOC_NAME(set_osf_hooks)
#define hwloc_look_windows HWLOC_NAME(look_windows)
#define hwloc_set_windows_hooks HWLOC_NAME(set_windows_hooks)
#define hwloc_look_darwin HWLOC_NAME(look_darwin)
#define hwloc_set_darwin_hooks HWLOC_NAME(set_darwin_hooks)
#define hwloc_look_freebsd HWLOC_NAME(look_freebsd)
#define hwloc_set_freebsd_hooks HWLOC_NAME(set_freebsd_hooks)
#define hwloc_look_hpux HWLOC_NAME(look_hpux)
#define hwloc_set_hpux_hooks HWLOC_NAME(set_hpux_hooks)
#define hwloc_look_x86 HWLOC_NAME(look_x86)
#define hwloc_backend_synthetic_init HWLOC_NAME(backend_synthetic_init)
#define hwloc_backend_synthetic_exit HWLOC_NAME(backend_synthetic_exit)
#define hwloc_look_synthetic HWLOC_NAME(look_synthetic )
#define hwloc_insert_object_by_cpuset HWLOC_NAME(insert_object_by_cpuset)
#define hwloc_report_error_t HWLOC_NAME(report_error_t)
#define hwloc_report_os_error HWLOC_NAME(report_os_error)
#define hwloc__insert_object_by_cpuset HWLOC_NAME(_insert_object_by_cpuset)
#define hwloc_insert_object_by_parent HWLOC_NAME(insert_object_by_parent)
#define hwloc_add_object_info HWLOC_NAME(add_object_info)
#define hwloc_add_uname_info HWLOC_NAME(add_uname_info)
#define hwloc_free_object HWLOC_NAME(free_object)
#define hwloc_bitmap_printf_value HWLOC_NAME(bitmap_printf_value)
#define hwloc_alloc_setup_object HWLOC_NAME(alloc_setup_object)
#define hwloc_free_unlinked_object HWLOC_NAME(free_unlinked_object)
#define hwloc_setup_level HWLOC_NAME(setup_level)
#define hwloc_alloc_heap HWLOC_NAME(alloc_heap)
#define hwloc_alloc_mmap HWLOC_NAME(alloc_mmap)
#define hwloc_free_heap HWLOC_NAME(free_heap)
#define hwloc_free_mmap HWLOC_NAME(free_mmap)
#define hwloc_alloc_or_fail HWLOC_NAME(alloc_or_fail)
#define hwloc_topology_distances_init HWLOC_NAME(topology_distances_init)
#define hwloc_topology_distances_clear HWLOC_NAME(topology_distances_clear)
#define hwloc_topology_distances_destroy HWLOC_NAME(topology_distances_destroy)
#define hwloc_topology__set_distance_matrix HWLOC_NAME(topology__set_distance_matrix)
#define hwloc_store_distances_from_env HWLOC_NAME(store_distances_from_env)
#define hwloc_convert_distances_indexes_into_objects HWLOC_NAME(convert_distances_indexes_into_objects)
#define hwloc_finalize_logical_distances HWLOC_NAME(finalize_logical_distances)
#define hwloc_restrict_distances HWLOC_NAME(restrict_distances)
#define hwloc_free_logical_distances HWLOC_NAME(free_logical_distances)
#define hwloc_group_by_distances HWLOC_NAME(group_by_distances)
#endif /* HWLOC_SYM_TRANSFORM */
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* HWLOC_RENAME_H */

View File

@ -0,0 +1,589 @@
/* hwloc-1.2.1/include/private/autogen/config.h. Generated from config.h.in by configure. */
/* include/private/autogen/config.h.in. Generated from configure.ac by autoheader. */
/* -*- c -*-
*
* Copyright © 2009 CNRS, INRIA., Université Bordeaux 1 All rights reserved.
* Copyright © 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* This file is automatically generated by configure. Edits will be lost
* the next time you run configure!
*/
#ifndef HWLOC_CONFIGURE_H
#define HWLOC_CONFIGURE_H
/* Define to 1 if the system has the type `CACHE_DESCRIPTOR'. */
/* #undef HAVE_CACHE_DESCRIPTOR */
/* Define to 1 if the system has the type `CACHE_RELATIONSHIP'. */
/* #undef HAVE_CACHE_RELATIONSHIP */
/* Define to 1 if you have the `clz' function. */
/* #undef HAVE_CLZ */
/* Define to 1 if you have the `clzl' function. */
/* #undef HAVE_CLZL */
/* Define to 1 if we have -lcuda */
/* #undef HAVE_CUDA */
/* Define to 1 if we have -lcudart */
/* #undef HAVE_CUDART */
/* Define to 1 if you have the <cuda.h> header file. */
/* #undef HAVE_CUDA_H */
/* Define to 1 if you have the <cuda_runtime_api.h> header file. */
/* #undef HAVE_CUDA_RUNTIME_API_H */
/* Define to 1 if you have the declaration of `CTL_HW', and to 0 if you don't.
*/
#define HAVE_DECL_CTL_HW 0
/* Define to 1 if you have the declaration of `HW_NCPU', and to 0 if you
don't. */
#define HAVE_DECL_HW_NCPU 0
/* Define to 1 if you have the declaration of `pthread_getaffinity_np', and to
0 if you don't. */
#define HAVE_DECL_PTHREAD_GETAFFINITY_NP 1
/* Define to 1 if you have the declaration of `pthread_setaffinity_np', and to
0 if you don't. */
#define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1
/* Define to 1 if you have the declaration of `_SC_LARGE_PAGESIZE', and to 0
if you don't. */
#define HAVE_DECL__SC_LARGE_PAGESIZE 0
/* Define to 1 if you have the declaration of `_SC_NPROCESSORS_CONF', and to 0
if you don't. */
#define HAVE_DECL__SC_NPROCESSORS_CONF 1
/* Define to 1 if you have the declaration of `_SC_NPROCESSORS_ONLN', and to 0
if you don't. */
#define HAVE_DECL__SC_NPROCESSORS_ONLN 1
/* Define to 1 if you have the declaration of `_SC_NPROC_CONF', and to 0 if
you don't. */
#define HAVE_DECL__SC_NPROC_CONF 0
/* Define to 1 if you have the declaration of `_SC_NPROC_ONLN', and to 0 if
you don't. */
#define HAVE_DECL__SC_NPROC_ONLN 0
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `ffs' function. */
#define HAVE_FFS 1
/* Define to 1 if you have the `ffsl' function. */
#define HAVE_FFSL 1
/* Define to 1 if you have the `fls' function. */
/* #undef HAVE_FLS */
/* Define to 1 if you have the `flsl' function. */
/* #undef HAVE_FLSL */
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if the system has the type `GROUP_AFFINITY'. */
/* #undef HAVE_GROUP_AFFINITY */
/* Define to 1 if the system has the type `GROUP_RELATIONSHIP'. */
/* #undef HAVE_GROUP_RELATIONSHIP */
/* Define to 1 if you have the `host_info' function. */
/* #undef HAVE_HOST_INFO */
/* Define to 1 if you have the <infiniband/verbs.h> header file. */
/* #undef HAVE_INFINIBAND_VERBS_H */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if the system has the type `KAFFINITY'. */
/* #undef HAVE_KAFFINITY */
/* Define to 1 if you have the <kstat.h> header file. */
/* #undef HAVE_KSTAT_H */
/* Define to 1 if you have the <langinfo.h> header file. */
/* #undef HAVE_LANGINFO_H */
/* Define to 1 if we have -lgdi32 */
/* #undef HAVE_LIBGDI32 */
/* Define to 1 if we have -libverbs */
/* #undef HAVE_LIBIBVERBS */
/* Define to 1 if we have -lkstat */
/* #undef HAVE_LIBKSTAT */
/* Define to 1 if we have -llgrp */
/* #undef HAVE_LIBLGRP */
/* Define to 1 if you have the <locale.h> header file. */
/* #undef HAVE_LOCALE_H */
/* Define to 1 if the system has the type `LOGICAL_PROCESSOR_RELATIONSHIP'. */
/* #undef HAVE_LOGICAL_PROCESSOR_RELATIONSHIP */
/* Define to 1 if you have the <mach/mach_host.h> header file. */
/* #undef HAVE_MACH_MACH_HOST_H */
/* Define to 1 if you have the <mach/mach_init.h> header file. */
/* #undef HAVE_MACH_MACH_INIT_H */
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define to 1 if you have the `memalign' function. */
#define HAVE_MEMALIGN 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <myriexpress.h> header file. */
/* #undef HAVE_MYRIEXPRESS_H */
/* Define to 1 if you have the `nl_langinfo' function. */
/* #undef HAVE_NL_LANGINFO */
/* Define to 1 if you have the <numaif.h> header file. */
/* #undef HAVE_NUMAIF_H */
/* Define to 1 if the system has the type `NUMA_NODE_RELATIONSHIP'. */
/* #undef HAVE_NUMA_NODE_RELATIONSHIP */
/* Define to 1 if you have the `openat' function. */
#define HAVE_OPENAT 1
/* Define to 1 if you have the `posix_memalign' function. */
#define HAVE_POSIX_MEMALIGN 1
/* Define to 1 if the system has the type `PROCESSOR_CACHE_TYPE'. */
/* #undef HAVE_PROCESSOR_CACHE_TYPE */
/* Define to 1 if the system has the type `PROCESSOR_GROUP_INFO'. */
/* #undef HAVE_PROCESSOR_GROUP_INFO */
/* Define to 1 if the system has the type `PROCESSOR_RELATIONSHIP'. */
/* #undef HAVE_PROCESSOR_RELATIONSHIP */
/* Define to 1 if the system has the type `PSAPI_WORKING_SET_EX_BLOCK'. */
/* #undef HAVE_PSAPI_WORKING_SET_EX_BLOCK */
/* Define to 1 if the system has the type `PSAPI_WORKING_SET_EX_INFORMATION'.
*/
/* #undef HAVE_PSAPI_WORKING_SET_EX_INFORMATION */
/* Define to 1 if you have the <pthread_np.h> header file. */
/* #undef HAVE_PTHREAD_NP_H */
/* Define to 1 if the system has the type `pthread_t'. */
#define HAVE_PTHREAD_T 1
/* Define to 1 if you have the `putwc' function. */
/* #undef HAVE_PUTWC */
/* Define to 1 if the system has the type `RelationProcessorPackage'. */
/* #undef HAVE_RELATIONPROCESSORPACKAGE */
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strftime' function. */
#define HAVE_STRFTIME 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strncasecmp' function. */
#define HAVE_STRNCASECMP 1
/* Define to 1 if you have the `sysctl' function. */
#define HAVE_SYSCTL 1
/* Define to 1 if you have the `sysctlbyname' function. */
/* #undef HAVE_SYSCTLBYNAME */
/* Define to 1 if the system has the type
`SYSTEM_LOGICAL_PROCESSOR_INFORMATION'. */
/* #undef HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION */
/* Define to 1 if the system has the type
`SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX'. */
/* #undef HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX */
/* Define to 1 if you have the <sys/cpuset.h> header file. */
/* #undef HAVE_SYS_CPUSET_H */
/* Define to 1 if you have the <sys/lgrp_user.h> header file. */
/* #undef HAVE_SYS_LGRP_USER_H */
/* Define to 1 if you have the <sys/mman.h> header file. */
#define HAVE_SYS_MMAN_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/sysctl.h> header file. */
#define HAVE_SYS_SYSCTL_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/utsname.h> header file. */
#define HAVE_SYS_UTSNAME_H 1
/* Define to 1 if you have the `uname' function. */
#define HAVE_UNAME 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if the system has the type `wchar_t'. */
/* #undef HAVE_WCHAR_T */
/* Define to 1 if you have the <X11/keysym.h> header file. */
/* #undef HAVE_X11_KEYSYM_H */
/* Define to 1 if you have the <X11/Xlib.h> header file. */
/* #undef HAVE_X11_XLIB_H */
/* Define to 1 if you have the <X11/Xutil.h> header file. */
/* #undef HAVE_X11_XUTIL_H */
/* Define to 1 on AIX */
/* #undef HWLOC_AIX_SYS */
/* Whether C compiler supports -fvisibility */
#define HWLOC_C_HAVE_VISIBILITY 1
/* Define to 1 on Darwin */
/* #undef HWLOC_DARWIN_SYS */
/* Whether we are in debugging mode or not */
/* #undef HWLOC_DEBUG */
/* Define to 1 on *FREEBSD */
/* #undef HWLOC_FREEBSD_SYS */
/* Whether your compiler has __attribute__ or not */
#define HWLOC_HAVE_ATTRIBUTE 1
/* Whether your compiler has __attribute__ aligned or not */
#define HWLOC_HAVE_ATTRIBUTE_ALIGNED 1
/* Whether your compiler has __attribute__ always_inline or not */
#define HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE 1
/* Whether your compiler has __attribute__ cold or not */
#define HWLOC_HAVE_ATTRIBUTE_COLD 1
/* Whether your compiler has __attribute__ const or not */
#define HWLOC_HAVE_ATTRIBUTE_CONST 1
/* Whether your compiler has __attribute__ deprecated or not */
#define HWLOC_HAVE_ATTRIBUTE_DEPRECATED 1
/* Whether your compiler has __attribute__ format or not */
#define HWLOC_HAVE_ATTRIBUTE_FORMAT 0
/* Whether your compiler has __attribute__ hot or not */
#define HWLOC_HAVE_ATTRIBUTE_HOT 1
/* Whether your compiler has __attribute__ malloc or not */
#define HWLOC_HAVE_ATTRIBUTE_MALLOC 1
/* Whether your compiler has __attribute__ may_alias or not */
#define HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 1
/* Whether your compiler has __attribute__ nonnull or not */
#define HWLOC_HAVE_ATTRIBUTE_NONNULL 0
/* Whether your compiler has __attribute__ noreturn or not */
#define HWLOC_HAVE_ATTRIBUTE_NORETURN 1
/* Whether your compiler has __attribute__ no_instrument_function or not */
#define HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION 1
/* Whether your compiler has __attribute__ packed or not */
#define HWLOC_HAVE_ATTRIBUTE_PACKED 1
/* Whether your compiler has __attribute__ pure or not */
#define HWLOC_HAVE_ATTRIBUTE_PURE 1
/* Whether your compiler has __attribute__ sentinel or not */
#define HWLOC_HAVE_ATTRIBUTE_SENTINEL 0
/* Whether your compiler has __attribute__ unused or not */
#define HWLOC_HAVE_ATTRIBUTE_UNUSED 1
/* Whether your compiler has __attribute__ warn unused result or not */
#define HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 1
/* Whether your compiler has __attribute__ weak alias or not */
#define HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS 1
/* Define to 1 if you have the `cairo' library. */
/* #undef HWLOC_HAVE_CAIRO */
/* Define to 1 if you have the `clz' function. */
/* #undef HWLOC_HAVE_CLZ */
/* Define to 1 if you have the `clzl' function. */
/* #undef HWLOC_HAVE_CLZL */
/* Define to 1 if you have cpuid */
#define HWLOC_HAVE_CPUID 1
/* Define to 1 if the CPU_SET macro works */
#define HWLOC_HAVE_CPU_SET 1
/* Define to 1 if the CPU_SET_S macro works */
#define HWLOC_HAVE_CPU_SET_S 1
/* Define to 1 if function `clz' is declared by system headers */
/* #undef HWLOC_HAVE_DECL_CLZ */
/* Define to 1 if function `clzl' is declared by system headers */
/* #undef HWLOC_HAVE_DECL_CLZL */
/* Define to 1 if function `ffs' is declared by system headers */
#define HWLOC_HAVE_DECL_FFS 1
/* Define to 1 if function `ffsl' is declared by system headers */
#define HWLOC_HAVE_DECL_FFSL 1
/* Define to 1 if function `fls' is declared by system headers */
/* #undef HWLOC_HAVE_DECL_FLS */
/* Define to 1 if function `flsl' is declared by system headers */
/* #undef HWLOC_HAVE_DECL_FLSL */
/* Define to 1 if you have the `ffs' function. */
#define HWLOC_HAVE_FFS 1
/* Define to 1 if you have the `ffsl' function. */
#define HWLOC_HAVE_FFSL 1
/* Define to 1 if you have the `fls' function. */
/* #undef HWLOC_HAVE_FLS */
/* Define to 1 if you have the `flsl' function. */
/* #undef HWLOC_HAVE_FLSL */
/* Define to 1 if you have a library providing the termcap interface */
/* #undef HWLOC_HAVE_LIBTERMCAP */
/* Define to 1 if mbind is available. */
/* #undef HWLOC_HAVE_MBIND */
/* Define to 1 if migrate_pages is available. */
/* #undef HWLOC_HAVE_MIGRATE_PAGES */
/* Define to 1 if glibc provides the old prototype of sched_setaffinity() */
/* #undef HWLOC_HAVE_OLD_SCHED_SETAFFINITY */
/* `Define to 1 if you have pthread_getthrds_np' */
/* #undef HWLOC_HAVE_PTHREAD_GETTHRDS_NP */
/* Define to 1 if set_mempolicy is available. */
/* #undef HWLOC_HAVE_SET_MEMPOLICY */
/* Define to 1 if you have the <stdint.h> header file. */
#define HWLOC_HAVE_STDINT_H 1
/* Define to 1 if you have the `windows.h' header. */
/* #undef HWLOC_HAVE_WINDOWS_H */
/* Define to 1 if X11 libraries are available. */
/* #undef HWLOC_HAVE_X11 */
/* Define to 1 if you have the `xml' library. */
/* #undef HWLOC_HAVE_XML */
/* Define to 1 if the _syscall3 macro works */
/* #undef HWLOC_HAVE__SYSCALL3 */
/* Define to 1 on HP-UX */
/* #undef HWLOC_HPUX_SYS */
/* Define to 1 on Irix */
/* #undef HWLOC_IRIX_SYS */
/* Define to 1 on Linux */
#define HWLOC_LINUX_SYS 1
/* Major version of hwloc */
/* #undef HWLOC_MAJOR_VERSION */
/* Minor version of hwloc */
/* #undef HWLOC_MINOR_VERSION */
/* Define to 1 on OSF */
/* #undef HWLOC_OSF_SYS */
/* Release version of hwloc */
/* #undef HWLOC_RELEASE_VERSION */
/* The size of `unsigned int', as computed by sizeof */
#define HWLOC_SIZEOF_UNSIGNED_INT 4
/* The size of `unsigned long', as computed by sizeof */
#define HWLOC_SIZEOF_UNSIGNED_LONG 4
/* Define to 1 on Solaris */
/* #undef HWLOC_SOLARIS_SYS */
/* The hwloc symbol prefix */
#define HWLOC_SYM_PREFIX hwloc_
/* The hwloc symbol prefix in all caps */
#define HWLOC_SYM_PREFIX_CAPS HWLOC_
/* Whether we need to re-define all the hwloc public symbols or not */
#define HWLOC_SYM_TRANSFORM 0
/* Define to 1 on unsupported systems */
/* #undef HWLOC_UNSUPPORTED_SYS */
/* Define to 1 if ncurses works, preferred over curses */
/* #undef HWLOC_USE_NCURSES */
/* Define to 1 on WINDOWS */
/* #undef HWLOC_WIN_SYS */
/* Define to 1 on x86_32 */
#define HWLOC_X86_32_ARCH 1
/* Define to 1 on x86_64 */
/* #undef HWLOC_X86_64_ARCH */
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* Name of package */
#define PACKAGE "htop"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "loderunner@users.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "htop"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "htop 0.9.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "htop"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.9.1"
/* The size of `unsigned int', as computed by sizeof. */
#define SIZEOF_UNSIGNED_INT 4
/* The size of `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG 4
/* The size of `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 4
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Enable extensions on HP-UX. */
#ifndef _HPUX_SOURCE
# define _HPUX_SOURCE 1
#endif
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
/* Version number of package */
#define VERSION "0.9.1"
/* Define to 1 if the X Window System is missing or not being used. */
/* #undef X_DISPLAY_MISSING */
/* Are we building for HP-UX? */
#define _HPUX_SOURCE 1
/* Define to 1 if on MINIX. */
/* #undef _MINIX */
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
/* #undef _POSIX_1_SOURCE */
/* Define to 1 if you need to in order for `stat' and other things to work. */
/* #undef _POSIX_SOURCE */
/* Define this to a keyword that can safely replace inline in installed
headers */
#define __hwloc_inline __inline__
/* Define this to the process ID type */
#define hwloc_pid_t pid_t
/* Define this to either strncasecmp or strncmp */
#define hwloc_strncasecmp strncasecmp
/* Define this to the thread ID type */
#define hwloc_thread_t pthread_t
#endif /* HWLOC_CONFIGURE_H */

View File

@ -0,0 +1,588 @@
/* include/private/autogen/config.h.in. Generated from configure.ac by autoheader. */
/* -*- c -*-
*
* Copyright © 2009 CNRS, INRIA., Université Bordeaux 1 All rights reserved.
* Copyright © 2009 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* This file is automatically generated by configure. Edits will be lost
* the next time you run configure!
*/
#ifndef HWLOC_CONFIGURE_H
#define HWLOC_CONFIGURE_H
/* Define to 1 if the system has the type `CACHE_DESCRIPTOR'. */
#undef HAVE_CACHE_DESCRIPTOR
/* Define to 1 if the system has the type `CACHE_RELATIONSHIP'. */
#undef HAVE_CACHE_RELATIONSHIP
/* Define to 1 if you have the `clz' function. */
#undef HAVE_CLZ
/* Define to 1 if you have the `clzl' function. */
#undef HAVE_CLZL
/* Define to 1 if we have -lcuda */
#undef HAVE_CUDA
/* Define to 1 if we have -lcudart */
#undef HAVE_CUDART
/* Define to 1 if you have the <cuda.h> header file. */
#undef HAVE_CUDA_H
/* Define to 1 if you have the <cuda_runtime_api.h> header file. */
#undef HAVE_CUDA_RUNTIME_API_H
/* Define to 1 if you have the declaration of `CTL_HW', and to 0 if you don't.
*/
#undef HAVE_DECL_CTL_HW
/* Define to 1 if you have the declaration of `HW_NCPU', and to 0 if you
don't. */
#undef HAVE_DECL_HW_NCPU
/* Define to 1 if you have the declaration of `pthread_getaffinity_np', and to
0 if you don't. */
#undef HAVE_DECL_PTHREAD_GETAFFINITY_NP
/* Define to 1 if you have the declaration of `pthread_setaffinity_np', and to
0 if you don't. */
#undef HAVE_DECL_PTHREAD_SETAFFINITY_NP
/* Define to 1 if you have the declaration of `_SC_LARGE_PAGESIZE', and to 0
if you don't. */
#undef HAVE_DECL__SC_LARGE_PAGESIZE
/* Define to 1 if you have the declaration of `_SC_NPROCESSORS_CONF', and to 0
if you don't. */
#undef HAVE_DECL__SC_NPROCESSORS_CONF
/* Define to 1 if you have the declaration of `_SC_NPROCESSORS_ONLN', and to 0
if you don't. */
#undef HAVE_DECL__SC_NPROCESSORS_ONLN
/* Define to 1 if you have the declaration of `_SC_NPROC_CONF', and to 0 if
you don't. */
#undef HAVE_DECL__SC_NPROC_CONF
/* Define to 1 if you have the declaration of `_SC_NPROC_ONLN', and to 0 if
you don't. */
#undef HAVE_DECL__SC_NPROC_ONLN
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the `ffs' function. */
#undef HAVE_FFS
/* Define to 1 if you have the `ffsl' function. */
#undef HAVE_FFSL
/* Define to 1 if you have the `fls' function. */
#undef HAVE_FLS
/* Define to 1 if you have the `flsl' function. */
#undef HAVE_FLSL
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
/* Define to 1 if the system has the type `GROUP_AFFINITY'. */
#undef HAVE_GROUP_AFFINITY
/* Define to 1 if the system has the type `GROUP_RELATIONSHIP'. */
#undef HAVE_GROUP_RELATIONSHIP
/* Define to 1 if you have the `host_info' function. */
#undef HAVE_HOST_INFO
/* Define to 1 if you have the <infiniband/verbs.h> header file. */
#undef HAVE_INFINIBAND_VERBS_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if the system has the type `KAFFINITY'. */
#undef HAVE_KAFFINITY
/* Define to 1 if you have the <kstat.h> header file. */
#undef HAVE_KSTAT_H
/* Define to 1 if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
/* Define to 1 if we have -lgdi32 */
#undef HAVE_LIBGDI32
/* Define to 1 if we have -libverbs */
#undef HAVE_LIBIBVERBS
/* Define to 1 if we have -lkstat */
#undef HAVE_LIBKSTAT
/* Define to 1 if we have -llgrp */
#undef HAVE_LIBLGRP
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if the system has the type `LOGICAL_PROCESSOR_RELATIONSHIP'. */
#undef HAVE_LOGICAL_PROCESSOR_RELATIONSHIP
/* Define to 1 if you have the <mach/mach_host.h> header file. */
#undef HAVE_MACH_MACH_HOST_H
/* Define to 1 if you have the <mach/mach_init.h> header file. */
#undef HAVE_MACH_MACH_INIT_H
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define to 1 if you have the `memalign' function. */
#undef HAVE_MEMALIGN
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <myriexpress.h> header file. */
#undef HAVE_MYRIEXPRESS_H
/* Define to 1 if you have the `nl_langinfo' function. */
#undef HAVE_NL_LANGINFO
/* Define to 1 if you have the <numaif.h> header file. */
#undef HAVE_NUMAIF_H
/* Define to 1 if the system has the type `NUMA_NODE_RELATIONSHIP'. */
#undef HAVE_NUMA_NODE_RELATIONSHIP
/* Define to 1 if you have the `openat' function. */
#undef HAVE_OPENAT
/* Define to 1 if you have the `posix_memalign' function. */
#undef HAVE_POSIX_MEMALIGN
/* Define to 1 if the system has the type `PROCESSOR_CACHE_TYPE'. */
#undef HAVE_PROCESSOR_CACHE_TYPE
/* Define to 1 if the system has the type `PROCESSOR_GROUP_INFO'. */
#undef HAVE_PROCESSOR_GROUP_INFO
/* Define to 1 if the system has the type `PROCESSOR_RELATIONSHIP'. */
#undef HAVE_PROCESSOR_RELATIONSHIP
/* Define to 1 if the system has the type `PSAPI_WORKING_SET_EX_BLOCK'. */
#undef HAVE_PSAPI_WORKING_SET_EX_BLOCK
/* Define to 1 if the system has the type `PSAPI_WORKING_SET_EX_INFORMATION'.
*/
#undef HAVE_PSAPI_WORKING_SET_EX_INFORMATION
/* Define to 1 if you have the <pthread_np.h> header file. */
#undef HAVE_PTHREAD_NP_H
/* Define to 1 if the system has the type `pthread_t'. */
#undef HAVE_PTHREAD_T
/* Define to 1 if you have the `putwc' function. */
#undef HAVE_PUTWC
/* Define to 1 if the system has the type `RelationProcessorPackage'. */
#undef HAVE_RELATIONPROCESSORPACKAGE
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strftime' function. */
#undef HAVE_STRFTIME
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strncasecmp' function. */
#undef HAVE_STRNCASECMP
/* Define to 1 if you have the `sysctl' function. */
#undef HAVE_SYSCTL
/* Define to 1 if you have the `sysctlbyname' function. */
#undef HAVE_SYSCTLBYNAME
/* Define to 1 if the system has the type
`SYSTEM_LOGICAL_PROCESSOR_INFORMATION'. */
#undef HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION
/* Define to 1 if the system has the type
`SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX'. */
#undef HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
/* Define to 1 if you have the <sys/cpuset.h> header file. */
#undef HAVE_SYS_CPUSET_H
/* Define to 1 if you have the <sys/lgrp_user.h> header file. */
#undef HAVE_SYS_LGRP_USER_H
/* Define to 1 if you have the <sys/mman.h> header file. */
#undef HAVE_SYS_MMAN_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/sysctl.h> header file. */
#undef HAVE_SYS_SYSCTL_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <sys/utsname.h> header file. */
#undef HAVE_SYS_UTSNAME_H
/* Define to 1 if you have the `uname' function. */
#undef HAVE_UNAME
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if the system has the type `wchar_t'. */
#undef HAVE_WCHAR_T
/* Define to 1 if you have the <X11/keysym.h> header file. */
#undef HAVE_X11_KEYSYM_H
/* Define to 1 if you have the <X11/Xlib.h> header file. */
#undef HAVE_X11_XLIB_H
/* Define to 1 if you have the <X11/Xutil.h> header file. */
#undef HAVE_X11_XUTIL_H
/* Define to 1 on AIX */
#undef HWLOC_AIX_SYS
/* Whether C compiler supports -fvisibility */
#undef HWLOC_C_HAVE_VISIBILITY
/* Define to 1 on Darwin */
#undef HWLOC_DARWIN_SYS
/* Whether we are in debugging mode or not */
#undef HWLOC_DEBUG
/* Define to 1 on *FREEBSD */
#undef HWLOC_FREEBSD_SYS
/* Whether your compiler has __attribute__ or not */
#undef HWLOC_HAVE_ATTRIBUTE
/* Whether your compiler has __attribute__ aligned or not */
#undef HWLOC_HAVE_ATTRIBUTE_ALIGNED
/* Whether your compiler has __attribute__ always_inline or not */
#undef HWLOC_HAVE_ATTRIBUTE_ALWAYS_INLINE
/* Whether your compiler has __attribute__ cold or not */
#undef HWLOC_HAVE_ATTRIBUTE_COLD
/* Whether your compiler has __attribute__ const or not */
#undef HWLOC_HAVE_ATTRIBUTE_CONST
/* Whether your compiler has __attribute__ deprecated or not */
#undef HWLOC_HAVE_ATTRIBUTE_DEPRECATED
/* Whether your compiler has __attribute__ format or not */
#undef HWLOC_HAVE_ATTRIBUTE_FORMAT
/* Whether your compiler has __attribute__ hot or not */
#undef HWLOC_HAVE_ATTRIBUTE_HOT
/* Whether your compiler has __attribute__ malloc or not */
#undef HWLOC_HAVE_ATTRIBUTE_MALLOC
/* Whether your compiler has __attribute__ may_alias or not */
#undef HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS
/* Whether your compiler has __attribute__ nonnull or not */
#undef HWLOC_HAVE_ATTRIBUTE_NONNULL
/* Whether your compiler has __attribute__ noreturn or not */
#undef HWLOC_HAVE_ATTRIBUTE_NORETURN
/* Whether your compiler has __attribute__ no_instrument_function or not */
#undef HWLOC_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION
/* Whether your compiler has __attribute__ packed or not */
#undef HWLOC_HAVE_ATTRIBUTE_PACKED
/* Whether your compiler has __attribute__ pure or not */
#undef HWLOC_HAVE_ATTRIBUTE_PURE
/* Whether your compiler has __attribute__ sentinel or not */
#undef HWLOC_HAVE_ATTRIBUTE_SENTINEL
/* Whether your compiler has __attribute__ unused or not */
#undef HWLOC_HAVE_ATTRIBUTE_UNUSED
/* Whether your compiler has __attribute__ warn unused result or not */
#undef HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT
/* Whether your compiler has __attribute__ weak alias or not */
#undef HWLOC_HAVE_ATTRIBUTE_WEAK_ALIAS
/* Define to 1 if you have the `cairo' library. */
#undef HWLOC_HAVE_CAIRO
/* Define to 1 if you have the `clz' function. */
#undef HWLOC_HAVE_CLZ
/* Define to 1 if you have the `clzl' function. */
#undef HWLOC_HAVE_CLZL
/* Define to 1 if you have cpuid */
#undef HWLOC_HAVE_CPUID
/* Define to 1 if the CPU_SET macro works */
#undef HWLOC_HAVE_CPU_SET
/* Define to 1 if the CPU_SET_S macro works */
#undef HWLOC_HAVE_CPU_SET_S
/* Define to 1 if function `clz' is declared by system headers */
#undef HWLOC_HAVE_DECL_CLZ
/* Define to 1 if function `clzl' is declared by system headers */
#undef HWLOC_HAVE_DECL_CLZL
/* Define to 1 if function `ffs' is declared by system headers */
#undef HWLOC_HAVE_DECL_FFS
/* Define to 1 if function `ffsl' is declared by system headers */
#undef HWLOC_HAVE_DECL_FFSL
/* Define to 1 if function `fls' is declared by system headers */
#undef HWLOC_HAVE_DECL_FLS
/* Define to 1 if function `flsl' is declared by system headers */
#undef HWLOC_HAVE_DECL_FLSL
/* Define to 1 if you have the `ffs' function. */
#undef HWLOC_HAVE_FFS
/* Define to 1 if you have the `ffsl' function. */
#undef HWLOC_HAVE_FFSL
/* Define to 1 if you have the `fls' function. */
#undef HWLOC_HAVE_FLS
/* Define to 1 if you have the `flsl' function. */
#undef HWLOC_HAVE_FLSL
/* Define to 1 if you have a library providing the termcap interface */
#undef HWLOC_HAVE_LIBTERMCAP
/* Define to 1 if mbind is available. */
#undef HWLOC_HAVE_MBIND
/* Define to 1 if migrate_pages is available. */
#undef HWLOC_HAVE_MIGRATE_PAGES
/* Define to 1 if glibc provides the old prototype of sched_setaffinity() */
#undef HWLOC_HAVE_OLD_SCHED_SETAFFINITY
/* `Define to 1 if you have pthread_getthrds_np' */
#undef HWLOC_HAVE_PTHREAD_GETTHRDS_NP
/* Define to 1 if set_mempolicy is available. */
#undef HWLOC_HAVE_SET_MEMPOLICY
/* Define to 1 if you have the <stdint.h> header file. */
#undef HWLOC_HAVE_STDINT_H
/* Define to 1 if you have the `windows.h' header. */
#undef HWLOC_HAVE_WINDOWS_H
/* Define to 1 if X11 libraries are available. */
#undef HWLOC_HAVE_X11
/* Define to 1 if you have the `xml' library. */
#undef HWLOC_HAVE_XML
/* Define to 1 if the _syscall3 macro works */
#undef HWLOC_HAVE__SYSCALL3
/* Define to 1 on HP-UX */
#undef HWLOC_HPUX_SYS
/* Define to 1 on Irix */
#undef HWLOC_IRIX_SYS
/* Define to 1 on Linux */
#undef HWLOC_LINUX_SYS
/* Major version of hwloc */
#undef HWLOC_MAJOR_VERSION
/* Minor version of hwloc */
#undef HWLOC_MINOR_VERSION
/* Define to 1 on OSF */
#undef HWLOC_OSF_SYS
/* Release version of hwloc */
#undef HWLOC_RELEASE_VERSION
/* The size of `unsigned int', as computed by sizeof */
#undef HWLOC_SIZEOF_UNSIGNED_INT
/* The size of `unsigned long', as computed by sizeof */
#undef HWLOC_SIZEOF_UNSIGNED_LONG
/* Define to 1 on Solaris */
#undef HWLOC_SOLARIS_SYS
/* The hwloc symbol prefix */
#undef HWLOC_SYM_PREFIX
/* The hwloc symbol prefix in all caps */
#undef HWLOC_SYM_PREFIX_CAPS
/* Whether we need to re-define all the hwloc public symbols or not */
#undef HWLOC_SYM_TRANSFORM
/* Define to 1 on unsupported systems */
#undef HWLOC_UNSUPPORTED_SYS
/* Define to 1 if ncurses works, preferred over curses */
#undef HWLOC_USE_NCURSES
/* Define to 1 on WINDOWS */
#undef HWLOC_WIN_SYS
/* Define to 1 on x86_32 */
#undef HWLOC_X86_32_ARCH
/* Define to 1 on x86_64 */
#undef HWLOC_X86_64_ARCH
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The size of `unsigned int', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_INT
/* The size of `unsigned long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG
/* The size of `void *', as computed by sizeof. */
#undef SIZEOF_VOID_P
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Enable extensions on HP-UX. */
#ifndef _HPUX_SOURCE
# undef _HPUX_SOURCE
#endif
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Version number of package */
#undef VERSION
/* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
/* Are we building for HP-UX? */
#undef _HPUX_SOURCE
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
/* Define this to a keyword that can safely replace inline in installed
headers */
#undef __hwloc_inline
/* Define this to the process ID type */
#undef hwloc_pid_t
/* Define this to either strncasecmp or strncmp */
#undef hwloc_strncasecmp
/* Define this to the thread ID type */
#undef hwloc_thread_t
#endif /* HWLOC_CONFIGURE_H */

View File

@ -0,0 +1 @@
timestamp for hwloc-1.2.1/include/private/autogen/config.h

View File

@ -0,0 +1,72 @@
/*
* Copyright © 2010-2011 Université Bordeaux 1
* Copyright © 2010 Cisco Systems, Inc. All rights reserved.
*
* See COPYING in top-level directory.
*/
/* Internals for x86's cpuid. */
#ifndef HWLOC_PRIVATE_CPUID_H
#define HWLOC_PRIVATE_CPUID_H
#ifdef HWLOC_X86_32_ARCH
static __hwloc_inline int hwloc_have_cpuid(void)
{
int ret;
unsigned tmp, tmp2;
asm(
"mov $0,%0\n\t" /* Not supported a priori */
"pushfl \n\t" /* Save flags */
"pushfl \n\t" \
"pop %1 \n\t" /* Get flags */ \
#define TRY_TOGGLE \
"xor $0x00200000,%1\n\t" /* Try to toggle ID */ \
"mov %1,%2\n\t" /* Save expected value */ \
"push %1 \n\t" \
"popfl \n\t" /* Try to toggle */ \
"pushfl \n\t" \
"pop %1 \n\t" \
"cmp %1,%2\n\t" /* Compare with expected value */ \
"jnz Lhwloc1\n\t" /* Unexpected, failure */ \
TRY_TOGGLE /* Try to set/clear */
TRY_TOGGLE /* Try to clear/set */
"mov $1,%0\n\t" /* Passed the test! */
"Lhwloc1: \n\t"
"popfl \n\t" /* Restore flags */
: "=r" (ret), "=&r" (tmp), "=&r" (tmp2));
return ret;
}
#endif /* HWLOC_X86_32_ARCH */
#ifdef HWLOC_X86_64_ARCH
static __hwloc_inline int hwloc_have_cpuid(void) { return 1; }
#endif /* HWLOC_X86_64_ARCH */
static __hwloc_inline void hwloc_cpuid(unsigned *eax, unsigned *ebx, unsigned *ecx, unsigned *edx)
{
asm(
#ifdef HWLOC_X86_32_ARCH
"push %%ebx\n\t"
#endif
"cpuid\n\t"
#ifdef HWLOC_X86_32_ARCH
"mov %%ebx,%1\n\t"
"pop %%ebx\n\t"
#endif
: "+a" (*eax),
#ifdef HWLOC_X86_32_ARCH
"=r" (*ebx),
#else
"=b" (*ebx),
#endif
"+c" (*ecx), "=d" (*edx));
}
#endif /* HWLOC_PRIVATE_CPUID_H */

View File

@ -0,0 +1,54 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA. All rights reserved.
* Copyright © 2009, 2011 Université Bordeaux 1
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
/* The configuration file */
#ifndef HWLOC_DEBUG_H
#define HWLOC_DEBUG_H
#include <private/autogen/config.h>
#ifdef HWLOC_DEBUG
#include <stdarg.h>
#include <stdio.h>
#endif
static __hwloc_inline void hwloc_debug(const char *s __hwloc_attribute_unused, ...)
{
#ifdef HWLOC_DEBUG
va_list ap;
va_start(ap, s);
vfprintf(stderr, s, ap);
va_end(ap);
#endif
}
#ifdef HWLOC_DEBUG
#define hwloc_debug_bitmap(fmt, bitmap) do { \
char *s= hwloc_bitmap_printf_value(bitmap); \
fprintf(stderr, fmt, s); \
free(s); \
} while (0)
#define hwloc_debug_1arg_bitmap(fmt, arg1, bitmap) do { \
char *s= hwloc_bitmap_printf_value(bitmap); \
fprintf(stderr, fmt, arg1, s); \
free(s); \
} while (0)
#define hwloc_debug_2args_bitmap(fmt, arg1, arg2, bitmap) do { \
char *s= hwloc_bitmap_printf_value(bitmap); \
fprintf(stderr, fmt, arg1, arg2, s); \
free(s); \
} while (0)
#else
#define hwloc_debug_bitmap(s, bitmap) do { } while(0)
#define hwloc_debug_1arg_bitmap(s, arg1, bitmap) do { } while(0)
#define hwloc_debug_2args_bitmap(s, arg1, arg2, bitmap) do { } while(0)
#endif
#endif /* HWLOC_DEBUG_H */

View File

@ -0,0 +1,331 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2010 INRIA. All rights reserved.
* Copyright © 2009-2011 Université Bordeaux 1
* Copyright © 2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
/* Misc internals routines. */
#ifndef HWLOC_PRIVATE_MISC_H
#define HWLOC_PRIVATE_MISC_H
#include <hwloc/autogen/config.h>
#include <private/autogen/config.h>
#include <private/private.h>
/* On some systems, snprintf returns the size of written data, not the actually
* required size. hwloc_snprintf always report the actually required size. */
int hwloc_snprintf(char *str, size_t size, const char *format, ...) __hwloc_attribute_format(printf, 3, 4);
/* Check whether needle matches the beginning of haystack, at least n, and up
* to a colon or \0 */
HWLOC_DECLSPEC
int hwloc_namecoloncmp(const char *haystack, const char *needle, size_t n);
/* Compile-time assertion */
#define HWLOC_BUILD_ASSERT(condition) ((void)sizeof(char[1 - 2*!(condition)]))
#define HWLOC_BITS_PER_LONG (HWLOC_SIZEOF_UNSIGNED_LONG * 8)
#define HWLOC_BITS_PER_INT (HWLOC_SIZEOF_UNSIGNED_INT * 8)
#if (HWLOC_BITS_PER_LONG != 32) && (HWLOC_BITS_PER_LONG != 64)
#error "unknown size for unsigned long."
#endif
#if (HWLOC_BITS_PER_INT != 16) && (HWLOC_BITS_PER_INT != 32) && (HWLOC_BITS_PER_INT != 64)
#error "unknown size for unsigned int."
#endif
/**
* ffsl helpers.
*/
#ifdef __GNUC__
# if (__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
/* Starting from 3.4, gcc has a long variant. */
# define hwloc_ffsl(x) __builtin_ffsl(x)
# else
# define hwloc_ffs(x) __builtin_ffs(x)
# define HWLOC_NEED_FFSL
# endif
#elif defined(HWLOC_HAVE_FFSL)
# ifndef HWLOC_HAVE_DECL_FFSL
extern int ffsl(long) __hwloc_attribute_const;
# endif
# define hwloc_ffsl(x) ffsl(x)
#elif defined(HWLOC_HAVE_FFS)
# ifndef HWLOC_HAVE_DECL_FFS
extern int ffs(int) __hwloc_attribute_const;
# endif
# define hwloc_ffs(x) ffs(x)
# define HWLOC_NEED_FFSL
#else /* no ffs implementation */
static __hwloc_inline int __hwloc_attribute_const
hwloc_ffsl(unsigned long x)
{
int i;
if (!x)
return 0;
i = 1;
#if HWLOC_BITS_PER_LONG >= 64
if (!(x & 0xfffffffful)) {
x >>= 32;
i += 32;
}
#endif
if (!(x & 0xffffu)) {
x >>= 16;
i += 16;
}
if (!(x & 0xff)) {
x >>= 8;
i += 8;
}
if (!(x & 0xf)) {
x >>= 4;
i += 4;
}
if (!(x & 0x3)) {
x >>= 2;
i += 2;
}
if (!(x & 0x1)) {
x >>= 1;
i += 1;
}
return i;
}
#endif
#ifdef HWLOC_NEED_FFSL
/* We only have an int ffs(int) implementation, build a long one. */
/* First make it 32 bits if it was only 16. */
static __hwloc_inline int __hwloc_attribute_const
hwloc_ffs32(unsigned long x)
{
#if HWLOC_BITS_PER_INT == 16
int low_ffs, hi_ffs;
low_ffs = hwloc_ffs(x & 0xfffful);
if (low_ffs)
return low_ffs;
hi_ffs = hwloc_ffs(x >> 16);
if (hi_ffs)
return hi_ffs + 16;
return 0;
#else
return hwloc_ffs(x);
#endif
}
/* Then make it 64 bit if longs are. */
static __hwloc_inline int __hwloc_attribute_const
hwloc_ffsl(unsigned long x)
{
#if HWLOC_BITS_PER_LONG == 64
int low_ffs, hi_ffs;
low_ffs = hwloc_ffs32(x & 0xfffffffful);
if (low_ffs)
return low_ffs;
hi_ffs = hwloc_ffs32(x >> 32);
if (hi_ffs)
return hi_ffs + 32;
return 0;
#else
return hwloc_ffs32(x);
#endif
}
#endif
/**
* flsl helpers.
*/
#ifdef __GNUC_____
# if (__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
# define hwloc_flsl(x) (x ? 8*sizeof(long) - __builtin_clzl(x) : 0)
# else
# define hwloc_fls(x) (x ? 8*sizeof(int) - __builtin_clz(x) : 0)
# define HWLOC_NEED_FLSL
# endif
#elif defined(HWLOC_HAVE_FLSL)
# ifndef HWLOC_HAVE_DECL_FLSL
extern int flsl(long) __hwloc_attribute_const;
# endif
# define hwloc_flsl(x) flsl(x)
#elif defined(HWLOC_HAVE_CLZL)
# ifndef HWLOC_HAVE_DECL_CLZL
extern int clzl(long) __hwloc_attribute_const;
# endif
# define hwloc_flsl(x) (x ? 8*sizeof(long) - clzl(x) : 0)
#elif defined(HWLOC_HAVE_FLS)
# ifndef HWLOC_HAVE_DECL_FLS
extern int fls(int) __hwloc_attribute_const;
# endif
# define hwloc_fls(x) fls(x)
# define HWLOC_NEED_FLSL
#elif defined(HWLOC_HAVE_CLZ)
# ifndef HWLOC_HAVE_DECL_CLZ
extern int clz(int) __hwloc_attribute_const;
# endif
# define hwloc_fls(x) (x ? 8*sizeof(int) - clz(x) : 0)
# define HWLOC_NEED_FLSL
#else /* no fls implementation */
static __hwloc_inline int __hwloc_attribute_const
hwloc_flsl(unsigned long x)
{
int i = 0;
if (!x)
return 0;
i = 1;
#if HWLOC_BITS_PER_LONG >= 64
if ((x & 0xffffffff00000000ul)) {
x >>= 32;
i += 32;
}
#endif
if ((x & 0xffff0000u)) {
x >>= 16;
i += 16;
}
if ((x & 0xff00)) {
x >>= 8;
i += 8;
}
if ((x & 0xf0)) {
x >>= 4;
i += 4;
}
if ((x & 0xc)) {
x >>= 2;
i += 2;
}
if ((x & 0x2)) {
x >>= 1;
i += 1;
}
return i;
}
#endif
#ifdef HWLOC_NEED_FLSL
/* We only have an int fls(int) implementation, build a long one. */
/* First make it 32 bits if it was only 16. */
static __hwloc_inline int __hwloc_attribute_const
hwloc_fls32(unsigned long x)
{
#if HWLOC_BITS_PER_INT == 16
int low_fls, hi_fls;
hi_fls = hwloc_fls(x >> 16);
if (hi_fls)
return hi_fls + 16;
low_fls = hwloc_fls(x & 0xfffful);
if (low_fls)
return low_fls;
return 0;
#else
return hwloc_fls(x);
#endif
}
/* Then make it 64 bit if longs are. */
static __hwloc_inline int __hwloc_attribute_const
hwloc_flsl(unsigned long x)
{
#if HWLOC_BITS_PER_LONG == 64
int low_fls, hi_fls;
hi_fls = hwloc_fls32(x >> 32);
if (hi_fls)
return hi_fls + 32;
low_fls = hwloc_fls32(x & 0xfffffffful);
if (low_fls)
return low_fls;
return 0;
#else
return hwloc_fls32(x);
#endif
}
#endif
static __hwloc_inline int __hwloc_attribute_const
hwloc_weight_long(unsigned long w)
{
#if HWLOC_BITS_PER_LONG == 32
#if (__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__) >= 4)
return __builtin_popcount(w);
#else
unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555);
res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
res = (res & 0x0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F);
res = (res & 0x00FF00FF) + ((res >> 8) & 0x00FF00FF);
return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF);
#endif
#else /* HWLOC_BITS_PER_LONG == 32 */
#if (__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__) >= 4)
return __builtin_popcountll(w);
#else
unsigned long res;
res = (w & 0x5555555555555555ul) + ((w >> 1) & 0x5555555555555555ul);
res = (res & 0x3333333333333333ul) + ((res >> 2) & 0x3333333333333333ul);
res = (res & 0x0F0F0F0F0F0F0F0Ful) + ((res >> 4) & 0x0F0F0F0F0F0F0F0Ful);
res = (res & 0x00FF00FF00FF00FFul) + ((res >> 8) & 0x00FF00FF00FF00FFul);
res = (res & 0x0000FFFF0000FFFFul) + ((res >> 16) & 0x0000FFFF0000FFFFul);
return (res & 0x00000000FFFFFFFFul) + ((res >> 32) & 0x00000000FFFFFFFFul);
#endif
#endif /* HWLOC_BITS_PER_LONG == 64 */
}
#endif /* HWLOC_PRIVATE_MISC_H */

View File

@ -0,0 +1,343 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2011 INRIA. All rights reserved.
* Copyright © 2009-2011 Université Bordeaux 1
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
*
* See COPYING in top-level directory.
*/
/* Internal types and helpers. */
#ifndef HWLOC_PRIVATE_H
#define HWLOC_PRIVATE_H
#include <private/autogen/config.h>
#include <hwloc.h>
#include <hwloc/bitmap.h>
#include <private/debug.h>
#include <sys/types.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <string.h>
#ifdef HWLOC_HAVE_ATTRIBUTE_FORMAT
# if HWLOC_HAVE_ATTRIBUTE_FORMAT
# define __hwloc_attribute_format(type, str, arg) __attribute__((__format__(type, str, arg)))
# else
# define __hwloc_attribute_format(type, str, arg)
# endif
#else
# define __hwloc_attribute_format(type, str, arg)
#endif
enum hwloc_ignore_type_e {
HWLOC_IGNORE_TYPE_NEVER = 0,
HWLOC_IGNORE_TYPE_KEEP_STRUCTURE,
HWLOC_IGNORE_TYPE_ALWAYS
};
#define HWLOC_DEPTH_MAX 128
typedef enum hwloc_backend_e {
HWLOC_BACKEND_NONE,
HWLOC_BACKEND_SYNTHETIC,
#ifdef HWLOC_LINUX_SYS
HWLOC_BACKEND_SYSFS,
#endif
#ifdef HWLOC_HAVE_XML
HWLOC_BACKEND_XML,
#endif
/* This value is only here so that we can end the enum list without
a comma (thereby preventing compiler warnings) */
HWLOC_BACKEND_MAX
} hwloc_backend_t;
struct hwloc_topology {
unsigned nb_levels; /* Number of horizontal levels */
unsigned next_group_depth; /* Depth of the next Group object that we may create */
unsigned level_nbobjects[HWLOC_DEPTH_MAX]; /* Number of objects on each horizontal level */
struct hwloc_obj **levels[HWLOC_DEPTH_MAX]; /* Direct access to levels, levels[l = 0 .. nblevels-1][0..level_nbobjects[l]] */
unsigned long flags;
int type_depth[HWLOC_OBJ_TYPE_MAX];
enum hwloc_ignore_type_e ignored_types[HWLOC_OBJ_TYPE_MAX];
int is_thissystem;
int is_loaded;
hwloc_pid_t pid; /* Process ID the topology is view from, 0 for self */
int (*set_thisproc_cpubind)(hwloc_topology_t topology, hwloc_const_cpuset_t set, int flags);
int (*get_thisproc_cpubind)(hwloc_topology_t topology, hwloc_cpuset_t set, int flags);
int (*set_thisthread_cpubind)(hwloc_topology_t topology, hwloc_const_cpuset_t set, int flags);
int (*get_thisthread_cpubind)(hwloc_topology_t topology, hwloc_cpuset_t set, int flags);
int (*set_proc_cpubind)(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_cpuset_t set, int flags);
int (*get_proc_cpubind)(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int flags);
#ifdef hwloc_thread_t
int (*set_thread_cpubind)(hwloc_topology_t topology, hwloc_thread_t tid, hwloc_const_cpuset_t set, int flags);
int (*get_thread_cpubind)(hwloc_topology_t topology, hwloc_thread_t tid, hwloc_cpuset_t set, int flags);
#endif
int (*get_thisproc_last_cpu_location)(hwloc_topology_t topology, hwloc_cpuset_t set, int flags);
int (*get_thisthread_last_cpu_location)(hwloc_topology_t topology, hwloc_cpuset_t set, int flags);
int (*get_proc_last_cpu_location)(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int flags);
int (*set_thisproc_membind)(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags);
int (*get_thisproc_membind)(hwloc_topology_t topology, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags);
int (*set_thisthread_membind)(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags);
int (*get_thisthread_membind)(hwloc_topology_t topology, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags);
int (*set_proc_membind)(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags);
int (*get_proc_membind)(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags);
int (*set_area_membind)(hwloc_topology_t topology, const void *addr, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags);
int (*get_area_membind)(hwloc_topology_t topology, const void *addr, size_t len, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags);
/* This has to return the same kind of pointer as alloc_membind, so that free_membind can be used on it */
void *(*alloc)(hwloc_topology_t topology, size_t len);
/* alloc_membind has to always succeed if !(flags & HWLOC_MEMBIND_STRICT).
* see hwloc_alloc_or_fail which is convenient for that. */
void *(*alloc_membind)(hwloc_topology_t topology, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags);
int (*free_membind)(hwloc_topology_t topology, void *addr, size_t len);
struct hwloc_topology_support support;
struct hwloc_os_distances_s {
int nbobjs;
unsigned *indexes; /* array of OS indexes before we can convert them into objs. always available.
*/
struct hwloc_obj **objs; /* array of objects, in the same order as above.
* either given (by a backend) together with the indexes array above.
* or build from the above indexes array when not given (by the user).
*/
float *distances; /* distance matrices, ordered according to the above indexes/objs array.
* distance from i to j is stored in slot i*nbnodes+j.
* will be copied into the main logical-index-ordered distance at the end of the discovery.
*/
} os_distances[HWLOC_OBJ_TYPE_MAX];
hwloc_backend_t backend_type;
union hwloc_backend_params_u {
#ifdef HWLOC_LINUX_SYS
struct hwloc_backend_params_sysfs_s {
/* sysfs backend parameters */
char *root_path; /* The path of the file system root, used when browsing, e.g., Linux' sysfs and procfs. */
int root_fd; /* The file descriptor for the file system root, used when browsing, e.g., Linux' sysfs and procfs. */
} sysfs;
#endif /* HWLOC_LINUX_SYS */
#if defined(HWLOC_OSF_SYS) || defined(HWLOC_COMPILE_PORTS)
struct hwloc_backend_params_osf {
int nbnodes;
} osf;
#endif /* HWLOC_OSF_SYS */
#ifdef HWLOC_HAVE_XML
struct hwloc_backend_params_xml_s {
/* xml backend parameters */
void *doc;
} xml;
#endif /* HWLOC_HAVE_XML */
struct hwloc_backend_params_synthetic_s {
/* synthetic backend parameters */
#define HWLOC_SYNTHETIC_MAX_DEPTH 128
unsigned arity[HWLOC_SYNTHETIC_MAX_DEPTH];
hwloc_obj_type_t type[HWLOC_SYNTHETIC_MAX_DEPTH];
unsigned id[HWLOC_SYNTHETIC_MAX_DEPTH];
unsigned depth[HWLOC_SYNTHETIC_MAX_DEPTH]; /* For cache/misc */
} synthetic;
} backend_params;
};
extern void hwloc_setup_pu_level(struct hwloc_topology *topology, unsigned nb_pus);
extern int hwloc_get_sysctlbyname(const char *name, int64_t *n);
extern int hwloc_get_sysctl(int name[], unsigned namelen, int *n);
extern unsigned hwloc_fallback_nbprocessors(struct hwloc_topology *topology);
#if defined(HWLOC_LINUX_SYS)
extern void hwloc_look_linux(struct hwloc_topology *topology);
extern void hwloc_set_linux_hooks(struct hwloc_topology *topology);
extern int hwloc_backend_sysfs_init(struct hwloc_topology *topology, const char *fsroot_path);
extern void hwloc_backend_sysfs_exit(struct hwloc_topology *topology);
#endif /* HWLOC_LINUX_SYS */
#ifdef HWLOC_HAVE_XML
extern int hwloc_backend_xml_init(struct hwloc_topology *topology, const char *xmlpath, const char *xmlbuffer, int buflen);
extern void hwloc_xml_check_distances(struct hwloc_topology *topology);
extern void hwloc_look_xml(struct hwloc_topology *topology);
extern void hwloc_backend_xml_exit(struct hwloc_topology *topology);
#endif /* HWLOC_HAVE_XML */
#ifdef HWLOC_SOLARIS_SYS
extern void hwloc_look_solaris(struct hwloc_topology *topology);
extern void hwloc_set_solaris_hooks(struct hwloc_topology *topology);
#endif /* HWLOC_SOLARIS_SYS */
#ifdef HWLOC_AIX_SYS
extern void hwloc_look_aix(struct hwloc_topology *topology);
extern void hwloc_set_aix_hooks(struct hwloc_topology *topology);
#endif /* HWLOC_AIX_SYS */
#ifdef HWLOC_OSF_SYS
extern void hwloc_look_osf(struct hwloc_topology *topology);
extern void hwloc_set_osf_hooks(struct hwloc_topology *topology);
#endif /* HWLOC_OSF_SYS */
#ifdef HWLOC_WIN_SYS
extern void hwloc_look_windows(struct hwloc_topology *topology);
extern void hwloc_set_windows_hooks(struct hwloc_topology *topology);
#endif /* HWLOC_WIN_SYS */
#ifdef HWLOC_DARWIN_SYS
extern void hwloc_look_darwin(struct hwloc_topology *topology);
extern void hwloc_set_darwin_hooks(struct hwloc_topology *topology);
#endif /* HWLOC_DARWIN_SYS */
#ifdef HWLOC_FREEBSD_SYS
extern void hwloc_look_freebsd(struct hwloc_topology *topology);
extern void hwloc_set_freebsd_hooks(struct hwloc_topology *topology);
#endif /* HWLOC_FREEBSD_SYS */
#ifdef HWLOC_HPUX_SYS
extern void hwloc_look_hpux(struct hwloc_topology *topology);
extern void hwloc_set_hpux_hooks(struct hwloc_topology *topology);
#endif /* HWLOC_HPUX_SYS */
extern void hwloc_look_x86(struct hwloc_topology *topology, unsigned nbprocs);
extern int hwloc_backend_synthetic_init(struct hwloc_topology *topology, const char *description);
extern void hwloc_backend_synthetic_exit(struct hwloc_topology *topology);
extern void hwloc_look_synthetic (struct hwloc_topology *topology);
/*
* Add an object to the topology.
* It is sorted along the tree of other objects according to the inclusion of
* cpusets, to eventually be added as a child of the smallest object including
* this object.
*
* If the cpuset is empty, the type of the object (and maybe some attributes)
* must be enough to find where to insert the object. This is especially true
* for NUMA nodes with memory and no CPUs.
*
* The given object should not have children.
*
* This shall only be called before levels are built.
*
* In case of error, hwloc_report_os_error() is called.
*/
extern void hwloc_insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t obj);
/*
* Add an object to the topology and specify which error callback to use
*/
typedef void (*hwloc_report_error_t)(const char * msg, int line);
extern void hwloc_report_os_error(const char * msg, int line);
extern int hwloc__insert_object_by_cpuset(struct hwloc_topology *topology, hwloc_obj_t obj, hwloc_report_error_t report_error);
/*
* Insert an object somewhere in the topology.
*
* It is added as the last child of the given parent.
* The cpuset is completely ignored, so strange objects such as I/O devices should
* preferably be inserted with this.
*
* The given object may have children.
*
* Remember to call topology_connect() afterwards to fix handy pointers.
*/
extern void hwloc_insert_object_by_parent(struct hwloc_topology *topology, hwloc_obj_t parent, hwloc_obj_t obj);
/* Insert name/value in the object infos array. name and value are copied by the callee. */
extern void hwloc_add_object_info(hwloc_obj_t obj, const char *name, const char *value);
/* Insert uname-specific names/values in the object infos array */
extern void hwloc_add_uname_info(struct hwloc_topology *topology);
/** \brief Return a locally-allocated stringified bitmap for printf-like calls. */
static __hwloc_inline char *
hwloc_bitmap_printf_value(hwloc_const_bitmap_t bitmap)
{
char *buf;
hwloc_bitmap_asprintf(&buf, bitmap);
return buf;
}
static __hwloc_inline struct hwloc_obj *
hwloc_alloc_setup_object(hwloc_obj_type_t type, signed idx)
{
struct hwloc_obj *obj = malloc(sizeof(*obj));
memset(obj, 0, sizeof(*obj));
obj->type = type;
obj->os_index = idx;
obj->os_level = -1;
obj->attr = malloc(sizeof(*obj->attr));
memset(obj->attr, 0, sizeof(*obj->attr));
/* do not allocate the cpuset here, let the caller do it */
return obj;
}
extern void hwloc_free_unlinked_object(hwloc_obj_t obj);
#define hwloc_object_cpuset_from_array(l, _value, _array, _max) do { \
struct hwloc_obj *__l = (l); \
unsigned int *__a = (_array); \
int k; \
__l->cpuset = hwloc_bitmap_alloc(); \
for(k=0; k<_max; k++) \
if (__a[k] == _value) \
hwloc_bitmap_set(__l->cpuset, k); \
} while (0)
/* Configures an array of NUM objects of type TYPE with physical IDs OSPHYSIDS
* and for which processors have ID PROC_PHYSIDS, and add them to the topology.
* */
static __hwloc_inline void
hwloc_setup_level(int procid_max, unsigned num, unsigned *osphysids, unsigned *proc_physids, struct hwloc_topology *topology, hwloc_obj_type_t type)
{
struct hwloc_obj *obj;
unsigned j;
hwloc_debug("%d %s\n", num, hwloc_obj_type_string(type));
for (j = 0; j < num; j++)
{
obj = hwloc_alloc_setup_object(type, osphysids[j]);
hwloc_object_cpuset_from_array(obj, j, proc_physids, procid_max);
hwloc_debug_2args_bitmap("%s %d has cpuset %s\n",
hwloc_obj_type_string(type),
j, obj->cpuset);
hwloc_insert_object_by_cpuset(topology, obj);
}
hwloc_debug("%s", "\n");
}
/* This can be used for the alloc field to get allocated data that can be freed by free() */
void *hwloc_alloc_heap(hwloc_topology_t topology, size_t len);
/* This can be used for the alloc field to get allocated data that can be freed by munmap() */
void *hwloc_alloc_mmap(hwloc_topology_t topology, size_t len);
/* This can be used for the free_membind field to free data using free() */
int hwloc_free_heap(hwloc_topology_t topology, void *addr, size_t len);
/* This can be used for the free_membind field to free data using munmap() */
int hwloc_free_mmap(hwloc_topology_t topology, void *addr, size_t len);
/* Allocates unbound memory or fail, depending on whether STRICT is requested
* or not */
static __hwloc_inline void *
hwloc_alloc_or_fail(hwloc_topology_t topology, size_t len, int flags)
{
if (flags & HWLOC_MEMBIND_STRICT)
return NULL;
return hwloc_alloc(topology, len);
}
extern void hwloc_topology_distances_init(struct hwloc_topology *topology);
extern void hwloc_topology_distances_clear(struct hwloc_topology *topology);
extern void hwloc_topology_distances_destroy(struct hwloc_topology *topology);
extern void hwloc_topology__set_distance_matrix(struct hwloc_topology *topology, hwloc_obj_type_t type, unsigned nbobjs, unsigned *indexes, hwloc_obj_t *objs, float *distances);
extern void hwloc_store_distances_from_env(struct hwloc_topology *topology);
extern void hwloc_convert_distances_indexes_into_objects(struct hwloc_topology *topology);
extern void hwloc_finalize_logical_distances(struct hwloc_topology *topology);
extern void hwloc_restrict_distances(struct hwloc_topology *topology, unsigned long flags);
extern void hwloc_free_logical_distances(struct hwloc_distances_s *dist);
extern void hwloc_group_by_distances(struct hwloc_topology *topology);
#endif /* HWLOC_PRIVATE_H */