Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
GPUSolver Class Reference

#include <libgpusolver.h>

Collaboration diagram for GPUSolver:
[legend]

Public Member Functions

 GPUSolver ()
 
 GPUSolver (unsigned platform, unsigned device)
 
 ~GPUSolver ()
 
bool run (unsigned int n, unsigned int k, uint8_t *header, size_t header_len, uint256 nonce, const std::function< bool(std::vector< unsigned char >)> validBlock, const std::function< bool(GPUSolverCancelCheck)> cancelled, crypto_generichash_blake2b_state base_state)
 
 GPUSolver (unsigned int n, unsigned k)
 
 GPUSolver (unsigned platform, unsigned device, unsigned int n, unsigned int k)
 
 ~GPUSolver ()
 
std::pair< int, int > getparam ()
 
bool run (unsigned int n, unsigned int k, uint8_t *header, size_t header_len, uint256 nonce, const std::function< bool(std::vector< unsigned char >)> validBlock, const std::function< bool(GPUSolverCancelCheck)> cancelled, crypto_generichash_blake2b_state base_state)
 

Private Member Functions

bool GPUSolve (unsigned int n, unsigned int k, uint8_t *header, size_t header_len, uint256 &nonce, const std::function< bool(std::vector< unsigned char >)> validBlock, const std::function< bool(GPUSolverCancelCheck)> cancelled, crypto_generichash_blake2b_state base_state)
 
bool GPUSolve (unsigned int n, unsigned int k, uint8_t *header, size_t header_len, uint256 &nonce, const std::function< bool(std::vector< unsigned char >)> validBlock, const std::function< bool(GPUSolverCancelCheck)> cancelled, crypto_generichash_blake2b_state base_state)
 

Private Attributes

cl_gpuminerminer
 
bool GPU
 
bool initOK
 
sols_tindices
 
uint32_t n_sol
 
uint32_t counter = 0
 
float sum = 0.f
 
float avg = 0.f
 

Static Private Attributes

static const uint32_t PROOFSIZE = 1 << PARAM_K
 

Detailed Description

Definition at line 63 of file libgpusolver.h.

Constructor & Destructor Documentation

GPUSolver::GPUSolver ( )

Definition at line 44 of file libgpusolver.cpp.

Here is the call graph for this function:

GPUSolver::GPUSolver ( unsigned  platform,
unsigned  device 
)

Definition at line 69 of file libgpusolver.cpp.

Here is the call graph for this function:

GPUSolver::~GPUSolver ( )

Definition at line 108 of file libgpusolver.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

GPUSolver::GPUSolver ( unsigned int  n,
unsigned  k 
)

Definition at line 44 of file libgpusolver.cpp.

Here is the call graph for this function:

GPUSolver::GPUSolver ( unsigned  platform,
unsigned  device,
unsigned int  n,
unsigned int  k 
)

Definition at line 78 of file libgpusolver.cpp.

Here is the call graph for this function:

GPUSolver::~GPUSolver ( )

Member Function Documentation

std::pair<int, int> GPUSolver::getparam ( )
inline

Definition at line 66 of file libgpusolver.h.

Here is the caller graph for this function:

bool GPUSolver::GPUSolve ( unsigned int  n,
unsigned int  k,
uint8_t *  header,
size_t  header_len,
uint256 nonce,
const std::function< bool(std::vector< unsigned char >)>  validBlock,
const std::function< bool(GPUSolverCancelCheck)>  cancelled,
crypto_generichash_blake2b_state  base_state 
)
private

Definition at line 132 of file libgpusolver.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool GPUSolver::GPUSolve ( unsigned int  n,
unsigned int  k,
uint8_t *  header,
size_t  header_len,
uint256 nonce,
const std::function< bool(std::vector< unsigned char >)>  validBlock,
const std::function< bool(GPUSolverCancelCheck)>  cancelled,
crypto_generichash_blake2b_state  base_state 
)
private
bool GPUSolver::run ( unsigned int  n,
unsigned int  k,
uint8_t *  header,
size_t  header_len,
uint256  nonce,
const std::function< bool(std::vector< unsigned char >)>  validBlock,
const std::function< bool(GPUSolverCancelCheck)>  cancelled,
crypto_generichash_blake2b_state  base_state 
)

Definition at line 120 of file libgpusolver.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool GPUSolver::run ( unsigned int  n,
unsigned int  k,
uint8_t *  header,
size_t  header_len,
uint256  nonce,
const std::function< bool(std::vector< unsigned char >)>  validBlock,
const std::function< bool(GPUSolverCancelCheck)>  cancelled,
crypto_generichash_blake2b_state  base_state 
)

Member Data Documentation

float GPUSolver::avg = 0.f
private

Definition at line 85 of file libgpusolver.h.

uint32_t GPUSolver::counter = 0
private

Definition at line 83 of file libgpusolver.h.

bool GPUSolver::GPU
private

Definition at line 76 of file libgpusolver.h.

sols_t * GPUSolver::indices
private

Definition at line 80 of file libgpusolver.h.

bool GPUSolver::initOK
private

Definition at line 77 of file libgpusolver.h.

cl_gpuminer * GPUSolver::miner
private

Definition at line 75 of file libgpusolver.h.

uint32_t GPUSolver::n_sol
private

Definition at line 81 of file libgpusolver.h.

const uint32_t GPUSolver::PROOFSIZE = 1 << PARAM_K
staticprivate

Definition at line 78 of file libgpusolver.h.

float GPUSolver::sum = 0.f
private

Definition at line 84 of file libgpusolver.h.


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