mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-15 19:02:44 -05:00
RandomX: align args
tempHash/output must be 16-byte aligned for randomx_calculate_hash{,_first,_next}
This commit is contained in:
@@ -215,7 +215,7 @@ void xmrig::CpuWorker<N>::start()
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
bool first = true;
|
||||
uint64_t tempHash[8] = {};
|
||||
alignas(16) uint64_t tempHash[8] = {};
|
||||
|
||||
// RandomX is faster, we don't need to store stats so often
|
||||
if (m_job.currentJob().algorithm().family() == Algorithm::RANDOM_X) {
|
||||
|
||||
@@ -82,7 +82,7 @@ private:
|
||||
const int m_astrobwtMaxSize;
|
||||
const Miner *m_miner;
|
||||
cryptonight_ctx *m_ctx[N];
|
||||
uint8_t m_hash[N * 32]{ 0 };
|
||||
alignas(16) uint8_t m_hash[N * 32]{ 0 };
|
||||
VirtualMemory *m_memory = nullptr;
|
||||
WorkerJob<N> m_job;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user