OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

Functions
Binding Helpers

## Functions
static __hwloc_inline void | hwloc_distributev (hwloc_topology_t topology, hwloc_obj_t *root, unsigned n_roots, hwloc_cpuset_t *cpuset, unsigned n, unsigned until)
| Distribute `n` items over the topology under `root`. More...
static __hwloc_inline void | hwloc_distribute (hwloc_topology_t topology, hwloc_obj_t root, hwloc_cpuset_t *cpuset, unsigned n, unsigned until)
static __hwloc_inline void * | hwloc_alloc_membind_policy_nodeset (hwloc_topology_t topology, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
| Allocate some memory on the given nodeset `nodeset`. More...
static __hwloc_inline void * | hwloc_alloc_membind_policy (hwloc_topology_t topology, size_t len, hwloc_const_cpuset_t cpuset, hwloc_membind_policy_t policy, int flags)
| Allocate some memory on the memory nodes near given cpuset `cpuset`. More...

## Detailed Description

## Function Documentation

static __hwloc_inline void* hwloc_alloc_membind_policy | ( | hwloc_topology_t | topology,
|  | size_t | len,
|  | hwloc_const_cpuset_t | cpuset,
|  | hwloc_membind_policy_t | policy,
|  | int | flags
| ) |  |
| static

Allocate some memory on the memory nodes near given cpuset `cpuset`.

This is similar to hwloc_alloc_membind_policy_nodeset, but for a given cpuset.

References hwloc_alloc(), hwloc_alloc_membind(), HWLOC_MEMBIND_FIRSTTOUCH, and hwloc_set_membind().

static __hwloc_inline void* hwloc_alloc_membind_policy_nodeset | ( | hwloc_topology_t | topology,
|  | size_t | len,
|  | hwloc_const_nodeset_t | nodeset,
|  | hwloc_membind_policy_t | policy,
|  | int | flags
| ) |  |
| static

Allocate some memory on the given nodeset `nodeset`.

This is similar to hwloc_alloc_membind except that it is allowed to change the current memory binding policy, thus providing more binding support, at the expense of changing the current state.

References hwloc_alloc(), hwloc_alloc_membind_nodeset(), HWLOC_MEMBIND_FIRSTTOUCH, and hwloc_set_membind_nodeset().

static __hwloc_inline void hwloc_distributev | ( | hwloc_topology_t | topology,
|  | hwloc_obj_t * | roots,
|  | unsigned | n_roots,
|  | hwloc_cpuset_t * | cpuset,
|  | unsigned | n,
|  | unsigned | until
| ) |  |
| static

Distribute `n` items over the topology under `root`.

Distribute `n` items over the topology under `roots`.

Array `cpuset` will be filled with `n` cpusets recursively distributed linearly over the topology under `root`, down to depth `until` (which can be INT_MAX to distribute down to the finest level).

This is typically useful when an application wants to distribute `n` threads over a machine, giving each of them as much private cache as possible and keeping them locally in number order.

The caller may typically want to also call hwloc_bitmap_singlify() before binding a thread so that it does not move at all.

This is the same as hwloc_distribute, but takes an array of roots instead of just one root.

References hwloc_obj::cpuset, and hwloc_bitmap_weight().