Browse Source

Set OpenCL sealer when -G is selected

cl-refactor
Lefteris Karapetsas 10 years ago
parent
commit
8c039ccef6
  1. 8
      libethereum/Client.cpp
  2. 2
      libethereum/Client.h

8
libethereum/Client.cpp

@ -461,6 +461,14 @@ void Client::setShouldPrecomputeDAG(bool _precompute)
sealEngine()->setOption("precomputeDAG", _precompute ? trueBytes: falseBytes);
}
void Client::setTurboMining(bool _enable)
{
m_turboMining = _enable;
sealEngine()->setSealer("opencl");
if (isMining())
startMining();
}
bool Client::isMining() const
{
return Ethash::isWorking(m_sealEngine.get());

2
libethereum/Client.h

@ -135,7 +135,7 @@ public:
/// Are we allowed to GPU mine?
bool turboMining() const { return m_turboMining; }
/// Enable/disable GPU mining.
void setTurboMining(bool _enable = true) { m_turboMining = _enable; if (isMining()) startMining(); }
void setTurboMining(bool _enable = true);
/// Enable/disable precomputing of the DAG for next epoch
void setShouldPrecomputeDAG(bool _precompute);

Loading…
Cancel
Save