OpenCL RandomX WIP
This commit is contained in:
parent
ff89ec660c
commit
4c90f9960e
72 changed files with 1717 additions and 505 deletions
|
@ -26,10 +26,13 @@
|
|||
#define XMRIG_IOCLRUNNER_H
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
#include "base/tools/Object.h"
|
||||
|
||||
|
||||
typedef struct _cl_context *cl_context;
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
using cl_context = struct _cl_context *;
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
@ -43,10 +46,12 @@ class OclLaunchData;
|
|||
class IOclRunner
|
||||
{
|
||||
public:
|
||||
XMRIG_DISABLE_COPY_MOVE(IOclRunner)
|
||||
|
||||
IOclRunner() = default;
|
||||
virtual ~IOclRunner() = default;
|
||||
|
||||
virtual bool run(uint32_t nonce, uint32_t *hashOutput) = 0;
|
||||
virtual bool selfTest() const = 0;
|
||||
virtual bool set(const Job &job, uint8_t *blob) = 0;
|
||||
virtual cl_context ctx() const = 0;
|
||||
virtual const Algorithm &algorithm() const = 0;
|
||||
|
@ -57,9 +62,7 @@ public:
|
|||
virtual size_t threadId() const = 0;
|
||||
virtual uint32_t deviceIndex() const = 0;
|
||||
virtual void build() = 0;
|
||||
|
||||
protected:
|
||||
virtual bool isReadyToBuild() const = 0;
|
||||
virtual void init() = 0;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue