Browse Source

...

cl-refactor
Genoil 9 years ago
parent
commit
adf32e82f8
  1. 10
      ethminer/MinerAux.h
  2. 1
      libethash-cl/ethash_cl_miner.cpp
  3. 4
      libstratum/EthStratumClient.cpp
  4. 2
      libstratum/EthStratumClient.h

10
ethminer/MinerAux.h

@ -583,15 +583,17 @@ public:
#if ETH_JSONRPC || !ETH_TRUE
<< "Work farming mode:" << endl
<< " -F,--farm <url> Put into mining farm mode with the work server at URL (default: http://127.0.0.1:8545)" << endl
<< " -FF,--farm-failover <url> Failover farm URL (default: disabled)" << endl
<< " -FF,-FO, --farm-failover, --stratum-failover <url> Failover getwork/stratum URL (default: disabled)" << endl
<< " --farm-retries <n> Number of retries until switch to failover (default: 3)" << endl
#endif
#if ETH_STRATUM || !ETH_TRUE
<< " -S, --stratum <host:port> Put into stratum mode with the stratum server at host:port" << endl
<< " -FS, --failover-stratum <host:port> Failover stratum server at host:port" << endl
<< " -O, --userpass <username.workername:password> Stratum login credentials" << endl
<< " -FO, --failover-userpass <username.workername:password> Failover stratum login credentials (optional, will use normal credentials when omitted)" << endl
#endif
#if ETH_JSONRPC || ETH_STRATUM || !ETH_TRUE
<< " --farm-recheck <n> Leave n ms between checks for changed work (default: 500)." << endl
<< " --farm-recheck <n> Leave n ms between checks for changed work (default: 500). When using stratum, use a high value (i.e. 2000) to get more stable hashrate output" << endl
<< " --no-precompute Don't precompute the next epoch's DAG." << endl
#endif
<< "Ethash verify mode:" << endl
@ -627,7 +629,7 @@ public:
<< " --list-devices List the detected OpenCL/CUDA devices and exit. Should be combined with -G or -U flag" << endl
<< " --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-extragpu-mem Set the memory (in MB) you believe your GPU requires for stuff other than mining. default: 0" << 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
#endif
@ -990,7 +992,7 @@ private:
sealers["cuda"] = GenericFarm<EthashProofOfWork>::SealerDescriptor{ &EthashCUDAMiner::instances, [](GenericMiner<EthashProofOfWork>::ConstructionInfo ci){ return new EthashCUDAMiner(ci); } };
#endif
GenericFarm<EthashProofOfWork> f;
EthStratumClient client(&f, m_minerType, m_farmURL, m_port, m_user, m_pass, m_maxFarmRetries);
EthStratumClient client(&f, m_minerType, m_farmURL, m_port, m_user, m_pass, m_maxFarmRetries, m_precompute);
if (m_farmFailOverURL != "")
{
if (m_fuser != "")

1
libethash-cl/ethash_cl_miner.cpp

@ -376,7 +376,6 @@ bool ethash_cl_miner::init(
computeCapability = computeCapabilityMajor * 10 + computeCapabilityMinor;
int maxregs = computeCapability >= 35 ? 72 : 63;
//printf("-cl-nv-maxrregcount=%d -cl-nv-arch sm_%d -cl-nv-verbose", maxregs, computeCapability);
sprintf(options, "-cl-nv-verbose -cl-nv-maxrregcount=%d", maxregs);// , computeCapability);
}

4
libstratum/EthStratumClient.cpp

@ -4,7 +4,7 @@
using boost::asio::ip::tcp;
EthStratumClient::EthStratumClient(GenericFarm<EthashProofOfWork> * f, MinerType m, string const & host, string const & port, string const & user, string const & pass, int const & retries)
EthStratumClient::EthStratumClient(GenericFarm<EthashProofOfWork> * f, MinerType m, string const & host, string const & port, string const & user, string const & pass, int const & retries, bool const & precompute)
: m_socket(m_io_service)
{
m_minerType = m;
@ -17,7 +17,7 @@ EthStratumClient::EthStratumClient(GenericFarm<EthashProofOfWork> * f, MinerType
m_authorized = false;
m_connected = false;
m_precompute = true;
m_precompute = precompute;
m_pending = 0;
m_maxRetries = retries;

2
libstratum/EthStratumClient.h

@ -27,7 +27,7 @@ typedef struct {
class EthStratumClient
{
public:
EthStratumClient(GenericFarm<EthashProofOfWork> * f, MinerType m, string const & host, string const & port, string const & user, string const & pass, int const & retries);
EthStratumClient(GenericFarm<EthashProofOfWork> * f, MinerType m, string const & host, string const & port, string const & user, string const & pass, int const & retries, bool const & precompute);
~EthStratumClient();
void setFailover(string const & host, string const & port);

Loading…
Cancel
Save