mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 10:01:06 +00:00
Fixed auto-config
This commit is contained in:
parent
202d44c147
commit
d0ce60a73a
2 changed files with 4 additions and 3 deletions
|
@ -160,7 +160,8 @@ bool xmrig::Config::finalize()
|
|||
const AlgoVariant av = getAlgoVariant();
|
||||
m_threads.mode = m_threads.count ? Simple : Automatic;
|
||||
|
||||
const size_t size = CpuThread::multiway(av) * cn_select_memory(m_algorithm.algo()) / 1024;
|
||||
const Variant v = m_algorithm.variant();
|
||||
const size_t size = CpuThread::multiway(av) * cn_select_memory(m_algorithm.algo(), v) / 1024;
|
||||
|
||||
if (!m_threads.count) {
|
||||
m_threads.count = Cpu::info()->optimalThreadsCount(size, m_maxCpuUsage);
|
||||
|
|
|
@ -70,12 +70,12 @@ template<> inline constexpr size_t cn_select_memory<CRYPTONIGHT_HEAVY>() { retur
|
|||
template<> inline constexpr size_t cn_select_memory<CRYPTONIGHT_PICO>() { return CRYPTONIGHT_PICO_MEMORY; }
|
||||
|
||||
|
||||
inline size_t cn_select_memory(Algo algorithm)
|
||||
inline size_t cn_select_memory(Algo algorithm, Variant v = VARIANT_AUTO)
|
||||
{
|
||||
switch(algorithm)
|
||||
{
|
||||
case CRYPTONIGHT:
|
||||
return CRYPTONIGHT_MEMORY;
|
||||
return (v == VARIANT_RX_WOW) ? CRYPTONIGHT_LITE_MEMORY : CRYPTONIGHT_MEMORY;
|
||||
|
||||
case CRYPTONIGHT_LITE:
|
||||
return CRYPTONIGHT_LITE_MEMORY;
|
||||
|
|
Loading…
Reference in a new issue