summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/amd/minethd.hpp
diff options
context:
space:
mode:
authorpsychocrypt <psychocrypt@users.noreply.github.com>2017-09-29 22:06:09 +0200
committerpsychocrypt <psychocrypt@users.noreply.github.com>2017-09-30 23:46:08 +0200
commit855af1cf65de1fd3795de3c9a859fd9242625a84 (patch)
tree51368c6f1d6cd401969f4beedcbcccc21d055153 /xmrstak/backend/amd/minethd.hpp
parent8babae3156430f5aa6b804f7c352ffb178097963 (diff)
downloadxmr-stak-855af1cf65de1fd3795de3c9a859fd9242625a84.zip
xmr-stak-855af1cf65de1fd3795de3c9a859fd9242625a84.tar.gz
fix compile
Diffstat (limited to 'xmrstak/backend/amd/minethd.hpp')
-rw-r--r--xmrstak/backend/amd/minethd.hpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/xmrstak/backend/amd/minethd.hpp b/xmrstak/backend/amd/minethd.hpp
index 7e71082..21c2dd9 100644
--- a/xmrstak/backend/amd/minethd.hpp
+++ b/xmrstak/backend/amd/minethd.hpp
@@ -2,6 +2,8 @@
#include "amd_gpu/gpu.hpp"
#include "jconf.hpp"
+#include "xmrstak/backend/cpu/crypto/cryptonight.h"
+#include "xmrstak/backend/miner_work.hpp"
#include "xmrstak/backend/iBackend.hpp"
#include "xmrstak/misc/environment.hpp"
@@ -13,27 +15,18 @@ namespace xmrstak
namespace amd
{
-class minethd : public IBackend
+class minethd : public iBackend
{
public:
static void switch_work(miner_work& pWork);
- 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 init_gpus();
private:
typedef void (*cn_hash_fun)(const void*, size_t, void*, cryptonight_ctx*);
minethd(miner_work& pWork, size_t iNo, GpuContext* ctx);
-
- // We use the top 8 bits of the nonce for thread and resume
- // This allows us to resume up to 64 threads 4 times before
- // we get nonce collisions
- // Bottom 24 bits allow for an hour of work at 4000 H/s
- inline uint32_t calc_start_nonce(uint32_t resume)
- {
- return reverseBits<uint32_t>(static_cast<uint32_t>(iThreadNo + GlobalStates::inst().iThreadCount * resume));
- }
void work_main();
void double_work_main();
@@ -45,7 +38,6 @@ private:
miner_work oWork;
std::thread oWorkThd;
- uint8_t iThreadNo;
bool bQuit;
bool bNoPrefetch;
OpenPOWER on IntegriCloud