config.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. /* include/hwloc/autogen/config.h. Generated from config.h.in by configure. */
  2. /* -*- c -*-
  3. * Copyright © 2009 CNRS
  4. * Copyright © 2009-2022 Inria. All rights reserved.
  5. * Copyright © 2009-2012 Université Bordeaux
  6. * Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
  7. * See COPYING in top-level directory.
  8. */
  9. /* The configuration file */
  10. #ifndef HWLOC_CONFIG_H
  11. #define HWLOC_CONFIG_H
  12. #define HWLOC_VERSION "2.9.3"
  13. #define HWLOC_VERSION_MAJOR 2
  14. #define HWLOC_VERSION_MINOR 9
  15. #define HWLOC_VERSION_RELEASE 3
  16. #define HWLOC_VERSION_GREEK ""
  17. /* #undef HWLOC_PCI_COMPONENT_BUILTIN */
  18. /* #undef HWLOC_OPENCL_COMPONENT_BUILTIN */
  19. /* #undef HWLOC_CUDA_COMPONENT_BUILTIN */
  20. /* #undef HWLOC_NVML_COMPONENT_BUILTIN */
  21. /* #undef HWLOC_RSMI_COMPONENT_BUILTIN */
  22. /* #undef HWLOC_LEVELZERO_COMPONENT_BUILTIN */
  23. /* #undef HWLOC_GL_COMPONENT_BUILTIN */
  24. /* #undef HWLOC_XML_LIBXML_COMPONENT_BUILTIN */
  25. #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
  26. # define __hwloc_restrict __restrict
  27. #else
  28. # if __STDC_VERSION__ >= 199901L
  29. # define __hwloc_restrict restrict
  30. # else
  31. # define __hwloc_restrict
  32. # endif
  33. #endif
  34. /* Note that if we're compiling C++, then just use the "inline"
  35. keyword, since it's part of C++ */
  36. #if defined(c_plusplus) || defined(__cplusplus)
  37. # define __hwloc_inline inline
  38. #elif defined(_MSC_VER) || defined(__HP_cc)
  39. # define __hwloc_inline __inline
  40. #else
  41. # define __hwloc_inline __inline__
  42. #endif
  43. /*
  44. * Note: this is public. We can not assume anything from the compiler used
  45. * by the application and thus the HWLOC_HAVE_* macros below are not
  46. * fetched from the autoconf result here. We only automatically use a few
  47. * well-known easy cases.
  48. */
  49. /* Some handy constants to make the logic below a little more readable */
  50. #if defined(__cplusplus) && \
  51. (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR >= 4))
  52. #define GXX_ABOVE_3_4 1
  53. #else
  54. #define GXX_ABOVE_3_4 0
  55. #endif
  56. #if !defined(__cplusplus) && \
  57. (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
  58. #define GCC_ABOVE_2_95 1
  59. #else
  60. #define GCC_ABOVE_2_95 0
  61. #endif
  62. #if !defined(__cplusplus) && \
  63. (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
  64. #define GCC_ABOVE_2_96 1
  65. #else
  66. #define GCC_ABOVE_2_96 0
  67. #endif
  68. #if !defined(__cplusplus) && \
  69. (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
  70. #define GCC_ABOVE_3_3 1
  71. #else
  72. #define GCC_ABOVE_3_3 0
  73. #endif
  74. #if !defined(__cplusplus) && \
  75. (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  76. #define GCC_ABOVE_3_4 1
  77. #else
  78. #define GCC_ABOVE_3_4 0
  79. #endif
  80. /* Maybe before gcc 2.95 too */
  81. #ifdef HWLOC_HAVE_ATTRIBUTE_UNUSED
  82. #define __HWLOC_HAVE_ATTRIBUTE_UNUSED HWLOC_HAVE_ATTRIBUTE_UNUSED
  83. #elif defined(__GNUC__)
  84. # define __HWLOC_HAVE_ATTRIBUTE_UNUSED (GXX_ABOVE_3_4 || GCC_ABOVE_2_95)
  85. #else
  86. # define __HWLOC_HAVE_ATTRIBUTE_UNUSED 0
  87. #endif
  88. #if __HWLOC_HAVE_ATTRIBUTE_UNUSED
  89. # define __hwloc_attribute_unused __attribute__((__unused__))
  90. #else
  91. # define __hwloc_attribute_unused
  92. #endif
  93. #ifdef HWLOC_HAVE_ATTRIBUTE_MALLOC
  94. #define __HWLOC_HAVE_ATTRIBUTE_MALLOC HWLOC_HAVE_ATTRIBUTE_MALLOC
  95. #elif defined(__GNUC__)
  96. # define __HWLOC_HAVE_ATTRIBUTE_MALLOC (GXX_ABOVE_3_4 || GCC_ABOVE_2_96)
  97. #else
  98. # define __HWLOC_HAVE_ATTRIBUTE_MALLOC 0
  99. #endif
  100. #if __HWLOC_HAVE_ATTRIBUTE_MALLOC
  101. # define __hwloc_attribute_malloc __attribute__((__malloc__))
  102. #else
  103. # define __hwloc_attribute_malloc
  104. #endif
  105. #ifdef HWLOC_HAVE_ATTRIBUTE_CONST
  106. #define __HWLOC_HAVE_ATTRIBUTE_CONST HWLOC_HAVE_ATTRIBUTE_CONST
  107. #elif defined(__GNUC__)
  108. # define __HWLOC_HAVE_ATTRIBUTE_CONST (GXX_ABOVE_3_4 || GCC_ABOVE_2_95)
  109. #else
  110. # define __HWLOC_HAVE_ATTRIBUTE_CONST 0
  111. #endif
  112. #if __HWLOC_HAVE_ATTRIBUTE_CONST
  113. # define __hwloc_attribute_const __attribute__((__const__))
  114. #else
  115. # define __hwloc_attribute_const
  116. #endif
  117. #ifdef HWLOC_HAVE_ATTRIBUTE_PURE
  118. #define __HWLOC_HAVE_ATTRIBUTE_PURE HWLOC_HAVE_ATTRIBUTE_PURE
  119. #elif defined(__GNUC__)
  120. # define __HWLOC_HAVE_ATTRIBUTE_PURE (GXX_ABOVE_3_4 || GCC_ABOVE_2_96)
  121. #else
  122. # define __HWLOC_HAVE_ATTRIBUTE_PURE 0
  123. #endif
  124. #if __HWLOC_HAVE_ATTRIBUTE_PURE
  125. # define __hwloc_attribute_pure __attribute__((__pure__))
  126. #else
  127. # define __hwloc_attribute_pure
  128. #endif
  129. #ifndef __hwloc_attribute_deprecated /* allow the user to disable these warnings by defining this macro to nothing */
  130. #ifdef HWLOC_HAVE_ATTRIBUTE_DEPRECATED
  131. #define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED HWLOC_HAVE_ATTRIBUTE_DEPRECATED
  132. #elif defined(__GNUC__)
  133. # define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED (GXX_ABOVE_3_4 || GCC_ABOVE_3_3)
  134. #else
  135. # define __HWLOC_HAVE_ATTRIBUTE_DEPRECATED 0
  136. #endif
  137. #if __HWLOC_HAVE_ATTRIBUTE_DEPRECATED
  138. # define __hwloc_attribute_deprecated __attribute__((__deprecated__))
  139. #else
  140. # define __hwloc_attribute_deprecated
  141. #endif
  142. #endif
  143. #ifdef HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS
  144. #define __HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS
  145. #elif defined(__GNUC__)
  146. # define __HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS (GXX_ABOVE_3_4 || GCC_ABOVE_3_3)
  147. #else
  148. # define __HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS 0
  149. #endif
  150. #if __HWLOC_HAVE_ATTRIBUTE_MAY_ALIAS
  151. # define __hwloc_attribute_may_alias __attribute__((__may_alias__))
  152. #else
  153. # define __hwloc_attribute_may_alias
  154. #endif
  155. #ifdef HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT
  156. #define __HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT
  157. #elif defined(__GNUC__)
  158. # define __HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT (GXX_ABOVE_3_4 || GCC_ABOVE_3_4)
  159. #else
  160. # define __HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT 0
  161. #endif
  162. #if __HWLOC_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT
  163. # define __hwloc_attribute_warn_unused_result __attribute__((__warn_unused_result__))
  164. #else
  165. # define __hwloc_attribute_warn_unused_result
  166. #endif
  167. #ifdef HWLOC_C_HAVE_VISIBILITY
  168. # if HWLOC_C_HAVE_VISIBILITY
  169. # define HWLOC_DECLSPEC __attribute__((__visibility__("default")))
  170. # else
  171. # define HWLOC_DECLSPEC
  172. # endif
  173. #else
  174. # define HWLOC_DECLSPEC
  175. #endif
  176. /* Defined to 1 on Linux */
  177. /* #undef HWLOC_LINUX_SYS */
  178. /* Defined to 1 if the CPU_SET macro works */
  179. /* #undef HWLOC_HAVE_CPU_SET */
  180. /* Defined to 1 if you have the `windows.h' header. */
  181. #define HWLOC_HAVE_WINDOWS_H 1
  182. #define hwloc_pid_t HANDLE
  183. #define hwloc_thread_t HANDLE
  184. #ifdef HWLOC_HAVE_WINDOWS_H
  185. # include <windows.h>
  186. typedef DWORDLONG hwloc_uint64_t;
  187. #else /* HWLOC_HAVE_WINDOWS_H */
  188. # ifdef hwloc_thread_t
  189. # include <pthread.h>
  190. # endif /* hwloc_thread_t */
  191. /* Defined to 1 if you have the <stdint.h> header file. */
  192. # define HWLOC_HAVE_STDINT_H 1
  193. # include <unistd.h>
  194. # ifdef HWLOC_HAVE_STDINT_H
  195. # include <stdint.h>
  196. # endif
  197. typedef uint64_t hwloc_uint64_t;
  198. #endif /* HWLOC_HAVE_WINDOWS_H */
  199. /* Define to 1 if --enable-32bits-pci-domain is called. */
  200. /* #undef HWLOC_HAVE_32BITS_PCI_DOMAIN */
  201. /* Whether we need to re-define all the hwloc public symbols or not */
  202. #define HWLOC_SYM_TRANSFORM 0
  203. /* The hwloc symbol prefix */
  204. #define HWLOC_SYM_PREFIX hwloc_
  205. /* The hwloc symbol prefix in all caps */
  206. #define HWLOC_SYM_PREFIX_CAPS HWLOC_
  207. #endif /* HWLOC_CONFIG_H */