24 #ifndef __GPU_SOLVER_H 25 #define __GPU_SOLVER_H 38 #include <OpenCL/opencl.h> 44 #define MAX_SOURCE_SIZE (0x200000) 48 virtual const char*
what()
const throw() {
49 return "GPU Equihash solver was cancelled";
63 GPUSolver(
unsigned platform,
unsigned device,
unsigned int n,
unsigned int k);
68 std::pair<int, int> param;
71 param.first = miner->PARAM_N;
72 param.second = miner->PARAM_K;
81 bool run(
unsigned int n,
unsigned int k, uint8_t *header,
size_t header_len,
uint256 nonce,
82 const std::function<
bool(std::vector<unsigned char>)> validBlock,
84 crypto_generichash_blake2b_state base_state);
98 bool GPUSolve(
unsigned int n,
unsigned int k, uint8_t *header,
size_t header_len,
uint256 &nonce,
99 const std::function<
bool(std::vector<unsigned char>)> validBlock,
101 crypto_generichash_blake2b_state base_state);
105 #endif // __GPU_SOLVER_H #define function(a, b, c, d, k, s)
std::pair< int, int > getparam()
virtual const char * what() const