Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Attributes | List of all members
dev::eth::EthashCPUMiner Class Reference

#include <EthashCPUMiner.h>

Inheritance diagram for dev::eth::EthashCPUMiner:
[legend]
Collaboration diagram for dev::eth::EthashCPUMiner:
[legend]

Public Member Functions

 EthashCPUMiner (GenericMiner< EthashProofOfWork >::ConstructionInfo const &_ci)
 
 ~EthashCPUMiner ()
 
- Public Member Functions inherited from dev::eth::GenericMiner< EthashProofOfWork >
 GenericMiner (ConstructionInfo const &_ci)
 
virtual ~GenericMiner ()
 
void setWork (WorkPackage const &_work=WorkPackage())
 
uint64_t hashCount () const
 
void resetHashCount ()
 
unsigned index () const
 

Static Public Member Functions

static unsigned instances ()
 
static std::string platformInfo ()
 
static void listDevices ()
 
static bool configureGPU (unsigned, unsigned, unsigned, unsigned, unsigned, bool, unsigned, uint64_t)
 
static void setNumInstances (unsigned _instances)
 

Protected Member Functions

void kickOff () override
 Begin working on a given work package, discarding any previous work. More...
 
void pause () override
 No work left to be done. More...
 
- Protected Member Functions inherited from dev::eth::GenericMiner< EthashProofOfWork >
bool submitProof (Solution const &_s)
 Notes that the Miner found a solution. More...
 
WorkPackage const & work () const
 
void accumulateHashes (unsigned _n)
 

Private Member Functions

void workLoop () override
 Overrides doWork(); should call shouldStop() often and exit when true. More...
 
- Private Member Functions inherited from dev::Worker
 Worker (std::string const &_name="anon", unsigned _idleWaitMs=30)
 
 Worker (Worker &&_m)
 Move-constructor. More...
 
Workeroperator= (Worker &&_m)
 Move-assignment. More...
 
virtual ~Worker ()
 
void setName (std::string _n)
 Allows changing worker name if work is stopped. More...
 
void startWorking ()
 Starts worker thread; causes startedWorking() to be called. More...
 
void stopWorking ()
 Stop worker thread; causes call to stopWorking(). More...
 
bool isWorking () const
 Returns if worker thread is present. More...
 
virtual void startedWorking ()
 Called after thread is started from startWorking(). More...
 
virtual void doWork ()
 Called continuously following sleep for m_idleWaitMs. More...
 
bool shouldStop () const
 
virtual void doneWorking ()
 Called when is to be stopped, just prior to thread being joined. More...
 

Static Private Attributes

static unsigned s_numInstances = 0
 

Additional Inherited Members

- Public Types inherited from dev::eth::GenericMiner< EthashProofOfWork >
using WorkPackage = typename EthashProofOfWork::WorkPackage
 
using Solution = typename EthashProofOfWork::Solution
 
using FarmFace = GenericFarmFace< EthashProofOfWork >
 
using ConstructionInfo = std::pair< FarmFace *, unsigned >
 

Detailed Description

Definition at line 35 of file EthashCPUMiner.h.

Constructor & Destructor Documentation

EthashCPUMiner::EthashCPUMiner ( GenericMiner< EthashProofOfWork >::ConstructionInfo const &  _ci)

Definition at line 57 of file EthashCPUMiner.cpp.

EthashCPUMiner::~EthashCPUMiner ( )

Definition at line 62 of file EthashCPUMiner.cpp.

Member Function Documentation

static bool dev::eth::EthashCPUMiner::configureGPU ( unsigned  ,
unsigned  ,
unsigned  ,
unsigned  ,
unsigned  ,
bool  ,
unsigned  ,
uint64_t   
)
inlinestatic

Definition at line 44 of file EthashCPUMiner.h.

static unsigned dev::eth::EthashCPUMiner::instances ( )
inlinestatic

Definition at line 41 of file EthashCPUMiner.h.

Here is the call graph for this function:

void EthashCPUMiner::kickOff ( )
overrideprotectedvirtual

Begin working on a given work package, discarding any previous work.

Parameters
_workThe package for which to find a solution.

Implements dev::eth::GenericMiner< EthashProofOfWork >.

Definition at line 66 of file EthashCPUMiner.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void dev::eth::EthashCPUMiner::listDevices ( )
inlinestatic

Definition at line 43 of file EthashCPUMiner.h.

void EthashCPUMiner::pause ( )
overrideprotectedvirtual

No work left to be done.

Pause until told to kickOff().

Implements dev::eth::GenericMiner< EthashProofOfWork >.

Definition at line 72 of file EthashCPUMiner.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string EthashCPUMiner::platformInfo ( )
static

Definition at line 108 of file EthashCPUMiner.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void dev::eth::EthashCPUMiner::setNumInstances ( unsigned  _instances)
inlinestatic

Definition at line 45 of file EthashCPUMiner.h.

Here is the call graph for this function:

void EthashCPUMiner::workLoop ( )
overrideprivatevirtual

Overrides doWork(); should call shouldStop() often and exit when true.

Reimplemented from dev::Worker.

Definition at line 77 of file EthashCPUMiner.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

unsigned EthashCPUMiner::s_numInstances = 0
staticprivate

Definition at line 53 of file EthashCPUMiner.h.


The documentation for this class was generated from the following files: