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:
parent
a5b6383f7b
commit
a84b45b1bb
7 changed files with 71 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue