Skip to content

Commit 0f409ab

Browse files
committed
chore: Reformat files with eclint -fix
1 parent 04f8a0c commit 0f409ab

14 files changed

Lines changed: 505 additions & 505 deletions

ArgParser.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ class ArgParser {
2020
public:
2121
Argument(T & t) : m_t(t) {}
2222
~Argument() {}
23-
23+
2424
void parse(const std::string & s) {
2525
m_t = lexical_cast::read<T>(s);
2626
}
27-
27+
2828
private:
2929
T & m_t;
3030
};
@@ -104,4 +104,4 @@ class ArgParser {
104104
std::map<std::string, std::pair<bool, IArgument *>> m_mapArgs;
105105
};
106106

107-
#endif /* HPP_ARGPARSER */
107+
#endif /* HPP_ARGPARSER */

CLMemory.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ template<typename T> class CLMemory {
8080
cl_mem m_clMem;
8181
};
8282

83-
#endif /* HPP_CLMEMORY */
83+
#endif /* HPP_CLMEMORY */

Dispatcher.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ void Dispatcher::run(const mode & mode) {
110110
// Kernel arguments - eradicate2_iterate
111111
d.m_memResult.setKernelArg(d.m_kernelIterate, 0);
112112
d.m_memMode.setKernelArg(d.m_kernelIterate, 1);
113-
CLMemory<cl_uchar>::setKernelArg(d.m_kernelIterate, 2, d.m_clScoreMax); // Updated in handleResult()
113+
CLMemory<cl_uchar>::setKernelArg(d.m_kernelIterate, 2, d.m_clScoreMax); // Updated in handleResult()
114114
CLMemory<cl_uint>::setKernelArg(d.m_kernelIterate, 3, d.m_index);
115115
// Round information updated in deviceDispatch()
116116
}
117-
117+
118118
m_quit = false;
119119
m_countRunning = m_vDevices.size();
120120

@@ -194,7 +194,7 @@ void Dispatcher::deviceDispatch(Device & d) {
194194
} else {
195195
cl_event event;
196196
d.m_memResult.read(false, &event);
197-
197+
198198
CLMemory<cl_uint>::setKernelArg(d.m_kernelIterate, 4, ++d.m_round); // Round information updated in deviceDispatch()
199199
enqueueKernelDevice(d, d.m_kernelIterate, m_size);
200200
clFlush(d.m_clQueue);

Makefile

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
CC=g++
2-
CDEFINES=
3-
SOURCES=Dispatcher.cpp eradicate2.cpp hexadecimal.cpp ModeFactory.cpp Speed.cpp sha3.cpp
4-
OBJECTS=$(SOURCES:.cpp=.o)
5-
EXECUTABLE=ERADICATE2.x64
6-
7-
UNAME_S := $(shell uname -s)
8-
ifeq ($(UNAME_S),Darwin)
9-
LDFLAGS=-framework OpenCL
10-
CFLAGS=-c -std=c++11 -Wall -mmmx -O2
11-
else
12-
LDFLAGS=-s -lOpenCL -mcmodel=large
13-
CFLAGS=-c -std=c++11 -Wall -mmmx -O2 -mcmodel=large
14-
endif
15-
16-
all: $(SOURCES) $(EXECUTABLE)
17-
18-
$(EXECUTABLE): $(OBJECTS)
19-
$(CC) $(OBJECTS) $(LDFLAGS) -o $@
20-
21-
.cpp.o:
22-
$(CC) $(CFLAGS) $(CDEFINES) $< -o $@
23-
24-
clean:
25-
rm -rf *.o
26-
1+
CC=g++
2+
CDEFINES=
3+
SOURCES=Dispatcher.cpp eradicate2.cpp hexadecimal.cpp ModeFactory.cpp Speed.cpp sha3.cpp
4+
OBJECTS=$(SOURCES:.cpp=.o)
5+
EXECUTABLE=ERADICATE2.x64
6+
7+
UNAME_S := $(shell uname -s)
8+
ifeq ($(UNAME_S),Darwin)
9+
LDFLAGS=-framework OpenCL
10+
CFLAGS=-c -std=c++11 -Wall -mmmx -O2
11+
else
12+
LDFLAGS=-s -lOpenCL -mcmodel=large
13+
CFLAGS=-c -std=c++11 -Wall -mmmx -O2 -mcmodel=large
14+
endif
15+
16+
all: $(SOURCES) $(EXECUTABLE)
17+
18+
$(EXECUTABLE): $(OBJECTS)
19+
$(CC) $(OBJECTS) $(LDFLAGS) -o $@
20+
21+
.cpp.o:
22+
$(CC) $(CFLAGS) $(CDEFINES) $< -o $@
23+
24+
clean:
25+
rm -rf *.o
26+

ModeFactory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ mode ModeFactory::matching(const std::string strHex) {
2626
std::fill( r.data2, r.data2 + sizeof(r.data2), cl_uchar(0) );
2727

2828
auto index = 0;
29-
29+
3030
for( size_t i = 0; i < strHex.size(); i += 2 ) {
3131
const auto indexHi = hexValueNoException(strHex[i]);
3232
const auto indexLo = i + 1 < strHex.size() ? hexValueNoException(strHex[i+1]) : std::string::npos;

README.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,55 @@
33
usage: ./ERADICATE2 [OPTIONS]
44
55
Input:
6-
-A, --address Target address
7-
-I, --init-code Init code
8-
-i, --init-code-file Read init code from this file
6+
-A, --address Target address
7+
-I, --init-code Init code
8+
-i, --init-code-file Read init code from this file
99
10-
The init code should be expressed as a hexadecimal string having the
11-
prefix 0x both when expressed on the command line with -I and in the
12-
file pointed to by -i if used. Any whitespace will be trimmed. If no
13-
init code is specified it defaults to an empty string.
10+
The init code should be expressed as a hexadecimal string having the
11+
prefix 0x both when expressed on the command line with -I and in the
12+
file pointed to by -i if used. Any whitespace will be trimmed. If no
13+
init code is specified it defaults to an empty string.
1414
1515
Basic modes:
16-
--benchmark Run without any scoring, a benchmark.
17-
--zeros Score on zeros anywhere in hash.
18-
--letters Score on letters anywhere in hash.
19-
--numbers Score on numbers anywhere in hash.
20-
--mirror Score on mirroring from center.
21-
--leading-doubles Score on hashes leading with hexadecimal pairs
16+
--benchmark Run without any scoring, a benchmark.
17+
--zeros Score on zeros anywhere in hash.
18+
--letters Score on letters anywhere in hash.
19+
--numbers Score on numbers anywhere in hash.
20+
--mirror Score on mirroring from center.
21+
--leading-doubles Score on hashes leading with hexadecimal pairs
2222
2323
Modes with arguments:
24-
--leading <single hex> Score on hashes leading with given hex character.
25-
--matching <hex string> Score on hashes matching given hex string.
24+
--leading <single hex> Score on hashes leading with given hex character.
25+
--matching <hex string> Score on hashes matching given hex string.
2626
2727
Advanced modes:
28-
--leading-range Scores on hashes leading with characters within
29-
given range.
30-
--range Scores on hashes having characters within given
31-
range anywhere.
28+
--leading-range Scores on hashes leading with characters within
29+
given range.
30+
--range Scores on hashes having characters within given
31+
range anywhere.
3232
3333
Range:
34-
-m, --min <0-15> Set range minimum (inclusive), 0 is '0' 15 is 'f'.
35-
-M, --max <0-15> Set range maximum (inclusive), 0 is '0' 15 is 'f'.
34+
-m, --min <0-15> Set range minimum (inclusive), 0 is '0' 15 is 'f'.
35+
-M, --max <0-15> Set range maximum (inclusive), 0 is '0' 15 is 'f'.
3636
3737
Device control:
38-
-s, --skip <index> Skip device given by index.
39-
-n, --no-cache Don't load cached pre-compiled version of kernel.
38+
-s, --skip <index> Skip device given by index.
39+
-n, --no-cache Don't load cached pre-compiled version of kernel.
4040
4141
Tweaking:
42-
-w, --work <size> Set OpenCL local work size. [default = 64]
43-
-W, --work-max <size> Set OpenCL maximum work size. [default = -i * -I]
44-
-S, --size <size> Set number of salts tried per loop.
45-
[default = 16777216]
42+
-w, --work <size> Set OpenCL local work size. [default = 64]
43+
-W, --work-max <size> Set OpenCL maximum work size. [default = -i * -I]
44+
-S, --size <size> Set number of salts tried per loop.
45+
[default = 16777216]
4646
4747
Examples:
48-
./ERADICATE2 -A 0x00000000000000000000000000000000deadbeef -I 0x00 --leading 0
49-
./ERADICATE2 -A 0x00000000000000000000000000000000deadbeef -I 0x00 --zeros
48+
./ERADICATE2 -A 0x00000000000000000000000000000000deadbeef -I 0x00 --leading 0
49+
./ERADICATE2 -A 0x00000000000000000000000000000000deadbeef -I 0x00 --zeros
5050
5151
About:
52-
ERADICATE2 is a vanity address generator for CREATE2 addresses that
52+
ERADICATE2 is a vanity address generator for CREATE2 addresses that
5353
utilizes computing power from GPUs using OpenCL.
5454
55-
Author: Johan Gustafsson <johan@johgu.se>
56-
Beer donations: 0x000dead000ae1c8e8ac27103e4ff65f42a4e9203
55+
Author: Johan Gustafsson <johan@johgu.se>
56+
Beer donations: 0x000dead000ae1c8e8ac27103e4ff65f42a4e9203
5757
```

Speed.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ class Speed {
3333
std::map<unsigned int, sampleList> m_mDeviceSamples;
3434
};
3535

36-
#endif /* _HPP_SPEED */
36+
#endif /* _HPP_SPEED */

eradicate2.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ __kernel void eradicate2_iterate(__global result * const pResult, __global const
3333
// and assume that there'll never be more than 2**32 devices, threads or rounds. Worst case scenario with default settings
3434
// of 16777216 = 2**24 threads means the assumption fails after a device has tried 2**32 * 2**24 = 2**56 salts, enough to match
3535
// 14 characters in the address! A GTX 1070 with speed of ~700*10**6 combinations per second would hit this target after ~3 years.
36-
h.d[6] += deviceIndex;
36+
h.d[6] += deviceIndex;
3737
h.d[7] += get_global_id(0);
3838
h.d[8] += round;
3939

0 commit comments

Comments
 (0)