|
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
313 if (!next || !next-> cpuset)
346 unsigned depth, unsigned idx) __hwloc_attribute_pure;
349 unsigned depth, unsigned idx)
393 static __hwloc_inline unsigned
395 unsigned depth) __hwloc_attribute_pure;
396 static __hwloc_inline unsigned
421 static __hwloc_inline int
424 static __hwloc_inline int
444 static __hwloc_inline int
447 static __hwloc_inline int
541 if (!next || !next-> cpuset)
600 static __hwloc_inline int
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++) {
783 static __hwloc_inline void
785 static __hwloc_inline void
789 if (!root-> arity || n == 1 || root-> depth >= until) {
805 static __hwloc_inline void
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;
834 static __hwloc_inline void *
852 static __hwloc_inline void *
1031 static __hwloc_inline void
1059 static __hwloc_inline void
1080 static __hwloc_inline void
1111 static __hwloc_inline void
1210 while (obj && obj-> cpuset) {
1235 static __hwloc_inline int
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) {
1358 static __hwloc_inline int
1360 unsigned domain, unsigned bus)
1376 unsigned domain, unsigned bus)
|
|
|