mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-08 08:23:34 -05:00
OpenCL RandomX WIP
This commit is contained in:
@@ -166,6 +166,10 @@ std::vector<xmrig::OclLaunchData> xmrig::OclConfig::get(const Miner *miner, cons
|
||||
continue;
|
||||
}
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
auto dataset = algorithm.family() == Algorithm::RANDOM_X ? std::make_shared<OclRxDataset>() : nullptr;
|
||||
# endif
|
||||
|
||||
if (thread.threads().size() > 1) {
|
||||
auto interleave = std::make_shared<OclInterleave>(thread.threads().size());
|
||||
|
||||
@@ -173,11 +177,21 @@ std::vector<xmrig::OclLaunchData> xmrig::OclConfig::get(const Miner *miner, cons
|
||||
OclLaunchData data(miner, algorithm, *this, platform, thread, devices[thread.index()], affinity);
|
||||
data.interleave = interleave;
|
||||
|
||||
out.emplace_back(data);
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
data.dataset = dataset;
|
||||
# endif
|
||||
|
||||
out.emplace_back(std::move(data));
|
||||
}
|
||||
}
|
||||
else {
|
||||
out.emplace_back(miner, algorithm, *this, platform, thread, devices[thread.index()], thread.threads()[0]);
|
||||
OclLaunchData data(miner, algorithm, *this, platform, thread, devices[thread.index()], thread.threads().front());
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
data.dataset = dataset;
|
||||
# endif
|
||||
|
||||
out.emplace_back(std::move(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user