diff --git a/ethminer/MinerAux.h b/ethminer/MinerAux.h index edfd2ad3f..964a23635 100644 --- a/ethminer/MinerAux.h +++ b/ethminer/MinerAux.h @@ -356,9 +356,9 @@ public: << " --current-block Let the miner know the current block number at configuration time. Will help determine DAG size and required GPU memory." << endl #if ETH_ETHASHCL || !ETH_TRUE << " --cl-extragpu-mem Set the memory (in MB) you believe your GPU requires for stuff other than mining. Windows rendering e.t.c.." << endl - << " --cl-local-work Set the OpenCL local work size. Default is " << toString(ethash_cl_miner::defaultLocalWorkSize) << endl - << " --cl-global-work Set the OpenCL global work size as a multiple of the local work size. Default is " << toString(ethash_cl_miner::defaultGlobalWorkSizeMultiplier) << " * " << toString(ethash_cl_miner::defaultLocalWorkSize) << endl - << " --cl-ms-per-batch Set the OpenCL target milliseconds per batch (global workgroup size). Default is " << toString(ethash_cl_miner::defaultMSPerBatch) << ". If 0 is given then no autoadjustment of global work size will happen" << endl + << " --cl-local-work Set the OpenCL local work size. Default is " << toString(ethash_cl_miner::c_defaultLocalWorkSize) << endl + << " --cl-global-work Set the OpenCL global work size as a multiple of the local work size. Default is " << toString(ethash_cl_miner::c_defaultGlobalWorkSizeMultiplier) << " * " << toString(ethash_cl_miner::c_defaultLocalWorkSize) << endl + << " --cl-ms-per-batch Set the OpenCL target milliseconds per batch (global workgroup size). Default is " << toString(ethash_cl_miner::c_defaultMSPerBatch) << ". If 0 is given then no autoadjustment of global work size will happen" << endl #endif ; } @@ -549,9 +549,9 @@ private: bool m_shouldListDevices = false; bool m_clAllowCPU = false; #if ETH_ETHASHCL || !ETH_TRUE - unsigned m_globalWorkSizeMultiplier = ethash_cl_miner::defaultGlobalWorkSizeMultiplier; - unsigned m_localWorkSize = ethash_cl_miner::defaultLocalWorkSize; - unsigned m_msPerBatch = ethash_cl_miner::defaultMSPerBatch; + unsigned m_globalWorkSizeMultiplier = ethash_cl_miner::c_defaultGlobalWorkSizeMultiplier; + unsigned m_localWorkSize = ethash_cl_miner::c_defaultLocalWorkSize; + unsigned m_msPerBatch = ethash_cl_miner::c_defaultMSPerBatch; #endif boost::optional m_currentBlock; // default value is 350MB of GPU memory for other stuff (windows system rendering, e.t.c.) diff --git a/libethash-cl/ethash_cl_miner.cpp b/libethash-cl/ethash_cl_miner.cpp index 0e5e8a214..44cbf65e9 100644 --- a/libethash-cl/ethash_cl_miner.cpp +++ b/libethash-cl/ethash_cl_miner.cpp @@ -50,9 +50,9 @@ using namespace std; -const unsigned ethash_cl_miner::defaultLocalWorkSize = 64; -const unsigned ethash_cl_miner::defaultGlobalWorkSizeMultiplier = 4096; // * CL_DEFAULT_LOCAL_WORK_SIZE -const unsigned ethash_cl_miner::defaultMSPerBatch = 0; +const unsigned ethash_cl_miner::c_defaultLocalWorkSize = 64; +const unsigned ethash_cl_miner::c_defaultGlobalWorkSizeMultiplier = 4096; // * CL_DEFAULT_LOCAL_WORK_SIZE +const unsigned ethash_cl_miner::c_defaultMSPerBatch = 0; // TODO: If at any point we can use libdevcore in here then we should switch to using a LogChannel #define ETHCL_LOG(_contents) cout << "[OPENCL]:" << _contents << endl @@ -185,9 +185,9 @@ bool ethash_cl_miner::configureGPU( bool ethash_cl_miner::s_allowCPU = false; unsigned ethash_cl_miner::s_extraRequiredGPUMem; -unsigned ethash_cl_miner::s_msPerBatch = ethash_cl_miner::defaultMSPerBatch; -unsigned ethash_cl_miner::s_workgroupSize = ethash_cl_miner::defaultLocalWorkSize; -unsigned ethash_cl_miner::s_initialGlobalWorkSize = ethash_cl_miner::defaultGlobalWorkSizeMultiplier * ethash_cl_miner::defaultLocalWorkSize; +unsigned ethash_cl_miner::s_msPerBatch = ethash_cl_miner::c_defaultMSPerBatch; +unsigned ethash_cl_miner::s_workgroupSize = ethash_cl_miner::c_defaultLocalWorkSize; +unsigned ethash_cl_miner::s_initialGlobalWorkSize = ethash_cl_miner::c_defaultGlobalWorkSizeMultiplier * ethash_cl_miner::c_defaultLocalWorkSize; bool ethash_cl_miner::searchForAllDevices(function _callback) { diff --git a/libethash-cl/ethash_cl_miner.h b/libethash-cl/ethash_cl_miner.h index 06e8550b1..1dd1ea406 100644 --- a/libethash-cl/ethash_cl_miner.h +++ b/libethash-cl/ethash_cl_miner.h @@ -67,11 +67,11 @@ public: /* -- default values -- */ /// Default value of the local work size. Also known as workgroup size. - static const unsigned defaultLocalWorkSize; + static const unsigned c_defaultLocalWorkSize; /// Default value of the global work size as a multiplier of the local work size - static const unsigned defaultGlobalWorkSizeMultiplier; + static const unsigned c_defaultGlobalWorkSizeMultiplier; /// Default value of the milliseconds per global work size (per batch) - static const unsigned defaultMSPerBatch; + static const unsigned c_defaultMSPerBatch; private: