OpenCL RandomX WIP
This commit is contained in:
parent
ff89ec660c
commit
4c90f9960e
72 changed files with 1717 additions and 505 deletions
|
@ -27,21 +27,21 @@
|
|||
#include "backend/opencl/wrappers/OclLib.h"
|
||||
|
||||
|
||||
bool xmrig::Cn0Kernel::enqueue(cl_command_queue queue, uint32_t nonce, size_t threads)
|
||||
void xmrig::Cn0Kernel::enqueue(cl_command_queue queue, uint32_t nonce, size_t threads)
|
||||
{
|
||||
const size_t offset[2] = { nonce, 1 };
|
||||
const size_t gthreads[2] = { threads, 8 };
|
||||
static const size_t lthreads[2] = { 8, 8 };
|
||||
|
||||
return enqueueNDRange(queue, 2, offset, gthreads, lthreads);
|
||||
enqueueNDRange(queue, 2, offset, gthreads, lthreads);
|
||||
}
|
||||
|
||||
|
||||
// __kernel void cn0(__global ulong *input, __global uint4 *Scratchpad, __global ulong *states, uint Threads)
|
||||
bool xmrig::Cn0Kernel::setArgs(cl_mem input, cl_mem scratchpads, cl_mem states, uint32_t threads)
|
||||
void xmrig::Cn0Kernel::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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue