/* This file is part of progminer. progminer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. progminer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with progminer. If not, see . */ #pragma once #include #include #include #include namespace dev { namespace eth { class CPUMiner : public Miner { public: CPUMiner(unsigned _index, CPSettings _settings, DeviceDescriptor& _device); ~CPUMiner() override; static unsigned getNumDevices(); static void enumDevices(std::map& _DevicesCollection); void search(const dev::eth::WorkPackage& w); protected: bool initDevice() override; bool initEpoch_internal() override; void kick_miner() override; private: atomic m_new_work = {false}; void workLoop() override; CPSettings m_settings; }; } // namespace eth } // namespace dev