-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathGenerationWork.h
75 lines (56 loc) · 1.66 KB
/
GenerationWork.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
GPU plot generator for Burst coin.
Author: Cryo
Bitcoin: 138gMBhCrNkbaiTCmUhP9HLU9xwn5QKZgD
Burst: BURST-YA29-QCEW-QXC3-BKXDL
Based on the code of the official miner and dcct's plotgen.
*/
#ifndef CRYO_GPU_PLOT_GENERATOR_GENERATION_WORK_H
#define CRYO_GPU_PLOT_GENERATOR_GENERATION_WORK_H
#include <memory>
#include "GenerationDevice.h"
namespace cryo {
namespace gpuPlotGenerator {
enum GenerationStatus {
Generating,
Generated,
Writing,
Written
};
class GenerationWork {
private:
std::shared_ptr<GenerationDevice> m_device;
unsigned long long m_startNonce;
unsigned int m_workSize;
GenerationStatus m_status;
public:
GenerationWork(const std::shared_ptr<GenerationDevice>& p_device, unsigned long long p_startNonce, unsigned int p_workSize);
GenerationWork(const GenerationWork& p_other);
virtual ~GenerationWork() throw ();
GenerationWork& operator=(const GenerationWork& p_other);
inline const std::shared_ptr<GenerationDevice>& getDevice() const;
inline unsigned long long getStartNonce() const;
inline unsigned int getWorkSize() const;
inline GenerationStatus getStatus() const;
inline void setStatus(GenerationStatus p_status);
};
}}
namespace cryo {
namespace gpuPlotGenerator {
inline const std::shared_ptr<GenerationDevice>& GenerationWork::getDevice() const {
return m_device;
}
inline unsigned long long GenerationWork::getStartNonce() const {
return m_startNonce;
}
inline unsigned int GenerationWork::getWorkSize() const {
return m_workSize;
}
inline GenerationStatus GenerationWork::getStatus() const {
return m_status;
}
inline void GenerationWork::setStatus(GenerationStatus p_status) {
m_status = p_status;
}
}}
#endif