C# Class BitMaker.Miner.Cpu.CpuMiner

CPU miner base class which provides a place to plug in the search algorithm.
Inheritance: IMiner
Show file Open project: wasabii/BitMaker

Public Methods

Method Description
Search ( Work work, uint round1State, byte round1Block2, uint round2State, byte round2Block1 ) : uint?

Searches a set of broken apart work for a nonce solution, and returns it. If no solution is found, returns null.

Start ( ) : void

Starts a single thread to pull and process work.

Stop ( ) : void

Stops the miner from running.

Protected Methods

Method Description
CpuMiner ( IMinerContext context, CpuDevice cpu ) : System

Initializes a new instance.

Private Methods

Method Description
PrepareWork ( Work work, byte &round1Blocks, uint &round1State, byte &round2Blocks, uint &round2State ) : void

Prepares the buffers for processing a work item.

Work ( Work work ) : void

Attempts to solve the given work with the specified solver.

WorkThread ( ) : void

Entry point for a standard work thread.

Method Details

CpuMiner() protected method

Initializes a new instance.
protected CpuMiner ( IMinerContext context, CpuDevice cpu ) : System
context IMinerContext
cpu CpuDevice
return System

Search() public abstract method

Searches a set of broken apart work for a nonce solution, and returns it. If no solution is found, returns null.
public abstract Search ( Work work, uint round1State, byte round1Block2, uint round2State, byte round2Block1 ) : uint?
work Work
round1State uint
round1Block2 byte
round2State uint
round2Block1 byte
return uint?

Start() public method

Starts a single thread to pull and process work.
public Start ( ) : void
return void

Stop() public method

Stops the miner from running.
public Stop ( ) : void
return void