49 #include <hwloc/autogen/config.h>
50 #include <sys/types.h>
58 #include <hwloc/rename.h>
78 #define HWLOC_API_VERSION 0x00010300
454 unsigned distances_count;
480 unsigned short domain;
481 unsigned char bus, dev, func;
482 unsigned short class_id;
483 unsigned short vendor_id, device_id, subvendor_id, subdevice_id;
484 unsigned char revision;
495 unsigned short domain;
496 unsigned char secondary_bus, subordinate_bus;
695 HWLOC_TOPOLOGY_FLAG_IO_DEVICES = (1<<2),
703 HWLOC_TOPOLOGY_FLAG_IO_BRIDGES = (1<<3),
711 HWLOC_TOPOLOGY_FLAG_WHOLE_IO = (1<<4)
738 HWLOC_DECLSPEC
int hwloc_topology_set_fsroot(hwloc_topology_t __hwloc_restrict topology,
const char * __hwloc_restrict fsroot_path);
796 HWLOC_DECLSPEC
int hwloc_topology_set_xml(hwloc_topology_t __hwloc_restrict topology,
const char * __hwloc_restrict xmlpath);
811 HWLOC_DECLSPEC
int hwloc_topology_set_xmlbuffer(hwloc_topology_t __hwloc_restrict topology,
const char * __hwloc_restrict buffer,
int size);
830 unsigned *os_index,
float *distances);
1002 HWLOC_DECLSPEC
int hwloc_topology_restrict(hwloc_topology_t __hwloc_restrict topology, hwloc_const_cpuset_t cpuset,
unsigned long flags);
1021 HWLOC_DECLSPEC
unsigned hwloc_topology_get_depth(hwloc_topology_t __hwloc_restrict topology) __hwloc_attribute_pure;
1067 static __hwloc_inline
int __hwloc_attribute_pure
1101 HWLOC_DECLSPEC hwloc_obj_t
hwloc_get_obj_by_depth (hwloc_topology_t topology,
unsigned depth,
unsigned idx) __hwloc_attribute_pure;
1109 static __hwloc_inline hwloc_obj_t __hwloc_attribute_pure
1161 HWLOC_DECLSPEC
int hwloc_obj_attr_snprintf(
char * __hwloc_restrict
string,
size_t size, hwloc_obj_t obj,
const char * __hwloc_restrict separator,
1185 hwloc_topology_t topology, hwloc_obj_t obj,
1186 const char * __hwloc_restrict indexprefix,
int verbose);
1195 HWLOC_DECLSPEC
int hwloc_obj_cpuset_snprintf(
char * __hwloc_restrict str,
size_t size,
size_t nobj,
const hwloc_obj_t * __hwloc_restrict objs);
1203 static __hwloc_inline
const char * __hwloc_attribute_pure
1220 HWLOC_DECLSPEC
void hwloc_obj_add_info(hwloc_obj_t obj,
const char *name,
const char *value);
1340 HWLOC_DECLSPEC
int hwloc_set_cpubind(hwloc_topology_t topology, hwloc_const_cpuset_t set,
int flags);
1347 HWLOC_DECLSPEC
int hwloc_get_cpubind(hwloc_topology_t topology, hwloc_cpuset_t set,
int flags);
1356 HWLOC_DECLSPEC
int hwloc_set_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_cpuset_t set,
int flags);
1369 HWLOC_DECLSPEC
int hwloc_get_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set,
int flags);
1371 #ifdef hwloc_thread_t
1379 HWLOC_DECLSPEC
int hwloc_set_thread_cpubind(hwloc_topology_t topology, hwloc_thread_t thread, hwloc_const_cpuset_t set,
int flags);
1382 #ifdef hwloc_thread_t
1390 HWLOC_DECLSPEC
int hwloc_get_thread_cpubind(hwloc_topology_t topology, hwloc_thread_t thread, hwloc_cpuset_t set,
int flags);
1910 HWLOC_DECLSPEC
void *
hwloc_alloc(hwloc_topology_t topology,
size_t len);
1937 HWLOC_DECLSPEC
int hwloc_free(hwloc_topology_t topology,
void *addr,
size_t len);
HWLOC_DECLSPEC int hwloc_free(hwloc_topology_t topology, void *addr, size_t len)
Free memory that was previously allocated by hwloc_alloc() or hwloc_alloc_membind().
Definition: bind.c:550
struct hwloc_obj * prev_cousin
Previous object of same type and depth.
Definition: hwloc.h:348
HWLOC_DECLSPEC const char * hwloc_obj_type_string(hwloc_obj_type_t type) __hwloc_attribute_const
Return a stringified topology object type.
Definition: traversal.c:175
signed os_level
OS-provided physical level, -1 if unknown or meaningless.
Definition: hwloc.h:344
unsigned char get_thisproc_cpubind
Getting the binding of the whole current process is supported.
Definition: hwloc.h:843
enum hwloc_obj_osdev_type_e hwloc_obj_osdev_type_t
Type of a OS device.
enum hwloc_obj_bridge_type_e hwloc_obj_bridge_type_t
Type of one side (upstream or downstream) of an I/O bridge.
void * userdata
Application-given private data pointer, initialized to NULL, use it as you wish.
Definition: hwloc.h:363
Host-side of a bridge, only possible upstream.
Definition: hwloc.h:257
unsigned sibling_rank
Index in parent's children[] array.
Definition: hwloc.h:352
Data cache.
Definition: hwloc.h:192
unsigned os_index
OS-provided physical index number.
Definition: hwloc.h:332
Assume that the selected backend provides the topology for the system on which we are running...
Definition: hwloc.h:666
struct hwloc_obj * hwloc_obj_t
Convenience typedef; a pointer to a struct hwloc_obj.
Definition: hwloc.h:462
HWLOC_DECLSPEC int hwloc_set_area_membind_nodeset(hwloc_topology_t topology, const void *addr, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
Bind the already-allocated memory identified by (addr, len) to the NUMA node(s) in physical nodeset...
Definition: bind.c:391
Distances between objects.
Definition: hwloc.h:522
hwloc_uint64_t size
Size of pages.
Definition: hwloc.h:320
hwloc_obj_bridge_type_e
Type of one side (upstream or downstream) of an I/O bridge.
Definition: hwloc.h:256
HWLOC_DECLSPEC int hwloc_topology_export_xml(hwloc_topology_t topology, const char *xmlpath)
Export the topology into an XML file.
Definition: topology-xml.c:1405
HWLOC_DECLSPEC int hwloc_topology_export_xmlbuffer(hwloc_topology_t topology, char **xmlbuffer, int *buflen)
Export the topology into a newly-allocated XML memory buffer.
Definition: topology-xml.c:1452
HWLOC_DECLSPEC int hwloc_obj_type_snprintf(char *__hwloc_restrict string, size_t size, hwloc_obj_t obj, int verbose)
Stringify the type of a given topology object into a human-readable form.
Definition: traversal.c:377
Operating system GPU device.
Definition: hwloc.h:265
Operating system device.
Definition: hwloc.h:237
HWLOC_DECLSPEC int hwloc_topology_ignore_type_keep_structure(hwloc_topology_t topology, hwloc_obj_type_t type)
Ignore an object type if it does not bring any structure.
Group-specific Object Attributes.
Definition: hwloc.h:475
Object type-specific Attributes.
Definition: hwloc.h:465
unsigned nbobjs
Number of objects considered in the matrix.
Definition: hwloc.h:525
unsigned char set_thread_cpubind
Binding a given thread only is supported.
Definition: hwloc.h:853
Allocate memory but do not immediately bind it to a specific locality.
Definition: hwloc.h:1482
unsigned char set_thisthread_membind
Binding the current thread only is supported.
Definition: hwloc.h:875
struct hwloc_obj * next_sibling
Next object below the same parent.
Definition: hwloc.h:353
unsigned char get_thread_cpubind
Getting the binding of a given thread only is supported.
Definition: hwloc.h:855
Move I/O objects to ancestors if their parents are removed during restriction.
Definition: hwloc.h:983
Request strict binding from the OS.
Definition: hwloc.h:1574
hwloc_uint64_t count
Number of pages of this size.
Definition: hwloc.h:321
Machine.
Definition: hwloc.h:179
Move Misc objects to ancestors if their parents are removed during restriction.
Definition: hwloc.h:978
hwloc_cpuset_t allowed_cpuset
The CPU set of allowed logical processors.
Definition: hwloc.h:398
unsigned depth
Depth of cache (e.g., L1, L2, ...etc.)
Definition: hwloc.h:469
HWLOC_DECLSPEC int hwloc_topology_set_synthetic(hwloc_topology_t __hwloc_restrict topology, const char *__hwloc_restrict description)
Enable synthetic topology.
hwloc_bitmap_t hwloc_cpuset_t
A CPU set is a bitmap whose bits are set according to CPU physical OS indexes.
Definition: hwloc.h:128
struct hwloc_obj * first_child
First child.
Definition: hwloc.h:359
struct hwloc_obj * parent
Parent, NULL if root (system object)
Definition: hwloc.h:351
HWLOC_DECLSPEC int hwloc_set_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_cpuset_t set, int flags)
Bind a process pid on cpus given in physical bitmap set.
Definition: bind.c:106
unsigned char set_proc_membind
Binding a whole given process is supported.
Definition: hwloc.h:871
unsigned char set_thisproc_membind
Binding the whole current process is supported.
Definition: hwloc.h:867
hwloc_cpuset_t online_cpuset
The CPU set of online logical processors.
Definition: hwloc.h:390
The old deprecated Cpuset API.
hwloc_cpuset_t complete_cpuset
The complete CPU set of logical processors of this object,.
Definition: hwloc.h:379
Object memory.
Definition: hwloc.h:309
struct hwloc_obj_memory_s memory
Memory attributes.
Definition: hwloc.h:335
Allocate memory on the specified nodes.
Definition: hwloc.h:1493
hwloc_obj_type_t type
Type of object.
Definition: hwloc.h:331
Request for strict binding from the OS.
Definition: hwloc.h:1285
Sentinel value.
Definition: hwloc.h:243
HWLOC_DECLSPEC int hwloc_set_membind_nodeset(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
Set the default memory binding policy of the current process or thread to prefer the NUMA node(s) spe...
Definition: bind.c:260
unsigned char get_proc_last_cpu_location
Getting the last processors where a whole process ran is supported.
Definition: hwloc.h:859
hwloc_cpubind_flags_t
Process/Thread binding flags.
Definition: hwloc.h:1279
HWLOC_DECLSPEC int hwloc_topology_set_flags(hwloc_topology_t topology, unsigned long flags)
Set OR'ed flags to non-yet-loaded topology.
HWLOC_DECLSPEC void hwloc_topology_check(hwloc_topology_t topology)
Run internal checks on a topology structure.
HWLOC_DECLSPEC int hwloc_topology_set_distance_matrix(hwloc_topology_t __hwloc_restrict topology, hwloc_obj_type_t type, unsigned nbobjs, unsigned *os_index, float *distances)
Provide a distance matrix.
Definition: distances.c:226
Bridge.
Definition: hwloc.h:225
hwloc_nodeset_t nodeset
NUMA nodes covered by this object or containing this object.
Definition: hwloc.h:409
unsigned char get_thisthread_cpubind
Getting the binding of the current thread only is supported.
Definition: hwloc.h:851
Set policy for a specific thread of the current process.
Definition: hwloc.h:1568
Migrate existing allocated memory.
Definition: hwloc.h:1585
Core.
Definition: hwloc.h:195
unsigned char get_proc_cpubind
Getting the binding of a whole given process is supported.
Definition: hwloc.h:847
unsigned char get_thisthread_last_cpu_location
Getting the last processors where the current thread ran is supported.
Definition: hwloc.h:861
int associativity
Ways of associativity, -1 if fully associative, 0 if unknown.
Definition: hwloc.h:471
hwloc_uint64_t local_memory
Local memory (in bytes)
Definition: hwloc.h:311
Set policy for all threads of the specified (possibly multithreaded) process.
Definition: hwloc.h:1561
HWLOC_DECLSPEC int hwloc_get_proc_membind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t cpuset, hwloc_membind_policy_t *policy, int flags)
Query the default memory binding policy and physical locality of the specified process (the locality ...
Definition: bind.c:375
HWLOC_DECLSPEC int hwloc_get_last_cpu_location(hwloc_topology_t topology, hwloc_cpuset_t set, int flags)
Get the last physical CPU where the current process or thread ran.
Definition: bind.c:156
Reset the memory allocation policy to the system default.
Definition: hwloc.h:1480
HWLOC_DECLSPEC unsigned hwloc_get_api_version(void)
Indicate at runtime which hwloc API version was used at build time.
Definition: topology.c:47
struct hwloc_obj * last_child
Last child.
Definition: hwloc.h:360
unsigned char get_thisproc_last_cpu_location
Getting the last processors where the whole current process ran is supported.
Definition: hwloc.h:857
Array of local memory page types, NULL if no local memory and page_types is 0.
Definition: hwloc.h:319
Detect the whole system, ignore reservations and offline settings.
Definition: hwloc.h:657
HWLOC_DECLSPEC int hwloc_compare_types(hwloc_obj_type_t type1, hwloc_obj_type_t type2) __hwloc_attribute_const
Compare the depth of two object types.
Definition: topology.c:384
Miscellaneous objects.
Definition: hwloc.h:220
struct hwloc_obj_info_s * infos
Array of stringified info type=name.
Definition: hwloc.h:456
struct hwloc_obj ** children
Children, children[0 .
Definition: hwloc.h:358
Flags describing actual discovery support for this topology.
Definition: hwloc.h:833
Structure of a topology object.
Definition: hwloc.h:329
hwloc_const_bitmap_t hwloc_const_cpuset_t
A non-modifiable hwloc_cpuset_t.
Definition: hwloc.h:130
unsigned char alloc_membind
Allocating a bound memory area is supported.
Definition: hwloc.h:883
struct hwloc_obj * next_cousin
Next object of same type and depth.
Definition: hwloc.h:347
unsigned depth
Depth of group object.
Definition: hwloc.h:476
float * latency
Matrix of latencies between objects, stored as a one-dimension array.
Definition: hwloc.h:530
unsigned char get_thisthread_membind
Getting the binding of the current thread only is supported.
Definition: hwloc.h:877
HWLOC_DECLSPEC int hwloc_topology_set_pid(hwloc_topology_t __hwloc_restrict topology, hwloc_pid_t pid)
Change which pid the topology is viewed from.
Operating system block device.
Definition: hwloc.h:263
unsigned char replicate_membind
Replication policy is supported.
Definition: hwloc.h:891
unsigned relative_depth
Relative depth of the considered objects below the object containing this distance information...
Definition: hwloc.h:523
HWLOC_DECLSPEC int hwloc_topology_init(hwloc_topology_t *topologyp)
Allocate a topology context.
HWLOC_DECLSPEC void * hwloc_alloc_membind(hwloc_topology_t topology, size_t len, hwloc_const_cpuset_t cpuset, hwloc_membind_policy_t policy, int flags) __hwloc_attribute_malloc
Allocate some memory on memory nodes near the given physical cpuset cpuset.
Definition: bind.c:532
HWLOC_DECLSPEC int hwloc_set_proc_membind_nodeset(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
Set the default memory binding policy of the specified process to prefer the NUMA node(s) specified b...
Definition: bind.c:335
Group objects.
Definition: hwloc.h:208
HWLOC_DECLSPEC int hwloc_topology_set_fsroot(hwloc_topology_t __hwloc_restrict topology, const char *__hwloc_restrict fsroot_path)
Change the file-system root path when building the topology from sysfs/procfs.
HWLOC_DECLSPEC int hwloc_get_proc_membind_nodeset(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_nodeset_t nodeset, hwloc_membind_policy_t *policy, int flags)
Query the default memory binding policy and physical locality of the specified process.
Definition: bind.c:365
Cache-specific Object Attributes.
Definition: hwloc.h:467
hwloc_const_bitmap_t hwloc_const_nodeset_t
A non-modifiable hwloc_nodeset_t.
Definition: hwloc.h:148
HWLOC_DECLSPEC int hwloc_topology_restrict(hwloc_topology_t __hwloc_restrict topology, hwloc_const_cpuset_t cpuset, unsigned long flags)
Restrict the topology to the given CPU set.
HWLOC_DECLSPEC int hwloc_get_area_membind_nodeset(hwloc_topology_t topology, const void *addr, size_t len, hwloc_nodeset_t nodeset, hwloc_membind_policy_t *policy, int flags)
Query the physical NUMA node(s) and binding policy of the memory identified by (addr, len ).
Definition: bind.c:420
HWLOC_DECLSPEC int hwloc_get_proc_cpubind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int flags)
Get the current physical binding of process pid.
Definition: bind.c:120
float latency_max
The maximal value in the latency matrix.
Definition: hwloc.h:535
struct hwloc_topology * hwloc_topology_t
Topology context.
Definition: hwloc.h:96
unsigned page_types_len
Size of array page_types.
Definition: hwloc.h:313
unsigned char set_thisproc_cpubind
Binding the whole current process is supported.
Definition: hwloc.h:841
HWLOC_DECLSPEC void * hwloc_alloc_membind_nodeset(hwloc_topology_t topology, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags) __hwloc_attribute_malloc
Allocate some memory on the given physical nodeset nodeset.
Definition: bind.c:495
HWLOC_DECLSPEC int hwloc_obj_snprintf(char *__hwloc_restrict string, size_t size, hwloc_topology_t topology, hwloc_obj_t obj, const char *__hwloc_restrict indexprefix, int verbose)
Stringify a given topology object into a human-readable form.
Adapt distance matrices according to objects being removed during restriction.
Definition: hwloc.h:973
unsigned logical_index
Horizontal index in the whole list of similar objects, could be a "cousin_rank" since it's the rank w...
Definition: hwloc.h:342
Operating system openfabrics device.
Definition: hwloc.h:269
unsigned char firsttouch_membind
First-touch policy is supported.
Definition: hwloc.h:885
PCI device.
Definition: hwloc.h:232
hwloc_compare_types_e
Definition: hwloc.h:294
NUMA node.
Definition: hwloc.h:184
HWLOC_DECLSPEC void hwloc_topology_destroy(hwloc_topology_t topology)
Terminate and free a topology context.
HWLOC_DECLSPEC int hwloc_obj_cpuset_snprintf(char *__hwloc_restrict str, size_t size, size_t nobj, const hwloc_obj_t *__hwloc_restrict objs)
Stringify the cpuset containing a set of objects.
hwloc_nodeset_t complete_nodeset
The complete NUMA node set of this object,.
Definition: hwloc.h:426
float latency_base
The multiplier that should be applied to latency matrix to retrieve the original OS-provided latencie...
Definition: hwloc.h:536
unsigned char migrate_membind
Migration flags is supported.
Definition: hwloc.h:896
HWLOC_DECLSPEC int hwloc_get_membind_nodeset(hwloc_topology_t topology, hwloc_nodeset_t nodeset, hwloc_membind_policy_t *policy, int flags)
Query the default memory binding policy and physical locality of the current process or thread...
Definition: bind.c:299
hwloc_uint64_t size
Size of cache in bytes.
Definition: hwloc.h:468
unsigned arity
Number of children.
Definition: hwloc.h:357
HWLOC_DECLSPEC int hwloc_topology_load(hwloc_topology_t topology)
Build the actual topology.
Socket, physical package, or chip.
Definition: hwloc.h:188
HWLOC_DECLSPEC void hwloc_obj_add_info(hwloc_obj_t obj, const char *name, const char *value)
Add the given info name and value pair to the given object.
Definition: topology.c:254
Avoid any effect on CPU binding.
Definition: hwloc.h:1593
HWLOC_DECLSPEC void hwloc_free_xmlbuffer(hwloc_topology_t topology, char *xmlbuffer)
Free a buffer allocated by hwloc_topology_export_xmlbuffer()
Definition: topology-xml.c:1468
hwloc_uint64_t total_memory
Total memory (in bytes) in this object and its children.
Definition: hwloc.h:310
HWLOC_DECLSPEC int hwloc_topology_ignore_all_keep_structure(hwloc_topology_t topology)
Ignore all objects that do not bring any structure.
For each page bound with this policy, by next time it is touched (and next time only), it is moved from its current location to the local NUMA node of the thread where the memory reference occurred (if it needs to be moved at all).
Definition: hwloc.h:1532
static __hwloc_inline hwloc_obj_t __hwloc_attribute_pure hwloc_get_obj_by_type(hwloc_topology_t topology, hwloc_obj_type_t type, unsigned idx)
Returns the topology object at logical index idx with type type.
Definition: hwloc.h:1110
Value returned by hwloc_compare_types when types can not be compared.
Definition: hwloc.h:295
HWLOC_DECLSPEC int hwloc_topology_set_xml(hwloc_topology_t __hwloc_restrict topology, const char *__hwloc_restrict xmlpath)
Enable XML-file based topology.
Object info.
Definition: hwloc.h:543
HWLOC_DECLSPEC int hwloc_get_area_membind(hwloc_topology_t topology, const void *addr, size_t len, hwloc_cpuset_t cpuset, hwloc_membind_policy_t *policy, int flags)
Query the CPUs near the physical NUMA node(s) and binding policy of the memory identified by (addr...
Definition: bind.c:430
HWLOC_DECLSPEC hwloc_obj_type_t hwloc_obj_type_of_string(const char *string) __hwloc_attribute_pure
Return an object type from the string.
Definition: traversal.c:196
HWLOC_DECLSPEC int hwloc_set_proc_membind(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_cpuset_t cpuset, hwloc_membind_policy_t policy, int flags)
Set the default memory binding policy of the specified process to prefer the NUMA node(s) near the sp...
Definition: bind.c:350
OS Device specific Object Attributes.
Definition: hwloc.h:503
Replicate memory on the given nodes; reads from this memory will attempt to be serviced from the NUMA...
Definition: hwloc.h:1510
unsigned char set_proc_cpubind
Binding a whole given process is supported.
Definition: hwloc.h:845
The bitmap API, for use in hwloc itself.
struct hwloc_obj * prev_sibling
Previous object below the same parent.
Definition: hwloc.h:354
unsigned char set_area_membind
Binding a given memory area is supported.
Definition: hwloc.h:879
Allocate memory on the given nodes in an interleaved / round-robin manner.
Definition: hwloc.h:1495
char * name
Info name.
Definition: hwloc.h:544
HWLOC_DECLSPEC void * hwloc_alloc(hwloc_topology_t topology, size_t len)
Allocate some memory.
Definition: bind.c:487
Avoid any effect on memory binding.
Definition: hwloc.h:1313
unsigned char get_thisproc_membind
Getting the binding of the whole current process is supported.
Definition: hwloc.h:869
PCI Device specific Object Attributes.
Definition: hwloc.h:479
char * name
Object description if any.
Definition: hwloc.h:333
HWLOC_DECLSPEC int hwloc_obj_attr_snprintf(char *__hwloc_restrict string, size_t size, hwloc_obj_t obj, const char *__hwloc_restrict separator, int verbose)
Stringify the attributes of a given topology object into a human-readable form.
Flags describing actual memory binding support for this topology.
Definition: hwloc.h:865
static __hwloc_inline const char *__hwloc_attribute_pure hwloc_obj_get_info_by_name(hwloc_obj_t obj, const char *name)
Search the given key name in object infos and return the corresponding value.
Definition: hwloc.h:1204
Bind all threads of the current (possibly) multithreaded process.
Definition: hwloc.h:1280
hwloc_obj_type_t
Type of topology object.
Definition: hwloc.h:164
HWLOC_DECLSPEC int hwloc_get_membind(hwloc_topology_t topology, hwloc_cpuset_t cpuset, hwloc_membind_policy_t *policy, int flags)
Query the default memory binding policy and physical locality of the current process or thread (the l...
Definition: bind.c:319
hwloc_restrict_flags_e
Flags to be given to hwloc_topology_restrict().
Definition: hwloc.h:972
HWLOC_DECLSPEC const struct hwloc_topology_support * hwloc_topology_get_support(hwloc_topology_t __hwloc_restrict topology)
Retrieve the topology support.
PCI-side of a bridge.
Definition: hwloc.h:258
Operating system network device.
Definition: hwloc.h:267
HWLOC_DECLSPEC int hwloc_set_area_membind(hwloc_topology_t topology, const void *addr, size_t len, hwloc_const_cpuset_t cpuset, hwloc_membind_policy_t policy, int flags)
Bind the already-allocated memory identified by (addr, len) to the NUMA node(s) near physical cpuset...
Definition: bind.c:405
unsigned char pu
Detecting the number of PU objects is supported.
Definition: hwloc.h:835
HWLOC_DECLSPEC hwloc_obj_t hwloc_topology_insert_misc_object_by_cpuset(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset, const char *name)
Add a MISC object to the topology.
hwloc_obj_osdev_type_e
Type of a OS device.
Definition: hwloc.h:262
Flags describing actual PU binding support for this topology.
Definition: hwloc.h:839
hwloc_topology_flags_e
Flags to be set onto a topology context before load.
Definition: hwloc.h:656
hwloc_cpuset_t cpuset
CPUs covered by this object.
Definition: hwloc.h:366
unsigned char interleave_membind
Interleave policy is supported.
Definition: hwloc.h:889
HWLOC_DECLSPEC int hwloc_get_proc_last_cpu_location(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_cpuset_t set, int flags)
Get the last physical CPU where a process ran.
Definition: bind.c:176
Whole system (may be a cluster of machines).
Definition: hwloc.h:174
Bridge specific Object Attribues.
Definition: hwloc.h:488
hwloc_membind_policy_t
Memory binding policy.
Definition: hwloc.h:1479
unsigned char set_thisthread_cpubind
Binding the current thread only is supported.
Definition: hwloc.h:849
HWLOC_DECLSPEC hwloc_obj_t hwloc_get_obj_by_depth(hwloc_topology_t topology, unsigned depth, unsigned idx) __hwloc_attribute_pure
Returns the topology object at logical index idx from depth depth.
union hwloc_obj_attr_u * attr
Object type-specific Attributes, may be NULL if no attribute value was found.
Definition: hwloc.h:337
unsigned linesize
Cache-line size in bytes.
Definition: hwloc.h:470
Operating system dma engine device.
Definition: hwloc.h:271
hwloc_membind_flags_t
Memory binding flags.
Definition: hwloc.h:1560
HWLOC_DECLSPEC int hwloc_set_membind(hwloc_topology_t topology, hwloc_const_cpuset_t cpuset, hwloc_membind_policy_t policy, int flags)
Set the default memory binding policy of the current process or thread to prefer the NUMA node(s) nea...
Definition: bind.c:284
unsigned infos_count
Size of infos array.
Definition: hwloc.h:457
hwloc_nodeset_t allowed_nodeset
The set of allowed NUMA memory nodes.
Definition: hwloc.h:440
Processing Unit, or (Logical) Processor.
Definition: hwloc.h:199
struct hwloc_distances_s ** distances
Distances between all objects at same depth below this object.
Definition: hwloc.h:453
HWLOC_DECLSPEC int hwloc_get_cpubind(hwloc_topology_t topology, hwloc_cpuset_t set, int flags)
Get current process or thread binding.
Definition: bind.c:86
char * value
Info value.
Definition: hwloc.h:545
HWLOC_DECLSPEC int hwloc_topology_ignore_type(hwloc_topology_t topology, hwloc_obj_type_t type)
Ignore an object type.
Set of flags describing actual support for this topology.
Definition: hwloc.h:905
hwloc_bitmap_t hwloc_nodeset_t
A node set is a bitmap whose bits are set according to NUMA memory node physical OS indexes...
Definition: hwloc.h:145
HWLOC_DECLSPEC int hwloc_topology_set_xmlbuffer(hwloc_topology_t __hwloc_restrict topology, const char *__hwloc_restrict buffer, int size)
Enable XML based topology using a memory buffer (instead of a file, as with hwloc_topology_set_xml())...
HWLOC_DECLSPEC hwloc_obj_t hwloc_topology_insert_misc_object_by_parent(hwloc_topology_t topology, hwloc_obj_t parent, const char *name)
Add a MISC object as a leaf of the topology.
unsigned char get_proc_membind
Getting the binding of a whole given process is supported.
Definition: hwloc.h:873
Bind current thread of current process.
Definition: hwloc.h:1283
unsigned char bind_membind
Bind policy is supported.
Definition: hwloc.h:887
unsigned depth
Vertical index in the hierarchy.
Definition: hwloc.h:341
unsigned char nexttouch_membind
Next-touch migration policy is supported.
Definition: hwloc.h:893
unsigned char get_area_membind
Getting the binding of a given memory area is supported.
Definition: hwloc.h:881
Returned by hwloc_get_membind*() functions when multiple threads or parts of a memory area have diffe...
Definition: hwloc.h:1542
High-level hwloc traversal helpers.
HWLOC_DECLSPEC int hwloc_set_cpubind(hwloc_topology_t topology, hwloc_const_cpuset_t set, int flags)
Bind current process or thread on cpus given in physical bitmap set.
Definition: bind.c:62