Print OpenCL platform and devices in summary.

This commit is contained in:
XMRig 2019-08-23 17:28:48 +07:00
parent ebdf650450
commit 92bc46f232
3 changed files with 55 additions and 20 deletions

View file

@ -165,7 +165,7 @@ void xmrig::OclConfig::read(const rapidjson::Value &value)
setPlatform(Json::getValue(value, kPlatform));
if (!m_threads.read(value)) {
if (isEnabled() && !m_threads.read(value)) {
generate();
}
}
@ -180,9 +180,14 @@ void xmrig::OclConfig::read(const rapidjson::Value &value)
void xmrig::OclConfig::generate()
{
OclLib::init(loader());
if (!OclLib::init(loader())) {
return;
}
const auto devices = platform().devices();
if (devices.empty()) {
return;
}
m_shouldSave = true;