Added option "mode" (or --randomx-mode) for RandomX.

This commit is contained in:
XMRig 2019-11-29 13:00:17 +07:00
parent ca9a3063d8
commit 64fb4f265b
No known key found for this signature in database
GPG key ID: 446A53638BE94409
20 changed files with 129 additions and 27 deletions

View file

@ -28,9 +28,10 @@
#define XMRIG_RX_DATASET_H
#include "base/tools/Object.h"
#include "crypto/common/Algorithm.h"
#include "crypto/randomx/configuration.h"
#include "base/tools/Object.h"
#include "crypto/rx/RxConfig.h"
struct randomx_dataset;
@ -49,7 +50,7 @@ class RxDataset
public:
XMRIG_DISABLE_COPY_MOVE_DEFAULT(RxDataset)
RxDataset(bool hugePages, bool cache);
RxDataset(bool hugePages, bool cache, RxConfig::Mode mode);
RxDataset(RxCache *cache);
~RxDataset();
@ -69,9 +70,10 @@ public:
private:
void allocate(bool hugePages);
int m_flags = 0;
randomx_dataset *m_dataset = nullptr;
RxCache *m_cache = nullptr;
const RxConfig::Mode m_mode = RxConfig::FastMode;
int m_flags = 0;
randomx_dataset *m_dataset = nullptr;
RxCache *m_cache = nullptr;
};