Implemented VM mode for OpenCL RandomX.

This commit is contained in:
XMRig
2019-09-12 00:01:03 +07:00
parent c4b49d4213
commit e9b20fff81
42 changed files with 450 additions and 165 deletions

View File

@@ -105,3 +105,14 @@ void xmrig::OclBaseRunner::enqueueWriteBuffer(cl_mem buffer, cl_bool blocking_wr
throw std::runtime_error(OclError::toString(ret));
}
}
void xmrig::OclBaseRunner::finalize(uint32_t *hashOutput)
{
enqueueReadBuffer(m_output, CL_TRUE, 0, sizeof(cl_uint) * 0x100, hashOutput);
uint32_t &results = hashOutput[0xFF];
if (results > 0xFF) {
results = 0xFF;
}
}