Implemented RxNUMAStorage.
This commit is contained in:
parent
ad6dc876b3
commit
05928ccc25
9 changed files with 306 additions and 61 deletions
|
@ -50,23 +50,25 @@ public:
|
|||
XMRIG_DISABLE_COPY_MOVE_DEFAULT(RxDataset)
|
||||
|
||||
RxDataset(bool hugePages, bool cache);
|
||||
RxDataset(RxCache *cache);
|
||||
~RxDataset();
|
||||
|
||||
inline bool isHugePages() const { return m_flags & 1; }
|
||||
inline randomx_dataset *get() const { return m_dataset; }
|
||||
inline RxCache *cache() const { return m_cache; }
|
||||
inline size_t size() const { return maxSize(); }
|
||||
inline bool isHugePages() const { return m_flags & 1; }
|
||||
inline randomx_dataset *get() const { return m_dataset; }
|
||||
inline RxCache *cache() const { return m_cache; }
|
||||
inline void setCache(RxCache *cache) { m_cache = cache; }
|
||||
|
||||
bool init(const Buffer &seed, uint32_t numThreads);
|
||||
size_t size(bool cache = true) const;
|
||||
std::pair<uint32_t, uint32_t> hugePages(bool cache = true) const;
|
||||
void *raw() const;
|
||||
void setRaw(const void *raw);
|
||||
|
||||
static inline constexpr size_t maxSize() { return RANDOMX_DATASET_MAX_SIZE; }
|
||||
|
||||
private:
|
||||
void allocate(bool hugePages);
|
||||
|
||||
Algorithm m_algorithm;
|
||||
int m_flags = 0;
|
||||
randomx_dataset *m_dataset = nullptr;
|
||||
RxCache *m_cache = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue