mirror of
https://github.com/xmrig/xmrig.git
synced 2026-04-21 22:22:36 -04:00
RandomX: added parameter for scratchpad prefetch mode
`scratchpad_prefetch_mode` can have 4 values: 0: off 1: use `prefetcht0` instruction (default, same as previous XMRig versions) 2: use `prefetchnta` instruction (faster on Coffee Lake and a few other CPUs) 3: use `mov` instruction
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "base/io/log/Log.h"
|
||||
#include "crypto/rx/RxConfig.h"
|
||||
#include "crypto/rx/RxQueue.h"
|
||||
#include "crypto/randomx/randomx.h"
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
@@ -99,6 +100,8 @@ bool xmrig::Rx::init(const T &seed, const RxConfig &config, const CpuConfig &cpu
|
||||
return true;
|
||||
}
|
||||
|
||||
randomx_set_scratchpad_prefetch_mode(config.scratchpadPrefetchMode());
|
||||
|
||||
if (isReady(seed)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user