Code cleanup

This commit is contained in:
XMRig 2021-01-25 22:00:42 +07:00
parent 1424b2975f
commit b9081e992b
No known key found for this signature in database
GPG key ID: 446A53638BE94409
3 changed files with 13 additions and 10 deletions

View file

@ -125,8 +125,6 @@ static inline bool isCacheExclusive(hwloc_obj_t obj)
xmrig::HwlocCpuInfo::HwlocCpuInfo()
{
m_threads = 0;
hwloc_topology_init(&m_topology);
hwloc_topology_load(m_topology);
@ -278,10 +276,8 @@ xmrig::CpuThreads xmrig::HwlocCpuInfo::allThreads(const Algorithm &algorithm, ui
CpuThreads threads;
threads.reserve(m_threads);
hwloc_obj_t pu = nullptr;
while ((pu = hwloc_get_next_obj_by_type(m_topology, HWLOC_OBJ_PU, pu)) != nullptr) {
threads.add(pu->os_index, 0);
for (const int32_t pu : m_units) {
threads.add(pu, 0);
}
if (threads.isEmpty()) {