summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/cpu/minethd.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'xmrstak/backend/cpu/minethd.hpp')
-rw-r--r--xmrstak/backend/cpu/minethd.hpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/xmrstak/backend/cpu/minethd.hpp b/xmrstak/backend/cpu/minethd.hpp
index 1dcca86..a091ee8 100644
--- a/xmrstak/backend/cpu/minethd.hpp
+++ b/xmrstak/backend/cpu/minethd.hpp
@@ -3,7 +3,6 @@
#include "crypto/cryptonight.h"
#include "xmrstak/backend/miner_work.hpp"
#include "xmrstak/backend/iBackend.hpp"
-#include "xmrstak/backend/globalStates.hpp"
#include <iostream>
#include <thread>
@@ -16,10 +15,10 @@ namespace xmrstak
namespace cpu
{
-class minethd : public IBackend
+class minethd : public iBackend
{
public:
- static std::vector<IBackend*> thread_starter(uint32_t threadOffset, miner_work& pWork);
+ static std::vector<iBackend*> thread_starter(uint32_t threadOffset, miner_work& pWork);
static bool self_test();
typedef void (*cn_hash_fun)(const void*, size_t, void*, cryptonight_ctx*);
@@ -36,21 +35,6 @@ private:
minethd(miner_work& pWork, size_t iNo, bool double_work, bool no_prefetch, int64_t affinity);
- // We use the top 10 bits of the nonce for thread and resume
- // This allows us to resume up to 128 threads 4 times before
- // we get nonce collisions
- // Bottom 22 bits allow for an hour of work at 1000 H/s
- inline uint32_t calc_start_nonce(uint32_t resume)
- {
- return reverseBits<uint32_t>(static_cast<uint32_t>(iThreadNo + GlobalStates::inst().iThreadCount * resume));
- }
-
- // Limited version of the nonce calc above
- inline uint32_t calc_nicehash_nonce(uint32_t start, uint32_t resume)
- {
- return start | ( ( reverseBits<uint32_t>(static_cast<uint32_t>(iThreadNo + GlobalStates::inst().iThreadCount * resume)) >> 4u ) );
- }
-
void work_main();
void double_work_main();
void consume_work();
@@ -65,7 +49,6 @@ private:
std::mutex work_thd_mtx;
std::thread oWorkThd;
- uint8_t iThreadNo;
int64_t affinity;
bool bQuit;
OpenPOWER on IntegriCloud