cn/r part 1 of 2.

This commit is contained in:
XMRig 2019-09-03 14:36:27 +07:00
parent 9b6ab55936
commit b9e15389ca
16 changed files with 1484 additions and 734 deletions

View file

@ -23,15 +23,26 @@
*/
#include <string>
#include "backend/opencl/kernels/Cn1Kernel.h"
#include "backend/opencl/wrappers/OclLib.h"
xmrig::Cn1Kernel::Cn1Kernel(cl_program program) : OclKernel(program, "cn1")
xmrig::Cn1Kernel::Cn1Kernel(cl_program program)
: OclKernel(program, "cn1")
{
}
xmrig::Cn1Kernel::Cn1Kernel(cl_program program, uint64_t height)
: OclKernel(program, ("cn1_" + std::to_string(height)).c_str())
{
}
bool xmrig::Cn1Kernel::enqueue(cl_command_queue queue, uint32_t nonce, size_t threads, size_t worksize)
{
const size_t offset = nonce;

View file

@ -36,6 +36,7 @@ class Cn1Kernel : public OclKernel
{
public:
Cn1Kernel(cl_program program);
Cn1Kernel(cl_program program, uint64_t height);
bool enqueue(cl_command_queue queue, uint32_t nonce, size_t threads, size_t worksize);
bool setArgs(cl_mem input, cl_mem scratchpads, cl_mem states, uint32_t threads);
};