This source file includes following definitions.
- hwloc_topology_insert_misc_object_by_parent
- hwloc_obj_cpuset_snprintf
- hwloc_obj_type_sscanf
- hwloc_set_membind_nodeset
- hwloc_get_membind_nodeset
- hwloc_set_proc_membind_nodeset
- hwloc_get_proc_membind_nodeset
- hwloc_set_area_membind_nodeset
- hwloc_get_area_membind_nodeset
- hwloc_alloc_membind_nodeset
- hwloc_alloc_membind_policy_nodeset
- hwloc_cpuset_to_nodeset_strict
- hwloc_cpuset_from_nodeset_strict
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 #ifndef HWLOC_DEPRECATED_H
  14 #define HWLOC_DEPRECATED_H
  15 
  16 #ifndef HWLOC_H
  17 #error Please include the main hwloc.h instead
  18 #endif
  19 
  20 #ifdef __cplusplus
  21 extern "C" {
  22 #endif
  23 
  24 
  25 #define HWLOC_OBJ_SYSTEM HWLOC_OBJ_MACHINE
  26 
  27 #define HWLOC_OBJ_SOCKET HWLOC_OBJ_PACKAGE
  28 
  29 #define HWLOC_OBJ_NODE HWLOC_OBJ_NUMANODE
  30 
  31 
  32 
  33 
  34 
  35 static __hwloc_inline hwloc_obj_t
  36 hwloc_topology_insert_misc_object_by_parent(hwloc_topology_t topology, hwloc_obj_t parent, const char *name) __hwloc_attribute_deprecated;
  37 static __hwloc_inline hwloc_obj_t
  38 hwloc_topology_insert_misc_object_by_parent(hwloc_topology_t topology, hwloc_obj_t parent, const char *name)
  39 {
  40   return hwloc_topology_insert_misc_object(topology, parent, name);
  41 }
  42 
  43 
  44 
  45 
  46 
  47 
  48 
  49 
  50 static __hwloc_inline int
  51 hwloc_obj_cpuset_snprintf(char *str, size_t size, size_t nobj, struct hwloc_obj * const *objs) __hwloc_attribute_deprecated;
  52 static __hwloc_inline int
  53 hwloc_obj_cpuset_snprintf(char *str, size_t size, size_t nobj, struct hwloc_obj * const *objs)
  54 {
  55   hwloc_bitmap_t set = hwloc_bitmap_alloc();
  56   int res;
  57   unsigned i;
  58 
  59   hwloc_bitmap_zero(set);
  60   for(i=0; i<nobj; i++)
  61     if (objs[i]->cpuset)
  62       hwloc_bitmap_or(set, set, objs[i]->cpuset);
  63 
  64   res = hwloc_bitmap_snprintf(str, size, set);
  65   hwloc_bitmap_free(set);
  66   return res;
  67 }
  68 
  69 
  70 
  71 
  72 
  73 static __hwloc_inline int
  74 hwloc_obj_type_sscanf(const char *string, hwloc_obj_type_t *typep, int *depthattrp, void *typeattrp, size_t typeattrsize) __hwloc_attribute_deprecated;
  75 static __hwloc_inline int
  76 hwloc_obj_type_sscanf(const char *string, hwloc_obj_type_t *typep, int *depthattrp, void *typeattrp, size_t typeattrsize)
  77 {
  78   union hwloc_obj_attr_u attr;
  79   int err = hwloc_type_sscanf(string, typep, &attr, sizeof(attr));
  80   if (err < 0)
  81     return err;
  82   if (hwloc_obj_type_is_cache(*typep)) {
  83     if (depthattrp)
  84       *depthattrp = (int) attr.cache.depth;
  85     if (typeattrp && typeattrsize >= sizeof(hwloc_obj_cache_type_t))
  86       memcpy(typeattrp, &attr.cache.type, sizeof(hwloc_obj_cache_type_t));
  87   } else if (*typep == HWLOC_OBJ_GROUP) {
  88     if (depthattrp)
  89       *depthattrp = (int) attr.group.depth;
  90   }
  91   return 0;
  92 }
  93 
  94 
  95 
  96 
  97 static __hwloc_inline int
  98 hwloc_set_membind_nodeset(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags) __hwloc_attribute_deprecated;
  99 static __hwloc_inline int
 100 hwloc_set_membind_nodeset(hwloc_topology_t topology, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
 101 {
 102   return hwloc_set_membind(topology, nodeset, policy, flags | HWLOC_MEMBIND_BYNODESET);
 103 }
 104 
 105 
 106 
 107 
 108 static __hwloc_inline int
 109 hwloc_get_membind_nodeset(hwloc_topology_t topology, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags) __hwloc_attribute_deprecated;
 110 static __hwloc_inline int
 111 hwloc_get_membind_nodeset(hwloc_topology_t topology, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags)
 112 {
 113   return hwloc_get_membind(topology, nodeset, policy, flags | HWLOC_MEMBIND_BYNODESET);
 114 }
 115 
 116 
 117 
 118 
 119 static __hwloc_inline int
 120 hwloc_set_proc_membind_nodeset(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags) __hwloc_attribute_deprecated;
 121 static __hwloc_inline int
 122 hwloc_set_proc_membind_nodeset(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
 123 {
 124   return hwloc_set_proc_membind(topology, pid, nodeset, policy, flags | HWLOC_MEMBIND_BYNODESET);
 125 }
 126 
 127 
 128 
 129 
 130 static __hwloc_inline int
 131 hwloc_get_proc_membind_nodeset(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags) __hwloc_attribute_deprecated;
 132 static __hwloc_inline int
 133 hwloc_get_proc_membind_nodeset(hwloc_topology_t topology, hwloc_pid_t pid, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags)
 134 {
 135   return hwloc_get_proc_membind(topology, pid, nodeset, policy, flags | HWLOC_MEMBIND_BYNODESET);
 136 }
 137 
 138 
 139 
 140 
 141 static __hwloc_inline int
 142 hwloc_set_area_membind_nodeset(hwloc_topology_t topology, const void *addr, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags) __hwloc_attribute_deprecated;
 143 static __hwloc_inline int
 144 hwloc_set_area_membind_nodeset(hwloc_topology_t topology, const void *addr, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
 145 {
 146   return hwloc_set_area_membind(topology, addr, len, nodeset, policy, flags | HWLOC_MEMBIND_BYNODESET);
 147 }
 148 
 149 
 150 
 151 
 152 static __hwloc_inline int
 153 hwloc_get_area_membind_nodeset(hwloc_topology_t topology, const void *addr, size_t len, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags) __hwloc_attribute_deprecated;
 154 static __hwloc_inline int
 155 hwloc_get_area_membind_nodeset(hwloc_topology_t topology, const void *addr, size_t len, hwloc_nodeset_t nodeset, hwloc_membind_policy_t * policy, int flags)
 156 {
 157   return hwloc_get_area_membind(topology, addr, len, nodeset, policy, flags | HWLOC_MEMBIND_BYNODESET);
 158 }
 159 
 160 
 161 
 162 static __hwloc_inline void *
 163 hwloc_alloc_membind_nodeset(hwloc_topology_t topology, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags) __hwloc_attribute_malloc __hwloc_attribute_deprecated;
 164 static __hwloc_inline void *
 165 hwloc_alloc_membind_nodeset(hwloc_topology_t topology, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
 166 {
 167   return hwloc_alloc_membind(topology, len, nodeset, policy, flags | HWLOC_MEMBIND_BYNODESET);
 168 }
 169 
 170 
 171 
 172 static __hwloc_inline void *
 173 hwloc_alloc_membind_policy_nodeset(hwloc_topology_t topology, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags) __hwloc_attribute_malloc __hwloc_attribute_deprecated;
 174 static __hwloc_inline void *
 175 hwloc_alloc_membind_policy_nodeset(hwloc_topology_t topology, size_t len, hwloc_const_nodeset_t nodeset, hwloc_membind_policy_t policy, int flags)
 176 {
 177   return hwloc_alloc_membind_policy(topology, len, nodeset, policy, flags | HWLOC_MEMBIND_BYNODESET);
 178 }
 179 
 180 
 181 
 182 static __hwloc_inline void
 183 hwloc_cpuset_to_nodeset_strict(hwloc_topology_t topology, hwloc_const_cpuset_t _cpuset, hwloc_nodeset_t nodeset) __hwloc_attribute_deprecated;
 184 static __hwloc_inline void
 185 hwloc_cpuset_to_nodeset_strict(hwloc_topology_t topology, hwloc_const_cpuset_t _cpuset, hwloc_nodeset_t nodeset)
 186 {
 187   hwloc_cpuset_to_nodeset(topology, _cpuset, nodeset);
 188 }
 189 
 190 
 191 
 192 static __hwloc_inline void
 193 hwloc_cpuset_from_nodeset_strict(hwloc_topology_t topology, hwloc_cpuset_t _cpuset, hwloc_const_nodeset_t nodeset) __hwloc_attribute_deprecated;
 194 static __hwloc_inline void
 195 hwloc_cpuset_from_nodeset_strict(hwloc_topology_t topology, hwloc_cpuset_t _cpuset, hwloc_const_nodeset_t nodeset)
 196 {
 197   hwloc_cpuset_from_nodeset(topology, _cpuset, nodeset);
 198 }
 199 
 200 
 201 #ifdef __cplusplus
 202 } 
 203 #endif
 204 
 205 
 206 #endif