1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-25 05:40:39 -05:00

OpenCL RandomX WIP

This commit is contained in:
XMRig
2019-09-11 15:48:02 +07:00
parent ff89ec660c
commit 4c90f9960e
72 changed files with 1717 additions and 505 deletions

View File

@@ -43,21 +43,21 @@ xmrig::Cn1Kernel::Cn1Kernel(cl_program program, uint64_t height)
}
bool xmrig::Cn1Kernel::enqueue(cl_command_queue queue, uint32_t nonce, size_t threads, size_t worksize)
void xmrig::Cn1Kernel::enqueue(cl_command_queue queue, uint32_t nonce, size_t threads, size_t worksize)
{
const size_t offset = nonce;
const size_t gthreads = threads;
const size_t lthreads = worksize;
return enqueueNDRange(queue, 1, &offset, &gthreads, &lthreads);
enqueueNDRange(queue, 1, &offset, &gthreads, &lthreads);
}
// __kernel void cn1(__global ulong *input, __global uint4 *Scratchpad, __global ulong *states, uint Threads)
bool xmrig::Cn1Kernel::setArgs(cl_mem input, cl_mem scratchpads, cl_mem states, uint32_t threads)
void xmrig::Cn1Kernel::setArgs(cl_mem input, cl_mem scratchpads, cl_mem states, uint32_t threads)
{
return setArg(0, sizeof(cl_mem), &input) &&
setArg(1, sizeof(cl_mem), &scratchpads) &&
setArg(2, sizeof(cl_mem), &states) &&
setArg(3, sizeof(uint32_t), &threads);
setArg(0, sizeof(cl_mem), &input);
setArg(1, sizeof(cl_mem), &scratchpads);
setArg(2, sizeof(cl_mem), &states);
setArg(3, sizeof(uint32_t), &threads);
}