Build hwloc version string based on HWLOC_API_VERSION, whenever hwlocVersion object does not exist (<1.11.x)

This commit is contained in:
Tony Butler 2019-08-01 13:45:03 -06:00
parent bdaf28adf8
commit e584b266df

View file

@ -167,7 +167,11 @@ xmrig::HwlocCpuInfo::HwlocCpuInfo() : BasicCpuInfo(),
else else
# endif # endif
{ {
snprintf(m_backend, sizeof m_backend, "hwloc"); snprintf(m_backend, sizeof m_backend, "hwloc/%d.%d.%d",
(HWLOC_API_VERSION>>16)&0x000000ff,
(HWLOC_API_VERSION>>8 )&0x000000ff,
(HWLOC_API_VERSION )&0x000000ff
);
} }
findCache(root, 2, 3, [this](hwloc_obj_t found) { this->m_cache[found->attr->cache.depth] += found->attr->cache.size; }); findCache(root, 2, 3, [this](hwloc_obj_t found) { this->m_cache[found->attr->cache.depth] += found->attr->cache.size; });