13 #ifndef HWLOC_HELPER_H
14 #define HWLOC_HELPER_H
17 #error Please include the main hwloc.h instead
47 static __hwloc_inline int
49 static __hwloc_inline int
75 static __hwloc_inline int
77 static __hwloc_inline int
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) {
239 static __hwloc_inline int
241 static __hwloc_inline int
331 unsigned depth, unsigned idx) __hwloc_attribute_pure;
334 unsigned depth, unsigned idx)
370 static __hwloc_inline unsigned
372 unsigned depth) __hwloc_attribute_pure;
373 static __hwloc_inline unsigned
394 static __hwloc_inline int
397 static __hwloc_inline int
538 current = current-> parent;
555 while (current && current-> cpuset) {
559 current = current-> parent;
641 for(i=0; i<nr; i++) {
671 static __hwloc_inline void
673 static __hwloc_inline void
679 if (!root-> arity || n == 1 || root-> depth >= until) {
694 static __hwloc_inline void
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;
723 static __hwloc_inline void *
741 static __hwloc_inline void *
920 static __hwloc_inline void
948 static __hwloc_inline void
969 static __hwloc_inline void
1000 static __hwloc_inline void
1099 while (obj && obj-> cpuset) {
1124 static __hwloc_inline int
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) {
1247 static __hwloc_inline int
1249 unsigned domain, unsigned bus)
1265 unsigned domain, unsigned bus)
|
|