update the platform win32 files for hwloc build on Windows natively.
This commit was SVN r26727.
Этот коммит содержится в:
родитель
4ccf94c734
Коммит
98035d131c
@ -61,7 +61,7 @@ ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
|
||||
# Make the include path visible to all targets
|
||||
INCLUDE_DIRECTORIES (
|
||||
${OpenMPI_SOURCE_DIR}/contrib/platform/win32
|
||||
${OpenMPI_SOURCE_DIR}/contrib/platform/win32/include
|
||||
${OpenMPI_SOURCE_DIR}/
|
||||
${OpenMPI_SOURCE_DIR}/opal
|
||||
${OpenMPI_SOURCE_DIR}/opal/include
|
||||
|
@ -122,6 +122,19 @@ EXTRA_DIST = \
|
||||
platform/win32/CMakeModules/fortran_get_sizeof.cmake \
|
||||
platform/win32/CMakeModules/setup_fortran.cmake \
|
||||
platform/win32/CMakeModules/fortran_check_real16_c_equiv.cmake \
|
||||
platform/win32/include/hwloc/autogen/config.h \
|
||||
platform/win32/include/hwloc/bitmap.h \
|
||||
platform/win32/include/hwloc/cpuset.h \
|
||||
platform/win32/include/hwloc/cuda.h \
|
||||
platform/win32/include/hwloc/cudart.h \
|
||||
platform/win32/include/hwloc/glibc-sched.h \
|
||||
platform/win32/include/hwloc/helper.h \
|
||||
platform/win32/include/hwloc/linux-libnuma.h \
|
||||
platform/win32/include/hwloc/linux.h \
|
||||
platform/win32/include/hwloc/myriexpress.h \
|
||||
platform/win32/include/hwloc/openfabrics-verbs.h \
|
||||
platform/win32/include/hwloc/rename.h \
|
||||
platform/win32/include/hwloc/private/autogen/config.h \
|
||||
platform/cisco/macosx-dynamic \
|
||||
platform/cisco/macosx-dynamic.conf \
|
||||
platform/cisco/linux \
|
||||
|
@ -175,39 +175,65 @@ OPAL_WITH_OPTION_MIN_MAX_VALUE(datarep_string 128 64 256)
|
||||
|
||||
OMPI_DEF_CACHE_VAR(OMPI_MPIEXT_COMPONENTS none STRING "Specify user defined MPI Extended Interface Components." 1 1)
|
||||
|
||||
OMPI_DEF_OPT(MCA_ompi_mtl_DIRECT_CALL "Whether mtl should use direct calls instead of components." OFF)
|
||||
OMPI_DEF(MCA_ompi_mtl_DIRECT_CALL 0 "Whether mtl should use direct calls instead of components." 0 1)
|
||||
|
||||
OMPI_DEF_OPT(MCA_ompi_pml_DIRECT_CALL "Whether pml should use direct calls instead of components." OFF)
|
||||
OMPI_DEF(MCA_ompi_pml_DIRECT_CALL 0 "Whether pml should use direct calls instead of components." 0 1)
|
||||
|
||||
OMPI_DEF_OPT(MPI_PARAM_CHECK "Whether we want to check MPI parameters always, never, or decide at run-time." OFF)
|
||||
OMPI_DEF_OPT(enable-mpi-param-check MPI_PARAM_CHECK "Whether we want to check MPI parameters always, never, or decide at run-time." OFF)
|
||||
|
||||
OMPI_DEF_OPT(OPAL_ENABLE_DEBUG "Whether we want developer-level debugging code or not." OFF)
|
||||
OMPI_DEF_OPT(enable-debug OPAL_ENABLE_DEBUG "Whether we want developer-level debugging code or not." OFF)
|
||||
|
||||
OMPI_DEF_OPT(OPAL_ENABLE_HETEROGENEOUS_SUPPORT "Enable features required for heterogeneous support." OFF)
|
||||
OMPI_DEF_OPT(enable-heterogeneous-support OPAL_ENABLE_HETEROGENEOUS_SUPPORT "Enable features required for heterogeneous support." OFF)
|
||||
|
||||
OMPI_DEF_OPT(OPAL_ENABLE_MEM_DEBUG "Whether we want the memory debug or not." OFF)
|
||||
OMPI_DEF_OPT(enable-mem-debug OPAL_ENABLE_MEM_DEBUG "Whether we want the memory debug or not." OFF)
|
||||
|
||||
OMPI_DEF_OPT(OPAL_ENABLE_MEM_PROFILE "Whether we want the memory profiling or not." OFF)
|
||||
OMPI_DEF_OPT(enable-mem-profile OPAL_ENABLE_MEM_PROFILE "Whether we want the memory profiling or not." OFF)
|
||||
|
||||
OMPI_DEF_OPT(OMPI_ENABLE_MPI_PROFILING "Whether we want MPI profiling or not." ON)
|
||||
OMPI_DEF_OPT(enable-mpi-profiling OMPI_ENABLE_MPI_PROFILING "Whether we want MPI profiling or not." ON)
|
||||
|
||||
OMPI_DEF_OPT(OMPI_ENABLE_THREAD_MULTIPLE "Enable MPI_THREAD_MULTIPLE." OFF)
|
||||
OMPI_DEF_OPT(enable-thread-multiple OMPI_ENABLE_THREAD_MULTIPLE "Enable MPI_THREAD_MULTIPLE." OFF)
|
||||
|
||||
OMPI_DEF(OMPI_ENABLE_PROGRESS_THREADS 0 "Hardwire OMPI progress threads to be off." 0 1)
|
||||
|
||||
OMPI_DEF(ORTE_ENABLE_PROGRESS_THREADS 0 "Hardwire ORTE progress threads to be off." 0 1)
|
||||
|
||||
OMPI_DEF_OPT(OPAL_ENABLE_MULTI_THREADS "Whether we should enable OPAL thread support." OFF)
|
||||
OMPI_DEF_OPT(enable-multi-threads OPAL_ENABLE_MULTI_THREADS "Whether we should enable OPAL thread support." OFF)
|
||||
|
||||
OMPI_DEF_OPT(OPAL_ENABLE_PTY_SUPPORT "Whether we should enable PTY support for STDIO forwarding." OFF)
|
||||
OMPI_DEF_OPT(enable-pty-support OPAL_ENABLE_PTY_SUPPORT "Whether we should enable PTY support for STDIO forwarding." OFF)
|
||||
|
||||
OMPI_DEF_OPT ( OMPI_GROUP_SPARSE "Wether we want sparse process groups." OFF)
|
||||
OMPI_DEF_OPT(enable-sparse-group OMPI_GROUP_SPARSE "Wether we want sparse process groups." OFF)
|
||||
|
||||
OMPI_DEF_OPT (OMPI_PROVIDE_MPI_FILE_INTERFACE "Whether OMPI should provide MPI File interface" ON)
|
||||
OMPI_DEF(OMPI_PROVIDE_MPI_FILE_INTERFACE 1 "Whether OMPI should provide MPI File interface" 0 1)
|
||||
|
||||
OMPI_DEF_OPT(OMPI_WANT_CXX_BINDINGS "Whether we want MPI cxx support or not." ON)
|
||||
OMPI_DEF_OPT(enable-mpi-cxx OMPI_BUILD_CXX_BINDINGS "Whether we want MPI cxx support or not." ON)
|
||||
|
||||
OMPI_DEF_OPT(OMPI_WANT_FORTRAN_BINDINGS "Whether we want MPI FORTRAN support or not." OFF)
|
||||
OMPI_DEF_OPT(enable-mpi-fortran OMPI_BUILD_FORTRAN_USEMPI_BINDINGS "Whether we want MPI FORTRAN support or not." OFF)
|
||||
|
||||
OMPI_DEF(OMPI_BUILD_FORTRAN_F08_SUBARRAYS 0 "fortran compiler has fortran08 subarrays" 0 1)
|
||||
|
||||
OMPI_DEF(OMPI_FORTRAN_HAVE_PRIVATE 0 "fortran compiler has private" 0 1)
|
||||
|
||||
OMPI_DEF(OMPI_FORTRAN_HAVE_ABSTRACT 0 "fortran compiler has abstract" 0 1)
|
||||
|
||||
OMPI_DEF(OMPI_FORTRAN_HAVE_ASYNCHRONOUS 0 "fortran compiler has asynchronous" 0 1)
|
||||
|
||||
OMPI_DEF(OMPI_FORTRAN_HAVE_PROCEDURE 0 "fortran compiler has procedure" 0 1)
|
||||
|
||||
OMPI_DEF(OMPI_FORTRAN_NEED_WRAPPER_ROUTINES 0 "fortran compiler needs wrapper routines" 0 1)
|
||||
|
||||
OMPI_DEF(OMPI_FORTRAN_HAVE_IGNORE_TKR 0 "fortran compiler has ignore tkr" 0 1)
|
||||
|
||||
OMPI_DEF(OMPI_FORTRAN_HAVE_F08_ASSUMED_SHAPE 0 "fortran compiler has f08 assumed shape" 0 1)
|
||||
|
||||
OMPI_DEF(OMPI_FORTRAN_HAVE_OPTIONAL_ARGS 0 "fortran compiler has f08 assumed shape" 0 1)
|
||||
|
||||
OMPI_DEF(OMPI_FORTRAN_HAVE_BIND_C 0 "fortran compiler has f08 assumed shape" 0 1)
|
||||
|
||||
OMPI_DEF(OMPI_FORTRAN_IGNORE_TKR_PREDECL 0 "fortran compiler has f08 assumed shape" 0 1)
|
||||
|
||||
OMPI_DEF(OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS 0 "fortran compiler has f08 assumed shape" 0 1)
|
||||
|
||||
OMPI_DEF(OMPI_BUILD_FORTRAN_MPIFH_BINDINGS 0 "fortran compiler has f08 assumed shape" 0 1)
|
||||
|
||||
OMPI_DEF_OPT(OMPI_WANT_F90_BINDINGS "Whether we want MPI F90 support or not." OFF)
|
||||
|
||||
@ -257,6 +283,8 @@ OMPI_DEF_OPT(OMPI_WANT_JAVA_BINDINGS "Whether we want to enable MPI Java support
|
||||
|
||||
OMPI_DEF_OPT(OPAL_HAVE_HWLOC "Whether we have hwloc support or not" ON)
|
||||
|
||||
OMPI_DEF_OPT(OPAL_HAVE_HWLOC_XML "Enable xml support or not" ON)
|
||||
|
||||
OMPI_DEF(OMPI_ENABLE_CONTRIB_vt 0 "Whether we want to enable VampirTrace support." 0 1)
|
||||
|
||||
IF (NOT MSVC)
|
||||
@ -628,7 +656,7 @@ OMPI_CHECK_TYPES (uintptr_t UINTPTR_T none c)
|
||||
###################################################################
|
||||
# Check Fortran 77 types #
|
||||
###################################################################
|
||||
INCLUDE(setup_FORTRAN)
|
||||
INCLUDE(setup_fortran)
|
||||
INCLUDE(fortran_check)
|
||||
INCLUDE(fortran_check_real16_c_equiv)
|
||||
INCLUDE(fortran_get_value_true)
|
||||
@ -736,6 +764,8 @@ IF(WIN32)
|
||||
|
||||
OMPI_DEF(MCA_timer_IMPLEMENTATION_HEADER "opal/mca/timer/windows/timer_windows.h" "Header to include for timer implementation." 1 1)
|
||||
|
||||
OMPI_DEF(MCA_hwloc_IMPLEMENTATION_HEADER "opal/mca/hwloc/hwloc142/hwloc142.h" "Header to include for hwloc implementation." 1 1)
|
||||
|
||||
OMPI_DEF(MCA_memory_IMPLEMENTATION_HEADER "opal/mca/memory/base/empty.h" "Header to include for memory implementation." 1 1)
|
||||
|
||||
OMPI_DEF(OPAL_ASSEMBLY_ARCH "OMPI_WINDOWS" "Architecture type of assembly to use for atomic operations." 0 1)
|
||||
@ -757,9 +787,7 @@ IF(WIN32)
|
||||
OMPI_DEF_CACHE(MCA_pml_DIRECT_CALL_HEADER " " STRING "Header pml includes to be direct called." 1 1)
|
||||
|
||||
OMPI_DEF_CACHE(OMPI_MPI_CONTRIBS none STRING "List of contributed package names that will be built." 1 1)
|
||||
|
||||
OMPI_DEF(OPAL_HAVE_HWLOC_XML 0 "Enable xml support or not" 0 1)
|
||||
|
||||
|
||||
CHECK_C_INLINE()
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
@ -106,18 +106,18 @@ ENDMACRO(OMPI_DEF_CACHE_VAR NAME VALUE OPT DESC IS_STR FORCE_DEF)
|
||||
|
||||
#add an configure option and
|
||||
#write the line in template file.
|
||||
MACRO(OMPI_DEF_OPT NAME DESC DEFAULT_VAL)
|
||||
MACRO(OMPI_DEF_OPT OPT_NAME DEF_NAME DESC DEFAULT_VAL)
|
||||
|
||||
UNSET(APPEND_STRING)
|
||||
|
||||
OPTION(${NAME} "${DESC}" ${DEFAULT_VAL})
|
||||
OPTION(${OPT_NAME} "${DESC}" ${DEFAULT_VAL})
|
||||
|
||||
IF(${${NAME}} STREQUAL "OFF")
|
||||
IF(${${OPT_NAME}} STREQUAL "OFF")
|
||||
SET(${NAME}_VAL 0)
|
||||
ELSE(${${NAME}} STREQUAL "OFF")
|
||||
ELSE(${${OPT_NAME}} STREQUAL "OFF")
|
||||
SET(${NAME}_VAL 1)
|
||||
ENDIF(${${NAME}} STREQUAL "OFF")
|
||||
ENDIF(${${OPT_NAME}} STREQUAL "OFF")
|
||||
|
||||
APPEND_CONFIG_FILE(${NAME} ${NAME}_VAL "" ${DESC} 0 1 1)
|
||||
APPEND_CONFIG_FILE(${DEF_NAME} ${NAME}_VAL "" ${DESC} 0 1 1)
|
||||
|
||||
ENDMACRO(OMPI_DEF_OPT NAME DESC DEFAULT_VAL)
|
||||
ENDMACRO(OMPI_DEF_OPT OPT_NAME DEF_NAME DESC DEFAULT_VAL)
|
||||
|
@ -29,6 +29,9 @@ IF(OMPI_WANT_FORTRAN_BINDINGS AND NOT FORTRAN_SETUP_DONE)
|
||||
|
||||
SET(FORTRAN ${FORTRAN_NAME} CACHE INTERNAL "Name of the fortran compiler.")
|
||||
|
||||
OMPI_DEF(OMPI_FC ${FORTRAN} "The fortran compiler name." 1 1)
|
||||
OMPI_DEF(OMPI_FC_ABSOLUTE ${CMAKE_Fortran_COMPILER} "The absolute path of the fortran compiler." 1 1)
|
||||
|
||||
# Default compiler settings.
|
||||
IF(${FORTRAN} STREQUAL "ifort.exe")
|
||||
#settings for Intel Fortran
|
||||
|
193
contrib/platform/win32/include/hwloc/autogen/config.h
Обычный файл
193
contrib/platform/win32/include/hwloc/autogen/config.h
Обычный файл
@ -0,0 +1,193 @@
|
||||
/* 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-2012 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
|
||||
|
||||
/* Note that if we're compiling C++, then just use the "inline"
|
||||
keyword, since it's part of C++ */
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
# define __hwloc_inline inline
|
||||
#elif defined(_MSC_VER) || defined(__HP_cc)
|
||||
# define __hwloc_inline __inline
|
||||
#else
|
||||
# define __hwloc_inline __inline__
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/* Some handy constants to make the logic below a little more readable */
|
||||
#if defined(__cplusplus) && \
|
||||
(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR >= 4))
|
||||
#define GXX_ABOVE_3_4 1
|
||||
#else
|
||||
#define GXX_ABOVE_3_4 0
|
||||
#endif
|
||||
|
||||
#if !defined(__cplusplus) && \
|
||||
(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
||||
#define GCC_ABOVE_2_95 1
|
||||
#else
|
||||
#define GCC_ABOVE_2_95 0
|
||||
#endif
|
||||
|
||||
#if !defined(__cplusplus) && \
|
||||
(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
|
||||
#define GCC_ABOVE_2_96 1
|
||||
#else
|
||||
#define GCC_ABOVE_2_96 0
|
||||
#endif
|
||||
|
||||
#if !defined(__cplusplus) && \
|
||||
(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
|
||||
#define GCC_ABOVE_3_3 1
|
||||
#else
|
||||
#define GCC_ABOVE_3_3 0
|
||||
#endif
|
||||
|
||||
/* Maybe before gcc 2.95 too */
|
||||
#ifdef HWLOC_HAVE_ATTRIBUTE_UNUSED
|
||||
#define __HWLOC_HAVE_ATTRIBUTE_UNUSED HWLOC_HAVE_ATTRIBUTE_UNUSED
|
||||
#elif defined(__GNUC__)
|
||||
# define __HWLOC_HAVE_ATTRIBUTE_UNUSED (GXX_ABOVE_3_4 || GCC_ABOVE_2_95)
|
||||
#else
|
||||
# define __HWLOC_HAVE_ATTRIBUTE_UNUSED 0
|
||||
#endif
|
||||
#if __HWLOC_HAVE_ATTRIBUTE_UNUSED
|
||||
# define __hwloc_attribute_unused __attribute__((__unused__))
|
||||
#else
|
||||
# define __hwloc_attribute_unused
|
||||
#endif
|
||||
|
||||
#ifdef HWLOC_HAVE_ATTRIBUTE_MALLOC
|
||||
#define __HWLOC_HAVE_ATTRIBUTE_MALLOC HWLOC_HAVE_ATTRIBUTE_MALLOC
|
||||
#elif defined(__GNUC__)
|
||||
# define __HWLOC_HAVE_ATTRIBUTE_MALLOC (GXX_ABOVE_3_4 || GCC_ABOVE_2_96)
|
||||
#else
|
||||
# define __HWLOC_HAVE_ATTRIBUTE_MALLOC 0
|
||||
#endif
|
||||
#if __HWLOC_HAVE_ATTRIBUTE_MALLOC
|
||||
# define __hwloc_attribute_malloc __attribute__((__malloc__))
|
||||
#else
|
||||
# define __hwloc_attribute_malloc
|
||||
#endif
|
||||
|
||||
#ifdef HWLOC_HAVE_ATTRIBUTE_CONST
|
||||
#define __HWLOC_HAVE_ATTRIBUTE_CONST HWLOC_HAVE_ATTRIBUTE_CONST
|
||||
#elif defined(__GNUC__)
|
||||
# define __HWLOC_HAVE_ATTRIBUTE_CONST (GXX_ABOVE_3_4 || GCC_ABOVE_2_95)
|
||||
#else
|
||||
# define __HWLOC_HAVE_ATTRIBUTE_CONST 0
|
||||
#endif
|
||||
#if __HWLOC_HAVE_ATTRIBUTE_CONST
|
||||
# define __hwloc_attribute_const __attribute__((__const__))
|
||||
#else
|
||||
# define __hwloc_attribute_const
|
||||
#endif
|
||||
|
||||
#ifdef HWLOC_HAVE_ATTRIBUTE_PURE
|
||||
#define __HWLOC_HAVE_ATTRIBUTE_PURE HWLOC_HAVE_ATTRIBUTE_PURE
|
||||
#elif defined(__GNUC__)
|
||||
# define __HWLOC_HAVE_ATTRIBUTE_PURE (GXX_ABOVE_3_4 || GCC_ABOVE_2_96)
|
||||
#else
|
||||
# define __HWLOC_HAVE_ATTRIBUTE_PURE 0
|
||||
#endif
|
||||
#if __HWLOC_HAVE_ATTRIBUTE_PURE
|
||||
# define __hwloc_attribute_pure __attribute__((__pure__))
|
||||
#else
|
||||
# define __hwloc_attribute_pure
|
||||
#endif
|
||||
|
||||
#ifdef HWLOC_HAVE_ATTRIBUTE_DEPRECATED
|
||||
#define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED HWLOC_HAVE_ATTRIBUTE_DEPRECATED
|
||||
#elif defined(__GNUC__)
|
||||
# define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED (GXX_ABOVE_3_4 || GCC_ABOVE_3_3)
|
||||
#else
|
||||
# define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED 0
|
||||
#endif
|
||||
#if __HWLOC_HAVE_ATTRIBUTE_DEPRECATED
|
||||
# define __hwloc_attribute_deprecated __attribute__((__deprecated__))
|
||||
#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
|
||||
# if defined(OPAL_IMPORTS)
|
||||
# define HWLOC_DECLSPEC __declspec(dllimport)
|
||||
# else
|
||||
# define HWLOC_DECLSPEC __declspec(dllexport)
|
||||
# endif
|
||||
#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. */
|
||||
#define HWLOC_HAVE_WINDOWS_H 1
|
||||
#define hwloc_pid_t HANDLE
|
||||
#define hwloc_thread_t HANDLE
|
||||
|
||||
#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 */
|
335
contrib/platform/win32/include/hwloc/bitmap.h
Обычный файл
335
contrib/platform/win32/include/hwloc/bitmap.h
Обычный файл
@ -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 */
|
75
contrib/platform/win32/include/hwloc/cpuset.h
Обычный файл
75
contrib/platform/win32/include/hwloc/cpuset.h
Обычный файл
@ -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 */
|
135
contrib/platform/win32/include/hwloc/cuda.h
Обычный файл
135
contrib/platform/win32/include/hwloc/cuda.h
Обычный файл
@ -0,0 +1,135 @@
|
||||
/*
|
||||
* Copyright © 2010-2012 inria. All rights reserved.
|
||||
* Copyright © 2010-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 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 <hwloc/helper.h>
|
||||
|
||||
#include <cuda.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/** \defgroup hwlocality_cuda CUDA Driver API Specific Functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** \brief Return the domain, bus and device IDs of device \p cudevice.
|
||||
*/
|
||||
static __hwloc_inline int
|
||||
hwloc_cuda_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||
CUdevice cudevice, int *domain, int *bus, int *dev)
|
||||
{
|
||||
CUresult cres;
|
||||
|
||||
#if CUDA_VERSION >= 4000
|
||||
cres = cuDeviceGetAttribute(domain, CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, cudevice);
|
||||
if (cres != CUDA_SUCCESS) {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
#else
|
||||
*domain = 0;
|
||||
#endif
|
||||
cres = cuDeviceGetAttribute(bus, CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, cudevice);
|
||||
if (cres != CUDA_SUCCESS) {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
cres = cuDeviceGetAttribute(dev, CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, cudevice);
|
||||
if (cres != CUDA_SUCCESS) {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \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.
|
||||
*
|
||||
* Topology \p topology must match the current machine.
|
||||
*/
|
||||
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
|
||||
char path[HWLOC_CUDA_DEVICE_SYSFS_PATH_MAX];
|
||||
FILE *sysfile = NULL;
|
||||
int domainid, busid, deviceid;
|
||||
|
||||
if (hwloc_cuda_get_device_pci_ids(topology, cudevice, &domainid, &busid, &deviceid))
|
||||
return -1;
|
||||
|
||||
sprintf(path, "/sys/bus/pci/devices/%04x:%02x:%02x.0/local_cpus", domainid, busid, deviceid);
|
||||
sysfile = fopen(path, "r");
|
||||
if (!sysfile)
|
||||
return -1;
|
||||
|
||||
hwloc_linux_parse_cpumap_file(sysfile, set);
|
||||
if (hwloc_bitmap_iszero(set))
|
||||
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
|
||||
|
||||
fclose(sysfile);
|
||||
#else
|
||||
/* Non-Linux systems simply get a full cpuset */
|
||||
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \brief Get the hwloc object for the PCI device corresponding
|
||||
* to device \p cudevice.
|
||||
*
|
||||
* For the given CUDA Runtime API device \p cudevice, return the hwloc PCI
|
||||
* object containing the device. Returns NULL if there is none.
|
||||
*
|
||||
* IO devices detection must be enabled in topology \p topology.
|
||||
*/
|
||||
static __hwloc_inline hwloc_obj_t
|
||||
hwloc_cuda_get_device_pcidev(hwloc_topology_t topology, CUdevice cudevice)
|
||||
{
|
||||
int domain, bus, dev;
|
||||
|
||||
if (hwloc_cuda_get_device_pci_ids(topology, cudevice, &domain, &bus, &dev))
|
||||
return NULL;
|
||||
|
||||
return hwloc_get_pcidev_by_busid(topology, domain, bus, dev, 0);
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* HWLOC_CUDA_H */
|
131
contrib/platform/win32/include/hwloc/cudart.h
Обычный файл
131
contrib/platform/win32/include/hwloc/cudart.h
Обычный файл
@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Copyright © 2010-2012 inria. All rights reserved.
|
||||
* Copyright © 2010-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 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 <hwloc/helper.h>
|
||||
|
||||
#include <cuda_runtime_api.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/** \defgroup hwlocality_cudart CUDA Runtime API Specific Functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** \brief Return the domain, bus and device IDs of device \p device.
|
||||
*/
|
||||
static __hwloc_inline int
|
||||
hwloc_cudart_get_device_pci_ids(hwloc_topology_t topology __hwloc_attribute_unused,
|
||||
int device, int *domain, int *bus, int *dev)
|
||||
{
|
||||
cudaError_t cerr;
|
||||
struct cudaDeviceProp prop;
|
||||
|
||||
cerr = cudaGetDeviceProperties(&prop, device);
|
||||
if (cerr) {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if CUDART_VERSION >= 4000
|
||||
*domain = prop.pciDomainID;
|
||||
#else
|
||||
*domain = 0;
|
||||
#endif
|
||||
|
||||
*bus = prop.pciBusID;
|
||||
*dev = prop.pciDeviceID;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \brief Get the CPU set of logical processors that are physically
|
||||
* close to device \p device.
|
||||
*
|
||||
* For the given CUDA Runtime API device \p device, 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.
|
||||
*
|
||||
* Topology \p topology must match the current machine.
|
||||
*/
|
||||
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
|
||||
char path[HWLOC_CUDART_DEVICE_SYSFS_PATH_MAX];
|
||||
FILE *sysfile = NULL;
|
||||
int domain, bus, dev;
|
||||
|
||||
if (hwloc_cudart_get_device_pci_ids(topology, device, &domain, &bus, &dev))
|
||||
return -1;
|
||||
|
||||
sprintf(path, "/sys/bus/pci/devices/%04x:%02x:%02x.0/local_cpus", domain, bus, dev);
|
||||
sysfile = fopen(path, "r");
|
||||
if (!sysfile)
|
||||
return -1;
|
||||
|
||||
hwloc_linux_parse_cpumap_file(sysfile, set);
|
||||
if (hwloc_bitmap_iszero(set))
|
||||
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
|
||||
|
||||
fclose(sysfile);
|
||||
#else
|
||||
/* Non-Linux systems simply get a full cpuset */
|
||||
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \brief Get the hwloc object for the PCI device corresponding
|
||||
* to device \p device.
|
||||
*
|
||||
* For the given CUDA Runtime API device \p device, return the hwloc PCI
|
||||
* object containing the device. Returns NULL if there is none.
|
||||
*
|
||||
* IO devices detection must be enabled in topology \p topology.
|
||||
*/
|
||||
static __hwloc_inline hwloc_obj_t
|
||||
hwloc_cudart_get_device_pcidev(hwloc_topology_t topology, int device)
|
||||
{
|
||||
int domain, bus, dev;
|
||||
|
||||
if (hwloc_cudart_get_device_pci_ids(topology, device, &domain, &bus, &dev))
|
||||
return NULL;
|
||||
|
||||
return hwloc_get_pcidev_by_busid(topology, domain, bus, dev, 0);
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* HWLOC_CUDART_H */
|
121
contrib/platform/win32/include/hwloc/glibc-sched.h
Обычный файл
121
contrib/platform/win32/include/hwloc/glibc-sched.h
Обычный файл
@ -0,0 +1,121 @@
|
||||
/*
|
||||
* Copyright © 2009 CNRS
|
||||
* Copyright © 2009-2012 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.
|
||||
*
|
||||
* \note Topology \p topology must match the current machine.
|
||||
*/
|
||||
|
||||
#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 && !defined sched_priority)
|
||||
#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)
|
||||
{
|
||||
int cpu;
|
||||
#ifdef CPU_ZERO_S
|
||||
int 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)
|
||||
*/
|
||||
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 */
|
1351
contrib/platform/win32/include/hwloc/helper.h
Обычный файл
1351
contrib/platform/win32/include/hwloc/helper.h
Обычный файл
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
462
contrib/platform/win32/include/hwloc/linux-libnuma.h
Обычный файл
462
contrib/platform/win32/include/hwloc/linux-libnuma.h
Обычный файл
@ -0,0 +1,462 @@
|
||||
/*
|
||||
* Copyright © 2009 CNRS
|
||||
* Copyright © 2009-2012 inria. All rights reserved.
|
||||
* Copyright © 2009-2010, 2012 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.
|
||||
*
|
||||
* This helper also offers a consistent behavior on non-NUMA machines
|
||||
* or non-NUMA-aware kernels by assuming that the machines have a single
|
||||
* NUMA node.
|
||||
*
|
||||
* \note Topology \p topology must match the current machine.
|
||||
*
|
||||
* \note The behavior of libnuma is undefined if the kernel is not NUMA-aware.
|
||||
* (when CONFIG_NUMA is not set in the kernel configuration).
|
||||
* This helper and libnuma may thus not be strictly compatible in this case,
|
||||
* which may be detected by checking whether numa_available() returns -1.
|
||||
*/
|
||||
|
||||
#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 = NULL;
|
||||
hwloc_bitmap_zero(cpuset);
|
||||
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
||||
if (node->os_index < maxnode
|
||||
&& (mask[node->os_index/sizeof(*mask)/8] & (1UL << (node->os_index % (sizeof(*mask)*8)))))
|
||||
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 = NULL;
|
||||
hwloc_bitmap_zero(nodeset);
|
||||
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
||||
if (node->os_index < maxnode
|
||||
&& (mask[node->os_index/sizeof(*mask)/8] & (1UL << (node->os_index % (sizeof(*mask)*8)))))
|
||||
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_cpuset_to_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset) __hwloc_attribute_malloc;
|
||||
static __hwloc_inline struct bitmask *
|
||||
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)
|
||||
if (node->memory.local_memory)
|
||||
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_nodeset_to_linux_libnuma_bitmask(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset) __hwloc_attribute_malloc;
|
||||
static __hwloc_inline struct bitmask *
|
||||
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) && node->memory.local_memory)
|
||||
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 = NULL;
|
||||
hwloc_bitmap_zero(cpuset);
|
||||
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
||||
if (numa_bitmask_isbitset(bitmask, node->os_index))
|
||||
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 = NULL;
|
||||
hwloc_bitmap_zero(nodeset);
|
||||
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
||||
if (numa_bitmask_isbitset(bitmask, node->os_index))
|
||||
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
|
||||
*
|
||||
* \note The Linux libnuma nodemask_t interface is deprecated and
|
||||
* its implementation is at least incorrect with respect to sparse
|
||||
* NUMA node ids. It is strongly advised to use struct bitmask
|
||||
* instead of nodemask_t, or even to use hwloc directly.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/** \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 = NULL;
|
||||
hwloc_bitmap_zero(cpuset);
|
||||
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
||||
if (nodemask_isset(nodemask, node->os_index))
|
||||
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 = NULL;
|
||||
hwloc_bitmap_zero(nodeset);
|
||||
while ((node = hwloc_get_next_obj_by_depth(topology, depth, node)) != NULL)
|
||||
if (nodemask_isset(nodemask, node->os_index))
|
||||
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 */
|
64
contrib/platform/win32/include/hwloc/linux.h
Обычный файл
64
contrib/platform/win32/include/hwloc/linux.h
Обычный файл
@ -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 */
|
111
contrib/platform/win32/include/hwloc/myriexpress.h
Обычный файл
111
contrib/platform/win32/include/hwloc/myriexpress.h
Обычный файл
@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Copyright © 2010-2012 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.
|
||||
*
|
||||
* Topology \p topology must match the current machine.
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* Topology \p topology must match the current machine.
|
||||
*/
|
||||
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 */
|
85
contrib/platform/win32/include/hwloc/openfabrics-verbs.h
Обычный файл
85
contrib/platform/win32/include/hwloc/openfabrics-verbs.h
Обычный файл
@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright © 2009 CNRS
|
||||
* Copyright © 2009-2012 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.
|
||||
*
|
||||
* Topology \p topology must match the current machine.
|
||||
*/
|
||||
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);
|
||||
if (hwloc_bitmap_iszero(set))
|
||||
hwloc_bitmap_copy(set, hwloc_topology_get_complete_cpuset(topology));
|
||||
|
||||
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 */
|
559
contrib/platform/win32/include/hwloc/rename.h
Обычный файл
559
contrib/platform/win32/include/hwloc/rename.h
Обычный файл
@ -0,0 +1,559 @@
|
||||
/*
|
||||
* 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_BRIDGE HWLOC_NAME_CAPS(OBJ_BRIDGE)
|
||||
#define HWLOC_OBJ_PCI_DEVICE HWLOC_NAME_CAPS(OBJ_PCI_DEVICE)
|
||||
#define HWLOC_OBJ_OS_DEVICE HWLOC_NAME_CAPS(OBJ_OS_DEVICE)
|
||||
#define HWLOC_OBJ_TYPE_MAX HWLOC_NAME_CAPS(OBJ_TYPE_MAX)
|
||||
#define hwloc_obj_type_t HWLOC_NAME(obj_type_t)
|
||||
|
||||
#define hwloc_obj_bridge_type_e HWLOC_NAME(obj_bridge_type_e)
|
||||
#define hwloc_obj_bridge_type_t HWLOC_NAME(obj_bridge_type_t)
|
||||
#define HWLOC_OBJ_BRIDGE_HOST HWLOC_NAME_CAPS(OBJ_BRIDGE_HOST)
|
||||
#define HWLOC_OBJ_BRIDGE_PCI HWLOC_NAME_CAPS(OBJ_BRIDGE_PCI)
|
||||
|
||||
#define hwloc_obj_osdev_type_e HWLOC_NAME(obj_osdev_type_e)
|
||||
#define hwloc_obj_osdev_type_t HWLOC_NAME(obj_osdev_type_t)
|
||||
#define HWLOC_OBJ_OSDEV_BLOCK HWLOC_NAME_CAPS(OBJ_OSDEV_BLOCK)
|
||||
#define HWLOC_OBJ_OSDEV_GPU HWLOC_NAME_CAPS(OBJ_OSDEV_GPU)
|
||||
#define HWLOC_OBJ_OSDEV_NETWORK HWLOC_NAME_CAPS(OBJ_OSDEV_NETWORK)
|
||||
#define HWLOC_OBJ_OSDEV_OPENFABRICS HWLOC_NAME_CAPS(OBJ_OSDEV_OPENFABRICS)
|
||||
#define HWLOC_OBJ_OSDEV_DMA HWLOC_NAME_CAPS(OBJ_OSDEV_DMA)
|
||||
|
||||
#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_pcidev_attr_s HWLOC_NAME(pcidev_attr_s)
|
||||
#define hwloc_bridge_attr_s HWLOC_NAME(bridge_attr_s)
|
||||
#define hwloc_osdev_attr_s HWLOC_NAME(osdev_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_FLAG_IO_DEVICES HWLOC_NAME_CAPS(TOPOLOGY_FLAG_IO_DEVICES)
|
||||
#define HWLOC_TOPOLOGY_FLAG_IO_BRIDGES HWLOC_NAME_CAPS(TOPOLOGY_FLAG_IO_BRIDGES)
|
||||
#define HWLOC_TOPOLOGY_FLAG_WHOLE_IO HWLOC_NAME_CAPS(TOPOLOGY_FLAG_WHOLE_IO)
|
||||
|
||||
#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_custom HWLOC_NAME(topology_set_custom)
|
||||
#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_free_xmlbuffer HWLOC_NAME(free_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_custom_insert_topology HWLOC_NAME(custom_insert_topology)
|
||||
#define hwloc_custom_insert_group_object_by_parent HWLOC_NAME(custom_insert_group_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_RESTRICT_FLAG_ADAPT_IO HWLOC_NAME_CAPS(RESTRICT_FLAG_ADAPT_IO)
|
||||
#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_TYPE_DEPTH_BRIDGE HWLOC_NAME_CAPS(TYPE_DEPTH_BRIDGE)
|
||||
#define HWLOC_TYPE_DEPTH_PCI_DEVICE HWLOC_NAME_CAPS(TYPE_DEPTH_PCI_DEVICE)
|
||||
#define HWLOC_TYPE_DEPTH_OS_DEVICE HWLOC_NAME_CAPS(TYPE_DEPTH_OS_DEVICE)
|
||||
|
||||
#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_obj_add_info HWLOC_NAME(obj_add_info)
|
||||
|
||||
#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)
|
||||
|
||||
#define hwloc_get_non_io_ancestor_obj HWLOC_NAME(get_non_io_ancestor_obj)
|
||||
#define hwloc_get_next_pcidev HWLOC_NAME(get_next_pcidev)
|
||||
#define hwloc_get_pcidev_by_busid HWLOC_NAME(get_pcidev_by_busid)
|
||||
#define hwloc_get_pcidev_by_busidstring HWLOC_NAME(get_pcidev_by_busidstring)
|
||||
#define hwloc_get_next_osdev HWLOC_NAME(get_next_osdev)
|
||||
#define hwloc_get_next_bridge HWLOC_NAME(get_next_bridge)
|
||||
#define hwloc_bridge_covers_pcibus HWLOC_NAME(bridge_covers_pcibus)
|
||||
#define hwloc_get_hostbridge_by_pcibus HWLOC_NAME(get_hostbridge_by_pcibus)
|
||||
|
||||
/* hwloc/bitmap.h */
|
||||
|
||||
#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_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_taskset_snprintf HWLOC_NAME(cpuset_taskset_snprintf)
|
||||
#define hwloc_cpuset_taskset_asprintf HWLOC_NAME(cpuset_taskset_asprintf)
|
||||
#define hwloc_cpuset_taskset_sscanf HWLOC_NAME(cpuset_taskset_sscanf)
|
||||
|
||||
#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_pci_ids HWLOC_NAME(cuda_get_device_pci_ids)
|
||||
#define hwloc_cuda_get_device_cpuset HWLOC_NAME(cuda_get_device_cpuset)
|
||||
#define hwloc_cuda_get_device_pcidev HWLOC_NAME(cuda_get_device_pcidev)
|
||||
|
||||
/* cudart.h */
|
||||
|
||||
#define hwloc_cudart_get_device_pci_ids HWLOC_NAME(cudart_get_device_pci_ids)
|
||||
#define hwloc_cudart_get_device_cpuset HWLOC_NAME(cudart_get_device_cpuset)
|
||||
#define hwloc_cudart_get_device_pcidev HWLOC_NAME(cudart_get_device_pcidev)
|
||||
|
||||
/* 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_LINUXFS HWLOC_NAME_CAPS(BACKEND_LINUXFS)
|
||||
#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_linuxfs_s HWLOC_NAME(backend_params_linuxfs_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_xml_imported_distances_s HWLOC_NAME(xml_imported_distances_s)
|
||||
|
||||
#define hwloc_setup_pu_level HWLOC_NAME(setup_pu_level)
|
||||
#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_connect_children HWLOC_NAME(connect_children)
|
||||
#define hwloc_connect_levels HWLOC_NAME(connect_levels)
|
||||
|
||||
#define hwloc_look_linuxfs HWLOC_NAME(look_linuxfs)
|
||||
#define hwloc_set_linuxfs_hooks HWLOC_NAME(set_linuxfs_hooks)
|
||||
#define hwloc_backend_linuxfs_init HWLOC_NAME(backend_linuxfs_init)
|
||||
#define hwloc_backend_linuxfs_exit HWLOC_NAME(backend_linuxfs_exit)
|
||||
|
||||
#define hwloc_backend_xml_init HWLOC_NAME(backend_xml_init)
|
||||
#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_libpci HWLOC_NAME(look_libpci)
|
||||
|
||||
#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_hide_errors HWLOC_NAME(hide_errors)
|
||||
#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_uname_info HWLOC_NAME(add_uname_info)
|
||||
#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_distances_init HWLOC_NAME(distances_init)
|
||||
#define hwloc_distances_clear HWLOC_NAME(distances_clear)
|
||||
#define hwloc_distances_destroy HWLOC_NAME(distances_destroy)
|
||||
#define hwloc_distances_set HWLOC_NAME(distances_set)
|
||||
#define hwloc_distances_set_from_env HWLOC_NAME(distances_set_from_env)
|
||||
#define hwloc_distances_restrict_os HWLOC_NAME(distances_restrict_os)
|
||||
#define hwloc_distances_restrict HWLOC_NAME(distances_restrict)
|
||||
#define hwloc_distances_finalize_os HWLOC_NAME(distances_finalize_os)
|
||||
#define hwloc_distances_finalize_logical HWLOC_NAME(distances_finalize_logical)
|
||||
#define hwloc_clear_object_distances HWLOC_NAME(clear_object_distances)
|
||||
#define hwloc_clear_object_distances_one HWLOC_NAME(clear_object_distances_one)
|
||||
#define hwloc_group_by_distances HWLOC_NAME(group_by_distances)
|
||||
|
||||
#endif /* HWLOC_SYM_TRANSFORM */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* HWLOC_RENAME_H */
|
576
contrib/platform/win32/include/private/autogen/config.h
Обычный файл
576
contrib/platform/win32/include/private/autogen/config.h
Обычный файл
@ -0,0 +1,576 @@
|
||||
/* 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, 2012 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'. */
|
||||
#define HAVE_CACHE_DESCRIPTOR 1
|
||||
|
||||
/* Define to 1 if the system has the type `CACHE_RELATIONSHIP'. */
|
||||
#define HAVE_CACHE_RELATIONSHIP 1
|
||||
|
||||
/* 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 `fabsf', and to 0 if you don't.
|
||||
*/
|
||||
#define HAVE_DECL_FABSF 1
|
||||
|
||||
/* 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 `PCI_LOOKUP_NO_NUMBERS', and to
|
||||
0 if you don't. */
|
||||
/* #undef HAVE_DECL_PCI_LOOKUP_NO_NUMBERS */
|
||||
|
||||
/* 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 0
|
||||
|
||||
/* 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 0
|
||||
|
||||
/* 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. */
|
||||
/* #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. */
|
||||
#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. */
|
||||
/* #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. */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
|
||||
/* Define to 1 if the system has the type `GROUP_AFFINITY'. */
|
||||
#define HAVE_GROUP_AFFINITY 1
|
||||
|
||||
/* Define to 1 if the system has the type `GROUP_RELATIONSHIP'. */
|
||||
#define HAVE_GROUP_RELATIONSHIP 1
|
||||
|
||||
/* 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. */
|
||||
#define HAVE_LANGINFO_H 1
|
||||
|
||||
/* Define to 1 if we have -lgdi32 */
|
||||
#define HAVE_LIBGDI32 1
|
||||
|
||||
/* 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 `pci' library (-lpci). */
|
||||
/* #undef HAVE_LIBPCI */
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define to 1 if the system has the type `LOGICAL_PROCESSOR_RELATIONSHIP'. */
|
||||
#define HAVE_LOGICAL_PROCESSOR_RELATIONSHIP 1
|
||||
|
||||
/* 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. */
|
||||
/* #undef HAVE_MEMALIGN */
|
||||
|
||||
/* 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. */
|
||||
#define HAVE_NL_LANGINFO 1
|
||||
|
||||
/* 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'. */
|
||||
#define HAVE_NUMA_NODE_RELATIONSHIP 1
|
||||
|
||||
/* Define to 1 if you have the `openat' function. */
|
||||
#define HAVE_OPENAT 1
|
||||
|
||||
/* Define to 1 if you have the <pci/pci.h> header file. */
|
||||
/* #undef HAVE_PCI_PCI_H */
|
||||
|
||||
/* Define to 1 if you have the <picl.h> header file. */
|
||||
/* #undef HAVE_PICL_H */
|
||||
|
||||
/* Define to 1 if the system has the type `PROCESSOR_CACHE_TYPE'. */
|
||||
#define HAVE_PROCESSOR_CACHE_TYPE 1
|
||||
|
||||
/* Define to 1 if the system has the type `PROCESSOR_GROUP_INFO'. */
|
||||
#define HAVE_PROCESSOR_GROUP_INFO 1
|
||||
|
||||
/* Define to 1 if the system has the type `PROCESSOR_RELATIONSHIP'. */
|
||||
#define HAVE_PROCESSOR_RELATIONSHIP 1
|
||||
|
||||
/* 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. */
|
||||
#define HAVE_PUTWC 1
|
||||
|
||||
/* 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. */
|
||||
/* #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'. */
|
||||
#define HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION 1
|
||||
|
||||
/* Define to 1 if the system has the type
|
||||
`SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX'. */
|
||||
#define HAVE_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX 1
|
||||
|
||||
/* 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. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* 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. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* 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 you have the `uselocale' function. */
|
||||
/* #undef HAVE_USELOCALE */
|
||||
|
||||
/* Define to 1 if the system has the type `wchar_t'. */
|
||||
#define HAVE_WCHAR_T 1
|
||||
|
||||
/* 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 if you have the <xlocale.h> header file. */
|
||||
/* #undef HAVE_XLOCALE_H */
|
||||
|
||||
/* Define to 1 on AIX */
|
||||
/* #undef HWLOC_AIX_SYS */
|
||||
|
||||
/* Whether C compiler supports symbol visibility or not */
|
||||
/* #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 */
|
||||
|
||||
/* Define to 1 if your `ffs' function is known to be broken. */
|
||||
/* #undef HWLOC_HAVE_BROKEN_FFS */
|
||||
|
||||
/* 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 the `libpci' library. */
|
||||
/* #undef HWLOC_HAVE_LIBPCI */
|
||||
|
||||
/* Define to 1 if you have a library providing the termcap interface */
|
||||
/* #undef HWLOC_HAVE_LIBTERMCAP */
|
||||
|
||||
/* Define to 1 if you have the `libxml2' library. */
|
||||
/* #undef HWLOC_HAVE_LIBXML2 */
|
||||
|
||||
/* 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 (without length) of
|
||||
sched_setaffinity() */
|
||||
/* #undef HWLOC_HAVE_OLD_SCHED_SETAFFINITY */
|
||||
|
||||
/* Define to 1 if struct pci_dev has a `device_class' field. */
|
||||
/* #undef HWLOC_HAVE_PCIDEV_DEVICE_CLASS */
|
||||
|
||||
/* Define to 1 if struct pci_dev has a `domain' field. */
|
||||
/* #undef HWLOC_HAVE_PCIDEV_DOMAIN */
|
||||
|
||||
/* Define to 1 if `libpci' has the `pci_find_cap' function. */
|
||||
/* #undef HWLOC_HAVE_PCI_FIND_CAP */
|
||||
|
||||
/* `Define to 1 if you have pthread_getthrds_np' */
|
||||
/* #undef HWLOC_HAVE_PTHREAD_GETTHRDS_NP */
|
||||
|
||||
/* Define to 1 if glibc provides a prototype of sched_setaffinity() */
|
||||
/* #undef HWLOC_HAVE_SCHED_SETAFFINITY */
|
||||
|
||||
/* 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. */
|
||||
#define HWLOC_HAVE_WINDOWS_H 1
|
||||
|
||||
/* Define to 1 if X11 libraries are available. */
|
||||
/* #undef HWLOC_HAVE_X11 */
|
||||
|
||||
/* 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 */
|
||||
#define HWLOC_MAJOR_VERSION 1
|
||||
|
||||
/* Minor version of hwloc */
|
||||
#define HWLOC_MINOR_VERSION 5
|
||||
|
||||
/* Define to 1 on OSF */
|
||||
/* #undef HWLOC_OSF_SYS */
|
||||
|
||||
/* Release version of hwloc */
|
||||
#define HWLOC_RELEASE_VERSION 0
|
||||
|
||||
/* 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 */
|
||||
#define HWLOC_WIN_SYS 1
|
||||
|
||||
/* 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 "hwloc"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "http://www.open-mpi.org/projects/hwloc/"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "hwloc"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "hwloc 1.5a1"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "hwloc"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.5a1"
|
||||
|
||||
/* 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 "1.5a1"
|
||||
|
||||
/* 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 the process ID type */
|
||||
#define hwloc_pid_t HANDLE
|
||||
|
||||
/* Define this to either strncasecmp or strncmp */
|
||||
#define hwloc_strncasecmp strncasecmp
|
||||
|
||||
/* Define this to the thread ID type */
|
||||
#define hwloc_thread_t HANDLE
|
||||
|
||||
|
||||
typedef long ssize_t;
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#define strcasecmp _stricmp
|
||||
#define strncasecmp _strnicmp
|
||||
#define strtoull _strtoui64
|
||||
|
||||
#define HWLOC_INSIDE_LIBHWLOC 1
|
||||
|
||||
#endif /* HWLOC_CONFIGURE_H */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user