Browse Source

Use single GPU mining thread when --opencl-device is chosen

cl-refactor
Genoil 10 years ago
parent
commit
9648529ef4
  1. 1
      eth/main.cpp
  2. 2
      libethcore/Ethash.cpp

1
eth/main.cpp

@ -612,6 +612,7 @@ int main(int argc, char** argv)
else if (arg == "--opencl-device" && i + 1 < argc)
try {
openclDevice = stol(argv[++i]);
miningThreads = 1;
}
catch (...)
{

2
libethcore/Ethash.cpp

@ -311,7 +311,7 @@ void Ethash::GPUMiner::workLoop()
auto p = EthashAux::params(m_minerSeed);
auto cb = [&](void* d) { EthashAux::full(m_minerSeed, bytesRef((byte*)d, p.full_size)); };
unsigned device = instances() > 0 ? index() : s_deviceId;
unsigned device = instances() > 1 ? index() : s_deviceId;
m_miner->init(p, cb, 32, s_platformId, device);
}

Loading…
Cancel
Save