forked from preda/gpuowl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArgs.h
72 lines (52 loc) · 1.25 KB
/
Args.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
// Copyright Mihai Preda.
#pragma once
#include "common.h"
#include <string>
#include <set>
#include <filesystem>
namespace fs = std::filesystem;
class Args {
public:
static std::string mergeArgs(int argc, char **argv);
enum {CARRY_AUTO = 0, CARRY_SHORT, CARRY_LONG};
void parse(const string& line);
void setDefaults();
bool uses(const std::string& key) const { return flags.count(key); }
string user;
string cpu;
string dump;
string dir;
string uid;
string binaryFile;
string verifyPath;
std::set<std::string> flags;
int device = 0;
bool timeKernels = false;
bool cudaYield = false;
bool noSpin = false;
bool safeMath = true;
bool clean = true;
u32 proofPow = 8;
u32 proofVerify = 9;
fs::path resultsFile = "results.txt";
fs::path masterDir;
fs::path tmpDir = ".";
fs::path proofResultDir = "proof";
fs::path proofToVerifyDir = "proof-tmp";
// fs::path proofBadDir = "bad-proof";
bool keepProof = false;
int carry = CARRY_AUTO;
u32 blockSize = 0;
u32 logStep = 0;
string fftSpec;
u32 B1 = 0;
u32 B2 = 0;
u32 B2_B1_ratio = 30;
u32 D = 0;
u32 prpExp = 0;
size_t maxAlloc = 0;
u32 iters = 0;
u32 nSavefiles = 20;
u32 startFrom = u32(-1);
void printHelp();
};