mirror of
https://github.com/xmrig/xmrig.git
synced 2024-10-30 21:17:52 +00:00
Fix RandomX init when switching to other algo and back
This commit is contained in:
parent
13ee9d09a8
commit
d557fe7f39
1 changed files with 4 additions and 4 deletions
|
@ -104,10 +104,6 @@ bool xmrig::Rx::init(const T &seed, const RxConfig &config, const CpuConfig &cpu
|
||||||
randomx_set_scratchpad_prefetch_mode(config.scratchpadPrefetchMode());
|
randomx_set_scratchpad_prefetch_mode(config.scratchpadPrefetchMode());
|
||||||
randomx_set_huge_pages_jit(cpu.isHugePagesJit());
|
randomx_set_huge_pages_jit(cpu.isHugePagesJit());
|
||||||
|
|
||||||
if (isReady(seed)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!msrInitialized) {
|
if (!msrInitialized) {
|
||||||
msrEnabled = msrInit(config, cpu.threads().get(seed.algorithm()).data());
|
msrEnabled = msrInit(config, cpu.threads().get(seed.algorithm()).data());
|
||||||
msrInitialized = true;
|
msrInitialized = true;
|
||||||
|
@ -121,6 +117,10 @@ bool xmrig::Rx::init(const T &seed, const RxConfig &config, const CpuConfig &cpu
|
||||||
osInitialized = true;
|
osInitialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isReady(seed)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
d_ptr->queue.enqueue(seed, config.nodeset(), config.threads(cpu.limit()), cpu.isHugePages(), config.isOneGbPages(), config.mode(), cpu.priority());
|
d_ptr->queue.enqueue(seed, config.nodeset(), config.threads(cpu.limit()), cpu.isHugePages(), config.isOneGbPages(), config.mode(), cpu.priority());
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue