Implemented option "dataset_host".
This commit is contained in:
parent
7f0891a0f0
commit
ad7141fe21
5 changed files with 31 additions and 9 deletions
|
@ -42,7 +42,7 @@ xmrig::OclContext::~OclContext()
|
|||
}
|
||||
|
||||
|
||||
bool xmrig::OclContext::init(const std::vector<OclDevice> &devices, std::vector<OclLaunchData> &threads)
|
||||
bool xmrig::OclContext::init(const std::vector<OclDevice> &devices, std::vector<OclLaunchData> &threads, const Job &job)
|
||||
{
|
||||
if (!m_ctx) {
|
||||
std::vector<cl_device_id> ids(devices.size());
|
||||
|
@ -62,7 +62,7 @@ bool xmrig::OclContext::init(const std::vector<OclDevice> &devices, std::vector<
|
|||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
if (data.algorithm.family() == Algorithm::RANDOM_X) {
|
||||
data.dataset->createBuffer(m_ctx, data.algorithm, data.thread.isDatasetHost());
|
||||
data.dataset->createBuffer(m_ctx, job, data.thread.isDatasetHost());
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
|
|
@ -37,6 +37,9 @@ using cl_context = struct _cl_context *;
|
|||
namespace xmrig {
|
||||
|
||||
|
||||
class Job;
|
||||
|
||||
|
||||
class OclContext
|
||||
{
|
||||
public:
|
||||
|
@ -46,7 +49,7 @@ public:
|
|||
OclContext(const OclDevice &device);
|
||||
~OclContext();
|
||||
|
||||
bool init(const std::vector<OclDevice> &devices, std::vector<OclLaunchData> &threads);
|
||||
bool init(const std::vector<OclDevice> &devices, std::vector<OclLaunchData> &threads, const Job &job);
|
||||
|
||||
inline bool isValid() const { return m_ctx != nullptr; }
|
||||
inline cl_context ctx() const { return m_ctx; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue