9 #ifndef OPAL_MCA_HWLOC_H
10 #define OPAL_MCA_HWLOC_H
12 #include "opal_config.h"
14 #ifdef HAVE_SYS_TYPES_H
15 #include <sys/types.h>
17 #ifdef HAVE_SYS_TIME_H
28 #include "opal/class/opal_value_array.h"
31 #include "opal/mca/base/base.h"
36 #define WIN32_LEAN_AND_MEAN
38 #undef WIN32_LEAN_AND_MEAN
39 typedef unsigned char u_char;
40 typedef unsigned short u_short;
62 #define OPAL_HWLOC_BASE_VERSION_2_0_0 \
63 MCA_BASE_VERSION_2_0_0, \
74 OPAL_HWLOC_NODE_LEVEL=0,
75 OPAL_HWLOC_NUMA_LEVEL,
76 OPAL_HWLOC_SOCKET_LEVEL,
77 OPAL_HWLOC_L3CACHE_LEVEL,
78 OPAL_HWLOC_L2CACHE_LEVEL,
79 OPAL_HWLOC_L1CACHE_LEVEL,
80 OPAL_HWLOC_CORE_LEVEL,
81 OPAL_HWLOC_HWTHREAD_LEVEL
83 #define OPAL_HWLOC_LEVEL_T OPAL_INT
87 #include MCA_hwloc_IMPLEMENTATION_HEADER
91 typedef uint8_t opal_hwloc_resource_type_t;
92 #define OPAL_HWLOC_PHYSICAL 1
93 #define OPAL_HWLOC_LOGICAL 2
94 #define OPAL_HWLOC_AVAILABLE 3
102 } opal_hwloc_obj_data_t;
108 unsigned cache_level;
109 unsigned int num_objs;
110 opal_hwloc_resource_type_t rtype;
111 } opal_hwloc_summary_t;
118 } opal_hwloc_topo_data_t;
122 typedef uint16_t opal_binding_policy_t;
123 #define OPAL_BINDING_POLICY OPAL_UINT16
126 #define OPAL_BIND_IF_SUPPORTED 0x1000
127 #define OPAL_BIND_ALLOW_OVERLOAD 0x2000
128 #define OPAL_BIND_GIVEN 0x4000
130 #define OPAL_BIND_TO_NONE 1
131 #define OPAL_BIND_TO_BOARD 2
132 #define OPAL_BIND_TO_NUMA 3
133 #define OPAL_BIND_TO_SOCKET 4
134 #define OPAL_BIND_TO_L3CACHE 5
135 #define OPAL_BIND_TO_L2CACHE 6
136 #define OPAL_BIND_TO_L1CACHE 7
137 #define OPAL_BIND_TO_CORE 8
138 #define OPAL_BIND_TO_HWTHREAD 9
139 #define OPAL_BIND_TO_CPUSET 10
140 #define OPAL_GET_BINDING_POLICY(pol) \
142 #define OPAL_SET_BINDING_POLICY(target, pol) \
143 (target) = (pol) | ((target) & 0xf000)
145 #define OPAL_BINDING_POLICY_IS_SET(pol) \
148 #define OPAL_BINDING_REQUIRED(n) \
149 (!(OPAL_BIND_IF_SUPPORTED & (n)))
151 #define OPAL_BIND_OVERLOAD_ALLOWED(n) \
152 (OPAL_BIND_ALLOW_OVERLOAD & (n))
156 OPAL_DECLSPEC
extern opal_binding_policy_t opal_hwloc_binding_policy;
158 OPAL_DECLSPEC
extern bool opal_hwloc_report_bindings;
160 OPAL_DECLSPEC
extern bool opal_hwloc_use_hwthreads_as_cpus;
mca_base_component_data_t base_data
MCA base data.
Definition: hwloc.h:50
Common type for all MCA components.
Definition: mca.h:250
mca_base_component_t base_version
MCA base component.
Definition: hwloc.h:48
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
Top-level interface for all MCA components.
Definition: opal_list.h:98
Structure for hwloc components.
Definition: hwloc.h:46
Base object.
Definition: opal_object.h:182
Meta data for MCA v2.0.0 components.
Definition: mca.h:309
Definition: opal_list.h:147
hwloc_obj_type_t
Type of topology object.
Definition: hwloc.h:164
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236