Skip to content

Commit

Permalink
Fix avx2-init (II)
Browse files Browse the repository at this point in the history
  • Loading branch information
Teredic authored Nov 18, 2021
1 parent 1d34c47 commit 781e449
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/crypto/rx/Rx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ void xmrig::Rx::init(IRxListener *listener)
template<typename T>
bool xmrig::Rx::init(const T &seed, const RxConfig &config, const CpuConfig &cpu)
{
const Algorithm algo = seed.algorithm();
if (seed.algorithm().family() != Algorithm::RANDOM_X) {
# ifdef XMRIG_FEATURE_MSR
RxMsr::destroy();
Expand All @@ -98,7 +99,7 @@ bool xmrig::Rx::init(const T &seed, const RxConfig &config, const CpuConfig &cpu

randomx_set_scratchpad_prefetch_mode(config.scratchpadPrefetchMode());
randomx_set_huge_pages_jit(cpu.isHugePagesJit());
randomx_set_optimized_dataset_init(config.initDatasetAVX2()) : 0);
randomx_set_optimized_dataset_init(algo != Algorithm::RX_XLA ? config.initDatasetAVX2() : 0);

# ifdef XMRIG_FEATURE_MSR
if (!RxMsr::isInitialized()) {
Expand Down

0 comments on commit 781e449

Please sign in to comment.