|
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)
597 current = current-> parent;
614 while (current && current-> cpuset) {
618 current = current-> parent;
703 for(i=0; i<nr; i++) {
740 if (!root-> arity || n == 1 || root-> depth >= until) {
764 for (i = 0; i < n_roots; i++)
765 if (roots[i]->cpuset)
768 for (i = 0; i < n_roots && tot_weight; i++) {
771 unsigned chunk = (n * weight + tot_weight-1) / tot_weight;
774 tot_weight -= weight;
1161 while (obj && obj-> cpuset) {
1189 float * latency, float *reverse_latency)
1193 unsigned first_logical ;
1202 if (distances && distances-> latency) {
1203 const float * latency_matrix = distances-> latency;
1207 *latency = latency_matrix[l1*nbobjs+l2];
1208 *reverse_latency = latency_matrix[l2*nbobjs+l1];
1235 while (obj && !obj-> cpuset) {
1256 unsigned domain, unsigned bus, unsigned dev, unsigned func)
1275 unsigned domain = 0;
1276 unsigned bus, dev, func;
1278 if (sscanf(busid, "%x:%x.%x", &bus, &dev, &func) != 3
1279 && sscanf(busid, "%x:%x:%x.%x", &domain, &bus, &dev, &func) != 4) {
1311 unsigned domain, unsigned bus)
1327 unsigned domain, unsigned bus)
|
|
|