summaryrefslogtreecommitdiffstats
path: root/minethd.h
diff options
context:
space:
mode:
Diffstat (limited to 'minethd.h')
-rw-r--r--minethd.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/minethd.h b/minethd.h
index d4470b1..aa40344 100644
--- a/minethd.h
+++ b/minethd.h
@@ -1,6 +1,7 @@
#pragma once
#include <thread>
#include <atomic>
+#include "crypto/cryptonight.h"
class telemetry
{
@@ -97,6 +98,9 @@ public:
std::atomic<uint64_t> iTimestamp;
private:
+ typedef void (*cn_hash_fun)(const void*, size_t, void*, cryptonight_ctx*);
+ typedef void (*cn_hash_fun_dbl)(const void*, size_t, void*, __restrict cryptonight_ctx*, __restrict cryptonight_ctx*);
+
minethd(miner_work& pWork, size_t iNo, bool double_work, bool no_prefetch);
// We use the top 10 bits of the nonce for thread and resume
@@ -110,6 +114,9 @@ private:
inline uint32_t calc_nicehash_nonce(uint32_t start, uint32_t resume)
{ return start | (resume * iThreadCount + iThreadNo) << 18; }
+ static cn_hash_fun func_selector(bool bHaveAes, bool bNoPrefetch, bool bMulx);
+ static cn_hash_fun_dbl func_dbl_selector(bool bHaveAes, bool bNoPrefetch, bool bMulx);
+
void work_main();
void double_work_main();
void consume_work();
OpenPOWER on IntegriCloud