progminer zano miner fork https://github.com/hyle-team/progminer
This commit is contained in:
54
zano/libethash-cpu/CPUMiner.h
Normal file
54
zano/libethash-cpu/CPUMiner.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <libdevcore/Worker.h>
|
||||
#include <libethcore/EthashAux.h>
|
||||
#include <libethcore/Miner.h>
|
||||
|
||||
#include <functional>
|
||||
|
||||
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<string, DeviceDescriptor>& _DevicesCollection);
|
||||
|
||||
void search(const dev::eth::WorkPackage& w);
|
||||
|
||||
protected:
|
||||
bool initDevice() override;
|
||||
bool initEpoch_internal() override;
|
||||
void kick_miner() override;
|
||||
|
||||
private:
|
||||
atomic<bool> m_new_work = {false};
|
||||
void workLoop() override;
|
||||
CPSettings m_settings;
|
||||
};
|
||||
|
||||
|
||||
} // namespace eth
|
||||
} // namespace dev
|
Reference in New Issue
Block a user