|
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) {
331 unsigned depth, unsigned idx) ;
334 unsigned depth, unsigned idx)
370 static inline unsigned
373 static inline unsigned
538 current = current-> parent;
555 while (current && current-> cpuset) {
559 current = current-> parent;
641 for(i=0; i<nr; i++) {
679 if (!root-> arity || n == 1 || root-> depth >= until) {
702 for (i = 0; i < n_roots; i++)
703 if (roots[i]->cpuset)
706 for (i = 0; i < n_roots && tot_weight; i++) {
709 unsigned chunk = (n * weight + tot_weight-1) / tot_weight;
712 tot_weight -= weight;
1099 while (obj && obj-> cpuset) {
1127 float * latency, float *reverse_latency)
1131 unsigned first_logical ;
1140 if (distances && distances-> latency) {
1141 const float * latency_matrix = distances-> latency;
1145 *latency = latency_matrix[l1*nbobjs+l2];
1146 *reverse_latency = latency_matrix[l2*nbobjs+l1];
1173 while (obj && !obj-> cpuset) {
1194 unsigned domain, unsigned bus, unsigned dev, unsigned func)
1213 unsigned domain = 0;
1214 unsigned bus, dev, func;
1216 if (sscanf(busid, "%x:%x.%x", &bus, &dev, &func) != 3
1217 && sscanf(busid, "%x:%x:%x.%x", &domain, &bus, &dev, &func) != 4) {
1249 unsigned domain, unsigned bus)
1265 unsigned domain, unsigned bus)
|
|
|