|
|
@ -33,9 +33,8 @@ using namespace eth; |
|
|
|
|
|
|
|
namespace dev |
|
|
|
{ |
|
|
|
namespace eth |
|
|
|
{ |
|
|
|
|
|
|
|
namespace eth |
|
|
|
{ |
|
|
|
class EthashCUHook : public ethash_cu_miner::search_hook |
|
|
|
{ |
|
|
|
public: |
|
|
@ -96,8 +95,7 @@ namespace dev |
|
|
|
Notified<bool> m_aborted = { true }; |
|
|
|
EthashCUDAMiner* m_owner = nullptr; |
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
unsigned EthashCUDAMiner::s_platformId = 0; |
|
|
@ -105,10 +103,9 @@ unsigned EthashCUDAMiner::s_deviceId = 0; |
|
|
|
unsigned EthashCUDAMiner::s_numInstances = 0; |
|
|
|
int EthashCUDAMiner::s_devices[16] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; |
|
|
|
|
|
|
|
|
|
|
|
EthashCUDAMiner::EthashCUDAMiner(ConstructionInfo const& _ci) : |
|
|
|
GenericMiner<EthashProofOfWork>(_ci), |
|
|
|
Worker("cudaminer" + toString(index())), |
|
|
|
GenericMiner<EthashProofOfWork>(_ci), |
|
|
|
Worker("cudaminer" + toString(index())), |
|
|
|
m_hook( new EthashCUHook(this)) |
|
|
|
{ |
|
|
|
} |
|
|
@ -212,13 +209,11 @@ bool EthashCUDAMiner::configureGPU( |
|
|
|
) |
|
|
|
{ |
|
|
|
s_deviceId = _deviceId; |
|
|
|
|
|
|
|
if (_blockSize != 32 && _blockSize != 64 && _blockSize != 128) |
|
|
|
{ |
|
|
|
cout << "Given localWorkSize of " << toString(_blockSize) << "is invalid. Must be either 32,64 or 128" << endl; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
if (!ethash_cu_miner::configureGPU( |
|
|
|
_blockSize, |
|
|
|
_gridSize, |
|
|
|