|
26 #ifndef HWLOC_LINUX_LIBNUMA_H
27 #define HWLOC_LINUX_LIBNUMA_H
55 unsigned long *mask, unsigned long *maxnode)
58 unsigned long outmaxnode = -1;
61 *maxnode = (*maxnode + 8* sizeof(*mask) - 1) & ~(8* sizeof(*mask) - 1);
62 memset(mask, 0, *maxnode/8);
69 mask[node-> os_index/ sizeof(*mask)/8] |= 1UL << (node-> os_index % ( sizeof(*mask)*8));
70 if (outmaxnode == ( unsigned long) -1 || outmaxnode < node->os_index)
82 *maxnode = outmaxnode+1;
98 unsigned long *mask, unsigned long *maxnode)
101 unsigned long outmaxnode = -1;
104 *maxnode = (*maxnode + 8* sizeof(*mask) - 1) & ~(8* sizeof(*mask) - 1);
105 memset(mask, 0, *maxnode/8);
114 mask[node-> os_index/ sizeof(*mask)/8] |= 1UL << (node-> os_index % ( sizeof(*mask)*8));
115 if (outmaxnode == ( unsigned long) -1 || outmaxnode < node->os_index)
127 *maxnode = outmaxnode+1;
142 const unsigned long *mask, unsigned long maxnode)
151 && (mask[node-> os_index/ sizeof(*mask)/8] & (1UL << (node-> os_index % ( sizeof(*mask)*8)))))
175 const unsigned long *mask, unsigned long maxnode)
184 && (mask[node-> os_index/ sizeof(*mask)/8] & (1UL << (node-> os_index % ( sizeof(*mask)*8)))))
215 static inline struct bitmask *
217 static inline struct bitmask *
221 struct bitmask *bitmask = numa_allocate_cpumask();
229 numa_bitmask_setbit(bitmask, node-> os_index);
233 numa_bitmask_setbit(bitmask, 0);
248 static inline struct bitmask *
250 static inline struct bitmask *
254 struct bitmask *bitmask = numa_allocate_cpumask();
262 numa_bitmask_setbit(bitmask, node-> os_index);
266 numa_bitmask_setbit(bitmask, 0);
279 const struct bitmask *bitmask)
287 if (numa_bitmask_isbitset(bitmask, node-> os_index))
291 if (numa_bitmask_isbitset(bitmask, 0))
307 const struct bitmask *bitmask)
315 if (numa_bitmask_isbitset(bitmask, node-> os_index))
319 if (numa_bitmask_isbitset(bitmask, 0))
332 #ifdef NUMA_VERSION1_COMPATIBILITY
351 nodemask_t *nodemask)
355 nodemask_zero(nodemask);
360 nodemask_set(nodemask, node-> os_index);
364 nodemask_set(nodemask, 0);
377 nodemask_t *nodemask)
381 nodemask_zero(nodemask);
387 nodemask_set(nodemask, node-> os_index);
391 nodemask_set(nodemask, 0);
404 const nodemask_t *nodemask)
412 if (nodemask_isset(nodemask, node-> os_index))
416 if (nodemask_isset(nodemask, 0))
432 const nodemask_t *nodemask)
440 if (nodemask_isset(nodemask, node-> os_index))
444 if (nodemask_isset(nodemask, 0))
|
|
|