remove files that are not necessary for hwloc windows build.
This commit was SVN r26826.
Этот коммит содержится в:
родитель
11feeb61f3
Коммит
fe9857adaa
@ -104,6 +104,7 @@ INCLUDE (find_flex)
|
|||||||
FIND_FLEX()
|
FIND_FLEX()
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(opal)
|
ADD_SUBDIRECTORY(opal)
|
||||||
|
INCLUDE_DIRECTORIES(${HWLOC_PATH}/hwloc/include)
|
||||||
# set up the libevent include dirs
|
# set up the libevent include dirs
|
||||||
INCLUDE_DIRECTORIES (${LIBEVENT_INCLUDE_DIRS})
|
INCLUDE_DIRECTORIES (${LIBEVENT_INCLUDE_DIRS})
|
||||||
ADD_SUBDIRECTORY(ompi)
|
ADD_SUBDIRECTORY(ompi)
|
||||||
|
@ -124,17 +124,6 @@ EXTRA_DIST = \
|
|||||||
platform/win32/CMakeModules/fortran_check_real16_c_equiv.cmake \
|
platform/win32/CMakeModules/fortran_check_real16_c_equiv.cmake \
|
||||||
platform/win32/CMakeModules/opal_hwloc_config.cmake \
|
platform/win32/CMakeModules/opal_hwloc_config.cmake \
|
||||||
platform/win32/include/hwloc/autogen/config.h \
|
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/private/autogen/config.h \
|
platform/win32/include/private/autogen/config.h \
|
||||||
platform/cisco/macosx-dynamic \
|
platform/cisco/macosx-dynamic \
|
||||||
platform/cisco/macosx-dynamic.conf \
|
platform/cisco/macosx-dynamic.conf \
|
||||||
|
@ -16,6 +16,8 @@ INCLUDE_DIRECTORIES ("${CURRENT_PATH}/"
|
|||||||
"${CURRENT_PATH}/../"
|
"${CURRENT_PATH}/../"
|
||||||
"${CURRENT_PATH}/hwloc/include/")
|
"${CURRENT_PATH}/hwloc/include/")
|
||||||
|
|
||||||
|
SET(HWLOC_PATH ${CURRENT_PATH} CACHE INERNAL "path to hwloc dir")
|
||||||
|
|
||||||
SET(RESULT_COMPONENT_FILES
|
SET(RESULT_COMPONENT_FILES
|
||||||
${RESULT_COMPONENT_FILES}
|
${RESULT_COMPONENT_FILES}
|
||||||
${CURRENT_PATH}/${hwloc_dir}_component.c
|
${CURRENT_PATH}/${hwloc_dir}_component.c
|
||||||
|
@ -1,335 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 */
|
|
@ -1,75 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 */
|
|
@ -1,135 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 */
|
|
@ -1,131 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 */
|
|
@ -1,121 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 */
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -1,462 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 */
|
|
@ -1,64 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 */
|
|
@ -1,111 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 */
|
|
@ -1,85 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 */
|
|
@ -1,559 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 */
|
|
Загрузка…
Ссылка в новой задаче
Block a user