diff --git a/ethminer/MinerAux.h b/ethminer/MinerAux.h index 964a23635..80886cd7a 100644 --- a/ethminer/MinerAux.h +++ b/ethminer/MinerAux.h @@ -553,7 +553,7 @@ private: unsigned m_localWorkSize = ethash_cl_miner::c_defaultLocalWorkSize; unsigned m_msPerBatch = ethash_cl_miner::c_defaultMSPerBatch; #endif - boost::optional m_currentBlock; + uint64_t m_currentBlock = 0; // default value is 350MB of GPU memory for other stuff (windows system rendering, e.t.c.) unsigned m_extraGPUMemory = 350000000; diff --git a/libethash-cl/ethash_cl_miner.cpp b/libethash-cl/ethash_cl_miner.cpp index 8e2a7dc4d..942819ba8 100644 --- a/libethash-cl/ethash_cl_miner.cpp +++ b/libethash-cl/ethash_cl_miner.cpp @@ -149,7 +149,7 @@ bool ethash_cl_miner::configureGPU( unsigned _msPerBatch, bool _allowCPU, unsigned _extraGPUMemory, - boost::optional _currentBlock + uint64_t _currentBlock ) { s_workgroupSize = _localWorkSize; @@ -158,7 +158,7 @@ bool ethash_cl_miner::configureGPU( s_allowCPU = _allowCPU; s_extraRequiredGPUMem = _extraGPUMemory; // by default let's only consider the DAG of the first epoch - uint64_t dagSize = _currentBlock ? ethash_get_datasize(*_currentBlock) : 1073739904U; + uint64_t dagSize = ethash_get_datasize(_currentBlock); uint64_t requiredSize = dagSize + _extraGPUMemory; return searchForAllDevices(_platformId, [&requiredSize](cl::Device const _device) -> bool { diff --git a/libethash-cl/ethash_cl_miner.h b/libethash-cl/ethash_cl_miner.h index 094541cf9..fb28dc04b 100644 --- a/libethash-cl/ethash_cl_miner.h +++ b/libethash-cl/ethash_cl_miner.h @@ -1,6 +1,6 @@ #pragma once -#define __CL_ENABLE_EXCEPTIONS +#define __CL_ENABLE_EXCEPTIONS #define CL_USE_DEPRECATED_OPENCL_2_0_APIS #if defined(__clang__) @@ -12,7 +12,6 @@ #include "cl.hpp" #endif -#include #include #include #include @@ -50,7 +49,7 @@ public: unsigned _msPerBatch, bool _allowCPU, unsigned _extraGPUMemory, - boost::optional _currentBlock + uint64_t _currentBlock ); bool init( diff --git a/libethcore/Ethash.cpp b/libethcore/Ethash.cpp index fc0e07f12..9be76926d 100644 --- a/libethcore/Ethash.cpp +++ b/libethcore/Ethash.cpp @@ -416,7 +416,7 @@ bool Ethash::GPUMiner::configureGPU( unsigned _deviceId, bool _allowCPU, unsigned _extraGPUMemory, - boost::optional _currentBlock + uint64_t _currentBlock ) { s_platformId = _platformId; diff --git a/libethcore/Ethash.h b/libethcore/Ethash.h index e9ddf16ca..7ffd887d0 100644 --- a/libethcore/Ethash.h +++ b/libethcore/Ethash.h @@ -88,7 +88,7 @@ public: static unsigned instances() { return s_numInstances > 0 ? s_numInstances : std::thread::hardware_concurrency(); } static std::string platformInfo(); static void listDevices() {} - static bool configureGPU(unsigned, unsigned, unsigned, unsigned, unsigned, bool, unsigned, boost::optional) { return false; } + static bool configureGPU(unsigned, unsigned, unsigned, unsigned, unsigned, bool, unsigned, uint64_t) { return false; } static void setNumInstances(unsigned _instances) { s_numInstances = std::min(_instances, std::thread::hardware_concurrency()); } protected: void kickOff() override @@ -125,7 +125,7 @@ public: unsigned _deviceId, bool _allowCPU, unsigned _extraGPUMemory, - boost::optional _currentBlock + uint64_t _currentBlock ); static void setNumInstances(unsigned _instances) { s_numInstances = std::min(_instances, getNumDevices()); }