Browse Source

Fix style issues

cl-refactor
bargst 10 years ago
parent
commit
a5e8a6a760
  1. 6
      libethash-cl/ethash_cl_miner.cpp

6
libethash-cl/ethash_cl_miner.cpp

@ -316,7 +316,7 @@ bool ethash_cl_miner::init(
// remember the device's address bits // remember the device's address bits
m_deviceBits = device.getInfo<CL_DEVICE_ADDRESS_BITS>(); m_deviceBits = device.getInfo<CL_DEVICE_ADDRESS_BITS>();
// make sure first step of global work size adjustment is large enough // make sure first step of global work size adjustment is large enough
m_stepWorkSizeAdjust = pow(2, m_deviceBits/2+1); m_stepWorkSizeAdjust = pow(2, m_deviceBits / 2 + 1);
// patch source code // patch source code
// note: ETHASH_CL_MINER_KERNEL is simply ethash_cl_miner_kernel.cl compiled // note: ETHASH_CL_MINER_KERNEL is simply ethash_cl_miner_kernel.cl compiled
@ -523,7 +523,7 @@ void ethash_cl_miner::search(uint8_t const* header, uint64_t target, search_hook
if (d > chrono::milliseconds(s_msPerBatch * 10 / 9)) if (d > chrono::milliseconds(s_msPerBatch * 10 / 9))
{ {
// Divide the step by 2 when adjustment way change // Divide the step by 2 when adjustment way change
if (m_wayWorkSizeAdjust > -1 ) if (m_wayWorkSizeAdjust > -1)
m_stepWorkSizeAdjust = max<unsigned>(1, m_stepWorkSizeAdjust / 2); m_stepWorkSizeAdjust = max<unsigned>(1, m_stepWorkSizeAdjust / 2);
m_wayWorkSizeAdjust = -1; m_wayWorkSizeAdjust = -1;
// cerr << "m_stepWorkSizeAdjust: " << m_stepWorkSizeAdjust << ", m_wayWorkSizeAdjust: " << m_wayWorkSizeAdjust << endl; // cerr << "m_stepWorkSizeAdjust: " << m_stepWorkSizeAdjust << ", m_wayWorkSizeAdjust: " << m_wayWorkSizeAdjust << endl;
@ -535,7 +535,7 @@ void ethash_cl_miner::search(uint8_t const* header, uint64_t target, search_hook
else if (d < chrono::milliseconds(s_msPerBatch * 9 / 10)) else if (d < chrono::milliseconds(s_msPerBatch * 9 / 10))
{ {
// Divide the step by 2 when adjustment way change // Divide the step by 2 when adjustment way change
if (m_wayWorkSizeAdjust < 1 ) if (m_wayWorkSizeAdjust < 1)
m_stepWorkSizeAdjust = max<unsigned>(1, m_stepWorkSizeAdjust / 2); m_stepWorkSizeAdjust = max<unsigned>(1, m_stepWorkSizeAdjust / 2);
m_wayWorkSizeAdjust = 1; m_wayWorkSizeAdjust = 1;
// cerr << "m_stepWorkSizeAdjust: " << m_stepWorkSizeAdjust << ", m_wayWorkSizeAdjust: " << m_wayWorkSizeAdjust << endl; // cerr << "m_stepWorkSizeAdjust: " << m_stepWorkSizeAdjust << ", m_wayWorkSizeAdjust: " << m_wayWorkSizeAdjust << endl;

Loading…
Cancel
Save