summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/nvidia/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/nvidia/minethd.hpp
parent8babae3156430f5aa6b804f7c352ffb178097963 (diff)
downloadxmr-stak-855af1cf65de1fd3795de3c9a859fd9242625a84.zip
xmr-stak-855af1cf65de1fd3795de3c9a859fd9242625a84.tar.gz
fix compile
Diffstat (limited to 'xmrstak/backend/nvidia/minethd.hpp')
-rw-r--r--xmrstak/backend/nvidia/minethd.hpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/xmrstak/backend/nvidia/minethd.hpp b/xmrstak/backend/nvidia/minethd.hpp
index ecf189a..657ee6a 100644
--- a/xmrstak/backend/nvidia/minethd.hpp
+++ b/xmrstak/backend/nvidia/minethd.hpp
@@ -2,9 +2,9 @@
#include "xmrstak/jconf.hpp"
#include "jconf.hpp"
-#include "nvcc_code/cryptonight.h"
+#include "nvcc_code/cryptonight.hpp"
-#include "xmrstak/bakcend/cpu/crypto/cryptonight.h"
+#include "xmrstak/backend/cpu/crypto/cryptonight.h"
#include "xmrstak/backend/iBackend.hpp"
#include "xmrstak/misc/environment.hpp"
@@ -19,12 +19,12 @@ namespace xmrstak
namespace nvidia
{
-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 self_test();
private:
@@ -32,21 +32,6 @@ private:
minethd(miner_work& pWork, size_t iNo, const jconf::thd_cfg& cfg);
- // 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>(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(iThreadNo + GlobalStates::inst().iThreadCount * resume) >> 4u ) );
- }
-
void work_main();
void consume_work();
@@ -59,7 +44,6 @@ private:
miner_work oWork;
std::thread oWorkThd;
- uint8_t iThreadNo;
nvid_ctx ctx;
OpenPOWER on IntegriCloud