1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-27 06:20:51 -05:00

Implemented VM mode for OpenCL RandomX.

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

View File

@@ -27,9 +27,30 @@
#include "backend/opencl/wrappers/OclLib.h"
void xmrig::FindSharesKernel::enqueue(cl_command_queue queue, size_t threads)
{
const size_t gthreads = threads;
static const size_t lthreads = 64;
enqueueNDRange(queue, 1, nullptr, &gthreads, &lthreads);
}
// __kernel void find_shares(__global const uint64_t* hashes, uint64_t target, uint32_t start_nonce, __global uint32_t* shares)
void xmrig::FindSharesKernel::setArgs(cl_mem hashes, cl_mem shares)
{
setArg(0, sizeof(cl_mem), &hashes);
setArg(3, sizeof(cl_mem), &shares);
}
void xmrig::FindSharesKernel::setTarget(uint64_t target)
{
setArg(1, sizeof(uint64_t), &target);
}
void xmrig::FindSharesKernel::setNonce(uint32_t nonce)
{
setArg(2, sizeof(uint32_t), &nonce);
}