-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mode.hpp
50 lines (39 loc) · 936 Bytes
/
Mode.hpp
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
#ifndef HPP_MODE
#define HPP_MODE
#include <string>
#if defined(__APPLE__) || defined(__MACOSX)
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
enum HashTarget {
ADDRESS,
CONTRACT,
HASH_TARGET_COUNT
};
class Mode {
private:
Mode();
public:
static Mode matching(const std::string strHex);
static Mode range(const cl_uchar min, const cl_uchar max);
static Mode leading(const char charLeading);
static Mode leadingRange(const cl_uchar min, const cl_uchar max);
static Mode mirror();
static Mode benchmark();
static Mode zeros();
static Mode letters();
static Mode numbers();
static Mode doubles();
std::string name;
std::string kernel;
HashTarget target;
// kernel transform fn name
std::string transformKernel() const;
// Address, Contract, ...
std::string transformName() const;
cl_uchar data1[20 * 100];
cl_uchar data2[20 * 100];
cl_uchar score;
};
#endif /* HPP_MODE */