mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-07 16:05:05 -05:00
Compare commits
4 Commits
a6bb5bcf8b
...
3b57c88cfc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b57c88cfc | ||
|
|
36fdfa2694 | ||
|
|
6cfc02d24f | ||
|
|
5ac6d438fa |
@@ -320,8 +320,13 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
|
|||||||
L2 += l2->attr->cache.size;
|
L2 += l2->attr->cache.size;
|
||||||
L2_associativity = l2->attr->cache.associativity;
|
L2_associativity = l2->attr->cache.associativity;
|
||||||
|
|
||||||
if (L3_exclusive && l2->attr->cache.size >= scratchpad) {
|
if (L3_exclusive) {
|
||||||
extra += scratchpad;
|
if (vendor() == VENDOR_AMD) {
|
||||||
|
extra += std::min<size_t>(l2->attr->cache.size, scratchpad);
|
||||||
|
}
|
||||||
|
else if (l2->attr->cache.size >= scratchpad) {
|
||||||
|
extra += scratchpad;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,6 +169,12 @@ bool xmrig::Platform::isOnBatteryPower()
|
|||||||
return (status == "Discharging");
|
return (status == "Discharging");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
std::ifstream f("/sys/class/power_supply/macsmc-battery/status");
|
||||||
|
if (f.is_open()) {
|
||||||
|
std::string status;
|
||||||
|
f >> status;
|
||||||
|
return (status == "Discharging");
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user