mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-19 04:11:16 -05: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:
@@ -50,6 +50,14 @@ public:
|
||||
ModeMax
|
||||
};
|
||||
|
||||
enum ScratchpadPrefetchMode : uint32_t {
|
||||
ScratchpadPrefetchOff,
|
||||
ScratchpadPrefetchT0,
|
||||
ScratchpadPrefetchNTA,
|
||||
ScratchpadPrefetchMov,
|
||||
ScratchpadPrefetchMax,
|
||||
};
|
||||
|
||||
bool read(const rapidjson::Value &value);
|
||||
rapidjson::Value toJSON(rapidjson::Document &doc) const;
|
||||
|
||||
@@ -68,6 +76,8 @@ public:
|
||||
inline bool cacheQoS() const { return m_cacheQoS; }
|
||||
inline Mode mode() const { return m_mode; }
|
||||
|
||||
inline ScratchpadPrefetchMode scratchpadPrefetchMode() const { return m_scratchpadPrefetchMode; }
|
||||
|
||||
# ifdef XMRIG_FEATURE_MSR
|
||||
const char *msrPresetName() const;
|
||||
const MsrItems &msrPreset() const;
|
||||
@@ -94,6 +104,8 @@ private:
|
||||
int m_threads = -1;
|
||||
Mode m_mode = AutoMode;
|
||||
|
||||
ScratchpadPrefetchMode m_scratchpadPrefetchMode = ScratchpadPrefetchT0;
|
||||
|
||||
# ifdef XMRIG_FEATURE_HWLOC
|
||||
std::vector<uint32_t> m_nodeset;
|
||||
# endif
|
||||
|
||||
Reference in New Issue
Block a user