Make option "dataset_host" available only for RandomX.
This commit is contained in:
parent
f8d1488e33
commit
c235145121
7 changed files with 31 additions and 29 deletions
|
@ -59,21 +59,21 @@ xmrig::CudaThread::CudaThread(const rapidjson::Value &value)
|
|||
m_affinity = Json::getUint64(value, kAffinity, m_affinity);
|
||||
|
||||
if (Json::getValue(value, kDatasetHost).IsInt()) {
|
||||
m_dataset_host = Json::getInt(value, kDatasetHost) != 0;
|
||||
m_datasetHost = Json::getInt(value, kDatasetHost, m_datasetHost) != 0;
|
||||
}
|
||||
else {
|
||||
m_dataset_host = Json::getBool(value, kDatasetHost);
|
||||
m_datasetHost = Json::getBool(value, kDatasetHost);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
xmrig::CudaThread::CudaThread(uint32_t index, nvid_ctx *ctx) :
|
||||
m_blocks(CudaLib::deviceInt(ctx, CudaLib::DeviceBlocks)),
|
||||
m_datasetHost(CudaLib::deviceInt(ctx, CudaLib::DeviceDatasetHost)),
|
||||
m_threads(CudaLib::deviceInt(ctx, CudaLib::DeviceThreads)),
|
||||
m_index(index),
|
||||
m_bfactor(CudaLib::deviceUint(ctx, CudaLib::DeviceBFactor)),
|
||||
m_bsleep(CudaLib::deviceUint(ctx, CudaLib::DeviceBSleep)),
|
||||
m_dataset_host(CudaLib::deviceInt(ctx, CudaLib::DeviceDatasetHost) != 0)
|
||||
m_bsleep(CudaLib::deviceUint(ctx, CudaLib::DeviceBSleep))
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -81,13 +81,13 @@ xmrig::CudaThread::CudaThread(uint32_t index, nvid_ctx *ctx) :
|
|||
|
||||
bool xmrig::CudaThread::isEqual(const CudaThread &other) const
|
||||
{
|
||||
return m_blocks == other.m_blocks &&
|
||||
m_threads == other.m_threads &&
|
||||
m_affinity == other.m_affinity &&
|
||||
m_index == other.m_index &&
|
||||
m_bfactor == other.m_bfactor &&
|
||||
m_bsleep == other.m_bsleep &&
|
||||
m_dataset_host == other.m_dataset_host;
|
||||
return m_blocks == other.m_blocks &&
|
||||
m_threads == other.m_threads &&
|
||||
m_affinity == other.m_affinity &&
|
||||
m_index == other.m_index &&
|
||||
m_bfactor == other.m_bfactor &&
|
||||
m_bsleep == other.m_bsleep &&
|
||||
m_datasetHost == other.m_datasetHost;
|
||||
}
|
||||
|
||||
|
||||
|
@ -104,7 +104,10 @@ rapidjson::Value xmrig::CudaThread::toJSON(rapidjson::Document &doc) const
|
|||
out.AddMember(StringRef(kBFactor), bfactor(), allocator);
|
||||
out.AddMember(StringRef(kBSleep), bsleep(), allocator);
|
||||
out.AddMember(StringRef(kAffinity), affinity(), allocator);
|
||||
out.AddMember(StringRef(kDatasetHost), dataset_host(), allocator);
|
||||
|
||||
if (m_datasetHost >= 0) {
|
||||
out.AddMember(StringRef(kDatasetHost), m_datasetHost > 0, allocator);
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue