13 #ifndef HWLOC_HELPER_H
14 #define HWLOC_HELPER_H
17 #error Please include the main hwloc.h instead
86 for(depth = 0; ; depth++)
128 if (obj->
depth < depth)
130 while (ancestor && ancestor->
depth > depth)
131 ancestor = ancestor->
parent;
142 while (ancestor && ancestor->
type != type)
143 ancestor = ancestor->
parent;
156 if (prev->
depth != depth)
206 if (prev->
parent != parent)
222 while (obj1 != obj2) {
227 if (obj1 != obj2 && obj1->
depth == obj2->
depth) {
313 if (!next || !next->
cpuset)
346 unsigned depth,
unsigned idx) ;
349 unsigned depth,
unsigned idx)
393 static inline
unsigned
396 static inline
unsigned
541 if (!next || !next->
cpuset)
606 for (depth=0; ; depth++) {
646 current = current->
parent;
663 while (current && current->
cpuset) {
667 current = current->
parent;
752 for(i=0; i<nr; i++) {
789 if (!root->
arity || n == 1 || root->
depth >= until) {
813 for (i = 0; i < n_roots; i++)
817 for (i = 0; i < n_roots && tot_weight; i++) {
820 unsigned chunk = (n * weight + tot_weight-1) / tot_weight;
823 tot_weight -= weight;
1210 while (obj && obj->
cpuset) {
1238 float *
latency,
float *reverse_latency)
1242 unsigned first_logical ;
1251 if (distances && distances->
latency) {
1252 const float * latency_matrix = distances->
latency;
1256 *latency = latency_matrix[l1*nbobjs+l2];
1257 *reverse_latency = latency_matrix[l2*nbobjs+l1];
1284 while (obj && !obj->
cpuset) {
1305 unsigned domain,
unsigned bus,
unsigned dev,
unsigned func)
1324 unsigned domain = 0;
1325 unsigned bus, dev, func;
1327 if (sscanf(busid,
"%x:%x.%x", &bus, &dev, &func) != 3
1328 && sscanf(busid,
"%x:%x:%x.%x", &domain, &bus, &dev, &func) != 4) {
1360 unsigned domain,
unsigned bus)
1376 unsigned domain,
unsigned bus)