- ObjType =
enum( :obj_type, obj_types )
- ObjCacheType =
enum( :obj_cache_type, [
:OBJ_CACHE_UNIFIED,
:OBJ_CACHE_DATA,
:OBJ_CACHE_INSTRUCTION
] )
- ObjBrigeType =
enum( :obj_bridge_type, [
:OBJ_BRIDGE_HOST,
:OBJ_BRIDGE_PCI
] )
- ObjOsdevType =
enum( :obj_osdev_type, [
:OBJ_OSDEV_BLOCK,
:OBJ_OSDEV_GPU,
:OBJ_OSDEV_NETWORK,
:OBJ_OSDEV_OPENFABRICS,
:OBJ_OSDEV_DMA,
:OBJ_OSDEV_COPROC
] )
- DistancesKind =
bitmask(FFI::find_type(:ulong), :distances_kind, [
:DISTANCES_KIND_FROM_OS,
:DISTANCES_KIND_FROM_USER,
:DISTANCES_KIND_MEANS_LATENCY,
:DISTANCES_KIND_MEANS_BANDWIDTH
])
- DistancesAddFlag =
bitmask(FFI::find_type(:ulong), :distances_add_flag, [
:DISTANCES_ADD_FLAG_GROUP,
:DISTANCES_ADD_FLAG_GROUP_INACCURATE
])
- CpubindFlags =
bitmask( :cpubind_flags, [
:CPUBIND_PROCESS,
:CPUBIND_THREAD,
:CPUBIND_STRICT,
:CPUBIND_NOMEMBIND
] )
- MembindPolicy =
enum( :membind_policy, [
:MEMBIND_DEFAULT, 0,
:MEMBIND_FIRSTTOUCH, 1,
:MEMBIND_BIND, 2,
:MEMBIND_INTERLEAVE, 3,
:MEMBIND_NEXTTOUCH, 4,
:MEMBIND_MIXED, -1
] )
- MembindFlags =
bitmask( :membind_flags, [
:MEMBIND_PROCESS,
:MEMBIND_THREAD,
:MEMBIND_STRICT,
:MEMBIND_MIGRATE,
:MEMBIND_NOCPUBIND,
:MEMBIND_BYNODESET
] )
- API_VERSION =
Hwloc.hwloc_get_api_version
- API_VERSION_1_10 =
0x00010a00
- API_VERSION_2_0 =
0x00020000
- TopologyExportXmlFlags =
bitmask( FFI::find_type(:ulong), :topology_export_xml_flags, [
:TOPOLOGY_EXPORT_XML_FLAG_V1
] )
- TopologyExportSyntheticFlags =
bitmask( FFI::find_type(:ulong), :topology_export_synthetic_flags, [
:TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_EXTENDED_TYPES,
:TOPOLOGY_EXPORT_SYNTHETIC_FLAG_NO_ATTRS
] )
- RestrictFlags =
bitmask( FFI::find_type(:ulong), :restrict_flags, [
:RESTRICT_FLAG_REMOVE_CPULESS,
:RESTRICT_FLAG_ADAPT_MISC,
:RESTRICT_FLAG_ADAPT_IO
] )
- TopologyFlags =
bitmask( FFI::find_type(:ulong), :topology_flags, [
:TOPOLOGY_FLAG_WHOLE_SYSTEM,
:TOPOLOGY_FLAG_IS_THISSYSTEM,
:TOPOLOGY_FLAG_THISSYSTEM_ALLOWED_RESOURCES
] )
- GetTypeDepth =
enum(:get_type_depth, [
:TYPE_DEPTH_UNKNOWN, -1,
:TYPE_DEPTH_MULTIPLE, -2,
:TYPE_DEPTH_BRIDGE, -3,
:TYPE_DEPTH_PCI_DEVICE, -4,
:TYPE_DEPTH_OS_DEVICE, -5
] + ( API_VERSION >= API_VERSION_2_0 ? [ :TYPE_DEPTH_MISC, -6 ] : [] ) )
- TypeFilter =
enum(:type_filter, [
:TYPE_FILTER_KEEP_ALL, 0,
:TYPE_FILTER_KEEP_NONE, 1,
:TYPE_FILTER_KEEP_STRUCTURE, 2,
:TYPE_FILTER_KEEP_IMPORTANT, 3
] )