mirror of
https://github.com/xmrig/xmrig.git
synced 2026-04-17 04:59:28 -04:00
Fixed initial dataset prefetch for RandomX v2
This commit is contained in:
@@ -61,6 +61,17 @@ namespace randomx {
|
||||
# if defined(XMRIG_ARM) || defined(XMRIG_RISCV)
|
||||
memcpy(reg.f, config.eMask, sizeof(config.eMask));
|
||||
# endif
|
||||
|
||||
const uint8_t* p = mem.memory;
|
||||
|
||||
// dataset prefetch for the first iteration of the main loop
|
||||
rx_prefetch_nta(p + (mem.ma & (RandomX_ConfigurationBase::DatasetBaseSize - 64)));
|
||||
|
||||
// dataset prefetch for the second iteration of the main loop (RandomX v2)
|
||||
if (RandomX_CurrentConfig.Tweak_V2_PREFETCH) {
|
||||
rx_prefetch_nta(p + (mem.mx & (RandomX_ConfigurationBase::DatasetBaseSize - 64)));
|
||||
}
|
||||
|
||||
compiler.getProgramFunc()(reg, mem, scratchpad, RandomX_CurrentConfig.ProgramIterations);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user