mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 10:01:06 +00:00
Don't generate CUDA config on fly.
This commit is contained in:
parent
7889634b40
commit
99fe304c1f
1 changed files with 6 additions and 0 deletions
|
@ -35,6 +35,7 @@
|
|||
namespace xmrig {
|
||||
|
||||
|
||||
static bool generated = false;
|
||||
static const char *kDevicesHint = "devices-hint";
|
||||
static const char *kEnabled = "enabled";
|
||||
static const char *kLoader = "loader";
|
||||
|
@ -113,6 +114,10 @@ void xmrig::CudaConfig::read(const rapidjson::Value &value)
|
|||
|
||||
void xmrig::CudaConfig::generate()
|
||||
{
|
||||
if (generated) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isEnabled() || m_threads.has("*")) {
|
||||
return;
|
||||
}
|
||||
|
@ -138,6 +143,7 @@ void xmrig::CudaConfig::generate()
|
|||
count += xmrig::generate<Algorithm::CN_PICO>(m_threads, devices);
|
||||
count += xmrig::generate<Algorithm::RANDOM_X>(m_threads, devices);
|
||||
|
||||
generated = true;
|
||||
m_shouldSave = count > 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue