mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-08 00:15:04 -05:00
Implemented unified cryptonight and RandomX scratchpad memory.
This commit is contained in:
@@ -48,12 +48,12 @@ public:
|
||||
CpuWorker(size_t index, const CpuLaunchData &data);
|
||||
~CpuWorker() override;
|
||||
|
||||
inline const MemInfo &memory() const { return m_memory; }
|
||||
|
||||
protected:
|
||||
bool selfTest() override;
|
||||
void start() override;
|
||||
|
||||
inline const VirtualMemory *memory() const override { return m_memory; }
|
||||
|
||||
private:
|
||||
inline cn_hash_fun fn(const Algorithm &algorithm) const { return CnHash::fn(algorithm, m_av, m_assembly); }
|
||||
|
||||
@@ -63,6 +63,7 @@ private:
|
||||
|
||||
bool verify(const Algorithm &algorithm, const uint8_t *referenceValue);
|
||||
bool verify2(const Algorithm &algorithm, const uint8_t *referenceValue);
|
||||
void allocateCnCtx();
|
||||
void consumeJob();
|
||||
|
||||
const Algorithm m_algorithm;
|
||||
@@ -71,8 +72,8 @@ private:
|
||||
const CnHash::AlgoVariant m_av;
|
||||
const Miner *m_miner;
|
||||
cryptonight_ctx *m_ctx[N];
|
||||
MemInfo m_memory;
|
||||
uint8_t m_hash[N * 32];
|
||||
VirtualMemory *m_memory = nullptr;
|
||||
WorkerJob<N> m_job;
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
|
||||
Reference in New Issue
Block a user