mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-07 16:05:05 -05:00
Compare commits
2050 Commits
v3.0.0
...
fc698f7bcf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc698f7bcf | ||
|
|
cb2f8fd453 | ||
|
|
59c6c42ceb | ||
|
|
6c10cc5a4b | ||
|
|
d5a8f8a5ae | ||
|
|
d94d052e6c | ||
|
|
ae2b7e3348 | ||
|
|
7d7f30701f | ||
|
|
e80fc25789 | ||
|
|
ff53be5f3b | ||
|
|
6981e68ae3 | ||
|
|
c7e541d84f | ||
|
|
a2ae17b4c4 | ||
|
|
554b60966b | ||
|
|
0378aa8df4 | ||
|
|
6dbd46a891 | ||
|
|
055db83142 | ||
|
|
cdd5dff337 | ||
|
|
bc5fe8f456 | ||
|
|
0bc87345c4 | ||
|
|
f17d31e61a | ||
|
|
e6bf4c0077 | ||
|
|
ff79b8fce4 | ||
|
|
af87369e4f | ||
|
|
65fc16d5ac | ||
|
|
826e23b4c4 | ||
|
|
548fbb9f71 | ||
|
|
02d45834e1 | ||
|
|
1252a4710e | ||
|
|
5891f1f06b | ||
|
|
5dcbab7e3a | ||
|
|
7b51e23aa0 | ||
|
|
7f7fc363e1 | ||
|
|
c4e1363148 | ||
|
|
a2e9b3456d | ||
|
|
4790318685 | ||
|
|
038c4fbe34 | ||
|
|
d65d34ef36 | ||
|
|
af6647f377 | ||
|
|
8f9adc02c0 | ||
|
|
5e0079f012 | ||
|
|
dc5e341778 | ||
|
|
0f81ab4c67 | ||
|
|
62a3a98e7d | ||
|
|
d31b3b7c76 | ||
|
|
e352109431 | ||
|
|
88b0385bfe | ||
|
|
9508332258 | ||
|
|
bc5c1f7e65 | ||
|
|
22118330e3 | ||
|
|
240f2450af | ||
|
|
6e856ca39c | ||
|
|
6047786f43 | ||
|
|
7b8ba9ac09 | ||
|
|
02259fec05 | ||
|
|
51728b2d55 | ||
|
|
ebe818a5fb | ||
|
|
790a71b030 | ||
|
|
c62622b114 | ||
|
|
fc643e2936 | ||
|
|
12b9b62ef7 | ||
|
|
667f636c62 | ||
|
|
81e87a6931 | ||
|
|
540b223eab | ||
|
|
75474be060 | ||
|
|
49f34e59a6 | ||
|
|
223add4e22 | ||
|
|
435fc86120 | ||
|
|
c0143b90ce | ||
|
|
c3cdffe86d | ||
|
|
8a4da33bea | ||
|
|
1c7a339527 | ||
|
|
490acd6e55 | ||
|
|
6ecf57959b | ||
|
|
e2c58126e9 | ||
|
|
0ed4b35cd3 | ||
|
|
afe2aa4402 | ||
|
|
3f7533a645 | ||
|
|
6ef0409086 | ||
|
|
64b0d9562e | ||
|
|
770b71c69a | ||
|
|
44642643f8 | ||
|
|
273bb84df8 | ||
|
|
4d0b8c9daf | ||
|
|
7d4d48e83b | ||
|
|
2ea37cdf37 | ||
|
|
a02afe6d4f | ||
|
|
6e86dddc65 | ||
|
|
0171faffe7 | ||
|
|
25decd1b7f | ||
|
|
354b9ddb34 | ||
|
|
3ad6ab56a5 | ||
|
|
1aa0e37b54 | ||
|
|
807c64ddb1 | ||
|
|
5bf90704a6 | ||
|
|
912d1e362b | ||
|
|
eeb459506c | ||
|
|
f4ec0287c4 | ||
|
|
483d6ada3d | ||
|
|
28e81bd7c0 | ||
|
|
54e75bc7c4 | ||
|
|
c388113a30 | ||
|
|
36afeec225 | ||
|
|
4b5e56416d | ||
|
|
0d314d0469 | ||
|
|
7fc45dfb2d | ||
|
|
2ba40edee0 | ||
|
|
bc4dd11761 | ||
|
|
7b52a41459 | ||
|
|
b5de214ff9 | ||
|
|
8bd3b393ef | ||
|
|
9223c2f027 | ||
|
|
6346d36d1b | ||
|
|
93c07e1d34 | ||
|
|
0ba3000982 | ||
|
|
f0e7de8c71 | ||
|
|
1c4eb6c5fe | ||
|
|
63e21dfe63 | ||
|
|
b2d9dab2e3 | ||
|
|
4c57b60e59 | ||
|
|
e6c81d7166 | ||
|
|
94840c70d8 | ||
|
|
e1478bfa94 | ||
|
|
6df6e15267 | ||
|
|
834ea44507 | ||
|
|
73dc0ffb7e | ||
|
|
e57641d6b1 | ||
|
|
b324e34444 | ||
|
|
7e49fc828d | ||
|
|
fdfbb60840 | ||
|
|
ee51dec499 | ||
|
|
575742078c | ||
|
|
6bab67bced | ||
|
|
db9069897d | ||
|
|
30641b1bdf | ||
|
|
45061f40d8 | ||
|
|
9f70752090 | ||
|
|
22d6a7525e | ||
|
|
c0bce256e1 | ||
|
|
09a7219651 | ||
|
|
97869f3347 | ||
|
|
1bbbff7d17 | ||
|
|
97683e5719 | ||
|
|
059d5d8421 | ||
|
|
285719cde4 | ||
|
|
c877ba8145 | ||
|
|
6793981066 | ||
|
|
1ae9a4e428 | ||
|
|
0e57053c5a | ||
|
|
232d2d6dc5 | ||
|
|
a3cb74f29b | ||
|
|
56753d7c4a | ||
|
|
f7b9e3ca67 | ||
|
|
56c95703a5 | ||
|
|
eadf272425 | ||
|
|
cb227a0a79 | ||
|
|
4c171bea1e | ||
|
|
e55a854314 | ||
|
|
5bdfafd719 | ||
|
|
15a2091837 | ||
|
|
48bd09f730 | ||
|
|
21fb970949 | ||
|
|
23c12fc351 | ||
|
|
71d193676a | ||
|
|
baef34ba8c | ||
|
|
95a739d821 | ||
|
|
7b9135aadc | ||
|
|
e6f694ca9e | ||
|
|
afd79e7537 | ||
|
|
a2728af4f7 | ||
|
|
65dbded9c4 | ||
|
|
f25e65b5ac | ||
|
|
bbb19ea2f9 | ||
|
|
1c5b332add | ||
|
|
87fd0ea94a | ||
|
|
4a42dca2cb | ||
|
|
b674fafa0f | ||
|
|
b5da73389f | ||
|
|
bf5e38545c | ||
|
|
f7543ada60 | ||
|
|
95e1705fc8 | ||
|
|
2d0b07afbc | ||
|
|
b33ccf0e0b | ||
|
|
4f5f9bdffb | ||
|
|
4d3e3daa6a | ||
|
|
802029e5f5 | ||
|
|
14117e9658 | ||
|
|
7ccb1d65f0 | ||
|
|
15de3cc16c | ||
|
|
124daa4afd | ||
|
|
5de1609b7d | ||
|
|
644f4cc017 | ||
|
|
41a3f97060 | ||
|
|
452080cfbd | ||
|
|
4f103b6b45 | ||
|
|
39609c9183 | ||
|
|
2adb7b2b74 | ||
|
|
3673137df6 | ||
|
|
faa7095865 | ||
|
|
e0701f9dad | ||
|
|
14aacf8636 | ||
|
|
c764441337 | ||
|
|
05fae12a63 | ||
|
|
8059ce67f9 | ||
|
|
10111fd7f9 | ||
|
|
2d25bec2df | ||
|
|
cab244d468 | ||
|
|
4001488888 | ||
|
|
9bec1521b8 | ||
|
|
7bde3ed5f7 | ||
|
|
2e738509bb | ||
|
|
f5447088cb | ||
|
|
7f2f50a8d9 | ||
|
|
5747ccfafc | ||
|
|
93081eb1f6 | ||
|
|
4bf65c8669 | ||
|
|
1a6fc3a665 | ||
|
|
8dede14ac8 | ||
|
|
20687a397e | ||
|
|
454f97fa0f | ||
|
|
8149fc7dcb | ||
|
|
a39ab89236 | ||
|
|
5b8501fb57 | ||
|
|
039be2ab75 | ||
|
|
718c7e0fc1 | ||
|
|
ef7951b91d | ||
|
|
214b1f021b | ||
|
|
81b18c0741 | ||
|
|
8e83f72456 | ||
|
|
c2ae625032 | ||
|
|
60566dc84c | ||
|
|
4ea8fe694d | ||
|
|
669d1ab008 | ||
|
|
e87d5111a2 | ||
|
|
56158779de | ||
|
|
efb322df66 | ||
|
|
e673d541c1 | ||
|
|
a98db529fb | ||
|
|
1a9eaaad8f | ||
|
|
be5fbca9b6 | ||
|
|
2feb264375 | ||
|
|
00990f2649 | ||
|
|
d78713be48 | ||
|
|
77367abe13 | ||
|
|
cd046f6fd0 | ||
|
|
63b7ec2887 | ||
|
|
a1e8f1c3e5 | ||
|
|
6db480a1ab | ||
|
|
a7acd9de6d | ||
|
|
a64f4d1870 | ||
|
|
9bfe59b630 | ||
|
|
1a4bf16521 | ||
|
|
a4d5d0a75a | ||
|
|
c40f1f9f66 | ||
|
|
15e5052dd0 | ||
|
|
f9f7963453 | ||
|
|
02240eff8c | ||
|
|
d64c963e5e | ||
|
|
c6292ce9ee | ||
|
|
cd652e2644 | ||
|
|
6f5ef0fe0f | ||
|
|
01fa968763 | ||
|
|
8e6f3ad99e | ||
|
|
b1f2479ec1 | ||
|
|
ecceba8ecd | ||
|
|
cb5f4a9c17 | ||
|
|
3a8ebfdcb6 | ||
|
|
0dcafeb571 | ||
|
|
a1d7ee4c6b | ||
|
|
03e70ba2ed | ||
|
|
19ef8c5d65 | ||
|
|
63baa9e263 | ||
|
|
1248bd5859 | ||
|
|
5c951ddb8a | ||
|
|
4ab0ad928d | ||
|
|
e67eb47796 | ||
|
|
a6656a8c49 | ||
|
|
a903d0a5bd | ||
|
|
ceaebfd877 | ||
|
|
5156ff11a8 | ||
|
|
e0143a92a8 | ||
|
|
f682d9a2e9 | ||
|
|
3bece0ff40 | ||
|
|
e6c456a970 | ||
|
|
923d1d712f | ||
|
|
ae8459bd35 | ||
|
|
3a7be07c62 | ||
|
|
e1cc0000c6 | ||
|
|
1210e8e95c | ||
|
|
a45fbd9cae | ||
|
|
f6d45f7990 | ||
|
|
b9464f993b | ||
|
|
f8f73b0cd7 | ||
|
|
df6ab2edd8 | ||
|
|
8bf7600154 | ||
|
|
a30501956f | ||
|
|
c287a40a20 | ||
|
|
04f50c24e2 | ||
|
|
7627b23212 | ||
|
|
e90e7febfb | ||
|
|
733b85a132 | ||
|
|
35ba786e63 | ||
|
|
446810a837 | ||
|
|
c6a68c3e51 | ||
|
|
ca8bef3ade | ||
|
|
d735caa334 | ||
|
|
eb54cc0e0f | ||
|
|
84c67c37cd | ||
|
|
b44f38a362 | ||
|
|
8ed4088d0a | ||
|
|
cdcea2a4f9 | ||
|
|
f0d80326ec | ||
|
|
cb8fc26cbe | ||
|
|
5ec5b5ed00 | ||
|
|
67e29c1af1 | ||
|
|
4bd94a79a4 | ||
|
|
80e597d951 | ||
|
|
2e269f5b8c | ||
|
|
57b8e35903 | ||
|
|
53be5765e6 | ||
|
|
68741c925b | ||
|
|
9ce207e667 | ||
|
|
07e0966517 | ||
|
|
a9d4c2a923 | ||
|
|
dc02e1feaa | ||
|
|
7daff331dc | ||
|
|
058a2fb0f4 | ||
|
|
4fff3b946e | ||
|
|
f7aa5e781b | ||
|
|
298c5cccfa | ||
|
|
2985571620 | ||
|
|
279d29cd7f | ||
|
|
387320ad6d | ||
|
|
76cd83edb2 | ||
|
|
7f4d667351 | ||
|
|
8027716264 | ||
|
|
a459dd7741 | ||
|
|
ef6011ac12 | ||
|
|
6d66051d92 | ||
|
|
b2cc2ef0d7 | ||
|
|
9805320517 | ||
|
|
582d17bb84 | ||
|
|
9e5f5b35a6 | ||
|
|
9a9c69ff50 | ||
|
|
5c1f3f395c | ||
|
|
23cefffe43 | ||
|
|
d048d5a639 | ||
|
|
9a6f773dea | ||
|
|
cd7c7902a9 | ||
|
|
fd3dad920d | ||
|
|
3dc192f63e | ||
|
|
123c7ab140 | ||
|
|
838996a0fc | ||
|
|
6e4fea34a4 | ||
|
|
b52c289931 | ||
|
|
4dbb5b89da | ||
|
|
84d0212e79 | ||
|
|
35acb3f00b | ||
|
|
7f2771b466 | ||
|
|
5fdf5516ff | ||
|
|
234de96784 | ||
|
|
df4532d9a1 | ||
|
|
c27f535768 | ||
|
|
c7ac314110 | ||
|
|
3215403815 | ||
|
|
bea2a6cf5b | ||
|
|
a28f411339 | ||
|
|
460d9c75c5 | ||
|
|
d1033abbe5 | ||
|
|
9eac9dd30a | ||
|
|
8d7b6adf98 | ||
|
|
230ff87634 | ||
|
|
19adf2630a | ||
|
|
3de4b16117 | ||
|
|
602e3a7587 | ||
|
|
4f6ffb67c1 | ||
|
|
a0194ddd18 | ||
|
|
30f7e876a2 | ||
|
|
5958490c23 | ||
|
|
f92ad4423d | ||
|
|
e0749a82c2 | ||
|
|
440aa003af | ||
|
|
9580f5395f | ||
|
|
e9ae4deb91 | ||
|
|
aee0762424 | ||
|
|
e6332eff2b | ||
|
|
d0a632f557 | ||
|
|
f4cdc527b0 | ||
|
|
661dc515ab | ||
|
|
6d9bafe068 | ||
|
|
202c8aaee8 | ||
|
|
410084384e | ||
|
|
43e98c509a | ||
|
|
08d79ddcdc | ||
|
|
0fdf063760 | ||
|
|
929205536c | ||
|
|
d24581c963 | ||
|
|
2eb2e90631 | ||
|
|
0842e6b9d2 | ||
|
|
93805cd167 | ||
|
|
755fe28bc3 | ||
|
|
59d780169f | ||
|
|
a30ede04f3 | ||
|
|
3f2dfa4279 | ||
|
|
7177b42903 | ||
|
|
21638c2f58 | ||
|
|
02b2b87bb6 | ||
|
|
c8a9dba8fd | ||
|
|
9a77d39a3f | ||
|
|
28a1d0fe1e | ||
|
|
0243789c04 | ||
|
|
45dd58f808 | ||
|
|
1b4abe1e98 | ||
|
|
9f778742a6 | ||
|
|
015f8aeed4 | ||
|
|
9e6311a7e0 | ||
|
|
0af9d2e75b | ||
|
|
6e2a84a46c | ||
|
|
6bb8913066 | ||
|
|
cf104ebdc5 | ||
|
|
ecba750442 | ||
|
|
3967badc55 | ||
|
|
3f3f9b0661 | ||
|
|
e3fc78a66c | ||
|
|
e6d833c227 | ||
|
|
ebe299902c | ||
|
|
bc63b63a2a | ||
|
|
e739e7d704 | ||
|
|
1bae083587 | ||
|
|
88959bd703 | ||
|
|
93e689d601 | ||
|
|
a136790bee | ||
|
|
29f2dd4b9e | ||
|
|
3003c067d3 | ||
|
|
89bc6418b1 | ||
|
|
8458b4ee39 | ||
|
|
7bfb801ce2 | ||
|
|
4567499905 | ||
|
|
9b63955b09 | ||
|
|
0414511de0 | ||
|
|
b61dad128c | ||
|
|
80ae339343 | ||
|
|
4d87555398 | ||
|
|
bef82c5de6 | ||
|
|
b069ad5dd1 | ||
|
|
f6a0646271 | ||
|
|
b5f1a1feae | ||
|
|
1ce059da1c | ||
|
|
2929451ee1 | ||
|
|
94fecb5e92 | ||
|
|
3bfa5ea038 | ||
|
|
ff82ca57f2 | ||
|
|
7f7b1fb073 | ||
|
|
d443dd86f1 | ||
|
|
3ac8f6b23a | ||
|
|
9b1f020a8b | ||
|
|
8bf88a4e74 | ||
|
|
08a2c143f5 | ||
|
|
4eb9a1aad5 | ||
|
|
c8c40586a1 | ||
|
|
29cb416107 | ||
|
|
465169ff12 | ||
|
|
df2bcd8192 | ||
|
|
d89bb56964 | ||
|
|
87a0864e3b | ||
|
|
ecf5579f36 | ||
|
|
d5523d819f | ||
|
|
dbda2e9ccd | ||
|
|
8babd7bc0a | ||
|
|
27ced139a6 | ||
|
|
b46849e813 | ||
|
|
a96a6108ff | ||
|
|
c50c78b700 | ||
|
|
cd7ab2c79f | ||
|
|
695fbc013b | ||
|
|
a403c53543 | ||
|
|
e26fbc96e9 | ||
|
|
259c165e60 | ||
|
|
7897bf02dc | ||
|
|
05f62c5ccc | ||
|
|
d82e100e30 | ||
|
|
5f869a414c | ||
|
|
7fd6be7d83 | ||
|
|
ae6c536e98 | ||
|
|
c66c593123 | ||
|
|
b3788b2ba3 | ||
|
|
b7adb34c37 | ||
|
|
ace8409a56 | ||
|
|
e2c757d9dd | ||
|
|
da35de993f | ||
|
|
854b7618ef | ||
|
|
3477f9fbc1 | ||
|
|
5799744f2f | ||
|
|
61d165a314 | ||
|
|
69186f2470 | ||
|
|
730d4a6cee | ||
|
|
54bc91d5e3 | ||
|
|
2012ffb231 | ||
|
|
5f9e0ebc6c | ||
|
|
f314c69a70 | ||
|
|
16fe462cad | ||
|
|
e6e2987ddf | ||
|
|
ed456b02cf | ||
|
|
da7f5826cb | ||
|
|
6cb398bb42 | ||
|
|
748be760e8 | ||
|
|
4a4118bb8e | ||
|
|
77f1bf0861 | ||
|
|
6bb29b3e7b | ||
|
|
f720772338 | ||
|
|
e53e48b88c | ||
|
|
ecf36ee891 | ||
|
|
23ef949dd3 | ||
|
|
92e708c6e7 | ||
|
|
30cfcc27db | ||
|
|
3c6077fb02 | ||
|
|
63883b4fa7 | ||
|
|
0f83b5e06c | ||
|
|
637a333197 | ||
|
|
3171b06048 | ||
|
|
2a66a0fa2f | ||
|
|
c080d5b962 | ||
|
|
0133107f14 | ||
|
|
253e349ef9 | ||
|
|
5126cc1414 | ||
|
|
ea1245026d | ||
|
|
2158adb711 | ||
|
|
8554bb4d9c | ||
|
|
1741354498 | ||
|
|
866e97efcf | ||
|
|
277352d072 | ||
|
|
8cae605e1f | ||
|
|
59c85eaf6a | ||
|
|
864233c110 | ||
|
|
e9b32b3009 | ||
|
|
ec608bbd05 | ||
|
|
ec2793bcc9 | ||
|
|
eb40f07552 | ||
|
|
28f268aeba | ||
|
|
bad5458d40 | ||
|
|
b72e21fc3c | ||
|
|
d578a3828f | ||
|
|
6c417eb9af | ||
|
|
dc70893e6b | ||
|
|
c5c958743e | ||
|
|
89f2fa6818 | ||
|
|
bcfd9edaa5 | ||
|
|
e0f774d6dd | ||
|
|
955cc366d1 | ||
|
|
bc4f6249be | ||
|
|
0d45600b0e | ||
|
|
2c8f7f692c | ||
|
|
3e41bdc552 | ||
|
|
5b189696d7 | ||
|
|
c6bcea3811 | ||
|
|
900dd13c45 | ||
|
|
2876f17f65 | ||
|
|
b2563ca8a6 | ||
|
|
7c0d60ac68 | ||
|
|
813a1885cb | ||
|
|
54bcf05b1d | ||
|
|
bbea8810a7 | ||
|
|
b6514957f1 | ||
|
|
69590f9777 | ||
|
|
576ff120e5 | ||
|
|
2d52118c1b | ||
|
|
28ad59d828 | ||
|
|
e0c630f34f | ||
|
|
b8f9a326aa | ||
|
|
542617b6db | ||
|
|
f5db50c9d7 | ||
|
|
856c8e6bcd | ||
|
|
b3dbf6e23f | ||
|
|
a11c57226b | ||
|
|
94d2cac775 | ||
|
|
548a7d46e1 | ||
|
|
bebc163e25 | ||
|
|
70cddc06ba | ||
|
|
1f9cdc0564 | ||
|
|
a5a7ee716d | ||
|
|
d2f24d94b9 | ||
|
|
ba3299b61b | ||
|
|
ca5dfe7c12 | ||
|
|
91ad6fcf3d | ||
|
|
0b7dfaabe0 | ||
|
|
6f8ffb7660 | ||
|
|
4a8e7510e1 | ||
|
|
32876dd01d | ||
|
|
37df513b32 | ||
|
|
31a5d05dc1 | ||
|
|
d478d737c4 | ||
|
|
e20daff4eb | ||
|
|
1ccdcb1645 | ||
|
|
072881e1a1 | ||
|
|
0c4a3cfc30 | ||
|
|
cffd0f50a4 | ||
|
|
4b1857114e | ||
|
|
b49fb27e84 | ||
|
|
ee341118ce | ||
|
|
f599807bbb | ||
|
|
a2ad626012 | ||
|
|
e8a99809b6 | ||
|
|
0fe20fe88c | ||
|
|
d1d1517b4f | ||
|
|
5980675876 | ||
|
|
3b87cd97ce | ||
|
|
d2f01cfa86 | ||
|
|
82830e359a | ||
|
|
8e3fec5768 | ||
|
|
4fd23a1bf4 | ||
|
|
8bfaddd3fc | ||
|
|
dabafaaadb | ||
|
|
5cda714254 | ||
|
|
91151ce4a1 | ||
|
|
dc1443f3b8 | ||
|
|
8af8df25aa | ||
|
|
b1e14dc1d3 | ||
|
|
f460d76f8d | ||
|
|
1c63e9efba | ||
|
|
21abbe4e84 | ||
|
|
3080f47cd6 | ||
|
|
f4ebdaa8e5 | ||
|
|
1bcfd0cdea | ||
|
|
9396ecf93d | ||
|
|
a4af964696 | ||
|
|
2c8d8ee2ab | ||
|
|
631a8ca802 | ||
|
|
346892e170 | ||
|
|
db03573804 | ||
|
|
e74573f81f | ||
|
|
0e70974d7d | ||
|
|
3a3ee91324 | ||
|
|
4108428872 | ||
|
|
4c3425a958 | ||
|
|
09624c4f9b | ||
|
|
8faef28e7d | ||
|
|
62450f4ed8 | ||
|
|
2c52a5a352 | ||
|
|
7d52bd7454 | ||
|
|
f68b105bd9 | ||
|
|
9ca1a6129b | ||
|
|
7a3df1c0bb | ||
|
|
22a1b8d82d | ||
|
|
0a462fbef5 | ||
|
|
f302b4b0ef | ||
|
|
65fe26dc6c | ||
|
|
e6d4921e21 | ||
|
|
f82d67e76e | ||
|
|
4e671a945d | ||
|
|
e38d277143 | ||
|
|
8eb9b4d37a | ||
|
|
2d45cc64c1 | ||
|
|
b9081e992b | ||
|
|
1424b2975f | ||
|
|
0fa5db8fa3 | ||
|
|
5999dccd57 | ||
|
|
78922a0772 | ||
|
|
bc3914883a | ||
|
|
86dae9e149 | ||
|
|
05b2260393 | ||
|
|
672f6df6c1 | ||
|
|
9dae559b73 | ||
|
|
b9d813c403 | ||
|
|
c48e2e6af8 | ||
|
|
76fba819fe | ||
|
|
6bab624885 | ||
|
|
3730bcd434 | ||
|
|
3b7d30a91d | ||
|
|
c8588903e3 | ||
|
|
0b4fec15dd | ||
|
|
ef8cc28f3f | ||
|
|
8471f7fad3 | ||
|
|
b99dc440af | ||
|
|
9a02007900 | ||
|
|
efc5e5d811 | ||
|
|
dea5be0a57 | ||
|
|
24c290963a | ||
|
|
9dffcdaddd | ||
|
|
3df47052ed | ||
|
|
3b8d081c8c | ||
|
|
05e6f66169 | ||
|
|
11e0d3de3a | ||
|
|
ea367da064 | ||
|
|
a999a56775 | ||
|
|
590252bd5e | ||
|
|
cc2de4f768 | ||
|
|
aeea0e0a6c | ||
|
|
82d698a1e5 | ||
|
|
95b2b5e028 | ||
|
|
eae84d47e7 | ||
|
|
45d12314f4 | ||
|
|
fa11cb623d | ||
|
|
7da04c6a2c | ||
|
|
5c449913af | ||
|
|
af019fed8e | ||
|
|
8872630c46 | ||
|
|
d3ec21cbf5 | ||
|
|
395dd4086b | ||
|
|
a7f9808621 | ||
|
|
88862b617f | ||
|
|
39bfa0c420 | ||
|
|
f62f4e6108 | ||
|
|
9f128d1182 | ||
|
|
2f2b33c82b | ||
|
|
56280cb1d5 | ||
|
|
07127c6e87 | ||
|
|
3dabc77a09 | ||
|
|
66349e3d23 | ||
|
|
85a78ce537 | ||
|
|
0d9f17670e | ||
|
|
deb561a410 | ||
|
|
9d256a1e9b | ||
|
|
3c985eef25 | ||
|
|
6224887967 | ||
|
|
09361bf3a5 | ||
|
|
8a1311f015 | ||
|
|
cde7cddcaa | ||
|
|
aa53ba073d | ||
|
|
ac46d6f8de | ||
|
|
5efd00abec | ||
|
|
e79e3370f8 | ||
|
|
633aaccd9c | ||
|
|
410313d933 | ||
|
|
7aba194d3b | ||
|
|
515a85e66c | ||
|
|
6b21a51a2f | ||
|
|
a934ba3079 | ||
|
|
633a92bff0 | ||
|
|
5a846ebd58 | ||
|
|
e4c2ccba9d | ||
|
|
15168950e5 | ||
|
|
6b331b6945 | ||
|
|
4c7d20c8e6 | ||
|
|
414588d701 | ||
|
|
f89f6a8abf | ||
|
|
ca3695a754 | ||
|
|
7c682ec91a | ||
|
|
cc5c2c41be | ||
|
|
643142dc30 | ||
|
|
a36fb7e728 | ||
|
|
87fafcf91b | ||
|
|
2966b80ba1 | ||
|
|
179f09081f | ||
|
|
775867fc3e | ||
|
|
497863441a | ||
|
|
ec62ded279 | ||
|
|
f9c0933f05 | ||
|
|
0da3390d09 | ||
|
|
9a025fdb75 | ||
|
|
cafd868773 | ||
|
|
1c9e959cc4 | ||
|
|
41a9bddd59 | ||
|
|
7a09f5fe47 | ||
|
|
ab45794b7c | ||
|
|
1d5592f303 | ||
|
|
2bf8887cab | ||
|
|
acf7ec8355 | ||
|
|
bd82b3c852 | ||
|
|
daf08fcf9a | ||
|
|
c8ee6f7db8 | ||
|
|
662a957106 | ||
|
|
3055e03b7e | ||
|
|
11da7a3155 | ||
|
|
0a27c6d6af | ||
|
|
86795aa5b7 | ||
|
|
63bd45c397 | ||
|
|
469b1f08de | ||
|
|
121c515a07 | ||
|
|
2715bc20d9 | ||
|
|
c156cdfe7a | ||
|
|
a9965c5580 | ||
|
|
dca6d3f1ff | ||
|
|
91979dc4dd | ||
|
|
87195ed237 | ||
|
|
d557fe7f39 | ||
|
|
13ee9d09a8 | ||
|
|
f16d1837f8 | ||
|
|
096b09bf4d | ||
|
|
bbcf8e2be3 | ||
|
|
fb9d2b9e7c | ||
|
|
58711aa666 | ||
|
|
c7236d2cf0 | ||
|
|
25da0cba57 | ||
|
|
fb721edc20 | ||
|
|
d2a4fa367a | ||
|
|
8686e08336 | ||
|
|
09b68f3cdb | ||
|
|
05a2054057 | ||
|
|
4e59f90495 | ||
|
|
19f0476efb | ||
|
|
edf7885172 | ||
|
|
6cd7f3e053 | ||
|
|
f1ae81c6ae | ||
|
|
8cbf90d35b | ||
|
|
48eaf11026 | ||
|
|
75f18c9b31 | ||
|
|
302fe70f6b | ||
|
|
a2a0defeef | ||
|
|
e2ea11ffeb | ||
|
|
d8f9501ac8 | ||
|
|
12a1365b5d | ||
|
|
8f3a2a63ba | ||
|
|
f7f07ce42c | ||
|
|
c1d99bfa09 | ||
|
|
be8245fc92 | ||
|
|
926871cbe1 | ||
|
|
ee677ef5c9 | ||
|
|
c10ec90b60 | ||
|
|
0d3c2752c9 | ||
|
|
eaa44a1547 | ||
|
|
89454c6d30 | ||
|
|
d3f2184fcc | ||
|
|
19da03c9b7 | ||
|
|
aa284c6a3a | ||
|
|
6379d1f90e | ||
|
|
8737af0f6f | ||
|
|
9a1e867da2 | ||
|
|
be979d35c7 | ||
|
|
971abe536c | ||
|
|
5ceacbbfd0 | ||
|
|
c18a0152dd | ||
|
|
3bbe3fa481 | ||
|
|
4d6b384c16 | ||
|
|
e4283d5f53 | ||
|
|
3b6cfd9c4f | ||
|
|
a076f739e3 | ||
|
|
4cdea633bf | ||
|
|
e3727f01b8 | ||
|
|
837bd1a43c | ||
|
|
eb36d2beef | ||
|
|
f08887180d | ||
|
|
95d3293f4b | ||
|
|
44054ac7eb | ||
|
|
057fbf7608 | ||
|
|
a64ff6b7c7 | ||
|
|
673c366f77 | ||
|
|
c8c0abdb00 | ||
|
|
0a183a59c0 | ||
|
|
3f7cf2ac18 | ||
|
|
d97b5a7552 | ||
|
|
cbd0c45c2b | ||
|
|
e5fd83554b | ||
|
|
c9e17780e7 | ||
|
|
5df1686810 | ||
|
|
1e3e8ff8ee | ||
|
|
d4750239ea | ||
|
|
99e9073993 | ||
|
|
51690ebad6 | ||
|
|
5ac908c027 | ||
|
|
f1a24b7ddd | ||
|
|
f977b31331 | ||
|
|
80b980c9d3 | ||
|
|
ddb4f9be76 | ||
|
|
a87d9d31e2 | ||
|
|
6c26e04fbe | ||
|
|
eb95d0339e | ||
|
|
e295a938f8 | ||
|
|
bccffa63a4 | ||
|
|
ca6ca4cb67 | ||
|
|
3910cf9e69 | ||
|
|
5d274777f6 | ||
|
|
dad1fdb505 | ||
|
|
565d36d9e4 | ||
|
|
e32e22474a | ||
|
|
905713f1ca | ||
|
|
5f314edb2f | ||
|
|
315d74c319 | ||
|
|
6b7b3511ce | ||
|
|
50bdaba526 | ||
|
|
4914fefb1f | ||
|
|
03cd56ed73 | ||
|
|
79c96418c7 | ||
|
|
36c1cb23e0 | ||
|
|
6dba0635f1 | ||
|
|
99b58580e9 | ||
|
|
027a6f8ae2 | ||
|
|
a3daaf09f5 | ||
|
|
da8b87b007 | ||
|
|
87b4d97798 | ||
|
|
6860450147 | ||
|
|
b0de5aefb1 | ||
|
|
d2e2f5f800 | ||
|
|
3088f915f9 | ||
|
|
4c5421b2bf | ||
|
|
6dd281b508 | ||
|
|
599958c982 | ||
|
|
328f985e07 | ||
|
|
7fc7b976bf | ||
|
|
36b1523194 | ||
|
|
5155139e9a | ||
|
|
a152d6be42 | ||
|
|
ccebf6bb20 | ||
|
|
5b4648339a | ||
|
|
7727014eea | ||
|
|
8c45e3226d | ||
|
|
75403ee275 | ||
|
|
c4db1435b2 | ||
|
|
f3ea3c5227 | ||
|
|
722e468bd9 | ||
|
|
9569772e7e | ||
|
|
144f9c4409 | ||
|
|
2ecece7b3d | ||
|
|
677d287135 | ||
|
|
62eb66486d | ||
|
|
da03d74ade | ||
|
|
9fcc542676 | ||
|
|
581d004568 | ||
|
|
4f7186cb0e | ||
|
|
65fa1d9bf3 | ||
|
|
f85efd163c | ||
|
|
eb8cf3ee5a | ||
|
|
793a2454ad | ||
|
|
4a74ce3242 | ||
|
|
87a54766eb | ||
|
|
22a69f70da | ||
|
|
3fbf2ac3d4 | ||
|
|
0a2fe5caa7 | ||
|
|
17795e3d7b | ||
|
|
1fdc8631e3 | ||
|
|
858463ceba | ||
|
|
a4550f55ea | ||
|
|
d9b6f46a6a | ||
|
|
4bac3e7695 | ||
|
|
59bd6d4187 | ||
|
|
166c011d37 | ||
|
|
1f55c6eb02 | ||
|
|
c2bdae70fe | ||
|
|
1289942567 | ||
|
|
44dcded866 | ||
|
|
8deb247b3e | ||
|
|
a705ab775b | ||
|
|
bfd5a81937 | ||
|
|
c710ee5fb5 | ||
|
|
a8466a139c | ||
|
|
ba47219185 | ||
|
|
cf54c85b76 | ||
|
|
fa5b872782 | ||
|
|
3ee0cd8c51 | ||
|
|
7bdeba4d08 | ||
|
|
116fb3d3f9 | ||
|
|
54a17a75ab | ||
|
|
5f0f2506e8 | ||
|
|
31e896feef | ||
|
|
8bfd7bcf05 | ||
|
|
ec13337228 | ||
|
|
cfe2a098ce | ||
|
|
a89c2c8dd1 | ||
|
|
ebf259fa7c | ||
|
|
1b4a124bc5 | ||
|
|
4bb8be8a29 | ||
|
|
d45bb24a32 | ||
|
|
5a7bcb2d03 | ||
|
|
f1ec8a18f6 | ||
|
|
7b4f768114 | ||
|
|
dfab81e9fa | ||
|
|
3025c265e8 | ||
|
|
ee603ab9e2 | ||
|
|
84f8a0dc54 | ||
|
|
481deff163 | ||
|
|
0e9ed351a1 | ||
|
|
8952f6892d | ||
|
|
d51fe01273 | ||
|
|
f7d6348948 | ||
|
|
3a01ebe277 | ||
|
|
189cc78d44 | ||
|
|
9be3b69109 | ||
|
|
7b38af703e | ||
|
|
bef9031b03 | ||
|
|
e4929d7c06 | ||
|
|
1e26e58660 | ||
|
|
8fe0577d60 | ||
|
|
64f42feba9 | ||
|
|
36ed0b4309 | ||
|
|
cb0bba7e10 | ||
|
|
51a72afb0e | ||
|
|
b1b0a3ba95 | ||
|
|
9768bf65d1 | ||
|
|
1584cca6d1 | ||
|
|
891a46382e | ||
|
|
db920e8006 | ||
|
|
768a4581e0 | ||
|
|
866245b525 | ||
|
|
c7476e076b | ||
|
|
d11a313d88 | ||
|
|
8d1168385a | ||
|
|
852fe14604 | ||
|
|
30be1cd102 | ||
|
|
fa0bb0e1bf | ||
|
|
a05393727c | ||
|
|
adf833b60a | ||
|
|
23daceb4dc | ||
|
|
4a9db89527 | ||
|
|
060c1af4c4 | ||
|
|
b826985d05 | ||
|
|
0f09883429 | ||
|
|
a84b45b1bb | ||
|
|
a5b6383f7b | ||
|
|
24f8f76714 | ||
|
|
ba336122c0 | ||
|
|
591744174c | ||
|
|
fc85017948 | ||
|
|
24f541a0dd | ||
|
|
f552577e71 | ||
|
|
a06ec06e8b | ||
|
|
96833d4790 | ||
|
|
5611ae9a30 | ||
|
|
72c8404d18 | ||
|
|
bc128d11d9 | ||
|
|
ff13675d31 | ||
|
|
4b682b6633 | ||
|
|
879e160ba3 | ||
|
|
9a6b8594f3 | ||
|
|
a354e9d217 | ||
|
|
950b5fa75e | ||
|
|
9f66d59c0a | ||
|
|
9d99fef52e | ||
|
|
3b22f1704f | ||
|
|
c89ad6b36d | ||
|
|
45300f1ff5 | ||
|
|
847d08cdbc | ||
|
|
81af1e964d | ||
|
|
3662e45435 | ||
|
|
f06e30e343 | ||
|
|
34d4aa4012 | ||
|
|
3e4bf8cd6c | ||
|
|
206b675892 | ||
|
|
00b4ae9c36 | ||
|
|
8d5ea745bb | ||
|
|
cac48cdd27 | ||
|
|
c20010ed54 | ||
|
|
5926dee354 | ||
|
|
b78b0b5c6b | ||
|
|
43afa437e4 | ||
|
|
050568a4ab | ||
|
|
8bf40cea36 | ||
|
|
ae3ff0f570 | ||
|
|
0addf91a70 | ||
|
|
abb78302b8 | ||
|
|
e5579d8635 | ||
|
|
3986c43fa5 | ||
|
|
838cc08680 | ||
|
|
a0fe49f946 | ||
|
|
70dbe8562c | ||
|
|
41fcd1e49a | ||
|
|
90195caa1d | ||
|
|
cdb6287d89 | ||
|
|
32e9b7e34a | ||
|
|
6484bbb716 | ||
|
|
e59806d6ae | ||
|
|
299b180b28 | ||
|
|
1acd88ed39 | ||
|
|
109c088e8a | ||
|
|
bb18239642 | ||
|
|
ccded7cc0a | ||
|
|
5bc89fdc8b | ||
|
|
70c7f33a20 | ||
|
|
1ec185a3a0 | ||
|
|
6aa4eeefbb | ||
|
|
10ea567084 | ||
|
|
028d6503aa | ||
|
|
51346c2b2b | ||
|
|
ca535c7813 | ||
|
|
ba80e27349 | ||
|
|
bd8cf54a0b | ||
|
|
e0eed7d5d6 | ||
|
|
8dff08f15f | ||
|
|
47d68b068b | ||
|
|
a648a8b9be | ||
|
|
7eefccc6bc | ||
|
|
1bf159d1e8 | ||
|
|
bf46cb8684 | ||
|
|
72c385c870 | ||
|
|
c83429c55c | ||
|
|
e5a2689052 | ||
|
|
b665d2d865 | ||
|
|
e06a76ef1c | ||
|
|
f523fddbfd | ||
|
|
30165ce4be | ||
|
|
83a10cce8c | ||
|
|
71cc486553 | ||
|
|
2eaf8edf0e | ||
|
|
3d740e81a2 | ||
|
|
ef475d98da | ||
|
|
5e92acab34 | ||
|
|
935b8a1106 | ||
|
|
c371a7a2bb | ||
|
|
4fe011b469 | ||
|
|
bf32802a82 | ||
|
|
ccfbba94f2 | ||
|
|
70d7fe9b59 | ||
|
|
34a5c89ee2 | ||
|
|
39ed25cf7b | ||
|
|
26c2200af3 | ||
|
|
aa5a7c3c13 | ||
|
|
08ca51ec4c | ||
|
|
bbd9945866 | ||
|
|
59313d9cc3 | ||
|
|
2da5d31a5d | ||
|
|
5724d8beb6 | ||
|
|
03e9797b92 | ||
|
|
74bd9460d7 | ||
|
|
f033cb7f46 | ||
|
|
38cf5b6324 | ||
|
|
16863763d3 | ||
|
|
aa1934d273 | ||
|
|
4bfe7c7090 | ||
|
|
c61dafce60 | ||
|
|
a4d086c451 | ||
|
|
12394c7c78 | ||
|
|
a83f2c809c | ||
|
|
416c9eff69 | ||
|
|
cee3aeb116 | ||
|
|
77ca380697 | ||
|
|
28c81f2c53 | ||
|
|
945d1db05c | ||
|
|
5324761e06 | ||
|
|
f7d1d50a25 | ||
|
|
dc0aee1432 | ||
|
|
e4c8714daa | ||
|
|
b974f1dc73 | ||
|
|
1b928e8bf1 | ||
|
|
8ac03a0d89 | ||
|
|
69a6111a4f | ||
|
|
78476c5da0 | ||
|
|
e4779ab6ca | ||
|
|
1c63a8e7c3 | ||
|
|
f42a100937 | ||
|
|
2d2f3d4eb2 | ||
|
|
3472bd9f02 | ||
|
|
8c979d3bc7 | ||
|
|
11ed37ea63 | ||
|
|
1afec10c7c | ||
|
|
12728649ff | ||
|
|
fa2461ba73 | ||
|
|
7ec14f249d | ||
|
|
e2a5b40793 | ||
|
|
d30bf207e9 | ||
|
|
dbc8e20e53 | ||
|
|
2170b58b6f | ||
|
|
75c57f7563 | ||
|
|
baa3384d12 | ||
|
|
5e1199ea48 | ||
|
|
5c5d841776 | ||
|
|
a28bddcbdf | ||
|
|
0bfe501dac | ||
|
|
3f237ae348 | ||
|
|
f4f88ea1f7 | ||
|
|
0e7bf5913b | ||
|
|
7f00cb59d2 | ||
|
|
2198beff59 | ||
|
|
0b304c1584 | ||
|
|
5ea0de2410 | ||
|
|
958224255a | ||
|
|
ea72052f50 | ||
|
|
9a02caf248 | ||
|
|
33bfecd49b | ||
|
|
f18bfeb77d | ||
|
|
ba017708bb | ||
|
|
0dbf41f761 | ||
|
|
936670f0fd | ||
|
|
ba405d1984 | ||
|
|
e17f686d4f | ||
|
|
74aff6b8f4 | ||
|
|
4f74675a19 | ||
|
|
4209aeb94d | ||
|
|
9a98c31514 | ||
|
|
fdbb2debd8 | ||
|
|
958f50c372 | ||
|
|
bbd3f05bf6 | ||
|
|
dd8777c11b | ||
|
|
9cbdb7f1f2 | ||
|
|
95ef32c913 | ||
|
|
6370d71ebe | ||
|
|
169fad3a5c | ||
|
|
2fae0e1319 | ||
|
|
297ff13810 | ||
|
|
77a7f144c0 | ||
|
|
aa101b6e00 | ||
|
|
4edcaa03be | ||
|
|
9864ba8696 | ||
|
|
bdbb7f891f | ||
|
|
06809df4a0 | ||
|
|
c9730faa49 | ||
|
|
2e3d087750 | ||
|
|
6676126376 | ||
|
|
eb1ed497e7 | ||
|
|
32442db099 | ||
|
|
734f142b47 | ||
|
|
340437b6d2 | ||
|
|
fb0ce0bf61 | ||
|
|
7a3233ab4b | ||
|
|
0ad4257113 | ||
|
|
e3d727cdb6 | ||
|
|
df24b25b64 | ||
|
|
c3c475cdcc | ||
|
|
15000e2c22 | ||
|
|
def045adda | ||
|
|
22b937cc1c | ||
|
|
07025dc41b | ||
|
|
e6e1028017 | ||
|
|
5c4cdfd80c | ||
|
|
636b2e3cfa | ||
|
|
0a7324f500 | ||
|
|
532520f626 | ||
|
|
5905dd63cc | ||
|
|
52e2890824 | ||
|
|
0d7820f61a | ||
|
|
65dc8f3d85 | ||
|
|
e4aa1fad3f | ||
|
|
a797d808b5 | ||
|
|
2e34bf7a1b | ||
|
|
7f31f45b6d | ||
|
|
3cbf0dc0ee | ||
|
|
85af4e27ec | ||
|
|
a7caf4cc66 | ||
|
|
628506e266 | ||
|
|
39ae24b138 | ||
|
|
dd7789763f | ||
|
|
c828e6b793 | ||
|
|
4326ba3c38 | ||
|
|
b34e3e1a7b | ||
|
|
29966fb491 | ||
|
|
80d944bf82 | ||
|
|
c18478a6b4 | ||
|
|
a0eb766238 | ||
|
|
781f08a034 | ||
|
|
d33c91684d | ||
|
|
bbee212970 | ||
|
|
05d3f17f15 | ||
|
|
8aeba61706 | ||
|
|
46e49cde0b | ||
|
|
b38046db46 | ||
|
|
72861e353b | ||
|
|
a8e91bb888 | ||
|
|
0cc90b152d | ||
|
|
11ac59331f | ||
|
|
ca7ff4e90b | ||
|
|
0e7036cf24 | ||
|
|
c8c874dadf | ||
|
|
bfd017d064 | ||
|
|
37f44b4da5 | ||
|
|
2da551e1e9 | ||
|
|
fb4b4a56e2 | ||
|
|
b025bca185 | ||
|
|
87bb1aa4d3 | ||
|
|
2d95a394a6 | ||
|
|
9634907676 | ||
|
|
d27647e408 | ||
|
|
9c9e7fa998 | ||
|
|
1a495e351c | ||
|
|
680e4dd865 | ||
|
|
abb3340cc7 | ||
|
|
89e6998054 | ||
|
|
70a3a83c26 | ||
|
|
92810ad761 | ||
|
|
39bd3ca1da | ||
|
|
4d0edde66d | ||
|
|
69cbfd682a | ||
|
|
6ae37a9519 | ||
|
|
97305f11a8 | ||
|
|
2e6c518a1c | ||
|
|
7f01c5c6f3 | ||
|
|
f19b2f7248 | ||
|
|
914b7023a2 | ||
|
|
4dddd3a44f | ||
|
|
01236bc40b | ||
|
|
618ca6525b | ||
|
|
c71ef8197f | ||
|
|
1eccb9d66f | ||
|
|
c0f7e881ba | ||
|
|
f9c65f3bbf | ||
|
|
f19fcb4407 | ||
|
|
382bfb0957 | ||
|
|
b7fbb28a47 | ||
|
|
fbedf197ab | ||
|
|
fc68ed15bc | ||
|
|
53ac6f7ee7 | ||
|
|
50eb7ba2fd | ||
|
|
1b875fdabb | ||
|
|
bb96684daf | ||
|
|
1e88b8447f | ||
|
|
5b610e4dfe | ||
|
|
92a258f142 | ||
|
|
1986b45acd | ||
|
|
539943c655 | ||
|
|
adb3c22e80 | ||
|
|
e22f798085 | ||
|
|
8698b73036 | ||
|
|
64650bf121 | ||
|
|
9405d8ed92 | ||
|
|
219f033647 | ||
|
|
16a83a9f61 | ||
|
|
abfed74af9 | ||
|
|
ba4a11c619 | ||
|
|
f1b8351a63 | ||
|
|
a620dfc955 | ||
|
|
f1e688724e | ||
|
|
e8355e1a1c | ||
|
|
6cb27e9662 | ||
|
|
5fee8ba288 | ||
|
|
b7840d9ab6 | ||
|
|
d591832eea | ||
|
|
13ac54ada9 | ||
|
|
1f36ea2a8e | ||
|
|
ab90af37b3 | ||
|
|
88031650b4 | ||
|
|
4a5493e12f | ||
|
|
6a97aeaf1b | ||
|
|
6ac3534fd5 | ||
|
|
e210067660 | ||
|
|
50c66083a7 | ||
|
|
05dc9821c5 | ||
|
|
c623dc7c92 | ||
|
|
4a7897b8bc | ||
|
|
33a7530f9b | ||
|
|
44f0daf384 | ||
|
|
6a45d5dcc9 | ||
|
|
7bf12dc81f | ||
|
|
2020b71eeb | ||
|
|
cad5fef1ea | ||
|
|
56e88f57fb | ||
|
|
bc09aa5ad0 | ||
|
|
eeadea53e2 | ||
|
|
0528ccd01e | ||
|
|
5486300db7 | ||
|
|
b0dda2b5b3 | ||
|
|
c80ef54b60 | ||
|
|
31383861cd | ||
|
|
b2b18ce22d | ||
|
|
8496f5b631 | ||
|
|
ec17bc4d40 | ||
|
|
5fa6a034d5 | ||
|
|
24c25b7d2e | ||
|
|
874cff3d51 | ||
|
|
297d884482 | ||
|
|
26c72cd7d8 | ||
|
|
fa91cff515 | ||
|
|
f415814069 | ||
|
|
9cf78cf14b | ||
|
|
8dc87576c5 | ||
|
|
f0db17be87 | ||
|
|
616c52f266 | ||
|
|
5bad45925a | ||
|
|
cdd9ea2496 | ||
|
|
14ef99ca67 | ||
|
|
2cd45a9e38 | ||
|
|
a070035d97 | ||
|
|
012d7124cd | ||
|
|
cde1e2c5f3 | ||
|
|
ead441f5db | ||
|
|
031e09fede | ||
|
|
1ee27a564b | ||
|
|
23c51c9a11 | ||
|
|
f9e653ea9f | ||
|
|
131085be80 | ||
|
|
12081e4f5b | ||
|
|
e1b8f52e59 | ||
|
|
6dad42a4db | ||
|
|
799d95d67a | ||
|
|
b131c60f08 | ||
|
|
1e2e247789 | ||
|
|
0caeb41bff | ||
|
|
fd0cbd448b | ||
|
|
bdf6e87dc5 | ||
|
|
88c7aca6f5 | ||
|
|
887c891ab2 | ||
|
|
2bc5fb10a7 | ||
|
|
8497e9c54f | ||
|
|
2e07e69697 | ||
|
|
2fea4e72b5 | ||
|
|
2863ade0c2 | ||
|
|
fb0b638cbb | ||
|
|
1e2d011705 | ||
|
|
dfaca04167 | ||
|
|
33b1d5f4b3 | ||
|
|
2499822106 | ||
|
|
9fe9e8989d | ||
|
|
311d3e1c18 | ||
|
|
5e444553b1 | ||
|
|
16f011a47f | ||
|
|
488049e695 | ||
|
|
d23e5e15ba | ||
|
|
5ad52192fe | ||
|
|
937dc7b7c3 | ||
|
|
7fa5e8706e | ||
|
|
2f27d5d108 | ||
|
|
56f23db878 | ||
|
|
264e3928c2 | ||
|
|
ef629ba0d0 | ||
|
|
aacdbc360b | ||
|
|
e2e37c8cfb | ||
|
|
c307433900 | ||
|
|
97e6a6669f | ||
|
|
e8f5cc67f8 | ||
|
|
8f9c1dd781 | ||
|
|
60634366c1 | ||
|
|
78bd280666 | ||
|
|
217540296f | ||
|
|
7eaabd4e00 | ||
|
|
ff59f3dbb4 | ||
|
|
9c8da1d4d3 | ||
|
|
ffc9f67751 | ||
|
|
bf1a0a0b83 | ||
|
|
f864687a96 | ||
|
|
030d6e5962 | ||
|
|
f609be6ec3 | ||
|
|
aa4a4c9fd0 | ||
|
|
269d12d1be | ||
|
|
23a1ae0337 | ||
|
|
4571899664 | ||
|
|
6d9b50b938 | ||
|
|
cd763be05b | ||
|
|
4e6b24d67d | ||
|
|
42a7194e93 | ||
|
|
01e063f6f5 | ||
|
|
81e3f6e7d9 | ||
|
|
9f1753cc4f | ||
|
|
39eafc3255 | ||
|
|
d342968211 | ||
|
|
c5968e8896 | ||
|
|
8e6f4d4ecb | ||
|
|
f80177cbd3 | ||
|
|
32b0314990 | ||
|
|
665e43fecc | ||
|
|
b5fb96dca0 | ||
|
|
73722ce186 | ||
|
|
638ed7b4f2 | ||
|
|
b5b12216d6 | ||
|
|
d2867a2ed8 | ||
|
|
e290995999 | ||
|
|
9ae8907b3e | ||
|
|
a80f3e8190 | ||
|
|
b3d1ca6cb2 | ||
|
|
0290b1ed3c | ||
|
|
869209389e | ||
|
|
c6530e352f | ||
|
|
706f588b36 | ||
|
|
eb20dfbc94 | ||
|
|
f69ba3ea1d | ||
|
|
88ff807700 | ||
|
|
e76e75cdff | ||
|
|
083c61754b | ||
|
|
146bbda33f | ||
|
|
c9f90e6770 | ||
|
|
6a2a8579ae | ||
|
|
29dd2c2138 | ||
|
|
4e5aef0a8a | ||
|
|
039c42b1fe | ||
|
|
1e45349890 | ||
|
|
d64bbfa9c0 | ||
|
|
d5605a29b4 | ||
|
|
4c28fa6009 | ||
|
|
ad9ae6a143 | ||
|
|
a5b0bc04cc | ||
|
|
f491e99bf9 | ||
|
|
402c44b547 | ||
|
|
ac4086b273 | ||
|
|
f00769f758 | ||
|
|
6ceb4dfc4f | ||
|
|
3a2941b719 | ||
|
|
99826a6b51 | ||
|
|
4a9a7434f6 | ||
|
|
dbb721cb5e | ||
|
|
2a93bb2cee | ||
|
|
7dfb4d9dc0 | ||
|
|
22eca8e0d5 | ||
|
|
ecb46643e2 | ||
|
|
73d959a259 | ||
|
|
a95b179a60 | ||
|
|
2e4a83547d | ||
|
|
fd30294ca0 | ||
|
|
9b16a2736a | ||
|
|
ea7aa4ccef | ||
|
|
d81845e1ab | ||
|
|
f9d07229b4 | ||
|
|
2d15c10e0f | ||
|
|
5bd6a1c028 | ||
|
|
356e666e61 | ||
|
|
bdf12bca0f | ||
|
|
c44ae06d54 | ||
|
|
c7de9e6561 | ||
|
|
00c9f89213 | ||
|
|
8f2a92c3ec | ||
|
|
69e67784d3 | ||
|
|
cd7f73a31c | ||
|
|
98cfe7ed37 | ||
|
|
449617d717 | ||
|
|
a25042db72 | ||
|
|
049caabdae | ||
|
|
81b1cccb0b | ||
|
|
2911bb3a81 | ||
|
|
45412a2ace | ||
|
|
f4cedd7b63 | ||
|
|
3e3d34b3ce | ||
|
|
12fb27e2cf | ||
|
|
a1e8c1353f | ||
|
|
c01c035269 | ||
|
|
eeb8bbe5bc | ||
|
|
f85aba5d21 | ||
|
|
f8bf8fddd9 | ||
|
|
7459677fd5 | ||
|
|
c0b0628d59 | ||
|
|
59e8fdb9ed | ||
|
|
5142a406b0 | ||
|
|
3cc8b19ca0 | ||
|
|
f8865b1498 | ||
|
|
969821296f | ||
|
|
a877b1d269 | ||
|
|
9cea70b77c | ||
|
|
d2d501c821 | ||
|
|
a5089638ea | ||
|
|
17f82280d0 | ||
|
|
c78d800392 | ||
|
|
8bef964f68 | ||
|
|
4da37baf8c | ||
|
|
33e7a54c29 | ||
|
|
1d4c8dda96 | ||
|
|
b633b593ad | ||
|
|
8dbb83f99b | ||
|
|
f24e4f6462 | ||
|
|
2e001677df | ||
|
|
be253808d4 | ||
|
|
e07cbe858b | ||
|
|
271a12dcca | ||
|
|
06c70a7cd9 | ||
|
|
dccf7f9ae7 | ||
|
|
aa1f0077d8 | ||
|
|
348916040c | ||
|
|
014c80f15d | ||
|
|
6adba6dad4 | ||
|
|
b346507975 | ||
|
|
fb5b873524 | ||
|
|
a6f381403c | ||
|
|
5d0fd2dc8e | ||
|
|
1ad6b5504c | ||
|
|
222fcfae87 | ||
|
|
5a2c3d8396 | ||
|
|
687617de25 | ||
|
|
a682ae3299 | ||
|
|
2e6523aa10 | ||
|
|
29591609f5 | ||
|
|
b15da20f9c | ||
|
|
8f2f3d73df | ||
|
|
7d7459100b | ||
|
|
8a0c8d9709 | ||
|
|
8592561b7a | ||
|
|
7ff465053b | ||
|
|
c62ac89081 | ||
|
|
1c58e28124 | ||
|
|
96ee721d21 | ||
|
|
de7ed2b968 | ||
|
|
4fb3086c1c | ||
|
|
5ab17fcd46 | ||
|
|
ff1849b63b | ||
|
|
9db3fb280e | ||
|
|
06e105821a | ||
|
|
a0046e325c | ||
|
|
e84bad4eca | ||
|
|
fc5b339f04 | ||
|
|
96cfdda9a1 | ||
|
|
3b4b230cab | ||
|
|
6163d27f14 | ||
|
|
f3f75fb788 | ||
|
|
d07a806123 | ||
|
|
ef522f6404 | ||
|
|
763691fa4b | ||
|
|
2491149d61 | ||
|
|
9bc13813ba | ||
|
|
3edaebb4cf | ||
|
|
558c524e2a | ||
|
|
d6582de09b | ||
|
|
d32df84ca5 | ||
|
|
8a13e0febd | ||
|
|
028b335bac | ||
|
|
d7d09159c1 | ||
|
|
ffec421408 | ||
|
|
d0df824599 | ||
|
|
4dec063472 | ||
|
|
86e25a13e3 | ||
|
|
91b50f1ac8 | ||
|
|
8ef3e2ec14 | ||
|
|
e9e747f0d1 | ||
|
|
3a75f39935 | ||
|
|
529f394c02 | ||
|
|
e3422979d1 | ||
|
|
bf248caa47 | ||
|
|
aa3dc75434 | ||
|
|
118b2e4a68 | ||
|
|
f1827e925e | ||
|
|
b8762ed428 | ||
|
|
38d20ea5f4 | ||
|
|
1fbbae1e4a | ||
|
|
caa2da8bb3 | ||
|
|
66734c7d3f | ||
|
|
a066f9a49c | ||
|
|
99d995fdab | ||
|
|
381e907ca0 | ||
|
|
9126504c76 | ||
|
|
d0f88c6068 | ||
|
|
a789316bbb | ||
|
|
f9bbdeeff9 | ||
|
|
a4d35065d9 | ||
|
|
901f1a7ab1 | ||
|
|
450b9ec19a | ||
|
|
a556070b42 | ||
|
|
05421057ae | ||
|
|
c3fd5835c3 | ||
|
|
cf48a34065 | ||
|
|
6245f86d7c | ||
|
|
84ebf9d372 | ||
|
|
2d5a7b6aa8 | ||
|
|
e9b51b7baa | ||
|
|
84d7eb05f3 | ||
|
|
41e374f0d9 | ||
|
|
c53fa07d2b | ||
|
|
8791261220 | ||
|
|
c7d2639010 | ||
|
|
c529770d38 | ||
|
|
64fb4f265b | ||
|
|
ca9a3063d8 | ||
|
|
33f6b91146 | ||
|
|
ada99a6dd1 | ||
|
|
7d1be2d234 | ||
|
|
2b87a10cf2 | ||
|
|
d224c0e7d8 | ||
|
|
921abd4623 | ||
|
|
6e7b440630 | ||
|
|
cd723e32e8 | ||
|
|
b13d9a04eb | ||
|
|
258f936272 | ||
|
|
997f90dae7 | ||
|
|
5d559971ca | ||
|
|
8102526abc | ||
|
|
af30f8cd4b | ||
|
|
4418ee743a | ||
|
|
fa18a75177 | ||
|
|
0e7c0e2903 | ||
|
|
f3c1435b01 | ||
|
|
fb28b931cc | ||
|
|
dd980fde49 | ||
|
|
ca77fda511 | ||
|
|
e3f726796b | ||
|
|
3953568a0e | ||
|
|
f9bc3fb09b | ||
|
|
0497ab072b | ||
|
|
5431601cef | ||
|
|
aeb2c6e8ec | ||
|
|
79f4685d9a | ||
|
|
5fa7a743f5 | ||
|
|
9124ed9348 | ||
|
|
55133d03cf | ||
|
|
77eb79ced5 | ||
|
|
9d24d181d7 | ||
|
|
b011b935b4 | ||
|
|
d807ba27a6 | ||
|
|
7c4b76f3f7 | ||
|
|
835228d9f7 | ||
|
|
2847c814d2 | ||
|
|
f77c4c67f2 | ||
|
|
13d256e737 | ||
|
|
ed4cfd55ac | ||
|
|
f965fd5a8c | ||
|
|
472ec1a0e6 | ||
|
|
74d62c92cd | ||
|
|
7e47b04676 | ||
|
|
d19c152d9a | ||
|
|
2abea46a87 | ||
|
|
e450e62b40 | ||
|
|
e6afd12d4f | ||
|
|
2ba19c9827 | ||
|
|
426bc8f0c4 | ||
|
|
f9f7567b17 | ||
|
|
d2b3ffc710 | ||
|
|
ed2f2c5a60 | ||
|
|
c235145121 | ||
|
|
f8d1488e33 | ||
|
|
0013e610d5 | ||
|
|
2c9b034c08 | ||
|
|
455cdf96f0 | ||
|
|
5519e97e6e | ||
|
|
4c4a674a4b | ||
|
|
239aecb0bb | ||
|
|
b1e23b46dd | ||
|
|
9d679462ed | ||
|
|
be31811920 | ||
|
|
26ed6254dc | ||
|
|
1cb4d73fe3 | ||
|
|
f110b5000b | ||
|
|
83f437f979 | ||
|
|
175a7b06b7 | ||
|
|
9d580693db | ||
|
|
3bdf7111ce | ||
|
|
23ebcfb2db | ||
|
|
b1eac17d60 | ||
|
|
9dfa38f1e7 | ||
|
|
80fd0f9fab | ||
|
|
58174e5e91 | ||
|
|
ab7f0cb4cc | ||
|
|
f6f480264e | ||
|
|
8cd265c38c | ||
|
|
99fe304c1f | ||
|
|
7889634b40 | ||
|
|
0e224abb0a | ||
|
|
c9f7cbae09 | ||
|
|
2e537013a2 | ||
|
|
7cb9b92347 | ||
|
|
bb2cc0deb7 | ||
|
|
d4a3024996 | ||
|
|
77d5b73724 | ||
|
|
ec717f27b5 | ||
|
|
0fc215c457 | ||
|
|
534a764023 | ||
|
|
dc705d88ab | ||
|
|
6e9fd5a430 | ||
|
|
e3f37bc2f9 | ||
|
|
f6d58c7d46 | ||
|
|
48545c5916 | ||
|
|
f7dcfffdb1 | ||
|
|
52281906c6 | ||
|
|
487b2a3655 | ||
|
|
71ee145f70 | ||
|
|
da20d74145 | ||
|
|
c29fa62260 | ||
|
|
5613912ec4 | ||
|
|
b77c5428f9 | ||
|
|
2012ce384e | ||
|
|
6b40ede2bc | ||
|
|
128c5f67ad | ||
|
|
578bebb04d | ||
|
|
5611249af7 | ||
|
|
a56febcd13 | ||
|
|
0ad992985c | ||
|
|
1a66c3f1a1 | ||
|
|
a2ef2fd9d9 | ||
|
|
5c02cb50da | ||
|
|
998c55030a | ||
|
|
079de97fab | ||
|
|
432addab33 | ||
|
|
10d292092a | ||
|
|
a02ee96651 | ||
|
|
d783febad6 | ||
|
|
ea6d9073b7 | ||
|
|
83a5923568 | ||
|
|
9e2b63890c | ||
|
|
ed08895d4a | ||
|
|
5b4026694d | ||
|
|
c9798ba2e9 | ||
|
|
3752551e53 | ||
|
|
a62f6f9552 | ||
|
|
e9d2e194f3 | ||
|
|
6009fffa7b | ||
|
|
fad1e5fb3c | ||
|
|
228f02c361 | ||
|
|
72c45d882b | ||
|
|
4dc7a8103b | ||
|
|
71108e1bde | ||
|
|
72b7d934f6 | ||
|
|
08e9e834b9 | ||
|
|
c26c4ce714 | ||
|
|
61ab47cc95 | ||
|
|
7db7b3727d | ||
|
|
1d03b942a5 | ||
|
|
ee87f73d5e | ||
|
|
bb7bff9115 | ||
|
|
1e5fdde9ba | ||
|
|
2b29a4c20f | ||
|
|
119e7ea7bf | ||
|
|
58c81be1f1 | ||
|
|
d3b137c817 | ||
|
|
9dce868fb9 | ||
|
|
c4170fbb86 | ||
|
|
2dc4ceae29 | ||
|
|
0e0a26f644 | ||
|
|
68d77b02d7 | ||
|
|
c13c83b902 | ||
|
|
72c9d94390 | ||
|
|
9101469308 | ||
|
|
759573ace3 | ||
|
|
0a1836e5a8 | ||
|
|
8af1075c98 | ||
|
|
91498ec690 | ||
|
|
59b62dcb77 | ||
|
|
10f9b29e03 | ||
|
|
d5af5cf8f8 | ||
|
|
05928ccc25 | ||
|
|
ad6dc876b3 | ||
|
|
207dae418d | ||
|
|
7508411faf | ||
|
|
f34031a984 | ||
|
|
d1aadc2e3b | ||
|
|
6d8cf91568 | ||
|
|
96b2560f79 | ||
|
|
923d47fff0 | ||
|
|
542a27a032 | ||
|
|
a7e8ac6cf8 | ||
|
|
42fd146c2b | ||
|
|
34468782cd | ||
|
|
3badeb56a0 | ||
|
|
bc18b5d0be | ||
|
|
158d2e4302 | ||
|
|
f60118ee79 | ||
|
|
6bc217e985 | ||
|
|
3560b6a3c2 | ||
|
|
77eecdd2c2 | ||
|
|
f4943b77f3 | ||
|
|
c908ef2489 | ||
|
|
d21155f3c6 | ||
|
|
da39ed2ce0 | ||
|
|
06500761fb | ||
|
|
919a6c0cc4 | ||
|
|
467e5115b0 | ||
|
|
c495802f64 | ||
|
|
66e48ed2d7 | ||
|
|
ac4cd3eb9b | ||
|
|
5d73402651 | ||
|
|
427b6516e0 | ||
|
|
eae9009b98 | ||
|
|
166d8dd53c | ||
|
|
680081b93b | ||
|
|
e66eeefb14 | ||
|
|
8e9e8cd169 | ||
|
|
f96538dfba | ||
|
|
9ad174c129 | ||
|
|
17b40ac4ad | ||
|
|
4453727754 | ||
|
|
d086318f4e | ||
|
|
5b7f1fe853 | ||
|
|
4c357d2d60 | ||
|
|
0eb5588454 | ||
|
|
5ba8b43fb8 | ||
|
|
0eb754d76e | ||
|
|
7c463849cc | ||
|
|
daed23422e | ||
|
|
550e332909 | ||
|
|
43f26dcd76 | ||
|
|
e1d1a5226c | ||
|
|
82aaa89ab6 | ||
|
|
aac384f54f | ||
|
|
ffccaa8817 | ||
|
|
bd488a6182 | ||
|
|
41ec1b4cb2 | ||
|
|
18bf9d3d95 | ||
|
|
56e070b3d1 | ||
|
|
88a9f8d892 | ||
|
|
0f367ab117 | ||
|
|
838f078fa5 | ||
|
|
d6f0555771 | ||
|
|
3ee3d13f0f | ||
|
|
6267ecc3dc | ||
|
|
1487a037ed | ||
|
|
1bba25e080 | ||
|
|
c6096c3c34 | ||
|
|
2604705bab | ||
|
|
5f948d0d96 | ||
|
|
3e42fa28df | ||
|
|
d9dc6a396f | ||
|
|
bdb72684b0 | ||
|
|
0f05936e63 | ||
|
|
290493e485 | ||
|
|
637301d340 | ||
|
|
c7e4815d79 | ||
|
|
54d73b7ac5 | ||
|
|
cbdf1e6c09 | ||
|
|
2e49930b94 | ||
|
|
9da0cb2ad1 | ||
|
|
cf6bd0e772 | ||
|
|
dc686bd1bf | ||
|
|
e002dbf57e | ||
|
|
38f4f4f695 | ||
|
|
a4bc548fe5 | ||
|
|
e57798360f | ||
|
|
3cbbc94249 | ||
|
|
cbc08e696f | ||
|
|
6e45ab599e | ||
|
|
e55fb68a29 | ||
|
|
7a1ff6bfed | ||
|
|
18809ddf0b | ||
|
|
7158514d48 | ||
|
|
3445f47482 | ||
|
|
5b33443607 | ||
|
|
05b2c66aaf | ||
|
|
50038516cb | ||
|
|
f6752310b4 | ||
|
|
e5c75fa2f7 | ||
|
|
40e8bfe443 | ||
|
|
ed11c0a6da | ||
|
|
365667ee0a | ||
|
|
1cfd5f0735 | ||
|
|
e8ee091e5a | ||
|
|
133cd30b2e | ||
|
|
e3fcb99d84 | ||
|
|
e8acb8a2a9 | ||
|
|
2a107cc463 | ||
|
|
1cd1f13fee | ||
|
|
7af3e4e340 | ||
|
|
d8b07570a3 | ||
|
|
95c960574a | ||
|
|
8266cd893b | ||
|
|
cb07469f4a | ||
|
|
e2fb6dd288 | ||
|
|
5b1613997a | ||
|
|
7bec469948 | ||
|
|
cc10a9cb4d | ||
|
|
171762d1aa | ||
|
|
78fd2fd0ac | ||
|
|
ff981ecb5c | ||
|
|
62d184a377 | ||
|
|
c6accf5151 | ||
|
|
a8f5b8ac8b | ||
|
|
179ef31b80 | ||
|
|
f4ba1e35e1 | ||
|
|
8a69c23646 | ||
|
|
bee01544c5 | ||
|
|
9e22c2609c | ||
|
|
6eba700ecf | ||
|
|
6f5d175d12 | ||
|
|
66fd532ee6 | ||
|
|
29f605e8ae | ||
|
|
1013c23f46 | ||
|
|
8d61374311 | ||
|
|
9399491a64 | ||
|
|
5a91552060 | ||
|
|
bd1ffa56dc | ||
|
|
046eb4d9fd | ||
|
|
ad7141fe21 | ||
|
|
7f0891a0f0 | ||
|
|
04a4a6cadc | ||
|
|
db79911c4b | ||
|
|
82595ee256 | ||
|
|
f3b55d6b08 | ||
|
|
2322e3bcf7 | ||
|
|
95daab4bc0 | ||
|
|
4c90f9960e | ||
|
|
01b2c952ea | ||
|
|
edb2c98ad7 | ||
|
|
ff89ec660c | ||
|
|
29790da63d | ||
|
|
859626cbe3 | ||
|
|
3d3a32087f | ||
|
|
002fd008a6 | ||
|
|
d9adf14551 | ||
|
|
62f086f607 | ||
|
|
9dc2525ce1 | ||
|
|
03946b42fa | ||
|
|
0e362f38bc | ||
|
|
1ad30d50a6 | ||
|
|
dc5843651b | ||
|
|
d3f98ef7bc | ||
|
|
e7b2b4fc3d | ||
|
|
13daf095d9 | ||
|
|
57f82f7504 | ||
|
|
a8c2e908a2 | ||
|
|
b9e15389ca | ||
|
|
9b6ab55936 | ||
|
|
235cda1051 | ||
|
|
28d1eaf8da | ||
|
|
fc4f43ac7f | ||
|
|
eef5d91606 | ||
|
|
e2d2591281 | ||
|
|
138304ff51 | ||
|
|
fdaa0b7ba1 | ||
|
|
10d2c0285c | ||
|
|
b541960611 | ||
|
|
ce3e2401cb | ||
|
|
96f3df3929 | ||
|
|
f1a9302c3e | ||
|
|
3a10c0546f | ||
|
|
5439f2d7b8 | ||
|
|
1a8abf054e | ||
|
|
13e38df391 | ||
|
|
53a71f7226 | ||
|
|
df90b299f2 | ||
|
|
71329718e4 | ||
|
|
fa983eee0e | ||
|
|
372183555b | ||
|
|
9cfbce5e09 | ||
|
|
f3c9b0e888 | ||
|
|
5678d15841 | ||
|
|
df91a85128 | ||
|
|
df973763bb | ||
|
|
76fdc4fc4b | ||
|
|
af52e454e7 | ||
|
|
d5e7ab4985 | ||
|
|
b89a6cc077 | ||
|
|
0a58781b0c | ||
|
|
b755218837 | ||
|
|
87fe8a4f7e | ||
|
|
b953d8db05 | ||
|
|
aa294ff066 | ||
|
|
8b84d7650b | ||
|
|
fcfb738ded | ||
|
|
21a56c9cbf | ||
|
|
82696000e4 | ||
|
|
ec1839d580 | ||
|
|
47b8cb6044 | ||
|
|
27e862da62 | ||
|
|
2a5110aa04 | ||
|
|
4a5e185973 | ||
|
|
4f1d4695cd | ||
|
|
d27990b273 | ||
|
|
cf123b7d88 | ||
|
|
2a07bc4ef3 | ||
|
|
797d90c4dd | ||
|
|
55e12fb34b | ||
|
|
92bc46f232 | ||
|
|
ebdf650450 | ||
|
|
fac7f8d56e | ||
|
|
39e69c2723 | ||
|
|
ed7216575c | ||
|
|
166a68244e | ||
|
|
83c7fad882 | ||
|
|
a15f050e1b | ||
|
|
ce35260b5d | ||
|
|
972d07ccd0 | ||
|
|
476e5dcb18 | ||
|
|
d8d173db4d | ||
|
|
d89404ee6d | ||
|
|
fe9d2a0e1d | ||
|
|
bd07f1d455 | ||
|
|
a8ab7e3bef | ||
|
|
52caa8a06f | ||
|
|
0fde6ef57a | ||
|
|
4c5af7c03c | ||
|
|
1d4bbbf6aa | ||
|
|
611c37b6bf | ||
|
|
316a44b812 | ||
|
|
030a9622cf | ||
|
|
b1db0803cf | ||
|
|
77eb474b29 | ||
|
|
4efe6040e9 | ||
|
|
bd9255136c | ||
|
|
d254aafb93 | ||
|
|
ed3a39dc74 | ||
|
|
fe832f510e | ||
|
|
3022f19eda | ||
|
|
1c00721de3 | ||
|
|
043989e8ee | ||
|
|
0c25424a3e | ||
|
|
df58821655 | ||
|
|
69969f782d | ||
|
|
1d4d62afb7 | ||
|
|
deec6cf51e | ||
|
|
5a738af607 | ||
|
|
d5f57c35e2 | ||
|
|
eda05edd6d | ||
|
|
f9f04e4b2e | ||
|
|
36da54b8ce | ||
|
|
a9103dd1ae | ||
|
|
d219840650 | ||
|
|
3d9cef24cd |
26
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
26
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior.
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Required data**
|
||||
- Miner log as text or screenshot
|
||||
- Config file or command line (without wallets)
|
||||
- OS: [e.g. Windows]
|
||||
- For GPU related issues: information about GPUs and driver version.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,2 +1,6 @@
|
||||
/build
|
||||
scripts/build
|
||||
scripts/deps
|
||||
/CMakeLists.txt.user
|
||||
/.idea
|
||||
/src/backend/opencl/cl/cn/cryptonight_gen.cl
|
||||
|
||||
565
CHANGELOG.md
565
CHANGELOG.md
@@ -1,25 +1,546 @@
|
||||
# v3.0.0
|
||||
- **[#1111](https://github.com/xmrig/xmrig/pull/1111) Added RandomX (`rx/test`) algorithm for testing and benchmarking.**
|
||||
- **[#1036](https://github.com/xmrig/xmrig/pull/1036) Added RandomWOW (`rx/wow`) algorithm for [Wownero](http://wownero.org/).**
|
||||
- **[#1050](https://github.com/xmrig/xmrig/pull/1050) Added RandomXL (`rx/loki`) algorithm for [Loki](https://loki.network/).**
|
||||
- **[#1077](https://github.com/xmrig/xmrig/issues/1077) Added NUMA support via hwloc**.
|
||||
- **Added flexible [multi algorithm](doc/CPU.md) configuration.**
|
||||
- **Added unlimited switching between incompatible algorithms, all mining options can be changed in runtime.**
|
||||
- [#257](https://github.com/xmrig/xmrig-nvidia/pull/257) New logging subsystem, file and syslog now always without colors.
|
||||
- [#314](https://github.com/xmrig/xmrig-proxy/issues/314) Added donate over proxy feature.
|
||||
- [#1007](https://github.com/xmrig/xmrig/issues/1007) Old HTTP API backend based on libmicrohttpd, replaced to custom HTTP server (libuv + http_parser).
|
||||
- [#1010](https://github.com/xmrig/xmrig/pull/1010#issuecomment-482632107) Added daemon support (solo mining).
|
||||
- [#1066](https://github.com/xmrig/xmrig/issues/1066#issuecomment-518080529) Added error message if pool not ready for RandomX.
|
||||
- [#1105](https://github.com/xmrig/xmrig/issues/1105) Improved auto configuration for `cn-pico` algorithm.
|
||||
- Added commands `pause` and `resume` via JSON RPC 2.0 API (`POST /json_rpc`).
|
||||
- Added command line option `--export-topology` for export hwloc topology to a XML file.
|
||||
- Breaked backward compatibility with previous configs and command line, `variant` option replaced to `algo`, global option `algo` removed, all CPU related settings moved to `cpu` object.
|
||||
- Options `av`, `safe` and `max-cpu-usage` removed.
|
||||
- Algorithm `cn/msr` renamed to `cn/fast`.
|
||||
- Algorithm `cn/xtl` removed.
|
||||
- API endpoint `GET /1/threads` replaced to `GET /2/backends`.
|
||||
- Added global uptime and extended connection information in API.
|
||||
- API now return current algorithm.
|
||||
# v6.19.3
|
||||
- [#3245](https://github.com/xmrig/xmrig/issues/3245) Improved algorithm negotiation for donation rounds by sending extra information about current mining job.
|
||||
- [#3254](https://github.com/xmrig/xmrig/pull/3254) Tweaked auto-tuning for Intel CPUs.
|
||||
- [#3271](https://github.com/xmrig/xmrig/pull/3271) RandomX: optimized program generation.
|
||||
- [#3273](https://github.com/xmrig/xmrig/pull/3273) RandomX: fixed undefined behavior.
|
||||
- [#3275](https://github.com/xmrig/xmrig/pull/3275) RandomX: fixed `jccErratum` list.
|
||||
- [#3280](https://github.com/xmrig/xmrig/pull/3280) Updated example scripts.
|
||||
|
||||
# v6.19.2
|
||||
- [#3230](https://github.com/xmrig/xmrig/pull/3230) Fixed parsing of `TX_EXTRA_MERGE_MINING_TAG`.
|
||||
- [#3232](https://github.com/xmrig/xmrig/pull/3232) Added new `X-Hash-Difficulty` HTTP header.
|
||||
- [#3240](https://github.com/xmrig/xmrig/pull/3240) Improved .cmd files when run by shortcuts on another drive.
|
||||
- [#3241](https://github.com/xmrig/xmrig/pull/3241) Added view tag calculation (fixes Wownero solo mining issue).
|
||||
|
||||
# v6.19.1
|
||||
- Resolved deprecated methods warnings with OpenSSL 3.0.
|
||||
- [#3213](https://github.com/xmrig/xmrig/pull/3213) Fixed build with 32-bit clang 15.
|
||||
- [#3218](https://github.com/xmrig/xmrig/pull/3218) Fixed: `--randomx-wrmsr=-1` worked only on Intel.
|
||||
- [#3228](https://github.com/xmrig/xmrig/pull/3228) Fixed build with gcc 13.
|
||||
|
||||
# v6.19.0
|
||||
- [#3144](https://github.com/xmrig/xmrig/pull/3144) Update to latest `sse2neon.h`.
|
||||
- [#3161](https://github.com/xmrig/xmrig/pull/3161) MSVC build: enabled parallel compilation.
|
||||
- [#3163](https://github.com/xmrig/xmrig/pull/3163) Improved Zen 3 MSR mod.
|
||||
- [#3176](https://github.com/xmrig/xmrig/pull/3176) Update cmake required version to 3.1.
|
||||
- [#3182](https://github.com/xmrig/xmrig/pull/3182) DragonflyBSD compilation fixes.
|
||||
- [#3196](https://github.com/xmrig/xmrig/pull/3196) Show IP address for failed connections.
|
||||
- [#3185](https://github.com/xmrig/xmrig/issues/3185) Fixed macOS DMI reader.
|
||||
- [#3198](https://github.com/xmrig/xmrig/pull/3198) Fixed broken RandomX light mode mining.
|
||||
- [#3202](https://github.com/xmrig/xmrig/pull/3202) Solo mining: added job timeout (default is 15 seconds).
|
||||
|
||||
# v6.18.1
|
||||
- [#3129](https://github.com/xmrig/xmrig/pull/3129) Fix: protectRX flushed CPU cache only on MacOS/iOS.
|
||||
- [#3126](https://github.com/xmrig/xmrig/pull/3126) Don't reset when pool sends the same job blob.
|
||||
- [#3120](https://github.com/xmrig/xmrig/pull/3120) RandomX: optimized `CFROUND` elimination.
|
||||
- [#3109](https://github.com/xmrig/xmrig/pull/3109) RandomX: added Blake2 AVX2 version.
|
||||
- [#3082](https://github.com/xmrig/xmrig/pull/3082) Fixed GCC 12 warnings.
|
||||
- [#3075](https://github.com/xmrig/xmrig/pull/3075) Recognize `armv7ve` as valid ARMv7 target.
|
||||
- [#3132](https://github.com/xmrig/xmrig/pull/3132) RandomX: added MSR mod for Zen 4.
|
||||
- [#3134](https://github.com/xmrig/xmrig/pull/3134) Added Zen4 to `randomx_boost.sh`.
|
||||
|
||||
# v6.18.0
|
||||
- [#3067](https://github.com/xmrig/xmrig/pull/3067) Monero v15 network upgrade support and more house keeping.
|
||||
- Removed deprecated AstroBWTv1 and v2.
|
||||
- Fixed debug GhostRider build.
|
||||
- Monero v15 network upgrade support.
|
||||
- Fixed ZMQ debug log.
|
||||
- Improved daemon ZMQ mining stability.
|
||||
- [#3054](https://github.com/xmrig/xmrig/pull/3054) Fixes for 32-bit ARM.
|
||||
- [#3042](https://github.com/xmrig/xmrig/pull/3042) Fixed being unable to resume from `pause-on-battery`.
|
||||
- [#3031](https://github.com/xmrig/xmrig/pull/3031) Fixed `--cpu-priority` not working sometimes.
|
||||
- [#3020](https://github.com/xmrig/xmrig/pull/3020) Removed old AstroBWT algorithm.
|
||||
|
||||
# v6.17.0
|
||||
- [#2954](https://github.com/xmrig/xmrig/pull/2954) **Dero HE fork support (`astrobwt/v2` algorithm).**
|
||||
- [#2961](https://github.com/xmrig/xmrig/pull/2961) Dero HE (`astrobwt/v2`) CUDA config generator.
|
||||
- [#2969](https://github.com/xmrig/xmrig/pull/2969) Dero HE (`astrobwt/v2`) OpenCL support.
|
||||
- Fixed displayed DMI memory information for empty slots.
|
||||
- [#2932](https://github.com/xmrig/xmrig/pull/2932) Fixed GhostRider with hwloc disabled.
|
||||
|
||||
# v6.16.4
|
||||
- [#2904](https://github.com/xmrig/xmrig/pull/2904) Fixed unaligned memory accesses.
|
||||
- [#2908](https://github.com/xmrig/xmrig/pull/2908) Added MSVC/2022 to `version.h`.
|
||||
- [#2910](https://github.com/xmrig/xmrig/issues/2910) Fixed donation for GhostRider/RTM.
|
||||
|
||||
# v6.16.3
|
||||
- [#2778](https://github.com/xmrig/xmrig/pull/2778) Fixed `READY threads X/X` display after algorithm switching.
|
||||
- [#2782](https://github.com/xmrig/xmrig/pull/2782) Updated GhostRider documentation.
|
||||
- [#2815](https://github.com/xmrig/xmrig/pull/2815) Fixed `cn-heavy` in 32-bit builds.
|
||||
- [#2827](https://github.com/xmrig/xmrig/pull/2827) GhostRider: set correct priority for helper threads.
|
||||
- [#2837](https://github.com/xmrig/xmrig/pull/2837) RandomX: don't restart mining threads when the seed changes.
|
||||
- [#2848](https://github.com/xmrig/xmrig/pull/2848) GhostRider: added support for `client.reconnect` method.
|
||||
- [#2856](https://github.com/xmrig/xmrig/pull/2856) Fix for short responses from some Raptoreum pools.
|
||||
- [#2873](https://github.com/xmrig/xmrig/pull/2873) Fixed GhostRider benchmark on single-core systems.
|
||||
- [#2882](https://github.com/xmrig/xmrig/pull/2882) Fixed ARMv7 compilation.
|
||||
- [#2893](https://github.com/xmrig/xmrig/pull/2893) KawPow OpenCL: use separate UV loop for building programs.
|
||||
|
||||
# v6.16.2
|
||||
- [#2751](https://github.com/xmrig/xmrig/pull/2751) Fixed crash on CPUs supporting VAES and running GCC-compiled xmrig.
|
||||
- [#2761](https://github.com/xmrig/xmrig/pull/2761) Fixed broken auto-tuning in GCC Windows build.
|
||||
- [#2771](https://github.com/xmrig/xmrig/issues/2771) Fixed environment variables support for GhostRider and KawPow.
|
||||
- [#2769](https://github.com/xmrig/xmrig/pull/2769) Performance fixes:
|
||||
- Fixed several performance bottlenecks introduced in v6.16.1.
|
||||
- Fixed overall GCC-compiled build performance, it's the same speed as MSVC build now.
|
||||
- **Linux builds are up to 10% faster now compared to v6.16.0 GCC build.**
|
||||
- **Windows builds are up to 5% faster now compared to v6.16.0 MSVC build.**
|
||||
|
||||
# v6.16.1
|
||||
- [#2729](https://github.com/xmrig/xmrig/pull/2729) GhostRider fixes:
|
||||
- Added average hashrate display.
|
||||
- Fixed the number of threads shown at startup.
|
||||
- Fixed `--threads` or `-t` command line option (but `--cpu-max-threads-hint` is recommended to use).
|
||||
- [#2738](https://github.com/xmrig/xmrig/pull/2738) GhostRider fixes:
|
||||
- Fixed "difficulty is not a number" error when diff is high on some pools.
|
||||
- Fixed GhostRider compilation when `WITH_KAWPOW=OFF`.
|
||||
- [#2740](https://github.com/xmrig/xmrig/pull/2740) Added VAES support for Cryptonight variants **+4% speedup on Zen3**.
|
||||
- VAES instructions are available on Intel Ice Lake/AMD Zen3 and newer CPUs.
|
||||
- +4% speedup on Ryzen 5 5600X.
|
||||
|
||||
# v6.16.0
|
||||
- [#2712](https://github.com/xmrig/xmrig/pull/2712) **GhostRider algorithm (Raptoreum) support**: read the [RELEASE NOTES](src/crypto/ghostrider/README.md) for quick start guide and performance comparisons.
|
||||
- [#2682](https://github.com/xmrig/xmrig/pull/2682) Fixed: use cn-heavy optimization only for Vermeer CPUs.
|
||||
- [#2684](https://github.com/xmrig/xmrig/pull/2684) MSR mod: fix for error 183.
|
||||
|
||||
# v6.15.3
|
||||
- [#2614](https://github.com/xmrig/xmrig/pull/2614) OpenCL fixes for non-AMD platforms.
|
||||
- [#2623](https://github.com/xmrig/xmrig/pull/2623) Fixed compiling without kawpow.
|
||||
- [#2636](https://github.com/xmrig/xmrig/pull/2636) [#2639](https://github.com/xmrig/xmrig/pull/2639) AstroBWT speedup (up to +35%).
|
||||
- [#2646](https://github.com/xmrig/xmrig/pull/2646) Fixed MSVC compilation error.
|
||||
|
||||
# v6.15.2
|
||||
- [#2606](https://github.com/xmrig/xmrig/pull/2606) Fixed: AstroBWT auto-config ignored `max-threads-hint`.
|
||||
- Fixed possible crash on Windows (regression in v6.15.1).
|
||||
|
||||
# v6.15.1
|
||||
- [#2586](https://github.com/xmrig/xmrig/pull/2586) Fixed Windows 7 compatibility.
|
||||
- [#2594](https://github.com/xmrig/xmrig/pull/2594) Added Windows taskbar icon colors.
|
||||
|
||||
# v6.15.0
|
||||
- [#2548](https://github.com/xmrig/xmrig/pull/2548) Added automatic coin detection for daemon mining.
|
||||
- [#2563](https://github.com/xmrig/xmrig/pull/2563) Added new algorithm RandomX Graft (`rx/graft`).
|
||||
- [#2565](https://github.com/xmrig/xmrig/pull/2565) AstroBWT: added AVX2 Salsa20 implementation.
|
||||
- Added support for new CUDA plugin API (previous API still supported).
|
||||
|
||||
# v6.14.1
|
||||
- [#2532](https://github.com/xmrig/xmrig/pull/2532) Refactoring: stable (persistent) algorithms IDs.
|
||||
- [#2537](https://github.com/xmrig/xmrig/pull/2537) Fixed Termux build.
|
||||
|
||||
# v6.14.0
|
||||
- [#2484](https://github.com/xmrig/xmrig/pull/2484) Added ZeroMQ support for solo mining.
|
||||
- [#2476](https://github.com/xmrig/xmrig/issues/2476) Fixed crash in DMI memory reader.
|
||||
- [#2492](https://github.com/xmrig/xmrig/issues/2492) Added missing `--huge-pages-jit` command line option.
|
||||
- [#2512](https://github.com/xmrig/xmrig/pull/2512) Added show the number of transactions in pool job.
|
||||
|
||||
# v6.13.1
|
||||
- [#2468](https://github.com/xmrig/xmrig/pull/2468) Fixed regression in previous version: don't send miner signature during regular mining.
|
||||
|
||||
# v6.13.0
|
||||
- [#2445](https://github.com/xmrig/xmrig/pull/2445) Added support for solo mining with miner signatures for the upcoming Wownero fork.
|
||||
|
||||
# v6.12.2
|
||||
- [#2280](https://github.com/xmrig/xmrig/issues/2280) GPU backends are now disabled in benchmark mode.
|
||||
- [#2322](https://github.com/xmrig/xmrig/pull/2322) Improved MSR compatibility with recent Linux kernels and updated `randomx_boost.sh`.
|
||||
- [#2340](https://github.com/xmrig/xmrig/pull/2340) Fixed AES detection on FreeBSD on ARM.
|
||||
- [#2341](https://github.com/xmrig/xmrig/pull/2341) `sse2neon` updated to the latest version.
|
||||
- [#2351](https://github.com/xmrig/xmrig/issues/2351) Fixed help output for `--cpu-priority` and `--cpu-affinity` option.
|
||||
- [#2375](https://github.com/xmrig/xmrig/pull/2375) Fixed macOS CUDA backend default loader name.
|
||||
- [#2378](https://github.com/xmrig/xmrig/pull/2378) Fixed broken light mode mining on x86.
|
||||
- [#2379](https://github.com/xmrig/xmrig/pull/2379) Fixed CL code for KawPow where it assumes everything is AMD.
|
||||
- [#2386](https://github.com/xmrig/xmrig/pull/2386) RandomX: enabled `IMUL_RCP` optimization for light mode mining.
|
||||
- [#2393](https://github.com/xmrig/xmrig/pull/2393) RandomX: added BMI2 version for scratchpad prefetch.
|
||||
- [#2395](https://github.com/xmrig/xmrig/pull/2395) RandomX: rewrote dataset read code.
|
||||
- [#2398](https://github.com/xmrig/xmrig/pull/2398) RandomX: optimized ARMv8 dataset read.
|
||||
- Added `argon2/ninja` alias for `argon2/wrkz` algorithm.
|
||||
|
||||
# v6.12.1
|
||||
- [#2296](https://github.com/xmrig/xmrig/pull/2296) Fixed Zen3 assembly code for `cn/upx2` algorithm.
|
||||
|
||||
# v6.12.0
|
||||
- [#2276](https://github.com/xmrig/xmrig/pull/2276) Added support for Uplexa (`cn/upx2` algorithm).
|
||||
- [#2261](https://github.com/xmrig/xmrig/pull/2261) Show total hashrate if compiled without OpenCL.
|
||||
- [#2289](https://github.com/xmrig/xmrig/pull/2289) RandomX: optimized `IMUL_RCP` instruction.
|
||||
- Added support for `--user` command line option for online benchmark.
|
||||
|
||||
# v6.11.2
|
||||
- [#2207](https://github.com/xmrig/xmrig/issues/2207) Fixed regression in HTTP parser and llhttp updated to v5.1.0.
|
||||
|
||||
# v6.11.1
|
||||
- [#2239](https://github.com/xmrig/xmrig/pull/2239) Fixed broken `coin` setting functionality.
|
||||
|
||||
# v6.11.0
|
||||
- [#2196](https://github.com/xmrig/xmrig/pull/2196) Improved DNS subsystem and added new DNS specific options.
|
||||
- [#2172](https://github.com/xmrig/xmrig/pull/2172) Fixed build on Alpine 3.13.
|
||||
- [#2177](https://github.com/xmrig/xmrig/pull/2177) Fixed ARM specific compilation error with GCC 10.2.
|
||||
- [#2214](https://github.com/xmrig/xmrig/pull/2214) [#2216](https://github.com/xmrig/xmrig/pull/2216) [#2235](https://github.com/xmrig/xmrig/pull/2235) Optimized `cn-heavy` algorithm.
|
||||
- [#2217](https://github.com/xmrig/xmrig/pull/2217) Fixed mining job creation sequence.
|
||||
- [#2225](https://github.com/xmrig/xmrig/pull/2225) Fixed build without OpenCL support on some systems.
|
||||
- [#2229](https://github.com/xmrig/xmrig/pull/2229) Don't use RandomX JIT if `WITH_ASM=OFF`.
|
||||
- [#2228](https://github.com/xmrig/xmrig/pull/2228) Removed useless code for cryptonight algorithms.
|
||||
- [#2234](https://github.com/xmrig/xmrig/pull/2234) Fixed build error on gcc 4.8.
|
||||
|
||||
# v6.10.0
|
||||
- [#2122](https://github.com/xmrig/xmrig/pull/2122) Fixed pause logic when both pause on battery and user activity are enabled.
|
||||
- [#2123](https://github.com/xmrig/xmrig/issues/2123) Fixed compatibility with gcc 4.8.
|
||||
- [#2147](https://github.com/xmrig/xmrig/pull/2147) Fixed many `new job` messages when solo mining.
|
||||
- [#2150](https://github.com/xmrig/xmrig/pull/2150) Updated `sse2neon.h` to the latest master, fixes build on ARMv7.
|
||||
- [#2157](https://github.com/xmrig/xmrig/pull/2157) Fixed crash in `cn-heavy` on Zen3 with manual thread count.
|
||||
- Fixed possible out of order write to log file.
|
||||
- [http-parser](https://github.com/nodejs/http-parser) replaced to [llhttp](https://github.com/nodejs/llhttp).
|
||||
- For official builds: libuv, hwloc and OpenSSL updated to latest versions.
|
||||
|
||||
# v6.9.0
|
||||
- [#2104](https://github.com/xmrig/xmrig/pull/2104) Added [pause-on-active](https://xmrig.com/docs/miner/config/misc#pause-on-active) config option and `--pause-on-active=N` command line option.
|
||||
- [#2112](https://github.com/xmrig/xmrig/pull/2112) Added support for [Tari merge mining](https://github.com/tari-project/tari/blob/development/README.md#tari-merge-mining).
|
||||
- [#2117](https://github.com/xmrig/xmrig/pull/2117) Fixed crash when GPU mining `cn-heavy` on Zen3 system.
|
||||
|
||||
# v6.8.2
|
||||
- [#2080](https://github.com/xmrig/xmrig/pull/2080) Fixed compile error in Termux.
|
||||
- [#2089](https://github.com/xmrig/xmrig/pull/2089) Optimized CryptoNight-Heavy for Zen3, 7-8% speedup.
|
||||
|
||||
# v6.8.1
|
||||
- [#2064](https://github.com/xmrig/xmrig/pull/2064) Added documentation for config.json CPU options.
|
||||
- [#2066](https://github.com/xmrig/xmrig/issues/2066) Fixed AMD GPUs health data readings on Linux.
|
||||
- [#2067](https://github.com/xmrig/xmrig/pull/2067) Fixed compilation error when RandomX and Argon2 are disabled.
|
||||
- [#2076](https://github.com/xmrig/xmrig/pull/2076) Added support for flexible huge page sizes on Linux.
|
||||
- [#2077](https://github.com/xmrig/xmrig/pull/2077) Fixed `illegal instruction` crash on ARM.
|
||||
|
||||
# v6.8.0
|
||||
- [#2052](https://github.com/xmrig/xmrig/pull/2052) Added DMI/SMBIOS reader.
|
||||
- Added information about memory modules on the miner startup and for online benchmark.
|
||||
- Added new HTTP API endpoint: `GET /2/dmi`.
|
||||
- Added new command line option `--no-dmi` or config option `"dmi"`.
|
||||
- Added new CMake option `-DWITH_DMI=OFF`.
|
||||
- [#2057](https://github.com/xmrig/xmrig/pull/2057) Improved MSR subsystem code quality.
|
||||
- [#2058](https://github.com/xmrig/xmrig/pull/2058) RandomX JIT x86: removed unnecessary instructions.
|
||||
|
||||
# v6.7.2
|
||||
- [#2039](https://github.com/xmrig/xmrig/pull/2039) Fixed solo mining.
|
||||
|
||||
# v6.7.1
|
||||
- [#1995](https://github.com/xmrig/xmrig/issues/1995) Fixed log initialization.
|
||||
- [#1998](https://github.com/xmrig/xmrig/pull/1998) Added hashrate in the benchmark finished message.
|
||||
- [#2009](https://github.com/xmrig/xmrig/pull/2009) AstroBWT OpenCL fixes.
|
||||
- [#2028](https://github.com/xmrig/xmrig/pull/2028) RandomX x86 JIT: removed redundant `CFROUND`.
|
||||
|
||||
# v6.7.0
|
||||
- **[#1991](https://github.com/xmrig/xmrig/issues/1991) Added Apple M1 processor support.**
|
||||
- **[#1986](https://github.com/xmrig/xmrig/pull/1986) Up to 20-30% faster RandomX dataset initialization with AVX2 on some CPUs.**
|
||||
- [#1964](https://github.com/xmrig/xmrig/pull/1964) Cleanup and refactoring.
|
||||
- [#1966](https://github.com/xmrig/xmrig/pull/1966) Removed libcpuid support.
|
||||
- [#1968](https://github.com/xmrig/xmrig/pull/1968) Added virtual machine detection.
|
||||
- [#1969](https://github.com/xmrig/xmrig/pull/1969) [#1970](https://github.com/xmrig/xmrig/pull/1970) Fixed errors found by static analysis.
|
||||
- [#1977](https://github.com/xmrig/xmrig/pull/1977) Fixed: secure JIT and huge pages are incompatible on Windows.
|
||||
- [#1979](https://github.com/xmrig/xmrig/pull/1979) Term `x64` replaced to `64-bit`.
|
||||
- [#1980](https://github.com/xmrig/xmrig/pull/1980) Fixed build on gcc 11.
|
||||
- [#1989](https://github.com/xmrig/xmrig/pull/1989) Fixed broken Dero solo mining.
|
||||
|
||||
# v6.6.2
|
||||
- [#1958](https://github.com/xmrig/xmrig/pull/1958) Added example mining scripts to help new miners.
|
||||
- [#1959](https://github.com/xmrig/xmrig/pull/1959) Optimized JIT compiler.
|
||||
- [#1960](https://github.com/xmrig/xmrig/pull/1960) Fixed RandomX init when switching to other algo and back.
|
||||
|
||||
# v6.6.1
|
||||
- Fixed, benchmark validation on NUMA hardware produced incorrect results in some conditions.
|
||||
|
||||
# v6.6.0
|
||||
- Online benchmark protocol upgraded to v2, validation not compatible with previous versions.
|
||||
- Single thread benchmark now is cheat-resistant, not possible speedup it with multiple threads.
|
||||
- RandomX dataset is now always initialized with static seed, to prevent time cheat by report slow dataset initialization.
|
||||
- Zero delay online submission, to make time validation much more precise and strict.
|
||||
- DNS cache for online benchmark to prevent unexpected delays.
|
||||
|
||||
# v6.5.3
|
||||
- [#1946](https://github.com/xmrig/xmrig/pull/1946) Fixed MSR mod names in JSON API (v6.5.2 affected).
|
||||
|
||||
# v6.5.2
|
||||
- [#1935](https://github.com/xmrig/xmrig/pull/1935) Separate MSR mod for Zen/Zen2 and Zen3.
|
||||
- [#1937](https://github.com/xmrig/xmrig/issues/1937) Print path to existing WinRing0 service without verbose option.
|
||||
- [#1939](https://github.com/xmrig/xmrig/pull/1939) Fixed build with gcc 4.8.
|
||||
- [#1941](https://github.com/xmrig/xmrig/pull/1941) Added CPUID info to JSON report.
|
||||
- [#1941](https://github.com/xmrig/xmrig/pull/1942) Fixed alignment modification in memory pool.
|
||||
- [#1944](https://github.com/xmrig/xmrig/pull/1944) Updated `randomx_boost.sh` with new MSR mod.
|
||||
- Added `250K` and `500K` offline benchmarks.
|
||||
|
||||
# v6.5.1
|
||||
- [#1932](https://github.com/xmrig/xmrig/pull/1932) New MSR mod for Ryzen, up to +3.5% on Zen2 and +1-2% on Zen3.
|
||||
- [#1918](https://github.com/xmrig/xmrig/issues/1918) Fixed 1GB huge pages support on ARMv8.
|
||||
- [#1926](https://github.com/xmrig/xmrig/pull/1926) Fixed compilation on ARMv8 with GCC 9.3.0.
|
||||
- [#1929](https://github.com/xmrig/xmrig/issues/1929) Fixed build without HTTP.
|
||||
|
||||
# v6.5.0
|
||||
- **Added [online benchmark](https://xmrig.com/benchmark) mode for sharing results.**
|
||||
- Added new command line options: `--submit`, ` --verify=ID`, ` --seed=SEED`, `--hash=HASH`.
|
||||
- [#1912](https://github.com/xmrig/xmrig/pull/1912) Fixed MSR kernel module warning with new Linux kernels.
|
||||
- [#1925](https://github.com/xmrig/xmrig/pull/1925) Add checking for config files in user home directory.
|
||||
- Added vendor to ARM CPUs name and added `"arch"` field to API.
|
||||
- Removed legacy CUDA plugin API.
|
||||
|
||||
# v6.4.0
|
||||
- [#1862](https://github.com/xmrig/xmrig/pull/1862) **RandomX: removed `rx/loki` algorithm.**
|
||||
- [#1890](https://github.com/xmrig/xmrig/pull/1890) **Added `argon2/chukwav2` algorithm.**
|
||||
- [#1895](https://github.com/xmrig/xmrig/pull/1895) [#1897](https://github.com/xmrig/xmrig/pull/1897) **Added [benchmark and stress test](https://github.com/xmrig/xmrig/blob/dev/doc/BENCHMARK.md).**
|
||||
- [#1864](https://github.com/xmrig/xmrig/pull/1864) RandomX: improved software AES performance.
|
||||
- [#1870](https://github.com/xmrig/xmrig/pull/1870) RandomX: fixed unexpected resume due to disconnect during dataset init.
|
||||
- [#1872](https://github.com/xmrig/xmrig/pull/1872) RandomX: fixed `randomx_create_vm` call.
|
||||
- [#1875](https://github.com/xmrig/xmrig/pull/1875) RandomX: fixed crash on x86.
|
||||
- [#1876](https://github.com/xmrig/xmrig/pull/1876) RandomX: added `huge-pages-jit` config parameter.
|
||||
- [#1881](https://github.com/xmrig/xmrig/pull/1881) Fixed possible race condition in hashrate counting code.
|
||||
- [#1882](https://github.com/xmrig/xmrig/pull/1882) [#1886](https://github.com/xmrig/xmrig/pull/1886) [#1887](https://github.com/xmrig/xmrig/pull/1887) [#1893](https://github.com/xmrig/xmrig/pull/1893) General code improvements.
|
||||
- [#1885](https://github.com/xmrig/xmrig/pull/1885) Added more precise hashrate calculation.
|
||||
- [#1889](https://github.com/xmrig/xmrig/pull/1889) Fixed libuv performance issue on Linux.
|
||||
|
||||
# v6.3.5
|
||||
- [#1845](https://github.com/xmrig/xmrig/pull/1845) [#1861](https://github.com/xmrig/xmrig/pull/1861) Fixed ARM build and added CMake option `WITH_SSE4_1`.
|
||||
- [#1846](https://github.com/xmrig/xmrig/pull/1846) KawPow: fixed OpenCL memory leak.
|
||||
- [#1849](https://github.com/xmrig/xmrig/pull/1849) [#1859](https://github.com/xmrig/xmrig/pull/1859) RandomX: optimized soft AES code.
|
||||
- [#1850](https://github.com/xmrig/xmrig/pull/1850) [#1852](https://github.com/xmrig/xmrig/pull/1852) General code improvements.
|
||||
- [#1853](https://github.com/xmrig/xmrig/issues/1853) [#1856](https://github.com/xmrig/xmrig/pull/1856) [#1857](https://github.com/xmrig/xmrig/pull/1857) Fixed crash on old CPUs.
|
||||
|
||||
# v6.3.4
|
||||
- [#1823](https://github.com/xmrig/xmrig/pull/1823) RandomX: added new option `scratchpad_prefetch_mode`.
|
||||
- [#1827](https://github.com/xmrig/xmrig/pull/1827) [#1831](https://github.com/xmrig/xmrig/pull/1831) Improved nonce iteration performance.
|
||||
- [#1828](https://github.com/xmrig/xmrig/pull/1828) RandomX: added SSE4.1-optimized Blake2b.
|
||||
- [#1830](https://github.com/xmrig/xmrig/pull/1830) RandomX: added performance profiler (for developers).
|
||||
- [#1835](https://github.com/xmrig/xmrig/pull/1835) RandomX: returned old soft AES implementation and added auto-select between the two.
|
||||
- [#1840](https://github.com/xmrig/xmrig/pull/1840) RandomX: moved more stuff to compile time, small x86 JIT compiler speedup.
|
||||
- [#1841](https://github.com/xmrig/xmrig/pull/1841) Fixed Cryptonight OpenCL for AMD 20.7.2 drivers.
|
||||
- [#1842](https://github.com/xmrig/xmrig/pull/1842) RandomX: AES improvements, a bit faster hardware AES code when compiled with MSVC.
|
||||
- [#1843](https://github.com/xmrig/xmrig/pull/1843) RandomX: improved performance of GCC compiled binaries.
|
||||
|
||||
# v6.3.3
|
||||
- [#1817](https://github.com/xmrig/xmrig/pull/1817) Fixed self-select login sequence.
|
||||
- Added brand new [build from source](https://xmrig.com/docs/miner/build) documentation.
|
||||
- New binary downloads for macOS (`macos-x64`), FreeBSD (`freebsd-static-x64`), Linux (`linux-static-x64`), Ubuntu 18.04 (`bionic-x64`), Ubuntu 20.04 (`focal-x64`).
|
||||
- Generic Linux download `xenial-x64` renamed to `linux-x64`.
|
||||
- Builds without SSL/TLS support are no longer provided.
|
||||
- Improved CUDA loader error reporting and fixed plugin load on Linux.
|
||||
- Fixed build warnings with Clang compiler.
|
||||
- Fixed colors on macOS.
|
||||
|
||||
# v6.3.2
|
||||
- [#1794](https://github.com/xmrig/xmrig/pull/1794) More robust 1 GB pages handling.
|
||||
- Don't allocate 1 GB per thread if 1 GB is the default huge page size.
|
||||
- Try to allocate scratchpad from dataset's 1 GB huge pages, if normal huge pages are not available.
|
||||
- Correctly initialize RandomX cache if 1 GB pages fail to allocate on a first NUMA node.
|
||||
- [#1806](https://github.com/xmrig/xmrig/pull/1806) Fixed macOS battery detection.
|
||||
- [#1809](https://github.com/xmrig/xmrig/issues/1809) Improved auto configuration on ARM CPUs.
|
||||
- Added retrieving ARM CPU names, based on lscpu code and database.
|
||||
|
||||
# v6.3.1
|
||||
- [#1786](https://github.com/xmrig/xmrig/pull/1786) Added `pause-on-battery` option, supported on Windows and Linux.
|
||||
- Added command line options `--randomx-cache-qos` and `--argon2-impl`.
|
||||
|
||||
# v6.3.0
|
||||
- [#1771](https://github.com/xmrig/xmrig/pull/1771) Adopted new SSE2NEON and reduced ARM-specific changes.
|
||||
- [#1774](https://github.com/xmrig/xmrig/pull/1774) RandomX: Added new option `cache_qos` in `randomx` object for cache QoS support.
|
||||
- [#1777](https://github.com/xmrig/xmrig/pull/1777) Added support for upcoming Haven offshore fork.
|
||||
- [#1780](https://github.com/xmrig/xmrig/pull/1780) CryptoNight OpenCL: fix for long input data.
|
||||
|
||||
# v6.2.3
|
||||
- [#1745](https://github.com/xmrig/xmrig/pull/1745) AstroBWT: fixed OpenCL compilation on some systems.
|
||||
- [#1749](https://github.com/xmrig/xmrig/pull/1749) KawPow: optimized CPU share verification.
|
||||
- [#1752](https://github.com/xmrig/xmrig/pull/1752) RandomX: added error message when MSR mod fails.
|
||||
- [#1754](https://github.com/xmrig/xmrig/issues/1754) Fixed GPU health readings for pre Vega GPUs on Linux.
|
||||
- [#1756](https://github.com/xmrig/xmrig/issues/1756) Added results and connection reports.
|
||||
- [#1759](https://github.com/xmrig/xmrig/pull/1759) KawPow: fixed DAG initialization on slower AMD GPUs.
|
||||
- [#1763](https://github.com/xmrig/xmrig/pull/1763) KawPow: fixed rare duplicate share errors.
|
||||
- [#1766](https://github.com/xmrig/xmrig/pull/1766) RandomX: small speedup on Ryzen CPUs.
|
||||
|
||||
# v6.2.2
|
||||
- [#1742](https://github.com/xmrig/xmrig/issues/1742) Fixed crash when use HTTP API.
|
||||
|
||||
# v6.2.1
|
||||
- [#1726](https://github.com/xmrig/xmrig/issues/1726) Fixed detection of AVX2/AVX512.
|
||||
- [#1728](https://github.com/xmrig/xmrig/issues/1728) Fixed, 32 bit Windows builds was crash on start.
|
||||
- [#1729](https://github.com/xmrig/xmrig/pull/1729) Fixed KawPow crash on old CPUs.
|
||||
- [#1730](https://github.com/xmrig/xmrig/pull/1730) Improved displaying information for compute errors on GPUs.
|
||||
- [#1732](https://github.com/xmrig/xmrig/pull/1732) Fixed NiceHash disconnects for KawPow.
|
||||
- Fixed AMD GPU health (temperatures/power/clocks/fans) readings on Linux.
|
||||
|
||||
# v6.2.0-beta
|
||||
- [#1717](https://github.com/xmrig/xmrig/pull/1717) Added new algorithm `cn/ccx` for Conceal.
|
||||
- [#1718](https://github.com/xmrig/xmrig/pull/1718) Fixed, linker on Linux was marking entire executable as having an executable stack.
|
||||
- [#1720](https://github.com/xmrig/xmrig/pull/1720) Fixed broken CryptoNight algorithms family with gcc 10.1.
|
||||
|
||||
# v6.0.1-beta
|
||||
- [#1708](https://github.com/xmrig/xmrig/issues/1708) Added `title` option.
|
||||
- [#1711](https://github.com/xmrig/xmrig/pull/1711) [cuda] Print errors from KawPow DAG initialization.
|
||||
- [#1713](https://github.com/xmrig/xmrig/pull/1713) [cuda] Reduced memory usage for KawPow, minimum CUDA plugin version now is 6.1.0.
|
||||
|
||||
# v6.0.0-beta
|
||||
- [#1694](https://github.com/xmrig/xmrig/pull/1694) Added support for KawPow algorithm (Ravencoin) on AMD/NVIDIA.
|
||||
- Removed previously deprecated `cn/gpu` algorithm.
|
||||
- Default donation level reduced to 1% but you still can increase it if you like.
|
||||
|
||||
# v5.11.3
|
||||
- [#1718](https://github.com/xmrig/xmrig/pull/1718) Fixed, linker on Linux was marking entire executable as having an executable stack.
|
||||
- [#1720](https://github.com/xmrig/xmrig/pull/1720) Fixed broken CryptoNight algorithms family with gcc 10.1.
|
||||
|
||||
# v5.11.2
|
||||
- [#1664](https://github.com/xmrig/xmrig/pull/1664) Improved JSON config error reporting.
|
||||
- [#1668](https://github.com/xmrig/xmrig/pull/1668) Optimized RandomX dataset initialization.
|
||||
- [#1675](https://github.com/xmrig/xmrig/pull/1675) Fixed cross-compiling on Linux.
|
||||
- Fixed memory leak in HTTP client.
|
||||
- Build [dependencies](https://github.com/xmrig/xmrig-deps/releases/tag/v4.1) updated to recent versions.
|
||||
- Compiler for Windows gcc builds updated to v10.1.
|
||||
|
||||
# v5.11.1
|
||||
- [#1652](https://github.com/xmrig/xmrig/pull/1652) Up to 1% RandomX perfomance improvement on recent AMD CPUs.
|
||||
- [#1306](https://github.com/xmrig/xmrig/issues/1306) Fixed possible double connection to a pool.
|
||||
- [#1654](https://github.com/xmrig/xmrig/issues/1654) Fixed build with LibreSSL.
|
||||
|
||||
# v5.11.0
|
||||
- **[#1632](https://github.com/xmrig/xmrig/pull/1632) Added AstroBWT CUDA support ([CUDA plugin](https://github.com/xmrig/xmrig-cuda) v3.0.0 or newer required).**
|
||||
- [#1605](https://github.com/xmrig/xmrig/pull/1605) Fixed AstroBWT OpenCL for NVIDIA GPUs.
|
||||
- [#1635](https://github.com/xmrig/xmrig/pull/1635) Added pooled memory allocation of RandomX VMs (+0.5% speedup on Zen2).
|
||||
- [#1641](https://github.com/xmrig/xmrig/pull/1641) RandomX JIT refactoring, smaller memory footprint and a bit faster overall.
|
||||
- [#1643](https://github.com/xmrig/xmrig/issues/1643) Fixed build on CentOS 7.
|
||||
|
||||
# v5.10.0
|
||||
- [#1602](https://github.com/xmrig/xmrig/pull/1602) Added AMD GPUs support for AstroBWT algorithm.
|
||||
- [#1590](https://github.com/xmrig/xmrig/pull/1590) MSR mod automatically deactivated after switching from RandomX algorithms.
|
||||
- [#1592](https://github.com/xmrig/xmrig/pull/1592) Added AVX2 optimized code for AstroBWT algorithm.
|
||||
- Added new config option `astrobwt-avx2` in `cpu` object and command line option `--astrobwt-avx2`.
|
||||
- [#1596](https://github.com/xmrig/xmrig/issues/1596) Major TLS (Transport Layer Security) subsystem update.
|
||||
- Added new TLS options, please check [xmrig-proxy documentation](https://xmrig.com/docs/proxy/tls) for details.
|
||||
- `cn/gpu` algorithm now disabled by default and will be removed in next major (v6.x.x) release, no ETA for it right now.
|
||||
- Added command line option `--data-dir`.
|
||||
|
||||
# v5.9.0
|
||||
- [#1578](https://github.com/xmrig/xmrig/pull/1578) Added new RandomKEVA algorithm for upcoming Kevacoin fork, as `"algo": "rx/keva"` or `"coin": "keva"`.
|
||||
- [#1584](https://github.com/xmrig/xmrig/pull/1584) Fixed invalid AstroBWT hashes after algorithm switching.
|
||||
- [#1585](https://github.com/xmrig/xmrig/issues/1585) Fixed build without HTTP support.
|
||||
- Added command line option `--astrobwt-max-size`.
|
||||
|
||||
# v5.8.2
|
||||
- [#1580](https://github.com/xmrig/xmrig/pull/1580) AstroBWT algorithm 20-50% speedup.
|
||||
- Added new option `astrobwt-max-size`.
|
||||
- [#1581](https://github.com/xmrig/xmrig/issues/1581) Fixed macOS build.
|
||||
|
||||
# v5.8.1
|
||||
- [#1575](https://github.com/xmrig/xmrig/pull/1575) Fixed new block detection for DERO solo mining.
|
||||
|
||||
# v5.8.0
|
||||
- [#1573](https://github.com/xmrig/xmrig/pull/1573) Added new AstroBWT algorithm for upcoming DERO fork, as `"algo": "astrobwt"` or `"coin": "dero"`.
|
||||
|
||||
# v5.7.0
|
||||
- **Added SOCKS5 proxies support for Tor https://xmrig.com/docs/miner/tor.**
|
||||
- [#377](https://github.com/xmrig/xmrig-proxy/issues/377) Fixed duplicate jobs in daemon (solo) mining client.
|
||||
- [#1560](https://github.com/xmrig/xmrig/pull/1560) RandomX 0.3-0.4% speedup depending on CPU.
|
||||
- Fixed possible crashes in HTTP client.
|
||||
|
||||
# v5.6.0
|
||||
- [#1536](https://github.com/xmrig/xmrig/pull/1536) Added workaround for new AMD GPU drivers.
|
||||
- [#1546](https://github.com/xmrig/xmrig/pull/1546) Fixed generic OpenCL code for AMD Navi GPUs.
|
||||
- [#1551](https://github.com/xmrig/xmrig/pull/1551) Added RandomX JIT for AMD Navi GPUs.
|
||||
- Added health information for AMD GPUs (clocks/power/fan/temperature) via ADL (Windows) and sysfs (Linux).
|
||||
- Fixed possible nicehash nonce overflow in some conditions.
|
||||
- Fixed wrong OpenCL platform on macOS, option `platform` now ignored on this OS.
|
||||
|
||||
# v5.5.3
|
||||
- [#1529](https://github.com/xmrig/xmrig/pull/1529) Fixed crash on Bulldozer CPUs.
|
||||
|
||||
# v5.5.2
|
||||
- [#1500](https://github.com/xmrig/xmrig/pull/1500) Removed unnecessary code from RandomX JIT compiler.
|
||||
- [#1502](https://github.com/xmrig/xmrig/pull/1502) Optimizations for AMD Bulldozer.
|
||||
- [#1508](https://github.com/xmrig/xmrig/pull/1508) Added support for BMI2 instructions.
|
||||
- [#1510](https://github.com/xmrig/xmrig/pull/1510) Optimized `CFROUND` instruction for RandomX.
|
||||
- [#1520](https://github.com/xmrig/xmrig/pull/1520) Fixed thread affinity.
|
||||
|
||||
# v5.5.1
|
||||
- [#1469](https://github.com/xmrig/xmrig/issues/1469) Fixed build with gcc 4.8.
|
||||
- [#1473](https://github.com/xmrig/xmrig/pull/1473) Added RandomX auto-config for mobile Ryzen APUs.
|
||||
- [#1477](https://github.com/xmrig/xmrig/pull/1477) Fixed build with Clang.
|
||||
- [#1489](https://github.com/xmrig/xmrig/pull/1489) RandomX JIT compiler tweaks.
|
||||
- [#1493](https://github.com/xmrig/xmrig/pull/1493) Default value for Intel MSR preset changed to `15`.
|
||||
- Fixed unwanted resume after RandomX dataset change.
|
||||
|
||||
# v5.5.0
|
||||
- [#179](https://github.com/xmrig/xmrig/issues/179) Added support for [environment variables](https://xmrig.com/docs/miner/environment-variables) in config file.
|
||||
- [#1445](https://github.com/xmrig/xmrig/pull/1445) Removed `rx/v` algorithm.
|
||||
- [#1453](https://github.com/xmrig/xmrig/issues/1453) Fixed crash on 32bit systems.
|
||||
- [#1459](https://github.com/xmrig/xmrig/issues/1459) Fixed crash on very low memory systems.
|
||||
- [#1465](https://github.com/xmrig/xmrig/pull/1465) Added fix for 1st-gen Ryzen crashes.
|
||||
- [#1466](https://github.com/xmrig/xmrig/pull/1466) Added `cn-pico/tlo` algorithm.
|
||||
- Added `--randomx-no-rdmsr` command line option.
|
||||
- Added console title for Windows with miner name and version.
|
||||
- On Windows `priority` option now also change base priority.
|
||||
|
||||
# v5.4.0
|
||||
- [#1434](https://github.com/xmrig/xmrig/pull/1434) Added RandomSFX (`rx/sfx`) algorithm for Safex Cash.
|
||||
- [#1445](https://github.com/xmrig/xmrig/pull/1445) Added RandomV (`rx/v`) algorithm for *new* MoneroV.
|
||||
- [#1419](https://github.com/xmrig/xmrig/issues/1419) Added reverting MSR changes on miner exit, use `"rdmsr": false,` in `"randomx"` object to disable this feature.
|
||||
- [#1423](https://github.com/xmrig/xmrig/issues/1423) Fixed conflicts with exists WinRing0 driver service.
|
||||
- [#1425](https://github.com/xmrig/xmrig/issues/1425) Fixed crash on first generation Zen CPUs (MSR mod accidentally enable Opcache), additionally now you can disable Opcache and enable MSR mod via config `"wrmsr": ["0xc0011020:0x0", "0xc0011021:0x60", "0xc0011022:0x510000", "0xc001102b:0x1808cc16"],`.
|
||||
- Added advanced usage for `wrmsr` option, for example: `"wrmsr": ["0x1a4:0x6"],` (Intel) and `"wrmsr": ["0xc0011020:0x0", "0xc0011021:0x40:0xffffffffffffffdf", "0xc0011022:0x510000", "0xc001102b:0x1808cc16"],` (Ryzen).
|
||||
- Added new config option `"verbose"` and command line option `--verbose`.
|
||||
|
||||
# v5.3.0
|
||||
- [#1414](https://github.com/xmrig/xmrig/pull/1414) Added native MSR support for Windows, by using signed **WinRing0 driver** (© 2007-2009 OpenLibSys.org).
|
||||
- Added new [MSR documentation](https://xmrig.com/docs/miner/randomx-optimization-guide/msr).
|
||||
- [#1418](https://github.com/xmrig/xmrig/pull/1418) Increased stratum send buffer size.
|
||||
|
||||
# v5.2.1
|
||||
- [#1408](https://github.com/xmrig/xmrig/pull/1408) Added RandomX boost script for Linux (if you don't like run miner with root privileges).
|
||||
- Added support for [AMD Ryzen MSR registers](https://www.reddit.com/r/MoneroMining/comments/e962fu/9526_hs_on_ryzen_7_3700x_xmrig_520_1gb_pages_msr/) (Linux only).
|
||||
- Fixed command line option `--randomx-wrmsr` option without parameters.
|
||||
|
||||
# v5.2.0
|
||||
- **[#1388](https://github.com/xmrig/xmrig/pull/1388) Added [1GB huge pages support](https://xmrig.com/docs/miner/hugepages#onegb-huge-pages) for Linux.**
|
||||
- Added new option `1gb-pages` in `randomx` object with command line equivalent `--randomx-1gb-pages`.
|
||||
- Added automatic huge pages configuration on Linux if use the miner with root privileges.
|
||||
- **Added [automatic Intel prefetchers configuration](https://xmrig.com/docs/miner/randomx-optimization-guide#intel-specific-optimizations) on Linux.**
|
||||
- Added new option `wrmsr` in `randomx` object with command line equivalent `--randomx-wrmsr=6`.
|
||||
- [#1396](https://github.com/xmrig/xmrig/pull/1396) [#1401](https://github.com/xmrig/xmrig/pull/1401) New performance optimizations for Ryzen CPUs.
|
||||
- [#1385](https://github.com/xmrig/xmrig/issues/1385) Added `max-threads-hint` option support for RandomX dataset initialization threads.
|
||||
- [#1386](https://github.com/xmrig/xmrig/issues/1386) Added `priority` option support for RandomX dataset initialization threads.
|
||||
- For official builds all dependencies (libuv, hwloc, openssl) updated to recent versions.
|
||||
- Windows `msvc` builds now use Visual Studio 2019 instead of 2017.
|
||||
|
||||
# v5.1.1
|
||||
- [#1365](https://github.com/xmrig/xmrig/issues/1365) Fixed various system response/stability issues.
|
||||
- Added new CPU option `yield` and command line equivalent `--cpu-no-yield`.
|
||||
- [#1363](https://github.com/xmrig/xmrig/issues/1363) Fixed wrong priority of main miner thread.
|
||||
|
||||
# v5.1.0
|
||||
- [#1351](https://github.com/xmrig/xmrig/pull/1351) RandomX optimizations and fixes.
|
||||
- Improved RandomX performance (up to +6-7% on Intel CPUs, +2-3% on Ryzen CPUs)
|
||||
- Added workaround for Intel JCC erratum bug see https://www.phoronix.com/scan.php?page=article&item=intel-jcc-microcode&num=1 for details.
|
||||
- Note! Always disable "Hardware prefetcher" and "Adjacent cacheline prefetch" in BIOS for Intel CPUs to get the optimal RandomX performance.
|
||||
- [#1307](https://github.com/xmrig/xmrig/issues/1307) Fixed mining resume after donation round for pools with `self-select` feature.
|
||||
- [#1318](https://github.com/xmrig/xmrig/issues/1318#issuecomment-559676080) Added option `"mode"` (or `--randomx-mode`) for RandomX.
|
||||
- Added memory information on miner startup.
|
||||
- Added `resources` field to summary API with memory information and load average.
|
||||
|
||||
# v5.0.1
|
||||
- [#1234](https://github.com/xmrig/xmrig/issues/1234) Fixed compatibility with some AMD GPUs.
|
||||
- [#1284](https://github.com/xmrig/xmrig/issues/1284) Fixed build without RandomX.
|
||||
- [#1285](https://github.com/xmrig/xmrig/issues/1285) Added command line options `--cuda-bfactor-hint` and `--cuda-bsleep-hint`.
|
||||
- [#1290](https://github.com/xmrig/xmrig/pull/1290) Fixed 32-bit ARM compilation.
|
||||
|
||||
# v5.0.0
|
||||
This version is first stable unified 3 in 1 GPU+CPU release, OpenCL support built in in miner and not require additional external dependencies on compile time, NVIDIA CUDA available as external [CUDA plugin](https://github.com/xmrig/xmrig-cuda), for convenient, 3 in 1 downloads with recent CUDA version also provided.
|
||||
|
||||
This release based on 4.x.x series and include all features from v4.6.2-beta, changelog below include only the most important changes, [full changelog](doc/CHANGELOG_OLD.md) available separately.
|
||||
|
||||
- [#1272](https://github.com/xmrig/xmrig/pull/1272) Optimized hashrate calculation.
|
||||
- [#1263](https://github.com/xmrig/xmrig/pull/1263) Added new option `dataset_host` for NVIDIA GPUs with less than 4 GB memory (RandomX only).
|
||||
- [#1068](https://github.com/xmrig/xmrig/pull/1068) Added support for `self-select` stratum protocol extension.
|
||||
- [#1227](https://github.com/xmrig/xmrig/pull/1227) Added new algorithm `rx/arq`, RandomX variant for upcoming ArQmA fork.
|
||||
- [#808](https://github.com/xmrig/xmrig/issues/808#issuecomment-539297156) Added experimental support for persistent memory for CPU mining threads.
|
||||
- [#1221](https://github.com/xmrig/xmrig/issues/1221) Improved RandomX dataset memory usage and initialization speed for NUMA machines.
|
||||
- [#1175](https://github.com/xmrig/xmrig/issues/1175) Fixed support for systems where total count of NUMA nodes not equal usable nodes count.
|
||||
- Added config option `cpu/max-threads-hint` and command line option `--cpu-max-threads-hint`.
|
||||
- [#1185](https://github.com/xmrig/xmrig/pull/1185) Added JIT compiler for RandomX on ARMv8.
|
||||
- Improved API endpoint `GET /2/backends` and added support for this endpoint to [workers.xmrig.info](http://workers.xmrig.info).
|
||||
- Added command line option `--no-cpu` to disable CPU backend.
|
||||
- Added OpenCL specific command line options: `--opencl`, `--opencl-devices`, `--opencl-platform`, `--opencl-loader` and `--opencl-no-cache`.
|
||||
- Added CUDA specific command line options: `--cuda`, `--cuda-loader` and `--no-nvml`.
|
||||
- Removed command line option `--http-enabled`, HTTP API enabled automatically if any other `--http-*` option provided.
|
||||
- [#1172](https://github.com/xmrig/xmrig/issues/1172) **Added OpenCL mining backend.**
|
||||
- [#268](https://github.com/xmrig/xmrig-amd/pull/268) [#270](https://github.com/xmrig/xmrig-amd/pull/270) [#271](https://github.com/xmrig/xmrig-amd/pull/271) [#273](https://github.com/xmrig/xmrig-amd/pull/273) [#274](https://github.com/xmrig/xmrig-amd/pull/274) [#1171](https://github.com/xmrig/xmrig/pull/1171) Added RandomX support for OpenCL, thanks [@SChernykh](https://github.com/SChernykh).
|
||||
- Algorithm `cn/wow` removed, as no longer alive.
|
||||
|
||||
# Previous versions
|
||||
[doc/CHANGELOG_OLD.md](doc/CHANGELOG_OLD.md)
|
||||
|
||||
212
CMakeLists.txt
212
CMakeLists.txt
@@ -1,21 +1,41 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
project(xmrig)
|
||||
|
||||
option(WITH_LIBCPUID "Use Libcpuid" ON)
|
||||
option(WITH_HWLOC "Use hwloc" ON)
|
||||
option(WITH_CN_LITE "CryptoNight-Lite support" ON)
|
||||
option(WITH_CN_HEAVY "CryptoNight-Heavy support" ON)
|
||||
option(WITH_CN_PICO "CryptoNight-Pico support" ON)
|
||||
option(WITH_CN_GPU "CryptoNight-GPU support" ON)
|
||||
option(WITH_RANDOMX "RandomX support" ON)
|
||||
option(WITH_HTTP "HTTP protocol support (client/server)" ON)
|
||||
option(WITH_HWLOC "Enable hwloc support" ON)
|
||||
option(WITH_CN_LITE "Enable CryptoNight-Lite algorithms family" ON)
|
||||
option(WITH_CN_HEAVY "Enable CryptoNight-Heavy algorithms family" ON)
|
||||
option(WITH_CN_PICO "Enable CryptoNight-Pico algorithm" ON)
|
||||
option(WITH_CN_FEMTO "Enable CryptoNight-UPX2 algorithm" ON)
|
||||
option(WITH_RANDOMX "Enable RandomX algorithms family" ON)
|
||||
option(WITH_ARGON2 "Enable Argon2 algorithms family" ON)
|
||||
option(WITH_KAWPOW "Enable KawPow algorithms family" ON)
|
||||
option(WITH_GHOSTRIDER "Enable GhostRider algorithm" ON)
|
||||
option(WITH_HTTP "Enable HTTP protocol support (client/server)" ON)
|
||||
option(WITH_DEBUG_LOG "Enable debug log output" OFF)
|
||||
option(WITH_TLS "Enable OpenSSL support" ON)
|
||||
option(WITH_ASM "Enable ASM PoW implementations" ON)
|
||||
option(WITH_MSR "Enable MSR mod & 1st-gen Ryzen fix" ON)
|
||||
option(WITH_ENV_VARS "Enable environment variables support in config file" ON)
|
||||
option(WITH_EMBEDDED_CONFIG "Enable internal embedded JSON config" OFF)
|
||||
option(WITH_OPENCL "Enable OpenCL backend" ON)
|
||||
set(WITH_OPENCL_VERSION 200 CACHE STRING "Target OpenCL version")
|
||||
set_property(CACHE WITH_OPENCL_VERSION PROPERTY STRINGS 120 200 210 220)
|
||||
option(WITH_CUDA "Enable CUDA backend" ON)
|
||||
option(WITH_NVML "Enable NVML (NVIDIA Management Library) support (only if CUDA backend enabled)" ON)
|
||||
option(WITH_ADL "Enable ADL (AMD Display Library) or sysfs support (only if OpenCL backend enabled)" ON)
|
||||
option(WITH_STRICT_CACHE "Enable strict checks for OpenCL cache" ON)
|
||||
option(WITH_INTERLEAVE_DEBUG_LOG "Enable debug log for threads interleave" OFF)
|
||||
option(WITH_PROFILING "Enable profiling for developers" OFF)
|
||||
option(WITH_SSE4_1 "Enable SSE 4.1 for Blake2" ON)
|
||||
option(WITH_AVX2 "Enable AVX2 for Blake2" ON)
|
||||
option(WITH_VAES "Enable VAES instructions for Cryptonight" ON)
|
||||
option(WITH_BENCHMARK "Enable builtin RandomX benchmark and stress test" ON)
|
||||
option(WITH_SECURE_JIT "Enable secure access to JIT memory" OFF)
|
||||
option(WITH_DMI "Enable DMI/SMBIOS reader" ON)
|
||||
|
||||
option(BUILD_STATIC "Build static binary" OFF)
|
||||
option(ARM_TARGET "Force use specific ARM target 8 or 7" 0)
|
||||
option(ARM_V8 "Force ARMv8 (64 bit) architecture, use with caution if automatic detection fails, but you sure it may work" OFF)
|
||||
option(ARM_V7 "Force ARMv7 (32 bit) architecture, use with caution if automatic detection fails, but you sure it may work" OFF)
|
||||
option(HWLOC_DEBUG "Enable hwloc debug helpers and log" OFF)
|
||||
|
||||
|
||||
@@ -24,6 +44,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
include (CheckIncludeFile)
|
||||
include (cmake/cpu.cmake)
|
||||
include (cmake/os.cmake)
|
||||
include (src/base/base.cmake)
|
||||
include (src/backend/backend.cmake)
|
||||
|
||||
@@ -40,17 +61,18 @@ set(HEADERS
|
||||
src/core/config/usage.h
|
||||
src/core/Controller.h
|
||||
src/core/Miner.h
|
||||
src/core/Taskbar.h
|
||||
src/net/interfaces/IJobResultListener.h
|
||||
src/net/JobResult.h
|
||||
src/net/JobResults.h
|
||||
src/net/Network.h
|
||||
src/net/NetworkState.h
|
||||
src/net/strategies/DonateStrategy.h
|
||||
src/Summary.h
|
||||
src/version.h
|
||||
)
|
||||
|
||||
set(HEADERS_CRYPTO
|
||||
src/backend/common/interfaces/IMemoryPool.h
|
||||
src/crypto/cn/asm/CryptonightR_template.h
|
||||
src/crypto/cn/c_blake256.h
|
||||
src/crypto/cn/c_groestl.h
|
||||
@@ -66,8 +88,8 @@ set(HEADERS_CRYPTO
|
||||
src/crypto/cn/hash.h
|
||||
src/crypto/cn/skein_port.h
|
||||
src/crypto/cn/soft_aes.h
|
||||
src/crypto/common/Algorithm.h
|
||||
src/crypto/common/keccak.h
|
||||
src/crypto/common/HugePagesInfo.h
|
||||
src/crypto/common/MemoryPool.h
|
||||
src/crypto/common/Nonce.h
|
||||
src/crypto/common/portable/mm_malloc.h
|
||||
src/crypto/common/VirtualMemory.h
|
||||
@@ -88,9 +110,9 @@ set(SOURCES
|
||||
src/core/config/ConfigTransform.cpp
|
||||
src/core/Controller.cpp
|
||||
src/core/Miner.cpp
|
||||
src/core/Taskbar.cpp
|
||||
src/net/JobResults.cpp
|
||||
src/net/Network.cpp
|
||||
src/net/NetworkState.cpp
|
||||
src/net/strategies/DonateStrategy.cpp
|
||||
src/Summary.cpp
|
||||
src/xmrig.cpp
|
||||
@@ -103,117 +125,85 @@ set(SOURCES_CRYPTO
|
||||
src/crypto/cn/c_skein.c
|
||||
src/crypto/cn/CnCtx.cpp
|
||||
src/crypto/cn/CnHash.cpp
|
||||
src/crypto/common/Algorithm.cpp
|
||||
src/crypto/common/keccak.cpp
|
||||
src/crypto/common/HugePagesInfo.cpp
|
||||
src/crypto/common/MemoryPool.cpp
|
||||
src/crypto/common/Nonce.cpp
|
||||
src/crypto/common/VirtualMemory.cpp
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
set(SOURCES_OS
|
||||
"${SOURCES_OS}"
|
||||
if (CMAKE_C_COMPILER_ID MATCHES GNU)
|
||||
set_source_files_properties(src/crypto/cn/CnHash.cpp PROPERTIES COMPILE_FLAGS "-Ofast -fno-tree-vectorize")
|
||||
endif()
|
||||
|
||||
if (WITH_VAES)
|
||||
add_definitions(-DXMRIG_VAES)
|
||||
set(HEADERS_CRYPTO "${HEADERS_CRYPTO}" src/crypto/cn/CryptoNight_x86_vaes.h)
|
||||
set(SOURCES_CRYPTO "${SOURCES_CRYPTO}" src/crypto/cn/CryptoNight_x86_vaes.cpp)
|
||||
if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES Clang)
|
||||
set_source_files_properties(src/crypto/cn/CryptoNight_x86_vaes.cpp PROPERTIES COMPILE_FLAGS "-Ofast -fno-tree-vectorize -mavx2 -mvaes")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WITH_HWLOC)
|
||||
list(APPEND HEADERS_CRYPTO
|
||||
src/crypto/common/NUMAMemoryPool.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/common/NUMAMemoryPool.cpp
|
||||
src/crypto/common/VirtualMemory_hwloc.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if (XMRIG_OS_WIN)
|
||||
list(APPEND SOURCES_OS
|
||||
res/app.rc
|
||||
src/App_win.cpp
|
||||
src/crypto/common/VirtualMemory_win.cpp
|
||||
)
|
||||
|
||||
add_definitions(/DWIN32)
|
||||
set(EXTRA_LIBS ws2_32 psapi iphlpapi userenv)
|
||||
elseif (APPLE)
|
||||
set(SOURCES_OS
|
||||
"${SOURCES_OS}"
|
||||
elseif (XMRIG_OS_APPLE)
|
||||
list(APPEND SOURCES_OS
|
||||
src/App_unix.cpp
|
||||
src/crypto/common/VirtualMemory_unix.cpp
|
||||
)
|
||||
|
||||
find_library(IOKIT_LIBRARY IOKit)
|
||||
find_library(CORESERVICES_LIBRARY CoreServices)
|
||||
set(EXTRA_LIBS ${IOKIT_LIBRARY} ${CORESERVICES_LIBRARY})
|
||||
else()
|
||||
set(SOURCES_OS
|
||||
"${SOURCES_OS}"
|
||||
list(APPEND SOURCES_OS
|
||||
src/App_unix.cpp
|
||||
src/crypto/common/VirtualMemory_unix.cpp
|
||||
)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
||||
set(EXTRA_LIBS kvm pthread)
|
||||
else()
|
||||
if (XMRIG_OS_ANDROID)
|
||||
set(EXTRA_LIBS pthread rt dl log)
|
||||
elseif (XMRIG_OS_LINUX)
|
||||
list(APPEND SOURCES_OS
|
||||
src/crypto/common/LinuxMemory.h
|
||||
src/crypto/common/LinuxMemory.cpp
|
||||
)
|
||||
|
||||
set(EXTRA_LIBS pthread rt dl)
|
||||
elseif (XMRIG_OS_FREEBSD)
|
||||
set(EXTRA_LIBS kvm pthread)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
EXECUTE_PROCESS(COMMAND uname -o COMMAND tr -d '\n' OUTPUT_VARIABLE OPERATING_SYSTEM)
|
||||
if (OPERATING_SYSTEM MATCHES "Android")
|
||||
set(EXTRA_LIBS ${EXTRA_LIBS} log)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_definitions(/D__STDC_FORMAT_MACROS)
|
||||
add_definitions(/DUNICODE)
|
||||
add_definitions(-DXMRIG_MINER_PROJECT -DXMRIG_JSON_SINGLE_LINE_ARRAY)
|
||||
add_definitions(-D__STDC_FORMAT_MACROS -DUNICODE -D_FILE_OFFSET_BITS=64)
|
||||
|
||||
find_package(UV REQUIRED)
|
||||
|
||||
if (WITH_RANDOMX)
|
||||
include_directories(src/crypto/randomx)
|
||||
add_definitions(/DXMRIG_ALGO_RANDOMX)
|
||||
set(SOURCES_CRYPTO
|
||||
"${SOURCES_CRYPTO}"
|
||||
src/crypto/randomx/aes_hash.cpp
|
||||
src/crypto/randomx/allocator.cpp
|
||||
src/crypto/randomx/argon2_core.c
|
||||
src/crypto/randomx/argon2_ref.c
|
||||
src/crypto/randomx/blake2_generator.cpp
|
||||
src/crypto/randomx/blake2/blake2b.c
|
||||
src/crypto/randomx/bytecode_machine.cpp
|
||||
src/crypto/randomx/dataset.cpp
|
||||
src/crypto/randomx/instructions_portable.cpp
|
||||
src/crypto/randomx/randomx.cpp
|
||||
src/crypto/randomx/reciprocal.c
|
||||
src/crypto/randomx/soft_aes.cpp
|
||||
src/crypto/randomx/superscalar.cpp
|
||||
src/crypto/randomx/virtual_machine.cpp
|
||||
src/crypto/randomx/virtual_memory.cpp
|
||||
src/crypto/randomx/vm_compiled_light.cpp
|
||||
src/crypto/randomx/vm_compiled.cpp
|
||||
src/crypto/randomx/vm_interpreted_light.cpp
|
||||
src/crypto/randomx/vm_interpreted.cpp
|
||||
src/crypto/rx/Rx.cpp
|
||||
src/crypto/rx/Rx.h
|
||||
src/crypto/rx/RxAlgo.cpp
|
||||
src/crypto/rx/RxAlgo.h
|
||||
src/crypto/rx/RxCache.cpp
|
||||
src/crypto/rx/RxCache.h
|
||||
src/crypto/rx/RxConfig.cpp
|
||||
src/crypto/rx/RxConfig.h
|
||||
src/crypto/rx/RxDataset.cpp
|
||||
src/crypto/rx/RxDataset.h
|
||||
src/crypto/rx/RxVm.cpp
|
||||
src/crypto/rx/RxVm.h
|
||||
)
|
||||
if (NOT ARCH_ID)
|
||||
set(ARCH_ID ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
endif()
|
||||
if (CMAKE_C_COMPILER_ID MATCHES MSVC)
|
||||
enable_language(ASM_MASM)
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/randomx/jit_compiler_x86_static.asm
|
||||
src/crypto/randomx/jit_compiler_x86.cpp
|
||||
)
|
||||
elseif (NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/randomx/jit_compiler_x86_static.S
|
||||
src/crypto/randomx/jit_compiler_x86.cpp
|
||||
)
|
||||
# cheat because cmake and ccache hate each other
|
||||
set_property(SOURCE src/crypto/randomx/jit_compiler_x86_static.S PROPERTY LANGUAGE C)
|
||||
endif()
|
||||
else()
|
||||
remove_definitions(/DXMRIG_ALGO_RANDOMX)
|
||||
endif()
|
||||
|
||||
include(cmake/flags.cmake)
|
||||
|
||||
include(cmake/randomx.cmake)
|
||||
include(cmake/argon2.cmake)
|
||||
include(cmake/kawpow.cmake)
|
||||
include(cmake/ghostrider.cmake)
|
||||
include(cmake/OpenSSL.cmake)
|
||||
include(cmake/asm.cmake)
|
||||
include(cmake/cn-gpu.cmake)
|
||||
|
||||
if (WITH_CN_LITE)
|
||||
add_definitions(/DXMRIG_ALGO_CN_LITE)
|
||||
@@ -227,21 +217,37 @@ if (WITH_CN_PICO)
|
||||
add_definitions(/DXMRIG_ALGO_CN_PICO)
|
||||
endif()
|
||||
|
||||
if (WITH_CN_FEMTO)
|
||||
add_definitions(/DXMRIG_ALGO_CN_FEMTO)
|
||||
endif()
|
||||
|
||||
if (WITH_EMBEDDED_CONFIG)
|
||||
add_definitions(/DXMRIG_FEATURE_EMBEDDED_CONFIG)
|
||||
endif()
|
||||
|
||||
include(src/hw/api/api.cmake)
|
||||
include(src/hw/dmi/dmi.cmake)
|
||||
|
||||
include_directories(src)
|
||||
include_directories(src/3rdparty)
|
||||
include_directories(${UV_INCLUDE_DIR})
|
||||
|
||||
if (BUILD_STATIC)
|
||||
set(CMAKE_EXE_LINKER_FLAGS " -static")
|
||||
endif()
|
||||
|
||||
if (WITH_DEBUG_LOG)
|
||||
add_definitions(/DAPP_DEBUG)
|
||||
endif()
|
||||
|
||||
add_executable(${CMAKE_PROJECT_NAME} ${HEADERS} ${SOURCES} ${SOURCES_OS} ${SOURCES_CPUID} ${HEADERS_CRYPTO} ${SOURCES_CRYPTO} ${SOURCES_SYSLOG} ${TLS_SOURCES} ${XMRIG_ASM_SOURCES} ${CN_GPU_SOURCES})
|
||||
target_link_libraries(${CMAKE_PROJECT_NAME} ${XMRIG_ASM_LIBRARY} ${OPENSSL_LIBRARIES} ${UV_LIBRARIES} ${EXTRA_LIBS} ${CPUID_LIB})
|
||||
add_executable(${CMAKE_PROJECT_NAME} ${HEADERS} ${SOURCES} ${SOURCES_OS} ${HEADERS_CRYPTO} ${SOURCES_CRYPTO} ${SOURCES_SYSLOG} ${TLS_SOURCES} ${XMRIG_ASM_SOURCES})
|
||||
target_link_libraries(${CMAKE_PROJECT_NAME} ${XMRIG_ASM_LIBRARY} ${OPENSSL_LIBRARIES} ${UV_LIBRARIES} ${EXTRA_LIBS} ${CPUID_LIB} ${ARGON2_LIBRARY} ${ETHASH_LIBRARY} ${GHOSTRIDER_LIBRARY})
|
||||
|
||||
if (WIN32)
|
||||
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/bin/WinRing0/WinRing0x64.sys" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
||||
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/scripts/benchmark_1M.cmd" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
||||
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/scripts/benchmark_10M.cmd" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
||||
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/scripts/pool_mine_example.cmd" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
||||
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/scripts/solo_mine_example.cmd" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
||||
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/scripts/rtm_ghostrider_example.cmd" $<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_BUILD_TYPE STREQUAL Release AND NOT CMAKE_GENERATOR STREQUAL Xcode)
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} ${CMAKE_PROJECT_NAME})
|
||||
endif()
|
||||
|
||||
83
README.md
83
README.md
@@ -2,86 +2,35 @@
|
||||
|
||||
[](https://github.com/xmrig/xmrig/releases)
|
||||
[](https://github.com/xmrig/xmrig/releases)
|
||||
[](https://github.com/xmrig/xmrig/releases)
|
||||
[](https://github.com/xmrig/xmrig/releases)
|
||||
[](https://github.com/xmrig/xmrig/blob/master/LICENSE)
|
||||
[](https://github.com/xmrig/xmrig/stargazers)
|
||||
[](https://github.com/xmrig/xmrig/network)
|
||||
|
||||
XMRig is a high performance RandomX and CryptoNight CPU miner, with official support for Windows.
|
||||
XMRig is a high performance, open source, cross platform RandomX, KawPow, CryptoNight and [GhostRider](https://github.com/xmrig/xmrig/tree/master/src/crypto/ghostrider#readme) unified CPU/GPU miner and [RandomX benchmark](https://xmrig.com/benchmark). Official binaries are available for Windows, Linux, macOS and FreeBSD.
|
||||
|
||||
* This is the **CPU-mining** version, there is also a [NVIDIA GPU version](https://github.com/xmrig/xmrig-nvidia) and [AMD GPU version]( https://github.com/xmrig/xmrig-amd).
|
||||
|
||||
<img src="doc/screenshot.png" width="808" >
|
||||
|
||||
#### Table of contents
|
||||
* [Download](#download)
|
||||
* [Usage](#usage)
|
||||
* [Build](https://github.com/xmrig/xmrig/wiki/Build)
|
||||
* [Donations](#donations)
|
||||
* [Contacts](#contacts)
|
||||
## Mining backends
|
||||
- **CPU** (x86/x64/ARMv7/ARMv8)
|
||||
- **OpenCL** for AMD GPUs.
|
||||
- **CUDA** for NVIDIA GPUs via external [CUDA plugin](https://github.com/xmrig/xmrig-cuda).
|
||||
|
||||
## Download
|
||||
* Binary releases: https://github.com/xmrig/xmrig/releases
|
||||
* Git tree: https://github.com/xmrig/xmrig.git
|
||||
* Clone with `git clone https://github.com/xmrig/xmrig.git` :hammer: [Build instructions](https://github.com/xmrig/xmrig/wiki/Build).
|
||||
* **[Binary releases](https://github.com/xmrig/xmrig/releases)**
|
||||
* **[Build from source](https://xmrig.com/docs/miner/build)**
|
||||
|
||||
## Usage
|
||||
Preferend way to configure miner is [JSON config file](src/config.json) as more flexible and human frendly, command line interface not cover all features, for example mining profiles for different algorithms. Most impotant options can be changed in runtime without miner restart by editing config or via API.
|
||||
The preferred way to configure the miner is the [JSON config file](https://xmrig.com/docs/miner/config) as it is more flexible and human friendly. The [command line interface](https://xmrig.com/docs/miner/command-line-options) does not cover all features, such as mining profiles for different algorithms. Important options can be changed during runtime without miner restart by editing the config file or executing [API](https://xmrig.com/docs/miner/api) calls.
|
||||
|
||||
### Options
|
||||
```
|
||||
-a, --algo=ALGO specify the algorithm to use
|
||||
cn/r, cn/2, cn/1, cn/0, cn/double, cn/half, cn/fast,
|
||||
cn/rwz, cn/zls, cn/xao, cn/rto, cn/gpu,
|
||||
cn-lite/1,
|
||||
cn-heavy/xhv, cn-heavy/tube, cn-heavy/0,
|
||||
cn-pico,
|
||||
rx/wow, rx/loki
|
||||
-o, --url=URL URL of mining server
|
||||
-O, --userpass=U:P username:password pair for mining server
|
||||
-u, --user=USERNAME username for mining server
|
||||
-p, --pass=PASSWORD password for mining server
|
||||
--rig-id=ID rig identifier for pool-side statistics (needs pool support)
|
||||
-t, --threads=N number of miner threads
|
||||
-v, --av=N algorithm variation, 0 auto select
|
||||
-k, --keepalive send keepalived packet for prevent timeout (needs pool support)
|
||||
--nicehash enable nicehash.com support
|
||||
--tls enable SSL/TLS support (needs pool support)
|
||||
--tls-fingerprint=F pool TLS certificate fingerprint, if set enable strict certificate pinning
|
||||
--daemon use daemon RPC instead of pool for solo mining
|
||||
--daemon-poll-interval=N daemon poll interval in milliseconds (default: 1000)
|
||||
-r, --retries=N number of times to retry before switch to backup server (default: 5)
|
||||
-R, --retry-pause=N time to pause between retries (default: 5)
|
||||
--cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1
|
||||
--cpu-priority set process priority (0 idle, 2 normal to 5 highest)
|
||||
--no-huge-pages disable huge pages support
|
||||
--no-color disable colored output
|
||||
--donate-level=N donate level, default 5% (5 minutes in 100 minutes)
|
||||
--user-agent set custom user-agent string for pool
|
||||
-B, --background run the miner in the background
|
||||
-c, --config=FILE load a JSON-format configuration file
|
||||
-l, --log-file=FILE log all output to a file
|
||||
--asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer.
|
||||
--print-time=N print hashrate report every N seconds
|
||||
--api-worker-id=ID custom worker-id for API
|
||||
--api-id=ID custom instance ID for API
|
||||
--http-enabled enable HTTP API
|
||||
--http-host=HOST bind host for HTTP API (default: 127.0.0.1)
|
||||
--http-port=N bind port for HTTP API
|
||||
--http-access-token=T access token for HTTP API
|
||||
--http-no-restricted enable full remote access to HTTP API (only if access token set)
|
||||
--randomx-init=N threads count to initialize RandomX dataset
|
||||
--randomx-no-numa disable NUMA support for RandomX
|
||||
--export-topology export hwloc topology to a XML file and exit
|
||||
--dry-run test configuration and exit
|
||||
-h, --help display this help and exit
|
||||
-V, --version output version information and exit
|
||||
```
|
||||
* **[Wizard](https://xmrig.com/wizard)** helps you create initial configuration for the miner.
|
||||
* **[Workers](http://workers.xmrig.info)** helps manage your miners via HTTP API.
|
||||
|
||||
## Donations
|
||||
* Default donation 5% (5 minutes in 100 minutes) can be reduced to 1% via option `donate-level` or disabled in source code.
|
||||
* Default donation 1% (1 minute in 100 minutes) can be increased via option `donate-level` or disabled in source code.
|
||||
* XMR: `48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD`
|
||||
* BTC: `1P7ujsXeX7GxQwHNnJsRMgAdNkFZmNVqJT`
|
||||
|
||||
## Developers
|
||||
* **[xmrig](https://github.com/xmrig)**
|
||||
* **[sech1](https://github.com/SChernykh)**
|
||||
|
||||
## Contacts
|
||||
* support@xmrig.com
|
||||
|
||||
21
bin/WinRing0/LICENSE
Normal file
21
bin/WinRing0/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
Copyright (c) 2007-2009 OpenLibSys.org. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
BIN
bin/WinRing0/WinRing0x64.sys
Normal file
BIN
bin/WinRing0/WinRing0x64.sys
Normal file
Binary file not shown.
@@ -5,17 +5,43 @@ if (WITH_TLS)
|
||||
set(OPENSSL_USE_STATIC_LIBS TRUE)
|
||||
set(OPENSSL_MSVC_STATIC_RT TRUE)
|
||||
|
||||
set(EXTRA_LIBS ${EXTRA_LIBS} Crypt32)
|
||||
set(EXTRA_LIBS ${EXTRA_LIBS} crypt32)
|
||||
elseif (APPLE)
|
||||
set(OPENSSL_USE_STATIC_LIBS TRUE)
|
||||
endif()
|
||||
|
||||
if (BUILD_STATIC)
|
||||
set(OPENSSL_USE_STATIC_LIBS TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
find_package(OpenSSL)
|
||||
|
||||
if (OPENSSL_FOUND)
|
||||
set(TLS_SOURCES src/base/net/stratum/Tls.h src/base/net/stratum/Tls.cpp)
|
||||
set(TLS_SOURCES
|
||||
src/base/net/stratum/Tls.cpp
|
||||
src/base/net/stratum/Tls.h
|
||||
src/base/net/tls/ServerTls.cpp
|
||||
src/base/net/tls/ServerTls.h
|
||||
src/base/net/tls/TlsConfig.cpp
|
||||
src/base/net/tls/TlsConfig.h
|
||||
src/base/net/tls/TlsContext.cpp
|
||||
src/base/net/tls/TlsContext.h
|
||||
src/base/net/tls/TlsGen.cpp
|
||||
src/base/net/tls/TlsGen.h
|
||||
)
|
||||
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
if (WITH_HTTP)
|
||||
set(TLS_SOURCES ${TLS_SOURCES} src/base/net/http/HttpsClient.h src/base/net/http/HttpsClient.cpp)
|
||||
set(TLS_SOURCES ${TLS_SOURCES}
|
||||
src/base/net/https/HttpsClient.cpp
|
||||
src/base/net/https/HttpsClient.h
|
||||
src/base/net/https/HttpsContext.cpp
|
||||
src/base/net/https/HttpsContext.h
|
||||
src/base/net/https/HttpsServer.cpp
|
||||
src/base/net/https/HttpsServer.h
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "OpenSSL NOT found: use `-DWITH_TLS=OFF` to build without TLS support")
|
||||
@@ -27,5 +53,12 @@ else()
|
||||
set(OPENSSL_LIBRARIES "")
|
||||
remove_definitions(/DXMRIG_FEATURE_TLS)
|
||||
|
||||
if (WITH_HTTP)
|
||||
set(TLS_SOURCES ${TLS_SOURCES}
|
||||
src/base/net/http/HttpServer.cpp
|
||||
src/base/net/http/HttpServer.h
|
||||
)
|
||||
endif()
|
||||
|
||||
set(CMAKE_PROJECT_NAME "${CMAKE_PROJECT_NAME}-notls")
|
||||
endif()
|
||||
|
||||
18
cmake/argon2.cmake
Normal file
18
cmake/argon2.cmake
Normal file
@@ -0,0 +1,18 @@
|
||||
if (WITH_ARGON2)
|
||||
add_definitions(/DXMRIG_ALGO_ARGON2)
|
||||
|
||||
list(APPEND HEADERS_CRYPTO
|
||||
src/crypto/argon2/Hash.h
|
||||
src/crypto/argon2/Impl.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/argon2/Impl.cpp
|
||||
)
|
||||
|
||||
add_subdirectory(src/3rdparty/argon2)
|
||||
set(ARGON2_LIBRARY argon2)
|
||||
else()
|
||||
remove_definitions(/DXMRIG_ALGO_ARGON2)
|
||||
set(ARGON2_LIBRARY "")
|
||||
endif()
|
||||
@@ -1,25 +0,0 @@
|
||||
if (WITH_CN_GPU AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
|
||||
if (XMRIG_ARM)
|
||||
set(CN_GPU_SOURCES src/crypto/cn/gpu/cn_gpu_arm.cpp)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||
set_source_files_properties(src/crypto/cn/gpu/cn_gpu_arm.cpp PROPERTIES COMPILE_FLAGS "-O3")
|
||||
endif()
|
||||
else()
|
||||
set(CN_GPU_SOURCES src/crypto/cn/gpu/cn_gpu_avx.cpp src/crypto/cn/gpu/cn_gpu_ssse3.cpp)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||
set_source_files_properties(src/crypto/cn/gpu/cn_gpu_avx.cpp PROPERTIES COMPILE_FLAGS "-O3 -mavx2")
|
||||
set_source_files_properties(src/crypto/cn/gpu/cn_gpu_ssse3.cpp PROPERTIES COMPILE_FLAGS "-O3")
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
set_source_files_properties(src/crypto/cn/gpu/cn_gpu_avx.cpp PROPERTIES COMPILE_FLAGS "/arch:AVX")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_definitions(/DXMRIG_ALGO_CN_GPU)
|
||||
else()
|
||||
set(CN_GPU_SOURCES "")
|
||||
|
||||
remove_definitions(/DXMRIG_ALGO_CN_GPU)
|
||||
endif()
|
||||
@@ -1,43 +1,70 @@
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(XMRIG_64_BIT ON)
|
||||
add_definitions(-DXMRIG_64_BIT)
|
||||
else()
|
||||
set(XMRIG_64_BIT OFF)
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_SYSTEM_PROCESSOR)
|
||||
message(WARNING "CMAKE_SYSTEM_PROCESSOR not defined")
|
||||
endif()
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64)$")
|
||||
add_definitions(/DRAPIDJSON_SSE2)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
set(VAES_SUPPORTED ON)
|
||||
else()
|
||||
CHECK_CXX_COMPILER_FLAG("-mavx2 -mvaes" VAES_SUPPORTED)
|
||||
endif()
|
||||
|
||||
if (NOT VAES_SUPPORTED)
|
||||
set(WITH_VAES OFF)
|
||||
endif()
|
||||
|
||||
if (XMRIG_64_BIT AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64)$")
|
||||
add_definitions(-DRAPIDJSON_SSE2)
|
||||
else()
|
||||
set(WITH_SSE4_1 OFF)
|
||||
set(WITH_AVX2 OFF)
|
||||
set(WITH_VAES OFF)
|
||||
endif()
|
||||
|
||||
if (ARM_V8)
|
||||
set(ARM_TARGET 8)
|
||||
elseif (ARM_V7)
|
||||
set(ARM_TARGET 7)
|
||||
endif()
|
||||
|
||||
if (NOT ARM_TARGET)
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|armv8-a)$")
|
||||
set(ARM_TARGET 8)
|
||||
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7|armv7f|armv7s|armv7k|armv7-a|armv7l)$")
|
||||
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7|armv7f|armv7s|armv7k|armv7-a|armv7l|armv7ve)$")
|
||||
set(ARM_TARGET 7)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ARM_TARGET AND ARM_TARGET GREATER 6)
|
||||
set(XMRIG_ARM ON)
|
||||
set(WITH_LIBCPUID OFF)
|
||||
add_definitions(/DXMRIG_ARM)
|
||||
set(XMRIG_ARM ON)
|
||||
add_definitions(-DXMRIG_ARM=${ARM_TARGET})
|
||||
|
||||
message(STATUS "Use ARM_TARGET=${ARM_TARGET} (${CMAKE_SYSTEM_PROCESSOR})")
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
if (ARM_TARGET EQUAL 8)
|
||||
set(XMRIG_ARMv8 ON)
|
||||
add_definitions(/DXMRIG_ARMv8)
|
||||
|
||||
CHECK_CXX_COMPILER_FLAG(-march=armv8-a+crypto XMRIG_ARM_CRYPTO)
|
||||
|
||||
if (XMRIG_ARM_CRYPTO)
|
||||
add_definitions(/DXMRIG_ARM_CRYPTO)
|
||||
add_definitions(-DXMRIG_ARM_CRYPTO)
|
||||
set(ARM8_CXX_FLAGS "-march=armv8-a+crypto")
|
||||
else()
|
||||
set(ARM8_CXX_FLAGS "-march=armv8-a")
|
||||
endif()
|
||||
elseif (ARM_TARGET EQUAL 7)
|
||||
set(XMRIG_ARMv7 ON)
|
||||
add_definitions(/DXMRIG_ARMv7)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WITH_SSE4_1)
|
||||
add_definitions(-DXMRIG_FEATURE_SSE4_1)
|
||||
endif()
|
||||
|
||||
if (WITH_AVX2)
|
||||
add_definitions(-DXMRIG_FEATURE_AVX2)
|
||||
endif()
|
||||
|
||||
@@ -2,35 +2,37 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
add_definitions(/DNDEBUG)
|
||||
add_definitions(-DNDEBUG)
|
||||
endif()
|
||||
|
||||
include(CheckSymbolExists)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-strict-aliasing")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Ofast")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fexceptions -fno-rtti -Wno-class-memaccess")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fexceptions -fno-rtti -Wno-strict-aliasing -Wno-class-memaccess")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -s")
|
||||
|
||||
if (XMRIG_ARMv8)
|
||||
if (ARM_TARGET EQUAL 8)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARM8_CXX_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARM8_CXX_FLAGS} -flax-vector-conversions")
|
||||
elseif (XMRIG_ARMv7)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -flax-vector-conversions")
|
||||
elseif (ARM_TARGET EQUAL 7)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv7-a -mfpu=neon")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mfpu=neon -flax-vector-conversions")
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
|
||||
|
||||
add_definitions(/DHAVE_ROTR)
|
||||
add_definitions(-DHAVE_ROTR)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
@@ -43,22 +45,20 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
|
||||
endif()
|
||||
|
||||
add_definitions(/D_GNU_SOURCE)
|
||||
|
||||
if (${CMAKE_VERSION} VERSION_LESS "3.1.0")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
if (BUILD_STATIC)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
||||
endif()
|
||||
|
||||
#set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -gdwarf-2")
|
||||
add_definitions(-D_GNU_SOURCE -DHAVE_BUILTIN_CLEAR_CACHE)
|
||||
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
set(CMAKE_C_FLAGS_RELEASE "/MP /MT /O2 /Oi /DNDEBUG /GL")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "/MP /MT /O2 /Oi /DNDEBUG /GL")
|
||||
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Ox /Ot /Oi /MT /GL")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox /Ot /Oi /MT /GL")
|
||||
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
|
||||
add_definitions(/D_CRT_NONSTDC_NO_WARNINGS)
|
||||
add_definitions(/DNOMINMAX)
|
||||
add_definitions(/DHAVE_ROTR)
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MP /Ob1 /Zi /DRELWITHDEBINFO")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MP /Ob1 /Zi /DRELWITHDEBINFO")
|
||||
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -DNOMINMAX -DHAVE_ROTR)
|
||||
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||
|
||||
@@ -68,10 +68,10 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fexceptions -fno-rtti -Wno-missing-braces")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -funroll-loops -fmerge-all-constants")
|
||||
|
||||
if (XMRIG_ARMv8)
|
||||
if (ARM_TARGET EQUAL 8)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARM8_CXX_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARM8_CXX_FLAGS}")
|
||||
elseif (XMRIG_ARMv7)
|
||||
elseif (ARM_TARGET EQUAL 7)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon -march=${CMAKE_SYSTEM_PROCESSOR}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -march=${CMAKE_SYSTEM_PROCESSOR}")
|
||||
else()
|
||||
@@ -80,15 +80,19 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||
|
||||
check_symbol_exists("_rotr" "x86intrin.h" HAVE_ROTR)
|
||||
if (HAVE_ROTR)
|
||||
add_definitions(/DHAVE_ROTR)
|
||||
add_definitions(-DHAVE_ROTR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_STATIC)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if (NOT WIN32)
|
||||
check_symbol_exists("__builtin___clear_cache" "stdlib.h" HAVE_BUILTIN_CLEAR_CACHE)
|
||||
if (HAVE_BUILTIN_CLEAR_CACHE)
|
||||
add_definitions(/DHAVE_BUILTIN_CLEAR_CACHE)
|
||||
add_definitions(-DHAVE_BUILTIN_CLEAR_CACHE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
8
cmake/ghostrider.cmake
Normal file
8
cmake/ghostrider.cmake
Normal file
@@ -0,0 +1,8 @@
|
||||
if (WITH_GHOSTRIDER)
|
||||
add_definitions(/DXMRIG_ALGO_GHOSTRIDER)
|
||||
add_subdirectory(src/crypto/ghostrider)
|
||||
set(GHOSTRIDER_LIBRARY ghostrider)
|
||||
else()
|
||||
remove_definitions(/DXMRIG_ALGO_GHOSTRIDER)
|
||||
set(GHOSTRIDER_LIBRARY "")
|
||||
endif()
|
||||
19
cmake/kawpow.cmake
Normal file
19
cmake/kawpow.cmake
Normal file
@@ -0,0 +1,19 @@
|
||||
if (WITH_KAWPOW)
|
||||
add_definitions(/DXMRIG_ALGO_KAWPOW)
|
||||
|
||||
list(APPEND HEADERS_CRYPTO
|
||||
src/crypto/kawpow/KPCache.h
|
||||
src/crypto/kawpow/KPHash.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/kawpow/KPCache.cpp
|
||||
src/crypto/kawpow/KPHash.cpp
|
||||
)
|
||||
|
||||
add_subdirectory(src/3rdparty/libethash)
|
||||
set(ETHASH_LIBRARY ethash)
|
||||
else()
|
||||
remove_definitions(/DXMRIG_ALGO_KAWPOW)
|
||||
set(ETHASH_LIBRARY "")
|
||||
endif()
|
||||
52
cmake/os.cmake
Normal file
52
cmake/os.cmake
Normal file
@@ -0,0 +1,52 @@
|
||||
if (WIN32)
|
||||
set(XMRIG_OS_WIN ON)
|
||||
elseif (APPLE)
|
||||
set(XMRIG_OS_APPLE ON)
|
||||
|
||||
if (IOS OR CMAKE_SYSTEM_NAME STREQUAL iOS)
|
||||
set(XMRIG_OS_IOS ON)
|
||||
else()
|
||||
set(XMRIG_OS_MACOS ON)
|
||||
endif()
|
||||
else()
|
||||
set(XMRIG_OS_UNIX ON)
|
||||
|
||||
if (ANDROID OR CMAKE_SYSTEM_NAME MATCHES "Android")
|
||||
set(XMRIG_OS_ANDROID ON)
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
set(XMRIG_OS_LINUX ON)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD OR CMAKE_SYSTEM_NAME STREQUAL DragonFly)
|
||||
set(XMRIG_OS_FREEBSD ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if (XMRIG_OS_WIN)
|
||||
add_definitions(-DWIN32 -DXMRIG_OS_WIN)
|
||||
elseif(XMRIG_OS_APPLE)
|
||||
add_definitions(-DXMRIG_OS_APPLE)
|
||||
|
||||
if (XMRIG_OS_IOS)
|
||||
add_definitions(-DXMRIG_OS_IOS)
|
||||
else()
|
||||
add_definitions(-DXMRIG_OS_MACOS)
|
||||
endif()
|
||||
|
||||
if (XMRIG_ARM)
|
||||
set(WITH_SECURE_JIT ON)
|
||||
endif()
|
||||
elseif(XMRIG_OS_UNIX)
|
||||
add_definitions(-DXMRIG_OS_UNIX)
|
||||
|
||||
if (XMRIG_OS_ANDROID)
|
||||
add_definitions(-DXMRIG_OS_ANDROID)
|
||||
elseif (XMRIG_OS_LINUX)
|
||||
add_definitions(-DXMRIG_OS_LINUX)
|
||||
elseif (XMRIG_OS_FREEBSD)
|
||||
add_definitions(-DXMRIG_OS_FREEBSD)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WITH_SECURE_JIT)
|
||||
add_definitions(-DXMRIG_SECURE_JIT)
|
||||
endif()
|
||||
148
cmake/randomx.cmake
Normal file
148
cmake/randomx.cmake
Normal file
@@ -0,0 +1,148 @@
|
||||
if (WITH_RANDOMX)
|
||||
add_definitions(/DXMRIG_ALGO_RANDOMX)
|
||||
set(WITH_ARGON2 ON)
|
||||
|
||||
list(APPEND HEADERS_CRYPTO
|
||||
src/crypto/rx/Rx.h
|
||||
src/crypto/rx/RxAlgo.h
|
||||
src/crypto/rx/RxBasicStorage.h
|
||||
src/crypto/rx/RxCache.h
|
||||
src/crypto/rx/RxConfig.h
|
||||
src/crypto/rx/RxDataset.h
|
||||
src/crypto/rx/RxQueue.h
|
||||
src/crypto/rx/RxSeed.h
|
||||
src/crypto/rx/RxVm.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/randomx/aes_hash.cpp
|
||||
src/crypto/randomx/allocator.cpp
|
||||
src/crypto/randomx/blake2_generator.cpp
|
||||
src/crypto/randomx/blake2/blake2b.c
|
||||
src/crypto/randomx/bytecode_machine.cpp
|
||||
src/crypto/randomx/dataset.cpp
|
||||
src/crypto/randomx/instructions_portable.cpp
|
||||
src/crypto/randomx/randomx.cpp
|
||||
src/crypto/randomx/reciprocal.c
|
||||
src/crypto/randomx/soft_aes.cpp
|
||||
src/crypto/randomx/superscalar.cpp
|
||||
src/crypto/randomx/virtual_machine.cpp
|
||||
src/crypto/randomx/virtual_memory.cpp
|
||||
src/crypto/randomx/vm_compiled_light.cpp
|
||||
src/crypto/randomx/vm_compiled.cpp
|
||||
src/crypto/randomx/vm_interpreted_light.cpp
|
||||
src/crypto/randomx/vm_interpreted.cpp
|
||||
src/crypto/rx/Rx.cpp
|
||||
src/crypto/rx/RxAlgo.cpp
|
||||
src/crypto/rx/RxBasicStorage.cpp
|
||||
src/crypto/rx/RxCache.cpp
|
||||
src/crypto/rx/RxConfig.cpp
|
||||
src/crypto/rx/RxDataset.cpp
|
||||
src/crypto/rx/RxQueue.cpp
|
||||
src/crypto/rx/RxVm.cpp
|
||||
)
|
||||
|
||||
if (WITH_ASM AND CMAKE_C_COMPILER_ID MATCHES MSVC)
|
||||
enable_language(ASM_MASM)
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/randomx/jit_compiler_x86_static.asm
|
||||
src/crypto/randomx/jit_compiler_x86.cpp
|
||||
)
|
||||
elseif (WITH_ASM AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/randomx/jit_compiler_x86_static.S
|
||||
src/crypto/randomx/jit_compiler_x86.cpp
|
||||
)
|
||||
# cheat because cmake and ccache hate each other
|
||||
set_property(SOURCE src/crypto/randomx/jit_compiler_x86_static.S PROPERTY LANGUAGE C)
|
||||
elseif (XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/randomx/jit_compiler_a64_static.S
|
||||
src/crypto/randomx/jit_compiler_a64.cpp
|
||||
)
|
||||
# cheat because cmake and ccache hate each other
|
||||
if (CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set_property(SOURCE src/crypto/randomx/jit_compiler_a64_static.S PROPERTY LANGUAGE ASM)
|
||||
else()
|
||||
set_property(SOURCE src/crypto/randomx/jit_compiler_a64_static.S PROPERTY LANGUAGE C)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/randomx/jit_compiler_fallback.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if (WITH_SSE4_1)
|
||||
list(APPEND SOURCES_CRYPTO src/crypto/randomx/blake2/blake2b_sse41.c)
|
||||
|
||||
if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES Clang)
|
||||
set_source_files_properties(src/crypto/randomx/blake2/blake2b_sse41.c PROPERTIES COMPILE_FLAGS "-Ofast -msse4.1")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WITH_AVX2)
|
||||
list(APPEND SOURCES_CRYPTO src/crypto/randomx/blake2/avx2/blake2b_avx2.c)
|
||||
|
||||
if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES Clang)
|
||||
set_source_files_properties(src/crypto/randomx/blake2/avx2/blake2b_avx2.c PROPERTIES COMPILE_FLAGS "-Ofast -mavx2")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||
set_source_files_properties(src/crypto/randomx/jit_compiler_x86.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-const-variable)
|
||||
endif()
|
||||
|
||||
if (WITH_HWLOC)
|
||||
list(APPEND HEADERS_CRYPTO
|
||||
src/crypto/rx/RxNUMAStorage.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/rx/RxNUMAStorage.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if (WITH_MSR AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND (XMRIG_OS_WIN OR XMRIG_OS_LINUX))
|
||||
add_definitions(/DXMRIG_FEATURE_MSR)
|
||||
add_definitions(/DXMRIG_FIX_RYZEN)
|
||||
message("-- WITH_MSR=ON")
|
||||
|
||||
if (XMRIG_OS_WIN)
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/rx/RxFix_win.cpp
|
||||
src/hw/msr/Msr_win.cpp
|
||||
)
|
||||
elseif (XMRIG_OS_LINUX)
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/rx/RxFix_linux.cpp
|
||||
src/hw/msr/Msr_linux.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND HEADERS_CRYPTO
|
||||
src/crypto/rx/RxFix.h
|
||||
src/crypto/rx/RxMsr.h
|
||||
src/hw/msr/Msr.h
|
||||
src/hw/msr/MsrItem.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES_CRYPTO
|
||||
src/crypto/rx/RxMsr.cpp
|
||||
src/hw/msr/Msr.cpp
|
||||
src/hw/msr/MsrItem.cpp
|
||||
)
|
||||
else()
|
||||
remove_definitions(/DXMRIG_FEATURE_MSR)
|
||||
remove_definitions(/DXMRIG_FIX_RYZEN)
|
||||
message("-- WITH_MSR=OFF")
|
||||
endif()
|
||||
|
||||
if (WITH_PROFILING)
|
||||
add_definitions(/DXMRIG_FEATURE_PROFILING)
|
||||
|
||||
list(APPEND HEADERS_CRYPTO src/crypto/rx/Profiler.h)
|
||||
list(APPEND SOURCES_CRYPTO src/crypto/rx/Profiler.cpp)
|
||||
endif()
|
||||
else()
|
||||
remove_definitions(/DXMRIG_ALGO_RANDOMX)
|
||||
endif()
|
||||
@@ -1,5 +1,47 @@
|
||||
# Algorithms
|
||||
|
||||
Algorithm can be defined in 3 ways:
|
||||
|
||||
1. By pool, using algorithm negotiation, in this case no need specify algorithm on miner side.
|
||||
2. Per pool `coin` option, currently only usable values for this option is `monero` and `arqma`.
|
||||
3. Per pool `algo` option.
|
||||
|
||||
Option `coin` useful for pools without [algorithm negotiation](https://xmrig.com/docs/extensions/algorithm-negotiation) support or daemon to allow automatically switch algorithm in next hard fork. If you use xmrig-proxy don't need specify algorithm on miner side.
|
||||
|
||||
## Algorithm names
|
||||
|
||||
| Name | Memory | Version | Description | Notes |
|
||||
|------|--------|---------|-------------|-------|
|
||||
| `kawpow` | - | 6.0.0+ | KawPow (Ravencoin) | GPU only |
|
||||
| `rx/keva` | 1 MB | 5.9.0+ | RandomKEVA (RandomX variant for Keva). | |
|
||||
| `astrobwt` | 20 MB | 5.8.0+ | AstroBWT (Dero). | |
|
||||
| `cn-pico/tlo` | 256 KB | 5.5.0+ | CryptoNight-Pico (Talleo). | |
|
||||
| `rx/sfx` | 2 MB | 5.4.0+ | RandomSFX (RandomX variant for Safex). | |
|
||||
| `rx/arq` | 256 KB | 4.3.0+ | RandomARQ (RandomX variant for ArQmA). | |
|
||||
| `rx/0` | 2 MB | 3.2.0+ | RandomX (Monero). | |
|
||||
| `argon2/chukwa` | 512 KB | 3.1.0+ | Argon2id (Chukwa). | CPU only |
|
||||
| `argon2/wrkz` | 256 KB | 3.1.0+ | Argon2id (WRKZ) | CPU only |
|
||||
| `rx/wow` | 1 MB | 3.0.0+ | RandomWOW (RandomX variant for Wownero). | |
|
||||
| `rx/loki` | 2 MB | 3.0.0+ | RandomXL (RandomX variant for Loki). | |
|
||||
| `cn/fast` | 2 MB | 3.0.0+ | CryptoNight variant 1 with half iterations. | |
|
||||
| `cn/rwz` | 2 MB | 2.14.0+ | CryptoNight variant 2 with 3/4 iterations and reversed shuffle operation. | |
|
||||
| `cn/zls` | 2 MB | 2.14.0+ | CryptoNight variant 2 with 3/4 iterations. | |
|
||||
| `cn/double` | 2 MB | 2.14.0+ | CryptoNight variant 2 with double iterations. | |
|
||||
| `cn/r` | 2 MB | 2.13.0+ | CryptoNightR (Monero's variant 4). | |
|
||||
| `cn-pico` | 256 KB | 2.10.0+ | CryptoNight-Pico. | |
|
||||
| `cn/half` | 2 MB | 2.9.0+ | CryptoNight variant 2 with half iterations. | |
|
||||
| `cn/2` | 2 MB | 2.8.0+ | CryptoNight variant 2. | |
|
||||
| `cn/xao` | 2 MB | 2.6.4+ | CryptoNight variant 0 (modified). | |
|
||||
| `cn/rto` | 2 MB | 2.6.4+ | CryptoNight variant 1 (modified). | |
|
||||
| `cn-heavy/tube` | 4 MB | 2.6.4+ | CryptoNight-Heavy (modified). | |
|
||||
| `cn-heavy/xhv` | 4 MB | 2.6.3+ | CryptoNight-Heavy (modified). | |
|
||||
| `cn-heavy/0` | 4 MB | 2.6.0+ | CryptoNight-Heavy. | |
|
||||
| `cn/1` | 2 MB | 2.5.0+ | CryptoNight variant 1. | |
|
||||
| `cn-lite/1` | 1 MB | 2.5.0+ | CryptoNight-Lite variant 1. | |
|
||||
| `cn-lite/0` | 1 MB | 0.8.0+ | CryptoNight-Lite variant 0. | |
|
||||
| `cn/0` | 2 MB | 0.5.0+ | CryptoNight (original). | |
|
||||
|
||||
## Migration to v3
|
||||
Since version 3 mining [algorithm](#algorithm-names) should specified for each pool separately (`algo` option), earlier versions was use one global `algo` option and per pool `variant` option (this option was removed in v3). If your pool support [mining algorithm negotiation](https://github.com/xmrig/xmrig-proxy/issues/168) you may not specify this option at all.
|
||||
|
||||
#### Example
|
||||
@@ -9,18 +51,10 @@ Since version 3 mining [algorithm](#algorithm-names) should specified for each p
|
||||
{
|
||||
"url": "...",
|
||||
"algo": "cn/r",
|
||||
"coin": null
|
||||
...
|
||||
}
|
||||
],
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
#### Pools with mining algorithm negotiation support.
|
||||
|
||||
* [www.hashvault.pro](https://www.hashvault.pro/)
|
||||
* [moneroocean.stream](https://moneroocean.stream)
|
||||
|
||||
## Algorithm names
|
||||
|
||||
* https://xmrig.com/docs/algorithms
|
||||
|
||||
29
doc/BENCHMARK.md
Normal file
29
doc/BENCHMARK.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Embedded benchmark
|
||||
|
||||
You can run with XMRig with the following commands:
|
||||
```
|
||||
xmrig --bench=1M
|
||||
xmrig --bench=10M
|
||||
xmrig --bench=1M -a rx/wow
|
||||
xmrig --bench=10M -a rx/wow
|
||||
```
|
||||
This will run between 1 and 10 million RandomX hashes, depending on `bench` parameter, and print the time it took. First two commands use Monero variant (2 MB per thread, best for Zen2/Zen3 CPUs), second two commands use Wownero variant (1 MB per thread, useful for Intel and 1st gen Zen/Zen+ CPUs).
|
||||
|
||||
Checksum of all the hashes will be also printed to check stability of your hardware: if it's green then it's correct, if it's red then there was hardware error during computation. No Internet connection is required for the benchmark.
|
||||
|
||||
Double check that you see `Huge pages 100%` both for dataset and for all threads, and also check for `msr register values ... has been set successfully` - without this result will be far from the best. Running as administrator is required for MSR and huge pages to be set up properly.
|
||||
|
||||

|
||||
|
||||
### Benchmark with custom config
|
||||
|
||||
You can run benchmark with any configuration you want. Just start without command line parameteres, use regular config.json and add `"benchmark":"1M",` on the next line after pool url.
|
||||
|
||||
# Stress test
|
||||
|
||||
You can also run continuous stress-test that is as close to the real RandomX mining as possible and doesn't require any configuration:
|
||||
```
|
||||
xmrig --stress
|
||||
xmrig --stress -a rx/wow
|
||||
```
|
||||
This will require Internet connection and will run indefinitely.
|
||||
@@ -1,3 +1,116 @@
|
||||
# v4.6.2-beta
|
||||
- [#1274](https://github.com/xmrig/xmrig/issues/1274) Added `--cuda-devices` command line option.
|
||||
- [#1277](https://github.com/xmrig/xmrig/pull/1277) Fixed function names for clang on Apple.
|
||||
|
||||
# v4.6.1-beta
|
||||
- [#1272](https://github.com/xmrig/xmrig/pull/1272) Optimized hashrate calculation.
|
||||
- [#1273](https://github.com/xmrig/xmrig/issues/1273) Fixed crash when use `GET /2/backends` API endpoint with disabled CUDA.
|
||||
|
||||
# v4.6.0-beta
|
||||
- [#1263](https://github.com/xmrig/xmrig/pull/1263) Added new option `dataset_host` for NVIDIA GPUs with less than 4 GB memory (RandomX only).
|
||||
|
||||
# v4.5.0-beta
|
||||
- Added NVIDIA CUDA support via external [CUDA plugun](https://github.com/xmrig/xmrig-cuda). XMRig now is unified 3 in 1 miner.
|
||||
|
||||
# v4.4.0-beta
|
||||
- [#1068](https://github.com/xmrig/xmrig/pull/1068) Added support for `self-select` stratum protocol extension.
|
||||
- [#1240](https://github.com/xmrig/xmrig/pull/1240) Sync with the latest RandomX code.
|
||||
- [#1241](https://github.com/xmrig/xmrig/issues/1241) Fixed regression with colors on old Windows systems.
|
||||
- [#1243](https://github.com/xmrig/xmrig/pull/1243) Fixed incorrect OpenCL memory size detection in some cases.
|
||||
- [#1247](https://github.com/xmrig/xmrig/pull/1247) Fixed ARM64 RandomX code alignment.
|
||||
- [#1248](https://github.com/xmrig/xmrig/pull/1248) Fixed RandomX code cache cleanup on iOS/Darwin.
|
||||
|
||||
# v4.3.1-beta
|
||||
- Fixed regression in v4.3.0, miner didn't create `cn` mining profile with default config example.
|
||||
|
||||
# v4.3.0-beta
|
||||
- [#1227](https://github.com/xmrig/xmrig/pull/1227) Added new algorithm `rx/arq`, RandomX variant for upcoming ArQmA fork.
|
||||
- [#808](https://github.com/xmrig/xmrig/issues/808#issuecomment-539297156) Added experimental support for persistent memory for CPU mining threads.
|
||||
- [#1221](https://github.com/xmrig/xmrig/issues/1221) Improved RandomX dataset memory usage and initialization speed for NUMA machines.
|
||||
|
||||
# v4.2.1-beta
|
||||
- [#1150](https://github.com/xmrig/xmrig/issues/1150) Fixed build on FreeBSD.
|
||||
- [#1175](https://github.com/xmrig/xmrig/issues/1175) Fixed support for systems where total count of NUMA nodes not equal usable nodes count.
|
||||
- [#1199](https://github.com/xmrig/xmrig/issues/1199) Fixed excessive memory allocation for OpenCL threads with low intensity.
|
||||
- [#1212](https://github.com/xmrig/xmrig/issues/1212) Fixed low RandomX performance after fast algorithm switching.
|
||||
|
||||
# v4.2.0-beta
|
||||
- [#1202](https://github.com/xmrig/xmrig/issues/1202) Fixed algorithm verification in donate strategy.
|
||||
- Added per pool option `coin` with single possible value `monero` for pools without algorithm negotiation, for upcoming Monero fork.
|
||||
- Added config option `cpu/max-threads-hint` and command line option `--cpu-max-threads-hint`.
|
||||
|
||||
# v4.1.0-beta
|
||||
- **OpenCL backend disabled by default.**.
|
||||
- [#1183](https://github.com/xmrig/xmrig/issues/1183) Fixed compatibility with systemd.
|
||||
- [#1185](https://github.com/xmrig/xmrig/pull/1185) Added JIT compiler for RandomX on ARMv8.
|
||||
- Improved API endpoint `GET /2/backends` and added support for this endpoint to [workers.xmrig.info](http://workers.xmrig.info).
|
||||
- Added command line option `--no-cpu` to disable CPU backend.
|
||||
- Added OpenCL specific command line options: `--opencl`, `--opencl-devices`, `--opencl-platform`, `--opencl-loader` and `--opencl-no-cache`.
|
||||
- Removed command line option `--http-enabled`, HTTP API enabled automatically if any other `--http-*` option provided.
|
||||
|
||||
# v4.0.1-beta
|
||||
- [#1177](https://github.com/xmrig/xmrig/issues/1177) Fixed compatibility with old AMD drivers.
|
||||
- [#1180](https://github.com/xmrig/xmrig/issues/1180) Fixed possible duplicated shares after algorithm switching.
|
||||
- Added support for case if not all backend threads successfully started.
|
||||
- Fixed wrong config file permissions after write (only gcc builds on recent Windows 10 affected).
|
||||
|
||||
# v4.0.0-beta
|
||||
- [#1172](https://github.com/xmrig/xmrig/issues/1172) **Added OpenCL mining backend.**
|
||||
- [#268](https://github.com/xmrig/xmrig-amd/pull/268) [#270](https://github.com/xmrig/xmrig-amd/pull/270) [#271](https://github.com/xmrig/xmrig-amd/pull/271) [#273](https://github.com/xmrig/xmrig-amd/pull/273) [#274](https://github.com/xmrig/xmrig-amd/pull/274) [#1171](https://github.com/xmrig/xmrig/pull/1171) Added RandomX support for OpenCL, thanks [@SChernykh](https://github.com/SChernykh).
|
||||
- Algorithm `cn/wow` removed, as no longer alive.
|
||||
|
||||
# v3.2.0
|
||||
- Added per pool option `coin` with single possible value `monero` for pools without algorithm negotiation, for upcoming Monero fork.
|
||||
- [#1183](https://github.com/xmrig/xmrig/issues/1183) Fixed compatibility with systemd.
|
||||
|
||||
# v3.1.3
|
||||
- [#1180](https://github.com/xmrig/xmrig/issues/1180) Fixed possible duplicated shares after algorithm switching.
|
||||
- Fixed wrong config file permissions after write (only gcc builds on recent Windows 10 affected).
|
||||
|
||||
# v3.1.2
|
||||
- Many RandomX optimizations and fixes.
|
||||
- [#1132](https://github.com/xmrig/xmrig/issues/1132) Fixed build on CentOS 7.
|
||||
- [#1163](https://github.com/xmrig/xmrig/pull/1163) Optimized soft AES code, up to +30% hashrate on CPU without AES support and other optimizations.
|
||||
- [#1166](https://github.com/xmrig/xmrig/pull/1166) Fixed crash when initialize dataset with big threads count (eg 272).
|
||||
- [#1168](https://github.com/xmrig/xmrig/pull/1168) Optimized loading from scratchpad.
|
||||
- [#1128](https://github.com/xmrig/xmrig/issues/1128) Fixed CMake 2.8 compatibility.
|
||||
|
||||
# v3.1.1
|
||||
- [#1133](https://github.com/xmrig/xmrig/issues/1133) Fixed syslog regression.
|
||||
- [#1138](https://github.com/xmrig/xmrig/issues/1138) Fixed multiple network bugs.
|
||||
- [#1141](https://github.com/xmrig/xmrig/issues/1141) Fixed log in background mode.
|
||||
- [#1142](https://github.com/xmrig/xmrig/pull/1142) RandomX hashrate improved by 0.5-1.5% depending on variant and CPU.
|
||||
- [#1146](https://github.com/xmrig/xmrig/pull/1146) Fixed race condition in RandomX thread init.
|
||||
- [#1148](https://github.com/xmrig/xmrig/pull/1148) Fixed, on Linux linker marking entire executable as having an executable stack.
|
||||
- Fixed, for Argon2 algorithms command line options like `--threads` was ignored.
|
||||
- Fixed command line options for single pool, free order allowed again.
|
||||
|
||||
# v3.1.0
|
||||
- [#1107](https://github.com/xmrig/xmrig/issues/1107#issuecomment-522235892) Added Argon2 algorithm family: `argon2/chukwa` and `argon2/wrkz`.
|
||||
|
||||
# v3.0.0
|
||||
- **[#1111](https://github.com/xmrig/xmrig/pull/1111) Added RandomX (`rx/test`) algorithm for testing and benchmarking.**
|
||||
- **[#1036](https://github.com/xmrig/xmrig/pull/1036) Added RandomWOW (`rx/wow`) algorithm for [Wownero](http://wownero.org/).**
|
||||
- **[#1050](https://github.com/xmrig/xmrig/pull/1050) Added RandomXL (`rx/loki`) algorithm for [Loki](https://loki.network/).**
|
||||
- **[#1077](https://github.com/xmrig/xmrig/issues/1077) Added NUMA support via hwloc**.
|
||||
- **Added flexible [multi algorithm](doc/CPU.md) configuration.**
|
||||
- **Added unlimited switching between incompatible algorithms, all mining options can be changed in runtime.**
|
||||
- [#257](https://github.com/xmrig/xmrig-nvidia/pull/257) New logging subsystem, file and syslog now always without colors.
|
||||
- [#314](https://github.com/xmrig/xmrig-proxy/issues/314) Added donate over proxy feature.
|
||||
- [#1007](https://github.com/xmrig/xmrig/issues/1007) Old HTTP API backend based on libmicrohttpd, replaced to custom HTTP server (libuv + http_parser).
|
||||
- [#1010](https://github.com/xmrig/xmrig/pull/1010#issuecomment-482632107) Added daemon support (solo mining).
|
||||
- [#1066](https://github.com/xmrig/xmrig/issues/1066#issuecomment-518080529) Added error message if pool not ready for RandomX.
|
||||
- [#1105](https://github.com/xmrig/xmrig/issues/1105) Improved auto configuration for `cn-pico` algorithm.
|
||||
- Added commands `pause` and `resume` via JSON RPC 2.0 API (`POST /json_rpc`).
|
||||
- Added command line option `--export-topology` for export hwloc topology to a XML file.
|
||||
- Breaked backward compatibility with previous configs and command line, `variant` option replaced to `algo`, global option `algo` removed, all CPU related settings moved to `cpu` object.
|
||||
- Options `av`, `safe` and `max-cpu-usage` removed.
|
||||
- Algorithm `cn/msr` renamed to `cn/fast`.
|
||||
- Algorithm `cn/xtl` removed.
|
||||
- API endpoint `GET /1/threads` replaced to `GET /2/backends`.
|
||||
- Added global uptime and extended connection information in API.
|
||||
- API now return current algorithm.
|
||||
|
||||
# v2.99.6-beta
|
||||
- Added commands `pause` and `resume` via JSON RPC 2.0 API (`POST /json_rpc`).
|
||||
- Fixed autoconfig regression (since 2.99.5), mostly `rx/wow` was affected by this bug.
|
||||
|
||||
56
doc/CPU.md
56
doc/CPU.md
@@ -1,6 +1,6 @@
|
||||
# CPU backend
|
||||
**:warning: Recent version of this page https://xmrig.com/docs/miner/config/cpu.**
|
||||
|
||||
**Information in this document actual to version 2.99.5+**
|
||||
# CPU backend
|
||||
|
||||
All CPU related settings contains in one `cpu` object in config file, CPU backend allow specify multiple profiles and allow switch between them without restrictions by pool request or config change. Default auto-configuration create reasonable minimum of profiles which cover all supported algorithms.
|
||||
|
||||
@@ -77,6 +77,35 @@ Each number represent one thread and means CPU affinity, this is default format
|
||||
```
|
||||
Internal format, but can be user defined.
|
||||
|
||||
## RandomX options
|
||||
|
||||
#### `init`
|
||||
Thread count to initialize RandomX dataset. Auto-detect (`-1`) or any number greater than 0 to use that many threads.
|
||||
|
||||
#### `init-avx2`
|
||||
Use AVX2 for dataset initialization. Faster on some CPUs. Auto-detect (`-1`), disabled (`0`), always enabled on CPUs that support AVX2 (`1`).
|
||||
|
||||
#### `mode`
|
||||
RandomX mining mode: `auto`, `fast` (2 GB memory), `light` (256 MB memory).
|
||||
|
||||
#### `1gb-pages`
|
||||
Use 1GB hugepages for RandomX dataset (Linux only). Enabled (`true`) or disabled (`false`). It gives 1-3% speedup.
|
||||
|
||||
#### `wrmsr`
|
||||
[MSR mod](https://xmrig.com/docs/miner/randomx-optimization-guide/msr). Enabled (`true`) or disabled (`false`). It gives up to 15% speedup depending on your system. _(**Note**: Userspace MSR writes are no longer enabled by default; the flag `msr.allow_writes=on` must be set for Linux Kernels 5.9 and after.)_
|
||||
|
||||
#### `rdmsr`
|
||||
Restore MSR register values to their original values on exit. Used together with `wrmsr`. Enabled (`true`) or disabled (`false`).
|
||||
|
||||
#### `cache_qos`
|
||||
[Cache QoS](https://xmrig.com/docs/miner/randomx-optimization-guide/qos). Enabled (`true`) or disabled (`false`). It's useful when you can't or don't want to mine on all CPU cores to make mining hashrate more stable.
|
||||
|
||||
#### `numa`
|
||||
NUMA support (better hashrate on multi-CPU servers and Ryzen Threadripper 1xxx/2xxx). Enabled (`true`) or disabled (`false`).
|
||||
|
||||
#### `scratchpad_prefetch_mode`
|
||||
Which instruction to use in RandomX loop to prefetch data from scratchpad. `1` is default and fastest in most cases. Can be off (`0`), `prefetcht0` instruction (`1`), `prefetchnta` instruction (`2`, a bit faster on Coffee Lake and a few other CPUs), `mov` instruction (`3`).
|
||||
|
||||
## Shared options
|
||||
|
||||
#### `enabled`
|
||||
@@ -85,11 +114,32 @@ Enable (`true`) or disable (`false`) CPU backend, by default `true`.
|
||||
#### `huge-pages`
|
||||
Enable (`true`) or disable (`false`) huge pages support, by default `true`.
|
||||
|
||||
#### `huge-pages-jit`
|
||||
Enable (`true`) or disable (`false`) huge pages support for RandomX JIT code, by default `false`. It gives a very small boost on Ryzen CPUs, but hashrate is unstable between launches. Use with caution.
|
||||
|
||||
#### `hw-aes`
|
||||
Force enable (`true`) or disable (`false`) hardware AES support. Default value `null` means miner autodetect this feature. Usually don't need change this option, this option useful for some rare cases when miner can't detect hardware AES, but it available. If you force enable this option, but your hardware not support it, miner will crash.
|
||||
|
||||
#### `priority`
|
||||
Mining threads priority, value from `1` (lowest priority) to `5` (highest possible priority). Default value `null` means miner don't change threads priority at all.
|
||||
Mining threads priority, value from `1` (lowest priority) to `5` (highest possible priority). Default value `null` means miner don't change threads priority at all. Setting priority higher than 2 can make your PC unresponsive.
|
||||
|
||||
#### `memory-pool` (since v4.3.0)
|
||||
Use continuous, persistent memory block for mining threads, useful for preserve huge pages allocation while algorithm switching. Possible values `false` (feature disabled, by default) or `true` or specific count of 2 MB huge pages. It helps to avoid loosing huge pages for scratchpads when RandomX dataset is updated and mining threads restart after a 2-3 days of mining.
|
||||
|
||||
#### `yield` (since v5.1.1)
|
||||
Prefer system better system response/stability `true` (default value) or maximum hashrate `false`.
|
||||
|
||||
#### `asm`
|
||||
Enable/configure or disable ASM optimizations. Possible values: `true`, `false`, `"intel"`, `"ryzen"`, `"bulldozer"`.
|
||||
|
||||
#### `argon2-impl` (since v3.1.0)
|
||||
Allow override automatically detected Argon2 implementation, this option added mostly for debug purposes, default value `null` means autodetect. This is used in RandomX dataset initialization and also in some other mining algorithms. Other possible values: `"x86_64"`, `"SSE2"`, `"SSSE3"`, `"XOP"`, `"AVX2"`, `"AVX-512F"`. Manual selection has no safe guards - if your CPU doesn't support required instuctions, miner will crash.
|
||||
|
||||
#### `astrobwt-max-size`
|
||||
AstroBWT algorithm: skip hashes with large stage 2 size, default: `550`, min: `400`, max: `1200`. Optimal value depends on your CPU/GPU
|
||||
|
||||
#### `astrobwt-avx2`
|
||||
AstroBWT algorithm: use AVX2 code. It's faster on some CPUs and slower on other
|
||||
|
||||
#### `max-threads-hint` (since v4.2.0)
|
||||
Maximum CPU threads count (in percentage) hint for autoconfig. [CPU_MAX_USAGE.md](CPU_MAX_USAGE.md)
|
||||
|
||||
26
doc/CPU_MAX_USAGE.md
Normal file
26
doc/CPU_MAX_USAGE.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Maximum CPU usage
|
||||
|
||||
Please read this document carefully, `max-threads-hint` (was known as `max-cpu-usage`) option is most confusing option in the miner with many myth and legends.
|
||||
This option is just hint for automatic configuration and can't precise define CPU usage.
|
||||
|
||||
### Option definition
|
||||
#### Config file:
|
||||
```json
|
||||
{
|
||||
...
|
||||
"cpu": {
|
||||
"max-threads-hint": 100,
|
||||
...
|
||||
},
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
#### Command line
|
||||
`--cpu-max-threads-hint 100`
|
||||
|
||||
### Known issues and usage
|
||||
|
||||
* This option has no effect if miner already generated CPU configuration, to prevent config generation use `"autosave":false,`.
|
||||
* Only threads count can be changed, for 1 core CPU this option has no effect, for 2 core CPU only 2 values possible 50% and 100%, for 4 cores: 25%, 50%, 75%, 100%. etc.
|
||||
* You CPU may limited by other factors, eg cache.
|
||||
9
doc/PERSISTENT_OPTIONS.md
Normal file
9
doc/PERSISTENT_OPTIONS.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Persistent options
|
||||
|
||||
Options in list below can't changed in runtime by watching config file or via API.
|
||||
|
||||
* `background`
|
||||
* `donate-level`
|
||||
* `cpu/argon2-impl`
|
||||
* `opencl/loader`
|
||||
* `opencl/platform`
|
||||
41
doc/build/CMAKE_OPTIONS.md
vendored
Normal file
41
doc/build/CMAKE_OPTIONS.md
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
# CMake options
|
||||
**Recent version of this document: https://xmrig.com/docs/miner/cmake-options**
|
||||
|
||||
## Algorithms
|
||||
|
||||
* **`-DWITH_CN_LITE=OFF`** disable all CryptoNight-Lite algorithms (`cn-lite/0`, `cn-lite/1`).
|
||||
* **`-DWITH_CN_HEAVY=OFF`** disable all CryptoNight-Heavy algorithms (`cn-heavy/0`, `cn-heavy/xhv`, `cn-heavy/tube`).
|
||||
* **`-DWITH_CN_PICO=OFF`** disable CryptoNight-Pico algorithm (`cn-pico`).
|
||||
* **`-DWITH_RANDOMX=OFF`** disable RandomX algorithms (`rx/loki`, `rx/wow`).
|
||||
* **`-DWITH_ARGON2=OFF`** disable Argon2 algorithms (`argon2/chukwa`, `argon2/wrkz`).
|
||||
|
||||
## Features
|
||||
|
||||
* **`-DWITH_HWLOC=OFF`**
|
||||
disable [hwloc](https://github.com/xmrig/xmrig/issues/1077) support.
|
||||
Disabling this feature is not recommended in most cases.
|
||||
This feature add external dependency to libhwloc (1.10.0+) (except MSVC builds).
|
||||
* **`-DWITH_LIBCPUID=OFF`** disable built in libcpuid support, this feature always disabled if hwloc enabled, if both hwloc and libcpuid disabled auto configuration for CPU will very limited.
|
||||
* **`-DWITH_HTTP=OFF`** disable built in HTTP support, this feature used for HTTP API and daemon (solo mining) support.
|
||||
* **`-DWITH_TLS=OFF`** disable SSL/TLS support (secure connections to pool). This feature add external dependency to OpenSSL.
|
||||
* **`-DWITH_ASM=OFF`** disable assembly optimizations for modern CryptoNight algorithms.
|
||||
* **`-DWITH_EMBEDDED_CONFIG=ON`** Enable [embedded](https://github.com/xmrig/xmrig/issues/957) config support.
|
||||
* **`-DWITH_OPENCL=OFF`** Disable OpenCL backend.
|
||||
* **`-DWITH_CUDA=OFF`** Disable CUDA backend.
|
||||
* **`-DWITH_SSE4_1=OFF`** Disable SSE 4.1 for Blake2 (useful for arm builds).
|
||||
|
||||
## Debug options
|
||||
|
||||
* **`-DWITH_DEBUG_LOG=ON`** enable debug log (mostly network requests).
|
||||
* **`-DHWLOC_DEBUG=ON`** enable some debug log for hwloc.
|
||||
* **`-DCMAKE_BUILD_TYPE=Debug`** enable debug build, only useful for investigate crashes, this option slow down miner.
|
||||
|
||||
## Special build options
|
||||
|
||||
* **`-DXMRIG_DEPS=<path>`** path to precompiled dependencies https://github.com/xmrig/xmrig-deps
|
||||
* **`-DARM_TARGET=<number>`** override ARM target, possible values `7` (ARMv7) and `8` (ARMv8).
|
||||
* **`-DUV_INCLUDE_DIR=<path>`** custom path to libuv headers.
|
||||
* **`-DUV_LIBRARY=<path>`** custom path to libuv library.
|
||||
* **`-DHWLOC_INCLUDE_DIR=<path>`** custom path to hwloc headers.
|
||||
* **`-DHWLOC_LIBRARY=<path>`** custom path to hwloc library.
|
||||
* **`-DOPENSSL_ROOT_DIR=<path>`** custom path to OpenSSL.
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"current": [
|
||||
["rx/test", "2 MB", "2.99.5+", "RandomX (reference configuration)."],
|
||||
["rx/0", "2 MB", "2.99.0+", "RandomX (reference configuration), reserved for future use."],
|
||||
["rx/wow", "1 MB", "2.99.0+", "RandomWOW."],
|
||||
["rx/loki", "2 MB", "2.99.0+", "RandomXL."],
|
||||
["cn/fast", "2 MB", "2.99.0+", "CryptoNight variant 1 with half iterations."],
|
||||
["cn/rwz", "2 MB", "2.14.0+", "CryptoNight variant 2 with 3/4 iterations and reversed shuffle operation."],
|
||||
["cn/zls", "2 MB", "2.14.0+", "CryptoNight variant 2 with 3/4 iterations."],
|
||||
["cn/double", "2 MB", "2.14.0+", "CryptoNight variant 2 with double iterations."],
|
||||
["cn/r", "2 MB", "2.13.0+", "CryptoNightR (Monero's variant 4)."],
|
||||
["cn/wow", "2 MB", "2.12.0+", "CryptoNightR (Wownero)."],
|
||||
["cn/gpu", "2 MB", "2.11.0+", "CryptoNight-GPU."],
|
||||
["cn-pico", "256 KB", "2.10.0+", "CryptoNight-Pico."],
|
||||
["cn/half", "2 MB", "2.9.0+", "CryptoNight variant 2 with half iterations."],
|
||||
["cn/2", "2 MB", "2.8.0+", "CryptoNight variant 2."],
|
||||
["cn/xao", "2 MB", "2.6.4+", "CryptoNight variant 0 (modified)."],
|
||||
["cn/rto", "2 MB", "2.6.4+", "CryptoNight variant 1 (modified)."],
|
||||
["cn-heavy/tube", "4 MB", "2.6.4+", "CryptoNight-Heavy (modified)."],
|
||||
["cn-heavy/xhv", "4 MB", "2.6.3+", "CryptoNight-Heavy (modified)."],
|
||||
["cn-heavy/0", "4 MB", "2.6.0+", "CryptoNight-Heavy."],
|
||||
["cn/1", "2 MB", "2.5.0+", "CryptoNight variant 1."],
|
||||
["cn-lite/1", "1 MB", "2.5.0+", "CryptoNight-Lite variant 1."],
|
||||
["cn-lite/0", "1 MB", "0.8.0+", "CryptoNight-Lite variant 0."],
|
||||
["cn/0", "2 MB", "0.5.0+", "CryptoNight (original)."]
|
||||
],
|
||||
"removed": [
|
||||
["cn/msr", "2 MB", "2.6.3+", "Renamed to cn/fast, still supported as alias."],
|
||||
["cn/xtl", "2 MB", "2.6.1-2.16.0", "Coin forked to cn/half."],
|
||||
["cn-lite/ipbc", "1 MB", "2.6.1-2.6.3", "Coin forked to cn-heavy/tube."]
|
||||
]
|
||||
}
|
||||
30
doc/gpg_keys/xmrig.asc
Normal file
30
doc/gpg_keys/xmrig.asc
Normal file
@@ -0,0 +1,30 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQENBF3VSRIBCADfFjDUbq0WLGulFeSou0A+jTvweNllPyLNOn3SNCC0XLEYyEcu
|
||||
JiEBK80DlvR06TVr8Aw1rT5S2iH0i5Tl8DqShH2mmcN1rBp1M0Y95D89KVj3BIhE
|
||||
nxmgmD4N3Wgm+5FmEH4W/RpG1xdYWJx3eJhtWPdFJqpg083E2D5P30wIQem+EnTR
|
||||
5YrtTZPh5cPj2KRY+UmsDE3ahmxCgP7LYgnnpZQlWBBiMV932s7MvYBPJQc1wecS
|
||||
0wi1zxyS81xHc3839EkA7wueCeNo+5jha+KH66tMKsfrI2WvfPHTCPjK9v7WJc/O
|
||||
/eRp9d+wacn09D1L6CoRO0ers5p10GO84VhTABEBAAG0GVhNUmlnIDxzdXBwb3J0
|
||||
QHhtcmlnLmNvbT6JAU4EEwEIADgWIQSaxM6o5m41pcfN3BtEalNji+lECQUCXdVJ
|
||||
EgIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRBEalNji+lECbkQB/9nRou0
|
||||
tOlBwYn8xVgBu7IiDWNVETRWfrjrtdTvSahgbbo6lWgjA/vBLkjN9fISdBQ/n/Mt
|
||||
hNDJbEtxHHt2baJhvT8du1eWcIHHXCV/rmv+iY/hTXa1gKqHiHDJrtYSVBG3BMme
|
||||
1rdsUHTiKf3t5yRHOXAfY2C+XNblKAV7mhlxQBiKxdFDIkFEQKNrHNUvnzkOqoCT
|
||||
2kTZZ2tPUMQdOn1eek6zG/+C7SwcBpJnakJ8jce4yA/xZbOVKetNWO3Ufu3TE34k
|
||||
OdA+H4PU9+fV77XfOY8DtXeS3boUI97ei+4s/mwX/NFC0i8CPXyefxl3WRUBGDOI
|
||||
w//kPNQVh4HobOCeuQENBF3VSRIBCADl29WorEi+vRA/3kg9VUXtxSU6caibFS3N
|
||||
VXANiFRjrOmICdfrIgOSGNrYCQFsXu0Xe0udDYVX8yX6WJk+CT02Pdg0gkXiKoze
|
||||
KrnK15mo3xXbb2tr1o9ROPgwY/o2AwQHj0o1JhdS2cybfuRiUQRoGgBX7a9X0cTY
|
||||
r4ZJvOjzgAajl3ciwB3yWUmDiRlzZpO7YWESXbOhGVzyCnP5MlMEJ/fPRw9h38vK
|
||||
HNKLhzcRfsLpXk34ghY3SxIv4NWUfuZXFWqpSdC9JgNc5zA72lJEQcF4DHJCKl7B
|
||||
ddmrfsr9mdiIpo+/ZZFPPngdeZ2kvkJ2YKaZNVu2XooJARPQ8B8tABEBAAGJATYE
|
||||
GAEIACAWIQSaxM6o5m41pcfN3BtEalNji+lECQUCXdVJEgIbDAAKCRBEalNji+lE
|
||||
CdPUB/4nH1IdhHGmfko2kxdaHqQgCGLqh3pcrQXD9mBv/LYVnoHZpVRHsIDgg2Z4
|
||||
lQYrIRRqe69FjVxo7sA2eMIlV0GRDlUrw+HeURFpEhKPEdwFy6i/cti2MY0YxOrB
|
||||
TvQoRutUoMnyjM4TBJWaaqccbTsavMdLmG3JHdAkiHtUis/fUwVctmEQwN+d/J2b
|
||||
wJAtliqw3nXchUfdIfwHF/7hg8seUuYUaifzkazBZhVWvRkTVLVanzZ51HRfuzwD
|
||||
ntaa7kfYGdE+4TKOylAPh+8E6WnR19RRTpsaW0dVBgOiBTE0uc7rUv2HWS/u6RUR
|
||||
t7ldSBzkuDTlM2V59Iq2hXoSC6dT
|
||||
=cIG9
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
BIN
doc/screenshot_v5_2_0.png
Normal file
BIN
doc/screenshot_v5_2_0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
262
doc/topology/AMD_Opteron_6344_x2_N4_win7_2_0_4_bug.xml
Normal file
262
doc/topology/AMD_Opteron_6344_x2_N4_win7_2_0_4_bug.xml
Normal file
@@ -0,0 +1,262 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE topology SYSTEM "hwloc2.dtd">
|
||||
<topology version="2.0">
|
||||
<object type="Machine" os_index="0" cpuset="0x00ffffff" complete_cpuset="0x00ffffff" allowed_cpuset="0x00ffffff" nodeset="0x0000000f" complete_nodeset="0x0000000f" allowed_nodeset="0x0000000f" gp_index="1">
|
||||
<info name="Backend" value="Windows"/>
|
||||
<info name="hwlocVersion" value="2.0.4"/>
|
||||
<object type="Package" cpuset="0x00000fff" complete_cpuset="0x00000fff" nodeset="0x00000003" complete_nodeset="0x00000003" gp_index="36">
|
||||
<info name="CPUVendor" value="AuthenticAMD"/>
|
||||
<info name="CPUFamilyNumber" value="21"/>
|
||||
<info name="CPUModelNumber" value="2"/>
|
||||
<info name="CPUModel" value="AMD Opteron(tm) Processor 6344 "/>
|
||||
<info name="CPUStepping" value="0"/>
|
||||
<object type="L3Cache" cpuset="0x0000003f" complete_cpuset="0x0000003f" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="20" cache_size="12582912" depth="3" cache_linesize="64" cache_associativity="1" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="0" cpuset="0x0000003f" complete_cpuset="0x0000003f" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="80" local_memory="7009357824">
|
||||
<page_type size="4096" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="4" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="3" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="2">
|
||||
<object type="PU" os_index="0" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="85"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="7" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="6" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="5">
|
||||
<object type="PU" os_index="1" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="86"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="10" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="9" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="8">
|
||||
<object type="PU" os_index="2" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="87"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="13" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="12" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="11">
|
||||
<object type="PU" os_index="3" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="88"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="16" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="15" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="14">
|
||||
<object type="PU" os_index="4" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="89"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="19" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="18" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="17">
|
||||
<object type="PU" os_index="5" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000001" complete_nodeset="0x00000001" gp_index="90"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L3Cache" cpuset="0x00000fc0" complete_cpuset="0x00000fc0" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="40" cache_size="12582912" depth="3" cache_linesize="64" cache_associativity="1" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="1" cpuset="0x00000fc0" complete_cpuset="0x00000fc0" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="81" local_memory="8018194432">
|
||||
<page_type size="4096" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="23" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="22" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="21">
|
||||
<object type="PU" os_index="6" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="91"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="26" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="25" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="24">
|
||||
<object type="PU" os_index="7" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="92"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="29" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="28" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="27">
|
||||
<object type="PU" os_index="8" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="93"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="32" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="31" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="30">
|
||||
<object type="PU" os_index="9" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="94"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="35" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="34" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="33">
|
||||
<object type="PU" os_index="10" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="95"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="39" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="38" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="37">
|
||||
<object type="PU" os_index="11" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="96"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="Package" cpuset="0x00fff000" complete_cpuset="0x00fff000" nodeset="0x0000000c" complete_nodeset="0x0000000c" gp_index="75">
|
||||
<info name="CPUVendor" value="AuthenticAMD"/>
|
||||
<info name="CPUFamilyNumber" value="21"/>
|
||||
<info name="CPUModelNumber" value="2"/>
|
||||
<info name="CPUModel" value="AMD Opteron(tm) Processor 6344 "/>
|
||||
<info name="CPUStepping" value="0"/>
|
||||
<object type="L3Cache" cpuset="0x0003f000" complete_cpuset="0x0003f000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="59" cache_size="12582912" depth="3" cache_linesize="64" cache_associativity="1" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="2" cpuset="0x0003f000" complete_cpuset="0x0003f000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="82" local_memory="8035020800">
|
||||
<page_type size="4096" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="43" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="42" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="41">
|
||||
<object type="PU" os_index="12" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="97"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="46" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="45" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="44">
|
||||
<object type="PU" os_index="13" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="98"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="49" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="48" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="47">
|
||||
<object type="PU" os_index="14" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="99"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="52" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="51" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="50">
|
||||
<object type="PU" os_index="15" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="100"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="55" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="54" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="53">
|
||||
<object type="PU" os_index="16" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="101"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="58" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="57" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="56">
|
||||
<object type="PU" os_index="17" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="102"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L3Cache" cpuset="0x00fc0000" complete_cpuset="0x00fc0000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="79" cache_size="12582912" depth="3" cache_linesize="64" cache_associativity="1" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="3" cpuset="0x00fc0000" complete_cpuset="0x00fc0000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="83" local_memory="8097337344">
|
||||
<page_type size="4096" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="62" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="61" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="60">
|
||||
<object type="PU" os_index="18" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="103"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="65" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="64" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="63">
|
||||
<object type="PU" os_index="19" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="104"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="68" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="67" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="66">
|
||||
<object type="PU" os_index="20" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="105"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="71" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="70" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="69">
|
||||
<object type="PU" os_index="21" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="106"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="74" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="73" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="72">
|
||||
<object type="PU" os_index="22" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="107"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="78" cache_size="2097152" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="77" cache_size="16384" depth="1" cache_linesize="64" cache_associativity="4" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="76">
|
||||
<object type="PU" os_index="23" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000008" complete_nodeset="0x00000008" gp_index="108"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</topology>
|
||||
399
doc/topology/AMD_Opteron_6348_x4_N8_linux_2_0_4.xml
Normal file
399
doc/topology/AMD_Opteron_6348_x4_N8_linux_2_0_4.xml
Normal file
@@ -0,0 +1,399 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE topology SYSTEM "hwloc2.dtd">
|
||||
<topology version="2.0">
|
||||
<object type="Machine" os_index="0" cpuset="0xffffffff" complete_cpuset="0xffffffff" allowed_cpuset="0xffffffff" nodeset="0x00000066" complete_nodeset="0x000000ff" allowed_nodeset="0x00000066" gp_index="1">
|
||||
<info name="DMIProductName" value="H8QG6"/>
|
||||
<info name="DMIProductVersion" value="1234567890"/>
|
||||
<info name="DMIProductSerial" value="1234567890"/>
|
||||
<info name="DMIProductUUID" value="0"/>
|
||||
<info name="DMIBoardVendor" value="Supermicro"/>
|
||||
<info name="DMIBoardName" value="H8QG6"/>
|
||||
<info name="DMIBoardVersion" value="1234567890"/>
|
||||
<info name="DMIBoardSerial" value="0"/>
|
||||
<info name="DMIBoardAssetTag" value="1234567890"/>
|
||||
<info name="DMIChassisVendor" value="Supermicro"/>
|
||||
<info name="DMIChassisType" value="3"/>
|
||||
<info name="DMIChassisVersion" value="1234567890"/>
|
||||
<info name="DMIChassisSerial" value="1234567890."/>
|
||||
<info name="DMIChassisAssetTag" value="1234567890"/>
|
||||
<info name="DMIBIOSVendor" value="American Megatrends Inc."/>
|
||||
<info name="DMIBIOSVersion" value="080016 "/>
|
||||
<info name="DMIBIOSDate" value="10/11/2010"/>
|
||||
<info name="DMISysVendor" value="Supermicro"/>
|
||||
<info name="Backend" value="Linux"/>
|
||||
<info name="LinuxCgroup" value="/"/>
|
||||
<info name="OSName" value="Linux"/>
|
||||
<info name="OSRelease" value="4.15.0-20-generic"/>
|
||||
<info name="OSVersion" value="#21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018"/>
|
||||
<info name="HostName" value="host"/>
|
||||
<info name="Architecture" value="x86_64"/>
|
||||
<info name="hwlocVersion" value="2.0.4"/>
|
||||
<info name="ProcessName" value="xmrig"/>
|
||||
<object type="Package" os_index="0" cpuset="0x000000ff" complete_cpuset="0x000000ff" nodeset="0x00000002" complete_nodeset="0x00000003" gp_index="2">
|
||||
<info name="CPUVendor" value="AuthenticAMD"/>
|
||||
<info name="CPUFamilyNumber" value="16"/>
|
||||
<info name="CPUModelNumber" value="9"/>
|
||||
<info name="CPUModel" value="AMD Opteron(tm) Processor 6128"/>
|
||||
<info name="CPUStepping" value="1"/>
|
||||
<object type="L3Cache" cpuset="0x0000000f" complete_cpuset="0x0000000f" nodeset="0x0" complete_nodeset="0x00000001" gp_index="7" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L2Cache" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x0" complete_nodeset="0x00000001" gp_index="6" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x0" complete_nodeset="0x00000001" gp_index="5" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x0" complete_nodeset="0x00000001" gp_index="3">
|
||||
<object type="PU" os_index="0" cpuset="0x00000001" complete_cpuset="0x00000001" nodeset="0x0" complete_nodeset="0x00000001" gp_index="4"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x0" complete_nodeset="0x00000001" gp_index="11" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x0" complete_nodeset="0x00000001" gp_index="10" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x0" complete_nodeset="0x00000001" gp_index="8">
|
||||
<object type="PU" os_index="1" cpuset="0x00000002" complete_cpuset="0x00000002" nodeset="0x0" complete_nodeset="0x00000001" gp_index="9"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x0" complete_nodeset="0x00000001" gp_index="15" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x0" complete_nodeset="0x00000001" gp_index="14" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x0" complete_nodeset="0x00000001" gp_index="12">
|
||||
<object type="PU" os_index="2" cpuset="0x00000004" complete_cpuset="0x00000004" nodeset="0x0" complete_nodeset="0x00000001" gp_index="13"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x0" complete_nodeset="0x00000001" gp_index="19" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x0" complete_nodeset="0x00000001" gp_index="18" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x0" complete_nodeset="0x00000001" gp_index="16">
|
||||
<object type="PU" os_index="3" cpuset="0x00000008" complete_cpuset="0x00000008" nodeset="0x0" complete_nodeset="0x00000001" gp_index="17"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L3Cache" cpuset="0x000000f0" complete_cpuset="0x000000f0" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="24" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="1" cpuset="0x000000f0" complete_cpuset="0x000000f0" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="143" local_memory="4156817408">
|
||||
<page_type size="4096" count="854592"/>
|
||||
<page_type size="2097152" count="313"/>
|
||||
<page_type size="1073741824" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="23" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="22" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="20">
|
||||
<object type="PU" os_index="4" cpuset="0x00000010" complete_cpuset="0x00000010" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="21"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="28" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="27" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="25">
|
||||
<object type="PU" os_index="5" cpuset="0x00000020" complete_cpuset="0x00000020" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="26"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="32" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="31" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="29">
|
||||
<object type="PU" os_index="6" cpuset="0x00000040" complete_cpuset="0x00000040" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="30"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="36" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="35" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="33">
|
||||
<object type="PU" os_index="7" cpuset="0x00000080" complete_cpuset="0x00000080" nodeset="0x00000002" complete_nodeset="0x00000002" gp_index="34"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="Package" os_index="1" cpuset="0x0000ff00" complete_cpuset="0x0000ff00" nodeset="0x00000004" complete_nodeset="0x0000000c" gp_index="37">
|
||||
<info name="CPUVendor" value="AuthenticAMD"/>
|
||||
<info name="CPUFamilyNumber" value="16"/>
|
||||
<info name="CPUModelNumber" value="9"/>
|
||||
<info name="CPUModel" value="AMD Opteron(tm) Processor 6128"/>
|
||||
<info name="CPUStepping" value="1"/>
|
||||
<object type="L3Cache" cpuset="0x00000f00" complete_cpuset="0x00000f00" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="42" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="2" cpuset="0x00000f00" complete_cpuset="0x00000f00" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="144" local_memory="4204060672">
|
||||
<page_type size="4096" count="866126"/>
|
||||
<page_type size="2097152" count="313"/>
|
||||
<page_type size="1073741824" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="41" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="40" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="38">
|
||||
<object type="PU" os_index="8" cpuset="0x00000100" complete_cpuset="0x00000100" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="39"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="46" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="45" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="43">
|
||||
<object type="PU" os_index="9" cpuset="0x00000200" complete_cpuset="0x00000200" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="44"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="50" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="49" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="47">
|
||||
<object type="PU" os_index="10" cpuset="0x00000400" complete_cpuset="0x00000400" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="48"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="54" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="53" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="51">
|
||||
<object type="PU" os_index="11" cpuset="0x00000800" complete_cpuset="0x00000800" nodeset="0x00000004" complete_nodeset="0x00000004" gp_index="52"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L3Cache" cpuset="0x0000f000" complete_cpuset="0x0000f000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="59" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L2Cache" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="58" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="57" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="55">
|
||||
<object type="PU" os_index="12" cpuset="0x00001000" complete_cpuset="0x00001000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="56"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="63" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="62" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="60">
|
||||
<object type="PU" os_index="13" cpuset="0x00002000" complete_cpuset="0x00002000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="61"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="67" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="66" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="64">
|
||||
<object type="PU" os_index="14" cpuset="0x00004000" complete_cpuset="0x00004000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="65"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="71" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="70" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="68">
|
||||
<object type="PU" os_index="15" cpuset="0x00008000" complete_cpuset="0x00008000" nodeset="0x0" complete_nodeset="0x00000008" gp_index="69"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="Package" os_index="2" cpuset="0x00ff0000" complete_cpuset="0x00ff0000" nodeset="0x00000020" complete_nodeset="0x00000030" gp_index="72">
|
||||
<info name="CPUVendor" value="AuthenticAMD"/>
|
||||
<info name="CPUFamilyNumber" value="16"/>
|
||||
<info name="CPUModelNumber" value="9"/>
|
||||
<info name="CPUModel" value="AMD Opteron(tm) Processor 6128"/>
|
||||
<info name="CPUStepping" value="1"/>
|
||||
<object type="L3Cache" cpuset="0x000f0000" complete_cpuset="0x000f0000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="77" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L2Cache" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="76" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="75" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="73">
|
||||
<object type="PU" os_index="16" cpuset="0x00010000" complete_cpuset="0x00010000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="74"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="81" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="80" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="78">
|
||||
<object type="PU" os_index="17" cpuset="0x00020000" complete_cpuset="0x00020000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="79"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="85" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="84" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="82">
|
||||
<object type="PU" os_index="18" cpuset="0x00040000" complete_cpuset="0x00040000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="83"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="89" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="88" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="86">
|
||||
<object type="PU" os_index="19" cpuset="0x00080000" complete_cpuset="0x00080000" nodeset="0x0" complete_nodeset="0x00000010" gp_index="87"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L3Cache" cpuset="0x00f00000" complete_cpuset="0x00f00000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="94" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="5" cpuset="0x00f00000" complete_cpuset="0x00f00000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="147" local_memory="4226170880">
|
||||
<page_type size="4096" count="872036"/>
|
||||
<page_type size="2097152" count="312"/>
|
||||
<page_type size="1073741824" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="93" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="92" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="90">
|
||||
<object type="PU" os_index="20" cpuset="0x00100000" complete_cpuset="0x00100000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="91"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="98" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="97" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="95">
|
||||
<object type="PU" os_index="21" cpuset="0x00200000" complete_cpuset="0x00200000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="96"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="102" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="101" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="99">
|
||||
<object type="PU" os_index="22" cpuset="0x00400000" complete_cpuset="0x00400000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="100"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="106" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="105" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="103">
|
||||
<object type="PU" os_index="23" cpuset="0x00800000" complete_cpuset="0x00800000" nodeset="0x00000020" complete_nodeset="0x00000020" gp_index="104"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="Package" os_index="3" cpuset="0xff000000" complete_cpuset="0xff000000" nodeset="0x00000040" complete_nodeset="0x000000c0" gp_index="107">
|
||||
<info name="CPUVendor" value="AuthenticAMD"/>
|
||||
<info name="CPUFamilyNumber" value="16"/>
|
||||
<info name="CPUModelNumber" value="9"/>
|
||||
<info name="CPUModel" value="AMD Opteron(tm) Processor 6128"/>
|
||||
<info name="CPUStepping" value="1"/>
|
||||
<object type="L3Cache" cpuset="0x0f000000" complete_cpuset="0x0f000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="112" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="NUMANode" os_index="6" cpuset="0x0f000000" complete_cpuset="0x0f000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="148" local_memory="4221870080">
|
||||
<page_type size="4096" count="870986"/>
|
||||
<page_type size="2097152" count="312"/>
|
||||
<page_type size="1073741824" count="0"/>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x01000000" complete_cpuset="0x01000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="111" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x01000000" complete_cpuset="0x01000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="110" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x01000000" complete_cpuset="0x01000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="108">
|
||||
<object type="PU" os_index="24" cpuset="0x01000000" complete_cpuset="0x01000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="109"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x02000000" complete_cpuset="0x02000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="116" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x02000000" complete_cpuset="0x02000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="115" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x02000000" complete_cpuset="0x02000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="113">
|
||||
<object type="PU" os_index="25" cpuset="0x02000000" complete_cpuset="0x02000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="114"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x04000000" complete_cpuset="0x04000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="120" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x04000000" complete_cpuset="0x04000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="119" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x04000000" complete_cpuset="0x04000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="117">
|
||||
<object type="PU" os_index="26" cpuset="0x04000000" complete_cpuset="0x04000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="118"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x08000000" complete_cpuset="0x08000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="124" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x08000000" complete_cpuset="0x08000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="123" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x08000000" complete_cpuset="0x08000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="121">
|
||||
<object type="PU" os_index="27" cpuset="0x08000000" complete_cpuset="0x08000000" nodeset="0x00000040" complete_nodeset="0x00000040" gp_index="122"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L3Cache" cpuset="0xf0000000" complete_cpuset="0xf0000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="129" cache_size="5240832" depth="3" cache_linesize="64" cache_associativity="48" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L2Cache" cpuset="0x10000000" complete_cpuset="0x10000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="128" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x10000000" complete_cpuset="0x10000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="127" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="0" cpuset="0x10000000" complete_cpuset="0x10000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="125">
|
||||
<object type="PU" os_index="28" cpuset="0x10000000" complete_cpuset="0x10000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="126"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x20000000" complete_cpuset="0x20000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="133" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x20000000" complete_cpuset="0x20000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="132" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="1" cpuset="0x20000000" complete_cpuset="0x20000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="130">
|
||||
<object type="PU" os_index="29" cpuset="0x20000000" complete_cpuset="0x20000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="131"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x40000000" complete_cpuset="0x40000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="137" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x40000000" complete_cpuset="0x40000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="136" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="2" cpuset="0x40000000" complete_cpuset="0x40000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="134">
|
||||
<object type="PU" os_index="30" cpuset="0x40000000" complete_cpuset="0x40000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="135"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object type="L2Cache" cpuset="0x80000000" complete_cpuset="0x80000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="141" cache_size="524288" depth="2" cache_linesize="64" cache_associativity="16" cache_type="0">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="L1Cache" cpuset="0x80000000" complete_cpuset="0x80000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="140" cache_size="65536" depth="1" cache_linesize="64" cache_associativity="2" cache_type="1">
|
||||
<info name="Inclusive" value="0"/>
|
||||
<object type="Core" os_index="3" cpuset="0x80000000" complete_cpuset="0x80000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="138">
|
||||
<object type="PU" os_index="31" cpuset="0x80000000" complete_cpuset="0x80000000" nodeset="0x0" complete_nodeset="0x00000080" gp_index="139"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<distances2 type="NUMANode" nbobjs="4" kind="5" indexing="os">
|
||||
<indexes length="8">1 2 5 6 </indexes>
|
||||
<u64values length="30">10 22 16 22 22 10 22 16 16 22 </u64values>
|
||||
<u64values length="18">10 22 22 16 22 10 </u64values>
|
||||
</distances2>
|
||||
</topology>
|
||||
|
||||
23
package.json
Normal file
23
package.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "xmrig",
|
||||
"version": "3.0.0",
|
||||
"description": "RandomX, CryptoNight and Argon2 miner",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"doc": "doc"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node scripts/generate_cl.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/xmrig/xmrig.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "GPLv3",
|
||||
"bugs": {
|
||||
"url": "https://github.com/xmrig/xmrig/issues"
|
||||
},
|
||||
"homepage": "https://github.com/xmrig/xmrig#readme"
|
||||
}
|
||||
4
scripts/benchmark_10M.cmd
Normal file
4
scripts/benchmark_10M.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
cd /d "%~dp0"
|
||||
xmrig.exe --bench=10M --submit
|
||||
pause
|
||||
4
scripts/benchmark_1M.cmd
Normal file
4
scripts/benchmark_1M.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
cd /d "%~dp0"
|
||||
xmrig.exe --bench=1M --submit
|
||||
pause
|
||||
23
scripts/build.hwloc.sh
Executable file
23
scripts/build.hwloc.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
HWLOC_VERSION_MAJOR="2"
|
||||
HWLOC_VERSION_MINOR="9"
|
||||
HWLOC_VERSION_PATCH="0"
|
||||
|
||||
HWLOC_VERSION="${HWLOC_VERSION_MAJOR}.${HWLOC_VERSION_MINOR}.${HWLOC_VERSION_PATCH}"
|
||||
|
||||
mkdir -p deps
|
||||
mkdir -p deps/include
|
||||
mkdir -p deps/lib
|
||||
|
||||
mkdir -p build && cd build
|
||||
|
||||
wget https://download.open-mpi.org/release/hwloc/v${HWLOC_VERSION_MAJOR}.${HWLOC_VERSION_MINOR}/hwloc-${HWLOC_VERSION}.tar.gz -O hwloc-${HWLOC_VERSION}.tar.gz
|
||||
tar -xzf hwloc-${HWLOC_VERSION}.tar.gz
|
||||
|
||||
cd hwloc-${HWLOC_VERSION}
|
||||
./configure --disable-shared --enable-static --disable-io --disable-libudev --disable-libxml2
|
||||
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||
cp -fr include ../../deps
|
||||
cp hwloc/.libs/libhwloc.a ../../deps/lib
|
||||
cd ..
|
||||
19
scripts/build.hwloc1.sh
Executable file
19
scripts/build.hwloc1.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
HWLOC_VERSION="1.11.13"
|
||||
|
||||
mkdir -p deps
|
||||
mkdir -p deps/include
|
||||
mkdir -p deps/lib
|
||||
|
||||
mkdir -p build && cd build
|
||||
|
||||
wget https://download.open-mpi.org/release/hwloc/v1.11/hwloc-${HWLOC_VERSION}.tar.gz -O hwloc-${HWLOC_VERSION}.tar.gz
|
||||
tar -xzf hwloc-${HWLOC_VERSION}.tar.gz
|
||||
|
||||
cd hwloc-${HWLOC_VERSION}
|
||||
./configure --disable-shared --enable-static --disable-io --disable-libudev --disable-libxml2
|
||||
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||
cp -fr include ../../deps
|
||||
cp src/.libs/libhwloc.a ../../deps/lib
|
||||
cd ..
|
||||
20
scripts/build.libressl.sh
Executable file
20
scripts/build.libressl.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
LIBRESSL_VERSION="3.5.2"
|
||||
|
||||
mkdir -p deps
|
||||
mkdir -p deps/include
|
||||
mkdir -p deps/lib
|
||||
|
||||
mkdir -p build && cd build
|
||||
|
||||
wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${LIBRESSL_VERSION}.tar.gz -O libressl-${LIBRESSL_VERSION}.tar.gz
|
||||
tar -xzf libressl-${LIBRESSL_VERSION}.tar.gz
|
||||
|
||||
cd libressl-${LIBRESSL_VERSION}
|
||||
./configure --disable-shared
|
||||
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||
cp -fr include ../../deps
|
||||
cp crypto/.libs/libcrypto.a ../../deps/lib
|
||||
cp ssl/.libs/libssl.a ../../deps/lib
|
||||
cd ..
|
||||
20
scripts/build.openssl.sh
Executable file
20
scripts/build.openssl.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
OPENSSL_VERSION="1.1.1s"
|
||||
|
||||
mkdir -p deps
|
||||
mkdir -p deps/include
|
||||
mkdir -p deps/lib
|
||||
|
||||
mkdir -p build && cd build
|
||||
|
||||
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -O openssl-${OPENSSL_VERSION}.tar.gz
|
||||
tar -xzf openssl-${OPENSSL_VERSION}.tar.gz
|
||||
|
||||
cd openssl-${OPENSSL_VERSION}
|
||||
./config -no-shared -no-asm -no-zlib -no-comp -no-dgram -no-filenames -no-cms
|
||||
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||
cp -fr include ../../deps
|
||||
cp libcrypto.a ../../deps/lib
|
||||
cp libssl.a ../../deps/lib
|
||||
cd ..
|
||||
20
scripts/build.openssl3.sh
Executable file
20
scripts/build.openssl3.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
OPENSSL_VERSION="3.0.7"
|
||||
|
||||
mkdir -p deps
|
||||
mkdir -p deps/include
|
||||
mkdir -p deps/lib
|
||||
|
||||
mkdir -p build && cd build
|
||||
|
||||
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -O openssl-${OPENSSL_VERSION}.tar.gz
|
||||
tar -xzf openssl-${OPENSSL_VERSION}.tar.gz
|
||||
|
||||
cd openssl-${OPENSSL_VERSION}
|
||||
./config -no-shared -no-asm -no-zlib -no-comp -no-dgram -no-filenames -no-cms
|
||||
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||
cp -fr include ../../deps
|
||||
cp libcrypto.a ../../deps/lib
|
||||
cp libssl.a ../../deps/lib
|
||||
cd ..
|
||||
20
scripts/build.uv.sh
Executable file
20
scripts/build.uv.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
UV_VERSION="1.44.2"
|
||||
|
||||
mkdir -p deps
|
||||
mkdir -p deps/include
|
||||
mkdir -p deps/lib
|
||||
|
||||
mkdir -p build && cd build
|
||||
|
||||
wget https://github.com/libuv/libuv/archive/v${UV_VERSION}.tar.gz -O v${UV_VERSION}.tar.gz
|
||||
tar -xzf v${UV_VERSION}.tar.gz
|
||||
|
||||
cd libuv-${UV_VERSION}
|
||||
sh autogen.sh
|
||||
./configure --disable-shared
|
||||
make -j$(nproc || sysctl -n hw.ncpu || sysctl -n hw.logicalcpu)
|
||||
cp -fr include ../../deps
|
||||
cp .libs/libuv.a ../../deps/lib
|
||||
cd ..
|
||||
5
scripts/build_deps.sh
Executable file
5
scripts/build_deps.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
./build.uv.sh
|
||||
./build.hwloc.sh
|
||||
./build.openssl.sh
|
||||
12
scripts/enable_1gb_pages.sh
Executable file
12
scripts/enable_1gb_pages.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# https://xmrig.com/docs/miner/hugepages#onegb-huge-pages
|
||||
|
||||
sysctl -w vm.nr_hugepages=$(nproc)
|
||||
|
||||
for i in $(find /sys/devices/system/node/node* -maxdepth 0 -type d);
|
||||
do
|
||||
echo 3 > "$i/hugepages/hugepages-1048576kB/nr_hugepages";
|
||||
done
|
||||
|
||||
echo "1GB pages successfully enabled"
|
||||
94
scripts/generate_cl.js
Normal file
94
scripts/generate_cl.js
Normal file
@@ -0,0 +1,94 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { text2h, text2h_bundle, addIncludes } = require('./js/opencl');
|
||||
const { opencl_minify } = require('./js/opencl_minify');
|
||||
const cwd = process.cwd();
|
||||
|
||||
|
||||
function cn()
|
||||
{
|
||||
const cn = opencl_minify(addIncludes('cryptonight.cl', [
|
||||
'algorithm.cl',
|
||||
'wolf-aes.cl',
|
||||
'wolf-skein.cl',
|
||||
'jh.cl',
|
||||
'blake256.cl',
|
||||
'groestl256.cl',
|
||||
'fast_int_math_v2.cl',
|
||||
'fast_div_heavy.cl',
|
||||
'keccak.cl'
|
||||
]));
|
||||
|
||||
// fs.writeFileSync('cryptonight_gen.cl', cn);
|
||||
fs.writeFileSync('cryptonight_cl.h', text2h(cn, 'xmrig', 'cryptonight_cl'));
|
||||
}
|
||||
|
||||
|
||||
function cn_r()
|
||||
{
|
||||
const items = {};
|
||||
|
||||
items.cryptonight_r_defines_cl = opencl_minify(addIncludes('cryptonight_r_defines.cl', [ 'wolf-aes.cl' ]));
|
||||
items.cryptonight_r_cl = opencl_minify(fs.readFileSync('cryptonight_r.cl', 'utf8'));
|
||||
|
||||
// for (let key in items) {
|
||||
// fs.writeFileSync(key + '_gen.cl', items[key]);
|
||||
// }
|
||||
|
||||
fs.writeFileSync('cryptonight_r_cl.h', text2h_bundle('xmrig', items));
|
||||
}
|
||||
|
||||
|
||||
function rx()
|
||||
{
|
||||
let rx = addIncludes('randomx.cl', [
|
||||
'../cn/algorithm.cl',
|
||||
'randomx_constants_monero.h',
|
||||
'randomx_constants_wow.h',
|
||||
'randomx_constants_arqma.h',
|
||||
'randomx_constants_keva.h',
|
||||
'randomx_constants_graft.h',
|
||||
'aes.cl',
|
||||
'blake2b.cl',
|
||||
'randomx_vm.cl',
|
||||
'randomx_jit.cl'
|
||||
]);
|
||||
|
||||
rx = rx.replace(/(\t| )*#include "fillAes1Rx4.cl"/g, fs.readFileSync('fillAes1Rx4.cl', 'utf8'));
|
||||
rx = rx.replace(/(\t| )*#include "blake2b_double_block.cl"/g, fs.readFileSync('blake2b_double_block.cl', 'utf8'));
|
||||
rx = opencl_minify(rx);
|
||||
|
||||
//fs.writeFileSync('randomx_gen.cl', rx);
|
||||
fs.writeFileSync('randomx_cl.h', text2h(rx, 'xmrig', 'randomx_cl'));
|
||||
}
|
||||
|
||||
|
||||
function kawpow()
|
||||
{
|
||||
const kawpow = opencl_minify(addIncludes('kawpow.cl', [ 'defs.h' ]));
|
||||
const kawpow_dag = opencl_minify(addIncludes('kawpow_dag.cl', [ 'defs.h' ]));
|
||||
|
||||
// fs.writeFileSync('kawpow_gen.cl', kawpow);
|
||||
fs.writeFileSync('kawpow_cl.h', text2h(kawpow, 'xmrig', 'kawpow_cl'));
|
||||
fs.writeFileSync('kawpow_dag_cl.h', text2h(kawpow_dag, 'xmrig', 'kawpow_dag_cl'));
|
||||
}
|
||||
|
||||
|
||||
process.chdir(path.resolve('src/backend/opencl/cl/cn'));
|
||||
|
||||
cn();
|
||||
cn_r();
|
||||
|
||||
process.chdir(cwd);
|
||||
process.chdir(path.resolve('src/backend/opencl/cl/rx'));
|
||||
|
||||
rx();
|
||||
|
||||
process.chdir(cwd);
|
||||
process.chdir(path.resolve('src/backend/opencl/cl/kawpow'));
|
||||
|
||||
kawpow();
|
||||
91
scripts/js/opencl.js
Normal file
91
scripts/js/opencl.js
Normal file
@@ -0,0 +1,91 @@
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
|
||||
function bin2h(buf, namespace, name)
|
||||
{
|
||||
const size = buf.byteLength;
|
||||
let out = `#pragma once\n\nnamespace ${namespace} {\n\nstatic const unsigned char ${name}[${size}] = {\n `;
|
||||
|
||||
let b = 32;
|
||||
for (let i = 0; i < size; i++) {
|
||||
out += `0x${buf.readUInt8(i).toString(16).padStart(2, '0')}${size - i > 1 ? ',' : ''}`;
|
||||
|
||||
if (--b === 0) {
|
||||
b = 32;
|
||||
out += '\n ';
|
||||
}
|
||||
}
|
||||
|
||||
out += `\n};\n\n} // namespace ${namespace}\n`;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
function text2h_internal(text, name)
|
||||
{
|
||||
const buf = Buffer.from(text);
|
||||
const size = buf.byteLength;
|
||||
let out = `\nstatic const char ${name}[${size + 1}] = {\n `;
|
||||
|
||||
let b = 32;
|
||||
for (let i = 0; i < size; i++) {
|
||||
out += `0x${buf.readUInt8(i).toString(16).padStart(2, '0')},`;
|
||||
|
||||
if (--b === 0) {
|
||||
b = 32;
|
||||
out += '\n ';
|
||||
}
|
||||
}
|
||||
|
||||
out += '0x00';
|
||||
|
||||
out += '\n};\n';
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
function text2h(text, namespace, name)
|
||||
{
|
||||
return `#pragma once\n\nnamespace ${namespace} {\n` + text2h_internal(text, name) + `\n} // namespace ${namespace}\n`;
|
||||
}
|
||||
|
||||
|
||||
function text2h_bundle(namespace, items)
|
||||
{
|
||||
let out = `#pragma once\n\nnamespace ${namespace} {\n`;
|
||||
|
||||
for (let key in items) {
|
||||
out += text2h_internal(items[key], key);
|
||||
}
|
||||
|
||||
return out + `\n} // namespace ${namespace}\n`;
|
||||
}
|
||||
|
||||
|
||||
function addInclude(input, name)
|
||||
{
|
||||
return input.replace(`#include "${name}"`, fs.readFileSync(name, 'utf8'));
|
||||
}
|
||||
|
||||
|
||||
function addIncludes(inputFileName, names)
|
||||
{
|
||||
let data = fs.readFileSync(inputFileName, 'utf8');
|
||||
|
||||
for (let name of names) {
|
||||
data = addInclude(data, name);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
module.exports.bin2h = bin2h;
|
||||
module.exports.text2h = text2h;
|
||||
module.exports.text2h_bundle = text2h_bundle;
|
||||
module.exports.addInclude = addInclude;
|
||||
module.exports.addIncludes = addIncludes;
|
||||
51
scripts/js/opencl_minify.js
Normal file
51
scripts/js/opencl_minify.js
Normal file
@@ -0,0 +1,51 @@
|
||||
'use strict';
|
||||
|
||||
function opencl_minify(input)
|
||||
{
|
||||
let out = input.replace(/\r/g, '');
|
||||
out = out.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/gm, ''); // comments
|
||||
out = out.replace(/^#\s+/gm, '#'); // macros with spaces
|
||||
out = out.replace(/\n{2,}/g, '\n'); // empty lines
|
||||
out = out.replace(/^\s+/gm, ''); // leading whitespace
|
||||
out = out.replace(/ {2,}/g, ' '); // extra whitespace
|
||||
|
||||
let array = out.split('\n').map(line => {
|
||||
if (line[0] === '#') {
|
||||
return line;
|
||||
}
|
||||
|
||||
line = line.replace(/, /g, ',');
|
||||
line = line.replace(/ \? /g, '?');
|
||||
line = line.replace(/ : /g, ':');
|
||||
line = line.replace(/ = /g, '=');
|
||||
line = line.replace(/ != /g, '!=');
|
||||
line = line.replace(/ >= /g, '>=');
|
||||
line = line.replace(/ <= /g, '<=');
|
||||
line = line.replace(/ == /g, '==');
|
||||
line = line.replace(/ \+= /g, '+=');
|
||||
line = line.replace(/ -= /g, '-=');
|
||||
line = line.replace(/ \|= /g, '|=');
|
||||
line = line.replace(/ \| /g, '|');
|
||||
line = line.replace(/ \|\| /g, '||');
|
||||
line = line.replace(/ & /g, '&');
|
||||
line = line.replace(/ && /g, '&&');
|
||||
line = line.replace(/ > /g, '>');
|
||||
line = line.replace(/ < /g, '<');
|
||||
line = line.replace(/ \+ /g, '+');
|
||||
line = line.replace(/ - /g, '-');
|
||||
line = line.replace(/ \* /g, '*');
|
||||
line = line.replace(/ \^ /g, '^');
|
||||
line = line.replace(/ & /g, '&');
|
||||
line = line.replace(/ \/ /g, '/');
|
||||
line = line.replace(/ << /g, '<<');
|
||||
line = line.replace(/ >> /g, '>>');
|
||||
line = line.replace(/if \(/g, 'if(');
|
||||
|
||||
return line;
|
||||
});
|
||||
|
||||
return array.join('\n');
|
||||
}
|
||||
|
||||
|
||||
module.exports.opencl_minify = opencl_minify;
|
||||
20
scripts/pool_mine_example.cmd
Normal file
20
scripts/pool_mine_example.cmd
Normal file
@@ -0,0 +1,20 @@
|
||||
:: Example batch file for mining Monero at a pool
|
||||
::
|
||||
:: Format:
|
||||
:: xmrig.exe -o <pool address>:<pool port> -u <pool username/wallet> -p <pool password>
|
||||
::
|
||||
:: Fields:
|
||||
:: pool address The host name of the pool stratum or its IP address, for example pool.hashvault.pro
|
||||
:: pool port The port of the pool's stratum to connect to, for example 3333. Check your pool's getting started page.
|
||||
:: pool username/wallet For most pools, this is the wallet address you want to mine to. Some pools require a username
|
||||
:: pool password For most pools this can be just 'x'. For pools using usernames, you may need to provide a password as configured on the pool.
|
||||
::
|
||||
:: List of Monero mining pools:
|
||||
:: https://miningpoolstats.stream/monero
|
||||
::
|
||||
:: Choose pools outside of top 5 to help Monero network be more decentralized!
|
||||
:: Smaller pools also often have smaller fees/payout limits.
|
||||
|
||||
cd /d "%~dp0"
|
||||
xmrig.exe -o xmrpool.eu:3333 -u 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD -p x
|
||||
pause
|
||||
46
scripts/randomx_boost.sh
Executable file
46
scripts/randomx_boost.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
MSR_FILE=/sys/module/msr/parameters/allow_writes
|
||||
|
||||
if test -e "$MSR_FILE"; then
|
||||
echo on > $MSR_FILE
|
||||
else
|
||||
modprobe msr allow_writes=on
|
||||
fi
|
||||
|
||||
if grep -E 'AMD Ryzen|AMD EPYC' /proc/cpuinfo > /dev/null;
|
||||
then
|
||||
if grep "cpu family[[:space:]]\{1,\}:[[:space:]]25" /proc/cpuinfo > /dev/null;
|
||||
then
|
||||
if grep "model[[:space:]]\{1,\}:[[:space:]]97" /proc/cpuinfo > /dev/null;
|
||||
then
|
||||
echo "Detected Zen4 CPU"
|
||||
wrmsr -a 0xc0011020 0x4400000000000
|
||||
wrmsr -a 0xc0011021 0x4000000000040
|
||||
wrmsr -a 0xc0011022 0x8680000401570000
|
||||
wrmsr -a 0xc001102b 0x2040cc10
|
||||
echo "MSR register values for Zen4 applied"
|
||||
else
|
||||
echo "Detected Zen3 CPU"
|
||||
wrmsr -a 0xc0011020 0x4480000000000
|
||||
wrmsr -a 0xc0011021 0x1c000200000040
|
||||
wrmsr -a 0xc0011022 0xc000000401570000
|
||||
wrmsr -a 0xc001102b 0x2000cc10
|
||||
echo "MSR register values for Zen3 applied"
|
||||
fi
|
||||
else
|
||||
echo "Detected Zen1/Zen2 CPU"
|
||||
wrmsr -a 0xc0011020 0
|
||||
wrmsr -a 0xc0011021 0x40
|
||||
wrmsr -a 0xc0011022 0x1510000
|
||||
wrmsr -a 0xc001102b 0x2000cc16
|
||||
echo "MSR register values for Zen1/Zen2 applied"
|
||||
fi
|
||||
elif grep "Intel" /proc/cpuinfo > /dev/null;
|
||||
then
|
||||
echo "Detected Intel CPU"
|
||||
wrmsr -a 0x1a4 0xf
|
||||
echo "MSR register values for Intel applied"
|
||||
else
|
||||
echo "No supported CPU detected"
|
||||
fi
|
||||
23
scripts/rtm_ghostrider_example.cmd
Normal file
23
scripts/rtm_ghostrider_example.cmd
Normal file
@@ -0,0 +1,23 @@
|
||||
:: Example batch file for mining Raptoreum at a pool
|
||||
::
|
||||
:: Format:
|
||||
:: xmrig.exe -a gr -o <pool address>:<pool port> -u <pool username/wallet> -p <pool password>
|
||||
::
|
||||
:: Fields:
|
||||
:: pool address The host name of the pool stratum or its IP address, for example raptoreumemporium.com
|
||||
:: pool port The port of the pool's stratum to connect to, for example 3333. Check your pool's getting started page.
|
||||
:: pool username/wallet For most pools, this is the wallet address you want to mine to. Some pools require a username
|
||||
:: pool password For most pools this can be just 'x'. For pools using usernames, you may need to provide a password as configured on the pool.
|
||||
::
|
||||
:: List of Raptoreum mining pools:
|
||||
:: https://miningpoolstats.stream/raptoreum
|
||||
::
|
||||
:: Choose pools outside of top 5 to help Raptoreum network be more decentralized!
|
||||
:: Smaller pools also often have smaller fees/payout limits.
|
||||
|
||||
cd /d "%~dp0"
|
||||
:: Use this command line to connect to non-SSL port
|
||||
xmrig.exe -a gr -o raptoreumemporium.com:3008 -u WALLET_ADDRESS -p x
|
||||
:: Or use this command line to connect to an SSL port
|
||||
:: xmrig.exe -a gr -o rtm.suprnova.cc:4273 --tls -u WALLET_ADDRESS -p x
|
||||
pause
|
||||
16
scripts/solo_mine_example.cmd
Normal file
16
scripts/solo_mine_example.cmd
Normal file
@@ -0,0 +1,16 @@
|
||||
:: Example batch file for mining Monero solo
|
||||
::
|
||||
:: Format:
|
||||
:: xmrig.exe -o <node address>:<node port> -a rx/0 -u <wallet address> --daemon
|
||||
::
|
||||
:: Fields:
|
||||
:: node address The host name of your monerod node or its IP address. It can also be a public node with RPC enabled, for example node.xmr.to
|
||||
:: node port The RPC port of your monerod node to connect to, usually 18081.
|
||||
:: wallet address Check your Monero CLI or GUI wallet to see your wallet's address.
|
||||
::
|
||||
:: Mining solo is the best way to help Monero network be more decentralized!
|
||||
:: But you will only get a payout when you find a block which can take more than a year for a single low-end PC.
|
||||
|
||||
cd /d "%~dp0"
|
||||
xmrig.exe -o YOUR_NODE_IP:18081 -a rx/0 -u 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD --daemon
|
||||
pause
|
||||
25
src/3rdparty/CL/LICENSE
vendored
Normal file
25
src/3rdparty/CL/LICENSE
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and/or associated documentation files (the
|
||||
"Materials"), to deal in the Materials without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
permit persons to whom the Materials are furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Materials.
|
||||
|
||||
MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
https://www.khronos.org/registry/
|
||||
|
||||
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
50
src/3rdparty/CL/README.md
vendored
Normal file
50
src/3rdparty/CL/README.md
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# OpenCL<sup>TM</sup> API Headers
|
||||
|
||||
This repository contains C language headers for the OpenCL API.
|
||||
|
||||
The authoritative public repository for these headers is located at:
|
||||
|
||||
https://github.com/KhronosGroup/OpenCL-Headers
|
||||
|
||||
Issues, proposed fixes for issues, and other suggested changes should be
|
||||
created using Github.
|
||||
|
||||
## Branch Structure
|
||||
|
||||
The OpenCL API headers in this repository are Unified headers and are designed
|
||||
to work with all released OpenCL versions. This differs from previous OpenCL
|
||||
API headers, where version-specific API headers either existed in separate
|
||||
branches, or in separate folders in a branch.
|
||||
|
||||
## Compiling for a Specific OpenCL Version
|
||||
|
||||
By default, the OpenCL API headers in this repository are for the latest
|
||||
OpenCL version (currently OpenCL 2.2). To use these API headers to target
|
||||
a different OpenCL version, an application may `#define` the preprocessor
|
||||
value `CL_TARGET_OPENCL_VERSION` before including the OpenCL API headers.
|
||||
The `CL_TARGET_OPENCL_VERSION` is a three digit decimal value representing
|
||||
the OpenCL API version.
|
||||
|
||||
For example, to enforce usage of no more than the OpenCL 1.2 APIs, you may
|
||||
include the OpenCL API headers as follows:
|
||||
|
||||
```
|
||||
#define CL_TARGET_OPENCL_VERSION 120
|
||||
#include <CL/opencl.h>
|
||||
```
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
README.md This file
|
||||
LICENSE Source license for the OpenCL API headers
|
||||
CL/ Unified OpenCL API headers tree
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
See [LICENSE](LICENSE).
|
||||
|
||||
---
|
||||
|
||||
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos.
|
||||
1804
src/3rdparty/CL/cl.h
vendored
Normal file
1804
src/3rdparty/CL/cl.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
131
src/3rdparty/CL/cl_d3d10.h
vendored
Normal file
131
src/3rdparty/CL/cl_d3d10.h
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_D3D10_H
|
||||
#define __OPENCL_CL_D3D10_H
|
||||
|
||||
#include <d3d10.h>
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* cl_khr_d3d10_sharing */
|
||||
#define cl_khr_d3d10_sharing 1
|
||||
|
||||
typedef cl_uint cl_d3d10_device_source_khr;
|
||||
typedef cl_uint cl_d3d10_device_set_khr;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
#define CL_INVALID_D3D10_DEVICE_KHR -1002
|
||||
#define CL_INVALID_D3D10_RESOURCE_KHR -1003
|
||||
#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004
|
||||
#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005
|
||||
|
||||
/* cl_d3d10_device_source_nv */
|
||||
#define CL_D3D10_DEVICE_KHR 0x4010
|
||||
#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011
|
||||
|
||||
/* cl_d3d10_device_set_nv */
|
||||
#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012
|
||||
#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014
|
||||
#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_D3D10_RESOURCE_KHR 0x4015
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017
|
||||
#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_d3d10_device_source_khr d3d_device_source,
|
||||
void * d3d_object,
|
||||
cl_d3d10_device_set_khr d3d_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * devices,
|
||||
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Buffer * resource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Texture2D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D10Texture3D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_D3D10_H */
|
||||
|
||||
131
src/3rdparty/CL/cl_d3d11.h
vendored
Normal file
131
src/3rdparty/CL/cl_d3d11.h
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_D3D11_H
|
||||
#define __OPENCL_CL_D3D11_H
|
||||
|
||||
#include <d3d11.h>
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* cl_khr_d3d11_sharing */
|
||||
#define cl_khr_d3d11_sharing 1
|
||||
|
||||
typedef cl_uint cl_d3d11_device_source_khr;
|
||||
typedef cl_uint cl_d3d11_device_set_khr;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
#define CL_INVALID_D3D11_DEVICE_KHR -1006
|
||||
#define CL_INVALID_D3D11_RESOURCE_KHR -1007
|
||||
#define CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR -1008
|
||||
#define CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR -1009
|
||||
|
||||
/* cl_d3d11_device_source */
|
||||
#define CL_D3D11_DEVICE_KHR 0x4019
|
||||
#define CL_D3D11_DXGI_ADAPTER_KHR 0x401A
|
||||
|
||||
/* cl_d3d11_device_set */
|
||||
#define CL_PREFERRED_DEVICES_FOR_D3D11_KHR 0x401B
|
||||
#define CL_ALL_DEVICES_FOR_D3D11_KHR 0x401C
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_D3D11_DEVICE_KHR 0x401D
|
||||
#define CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR 0x402D
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_D3D11_RESOURCE_KHR 0x401E
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_D3D11_SUBRESOURCE_KHR 0x401F
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR 0x4020
|
||||
#define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x4021
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_d3d11_device_source_khr d3d_device_source,
|
||||
void * d3d_object,
|
||||
cl_d3d11_device_set_khr d3d_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * devices,
|
||||
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Buffer * resource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Texture2D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
ID3D11Texture3D * resource,
|
||||
UINT subresource,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_D3D11_H */
|
||||
|
||||
132
src/3rdparty/CL/cl_dx9_media_sharing.h
vendored
Normal file
132
src/3rdparty/CL/cl_dx9_media_sharing.h
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_H
|
||||
#define __OPENCL_CL_DX9_MEDIA_SHARING_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
/* cl_khr_dx9_media_sharing */
|
||||
#define cl_khr_dx9_media_sharing 1
|
||||
|
||||
typedef cl_uint cl_dx9_media_adapter_type_khr;
|
||||
typedef cl_uint cl_dx9_media_adapter_set_khr;
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <d3d9.h>
|
||||
typedef struct _cl_dx9_surface_info_khr
|
||||
{
|
||||
IDirect3DSurface9 *resource;
|
||||
HANDLE shared_handle;
|
||||
} cl_dx9_surface_info_khr;
|
||||
#endif
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/* Error Codes */
|
||||
#define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -1010
|
||||
#define CL_INVALID_DX9_MEDIA_SURFACE_KHR -1011
|
||||
#define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -1012
|
||||
#define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -1013
|
||||
|
||||
/* cl_media_adapter_type_khr */
|
||||
#define CL_ADAPTER_D3D9_KHR 0x2020
|
||||
#define CL_ADAPTER_D3D9EX_KHR 0x2021
|
||||
#define CL_ADAPTER_DXVA_KHR 0x2022
|
||||
|
||||
/* cl_media_adapter_set_khr */
|
||||
#define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2023
|
||||
#define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2024
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_ADAPTER_D3D9_KHR 0x2025
|
||||
#define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x2026
|
||||
#define CL_CONTEXT_ADAPTER_DXVA_KHR 0x2027
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x2028
|
||||
#define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x2029
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B
|
||||
#define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_uint num_media_adapters,
|
||||
cl_dx9_media_adapter_type_khr * media_adapter_type,
|
||||
void * media_adapters,
|
||||
cl_dx9_media_adapter_set_khr media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * devices,
|
||||
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_dx9_media_adapter_type_khr adapter_type,
|
||||
void * surface_info,
|
||||
cl_uint plane,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_H */
|
||||
|
||||
182
src/3rdparty/CL/cl_dx9_media_sharing_intel.h
vendored
Normal file
182
src/3rdparty/CL/cl_dx9_media_sharing_intel.h
vendored
Normal file
@@ -0,0 +1,182 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
/*****************************************************************************\
|
||||
|
||||
Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
|
||||
|
||||
THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
|
||||
MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
File Name: cl_dx9_media_sharing_intel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Notes:
|
||||
|
||||
\*****************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H
|
||||
#define __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
#include <d3d9.h>
|
||||
#include <dxvahd.h>
|
||||
#include <wtypes.h>
|
||||
#include <d3d9types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************************
|
||||
* cl_intel_dx9_media_sharing extension *
|
||||
****************************************/
|
||||
|
||||
#define cl_intel_dx9_media_sharing 1
|
||||
|
||||
typedef cl_uint cl_dx9_device_source_intel;
|
||||
typedef cl_uint cl_dx9_device_set_intel;
|
||||
|
||||
/* error codes */
|
||||
#define CL_INVALID_DX9_DEVICE_INTEL -1010
|
||||
#define CL_INVALID_DX9_RESOURCE_INTEL -1011
|
||||
#define CL_DX9_RESOURCE_ALREADY_ACQUIRED_INTEL -1012
|
||||
#define CL_DX9_RESOURCE_NOT_ACQUIRED_INTEL -1013
|
||||
|
||||
/* cl_dx9_device_source_intel */
|
||||
#define CL_D3D9_DEVICE_INTEL 0x4022
|
||||
#define CL_D3D9EX_DEVICE_INTEL 0x4070
|
||||
#define CL_DXVA_DEVICE_INTEL 0x4071
|
||||
|
||||
/* cl_dx9_device_set_intel */
|
||||
#define CL_PREFERRED_DEVICES_FOR_DX9_INTEL 0x4024
|
||||
#define CL_ALL_DEVICES_FOR_DX9_INTEL 0x4025
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_D3D9_DEVICE_INTEL 0x4026
|
||||
#define CL_CONTEXT_D3D9EX_DEVICE_INTEL 0x4072
|
||||
#define CL_CONTEXT_DXVA_DEVICE_INTEL 0x4073
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_DX9_RESOURCE_INTEL 0x4027
|
||||
#define CL_MEM_DX9_SHARED_HANDLE_INTEL 0x4074
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_DX9_PLANE_INTEL 0x4075
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_DX9_OBJECTS_INTEL 0x402A
|
||||
#define CL_COMMAND_RELEASE_DX9_OBJECTS_INTEL 0x402B
|
||||
/******************************************************************************/
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceIDsFromDX9INTEL(
|
||||
cl_platform_id platform,
|
||||
cl_dx9_device_source_intel dx9_device_source,
|
||||
void* dx9_object,
|
||||
cl_dx9_device_set_intel dx9_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL* clGetDeviceIDsFromDX9INTEL_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_dx9_device_source_intel dx9_device_source,
|
||||
void* dx9_object,
|
||||
cl_dx9_device_set_intel dx9_device_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromDX9MediaSurfaceINTEL(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
IDirect3DSurface9* resource,
|
||||
HANDLE sharedHandle,
|
||||
UINT plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceINTEL_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
IDirect3DSurface9* resource,
|
||||
HANDLE sharedHandle,
|
||||
UINT plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireDX9ObjectsINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9ObjectsINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseDX9ObjectsINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9ObjectsINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_INTEL_H */
|
||||
|
||||
132
src/3rdparty/CL/cl_egl.h
vendored
Normal file
132
src/3rdparty/CL/cl_egl.h
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_EGL_H
|
||||
#define __OPENCL_CL_EGL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Command type for events created with clEnqueueAcquireEGLObjectsKHR */
|
||||
#define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F
|
||||
#define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D
|
||||
#define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR 0x202E
|
||||
|
||||
/* Error type for clCreateFromEGLImageKHR */
|
||||
#define CL_INVALID_EGL_OBJECT_KHR -1093
|
||||
#define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092
|
||||
|
||||
/* CLeglImageKHR is an opaque handle to an EGLImage */
|
||||
typedef void* CLeglImageKHR;
|
||||
|
||||
/* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
|
||||
typedef void* CLeglDisplayKHR;
|
||||
|
||||
/* CLeglSyncKHR is an opaque handle to an EGLSync object */
|
||||
typedef void* CLeglSyncKHR;
|
||||
|
||||
/* properties passed to clCreateFromEGLImageKHR */
|
||||
typedef intptr_t cl_egl_image_properties_khr;
|
||||
|
||||
|
||||
#define cl_khr_egl_image 1
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromEGLImageKHR(cl_context context,
|
||||
CLeglDisplayKHR egldisplay,
|
||||
CLeglImageKHR eglimage,
|
||||
cl_mem_flags flags,
|
||||
const cl_egl_image_properties_khr * properties,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
|
||||
cl_context context,
|
||||
CLeglDisplayKHR egldisplay,
|
||||
CLeglImageKHR eglimage,
|
||||
cl_mem_flags flags,
|
||||
const cl_egl_image_properties_khr * properties,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireEGLObjectsKHR(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseEGLObjectsKHR(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
|
||||
#define cl_khr_egl_event 1
|
||||
|
||||
extern CL_API_ENTRY cl_event CL_API_CALL
|
||||
clCreateEventFromEGLSyncKHR(cl_context context,
|
||||
CLeglSyncKHR sync,
|
||||
CLeglDisplayKHR display,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
|
||||
cl_context context,
|
||||
CLeglSyncKHR sync,
|
||||
CLeglDisplayKHR display,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_EGL_H */
|
||||
762
src/3rdparty/CL/cl_ext.h
vendored
Normal file
762
src/3rdparty/CL/cl_ext.h
vendored
Normal file
@@ -0,0 +1,762 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
/* cl_ext.h contains OpenCL extensions which don't have external */
|
||||
/* (OpenGL, D3D) dependencies. */
|
||||
|
||||
#ifndef __CL_EXT_H
|
||||
#define __CL_EXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
/* cl_khr_fp64 extension - no extension #define since it has no functions */
|
||||
/* CL_DEVICE_DOUBLE_FP_CONFIG is defined in CL.h for OpenCL >= 120 */
|
||||
|
||||
#if CL_TARGET_OPENCL_VERSION <= 110
|
||||
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
|
||||
#endif
|
||||
|
||||
/* cl_khr_fp16 extension - no extension #define since it has no functions */
|
||||
#define CL_DEVICE_HALF_FP_CONFIG 0x1033
|
||||
|
||||
/* Memory object destruction
|
||||
*
|
||||
* Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR
|
||||
*
|
||||
* Registers a user callback function that will be called when the memory object is deleted and its resources
|
||||
* freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback
|
||||
* stack associated with memobj. The registered user callback functions are called in the reverse order in
|
||||
* which they were registered. The user callback functions are called and then the memory object is deleted
|
||||
* and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be
|
||||
* notified when the memory referenced by host_ptr, specified when the memory object is created and used as
|
||||
* the storage bits for the memory object, can be reused or freed.
|
||||
*
|
||||
* The application may not call CL api's with the cl_mem object passed to the pfn_notify.
|
||||
*
|
||||
* Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
|
||||
* before using.
|
||||
*/
|
||||
#define cl_APPLE_SetMemObjectDestructor 1
|
||||
cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem memobj,
|
||||
void (* pfn_notify)(cl_mem memobj, void * user_data),
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/* Context Logging Functions
|
||||
*
|
||||
* The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext().
|
||||
* Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
|
||||
* before using.
|
||||
*
|
||||
* clLogMessagesToSystemLog forwards on all log messages to the Apple System Logger
|
||||
*/
|
||||
#define cl_APPLE_ContextLoggingFunctions 1
|
||||
extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * errstr,
|
||||
const void * private_info,
|
||||
size_t cb,
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */
|
||||
extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * errstr,
|
||||
const void * private_info,
|
||||
size_t cb,
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */
|
||||
extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * errstr,
|
||||
const void * private_info,
|
||||
size_t cb,
|
||||
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/************************
|
||||
* cl_khr_icd extension *
|
||||
************************/
|
||||
#define cl_khr_icd 1
|
||||
|
||||
/* cl_platform_info */
|
||||
#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920
|
||||
|
||||
/* Additional Error Codes */
|
||||
#define CL_PLATFORM_NOT_FOUND_KHR -1001
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clIcdGetPlatformIDsKHR(cl_uint num_entries,
|
||||
cl_platform_id * platforms,
|
||||
cl_uint * num_platforms);
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clIcdGetPlatformIDsKHR_fn)(cl_uint num_entries,
|
||||
cl_platform_id * platforms,
|
||||
cl_uint * num_platforms);
|
||||
|
||||
|
||||
/*******************************
|
||||
* cl_khr_il_program extension *
|
||||
*******************************/
|
||||
#define cl_khr_il_program 1
|
||||
|
||||
/* New property to clGetDeviceInfo for retrieving supported intermediate
|
||||
* languages
|
||||
*/
|
||||
#define CL_DEVICE_IL_VERSION_KHR 0x105B
|
||||
|
||||
/* New property to clGetProgramInfo for retrieving for retrieving the IL of a
|
||||
* program
|
||||
*/
|
||||
#define CL_PROGRAM_IL_KHR 0x1169
|
||||
|
||||
extern CL_API_ENTRY cl_program CL_API_CALL
|
||||
clCreateProgramWithILKHR(cl_context context,
|
||||
const void * il,
|
||||
size_t length,
|
||||
cl_int * errcode_ret);
|
||||
|
||||
typedef CL_API_ENTRY cl_program
|
||||
(CL_API_CALL *clCreateProgramWithILKHR_fn)(cl_context context,
|
||||
const void * il,
|
||||
size_t length,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
/* Extension: cl_khr_image2d_from_buffer
|
||||
*
|
||||
* This extension allows a 2D image to be created from a cl_mem buffer without
|
||||
* a copy. The type associated with a 2D image created from a buffer in an
|
||||
* OpenCL program is image2d_t. Both the sampler and sampler-less read_image
|
||||
* built-in functions are supported for 2D images and 2D images created from
|
||||
* a buffer. Similarly, the write_image built-ins are also supported for 2D
|
||||
* images created from a buffer.
|
||||
*
|
||||
* When the 2D image from buffer is created, the client must specify the
|
||||
* width, height, image format (i.e. channel order and channel data type)
|
||||
* and optionally the row pitch.
|
||||
*
|
||||
* The pitch specified must be a multiple of
|
||||
* CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR pixels.
|
||||
* The base address of the buffer must be aligned to
|
||||
* CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR pixels.
|
||||
*/
|
||||
|
||||
#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT_KHR 0x104A
|
||||
#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT_KHR 0x104B
|
||||
|
||||
|
||||
/**************************************
|
||||
* cl_khr_initialize_memory extension *
|
||||
**************************************/
|
||||
|
||||
#define CL_CONTEXT_MEMORY_INITIALIZE_KHR 0x2030
|
||||
|
||||
|
||||
/**************************************
|
||||
* cl_khr_terminate_context extension *
|
||||
**************************************/
|
||||
|
||||
#define CL_DEVICE_TERMINATE_CAPABILITY_KHR 0x2031
|
||||
#define CL_CONTEXT_TERMINATE_KHR 0x2032
|
||||
|
||||
#define cl_khr_terminate_context 1
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clTerminateContextKHR(cl_context context) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clTerminateContextKHR_fn)(cl_context context) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
/*
|
||||
* Extension: cl_khr_spir
|
||||
*
|
||||
* This extension adds support to create an OpenCL program object from a
|
||||
* Standard Portable Intermediate Representation (SPIR) instance
|
||||
*/
|
||||
|
||||
#define CL_DEVICE_SPIR_VERSIONS 0x40E0
|
||||
#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
|
||||
|
||||
|
||||
/*****************************************
|
||||
* cl_khr_create_command_queue extension *
|
||||
*****************************************/
|
||||
#define cl_khr_create_command_queue 1
|
||||
|
||||
typedef cl_bitfield cl_queue_properties_khr;
|
||||
|
||||
extern CL_API_ENTRY cl_command_queue CL_API_CALL
|
||||
clCreateCommandQueueWithPropertiesKHR(cl_context context,
|
||||
cl_device_id device,
|
||||
const cl_queue_properties_khr* properties,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_command_queue
|
||||
(CL_API_CALL *clCreateCommandQueueWithPropertiesKHR_fn)(cl_context context,
|
||||
cl_device_id device,
|
||||
const cl_queue_properties_khr* properties,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_nv_device_attribute_query extension *
|
||||
******************************************/
|
||||
|
||||
/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */
|
||||
#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000
|
||||
#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001
|
||||
#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002
|
||||
#define CL_DEVICE_WARP_SIZE_NV 0x4003
|
||||
#define CL_DEVICE_GPU_OVERLAP_NV 0x4004
|
||||
#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005
|
||||
#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_amd_device_attribute_query *
|
||||
*********************************/
|
||||
|
||||
#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_arm_printf extension
|
||||
*********************************/
|
||||
|
||||
#define CL_PRINTF_CALLBACK_ARM 0x40B0
|
||||
#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1
|
||||
|
||||
|
||||
/***********************************
|
||||
* cl_ext_device_fission extension
|
||||
***********************************/
|
||||
#define cl_ext_device_fission 1
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseDeviceEXT(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clReleaseDeviceEXT_fn)(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainDeviceEXT(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clRetainDeviceEXT_fn)(cl_device_id device) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef cl_ulong cl_device_partition_property_ext;
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clCreateSubDevicesEXT(cl_device_id in_device,
|
||||
const cl_device_partition_property_ext * properties,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * out_devices,
|
||||
cl_uint * num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL * clCreateSubDevicesEXT_fn)(cl_device_id in_device,
|
||||
const cl_device_partition_property_ext * properties,
|
||||
cl_uint num_entries,
|
||||
cl_device_id * out_devices,
|
||||
cl_uint * num_devices) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
/* cl_device_partition_property_ext */
|
||||
#define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050
|
||||
#define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051
|
||||
#define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052
|
||||
#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053
|
||||
|
||||
/* clDeviceGetInfo selectors */
|
||||
#define CL_DEVICE_PARENT_DEVICE_EXT 0x4054
|
||||
#define CL_DEVICE_PARTITION_TYPES_EXT 0x4055
|
||||
#define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056
|
||||
#define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057
|
||||
#define CL_DEVICE_PARTITION_STYLE_EXT 0x4058
|
||||
|
||||
/* error codes */
|
||||
#define CL_DEVICE_PARTITION_FAILED_EXT -1057
|
||||
#define CL_INVALID_PARTITION_COUNT_EXT -1058
|
||||
#define CL_INVALID_PARTITION_NAME_EXT -1059
|
||||
|
||||
/* CL_AFFINITY_DOMAINs */
|
||||
#define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1
|
||||
#define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2
|
||||
#define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3
|
||||
#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
|
||||
#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
|
||||
#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
|
||||
|
||||
/* cl_device_partition_property_ext list terminators */
|
||||
#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||
#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
|
||||
#define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1)
|
||||
|
||||
|
||||
/***********************************
|
||||
* cl_ext_migrate_memobject extension definitions
|
||||
***********************************/
|
||||
#define cl_ext_migrate_memobject 1
|
||||
|
||||
typedef cl_bitfield cl_mem_migration_flags_ext;
|
||||
|
||||
#define CL_MIGRATE_MEM_OBJECT_HOST_EXT 0x1
|
||||
|
||||
#define CL_COMMAND_MIGRATE_MEM_OBJECT_EXT 0x4040
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueMigrateMemObjectEXT(cl_command_queue command_queue,
|
||||
cl_uint num_mem_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_mem_migration_flags_ext flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL *clEnqueueMigrateMemObjectEXT_fn)(cl_command_queue command_queue,
|
||||
cl_uint num_mem_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_mem_migration_flags_ext flags,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event);
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_qcom_ext_host_ptr extension
|
||||
*********************************/
|
||||
#define cl_qcom_ext_host_ptr 1
|
||||
|
||||
#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29)
|
||||
|
||||
#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0
|
||||
#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1
|
||||
#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2
|
||||
#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3
|
||||
#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4
|
||||
#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5
|
||||
#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6
|
||||
#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7
|
||||
|
||||
typedef cl_uint cl_image_pitch_info_qcom;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceImageInfoQCOM(cl_device_id device,
|
||||
size_t image_width,
|
||||
size_t image_height,
|
||||
const cl_image_format *image_format,
|
||||
cl_image_pitch_info_qcom param_name,
|
||||
size_t param_value_size,
|
||||
void *param_value,
|
||||
size_t *param_value_size_ret);
|
||||
|
||||
typedef struct _cl_mem_ext_host_ptr
|
||||
{
|
||||
/* Type of external memory allocation. */
|
||||
/* Legal values will be defined in layered extensions. */
|
||||
cl_uint allocation_type;
|
||||
|
||||
/* Host cache policy for this external memory allocation. */
|
||||
cl_uint host_cache_policy;
|
||||
|
||||
} cl_mem_ext_host_ptr;
|
||||
|
||||
|
||||
/*******************************************
|
||||
* cl_qcom_ext_host_ptr_iocoherent extension
|
||||
********************************************/
|
||||
|
||||
/* Cache policy specifying io-coherence */
|
||||
#define CL_MEM_HOST_IOCOHERENT_QCOM 0x40A9
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_qcom_ion_host_ptr extension
|
||||
*********************************/
|
||||
|
||||
#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8
|
||||
|
||||
typedef struct _cl_mem_ion_host_ptr
|
||||
{
|
||||
/* Type of external memory allocation. */
|
||||
/* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */
|
||||
cl_mem_ext_host_ptr ext_host_ptr;
|
||||
|
||||
/* ION file descriptor */
|
||||
int ion_filedesc;
|
||||
|
||||
/* Host pointer to the ION allocated memory */
|
||||
void* ion_hostptr;
|
||||
|
||||
} cl_mem_ion_host_ptr;
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_qcom_android_native_buffer_host_ptr extension
|
||||
*********************************/
|
||||
|
||||
#define CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM 0x40C6
|
||||
|
||||
typedef struct _cl_mem_android_native_buffer_host_ptr
|
||||
{
|
||||
/* Type of external memory allocation. */
|
||||
/* Must be CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM for Android native buffers. */
|
||||
cl_mem_ext_host_ptr ext_host_ptr;
|
||||
|
||||
/* Virtual pointer to the android native buffer */
|
||||
void* anb_ptr;
|
||||
|
||||
} cl_mem_android_native_buffer_host_ptr;
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_img_yuv_image extension *
|
||||
******************************************/
|
||||
|
||||
/* Image formats used in clCreateImage */
|
||||
#define CL_NV21_IMG 0x40D0
|
||||
#define CL_YV12_IMG 0x40D1
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_img_cached_allocations extension *
|
||||
******************************************/
|
||||
|
||||
/* Flag values used by clCreateBuffer */
|
||||
#define CL_MEM_USE_UNCACHED_CPU_MEMORY_IMG (1 << 26)
|
||||
#define CL_MEM_USE_CACHED_CPU_MEMORY_IMG (1 << 27)
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_img_use_gralloc_ptr extension *
|
||||
******************************************/
|
||||
#define cl_img_use_gralloc_ptr 1
|
||||
|
||||
/* Flag values used by clCreateBuffer */
|
||||
#define CL_MEM_USE_GRALLOC_PTR_IMG (1 << 28)
|
||||
|
||||
/* To be used by clGetEventInfo: */
|
||||
#define CL_COMMAND_ACQUIRE_GRALLOC_OBJECTS_IMG 0x40D2
|
||||
#define CL_COMMAND_RELEASE_GRALLOC_OBJECTS_IMG 0x40D3
|
||||
|
||||
/* Error code from clEnqueueReleaseGrallocObjectsIMG */
|
||||
#define CL_GRALLOC_RESOURCE_NOT_ACQUIRED_IMG 0x40D4
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireGrallocObjectsIMG(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseGrallocObjectsIMG(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_subgroups extension
|
||||
*********************************/
|
||||
#define cl_khr_subgroups 1
|
||||
|
||||
#if !defined(CL_VERSION_2_1)
|
||||
/* For OpenCL 2.1 and newer, cl_kernel_sub_group_info is declared in CL.h.
|
||||
In hindsight, there should have been a khr suffix on this type for
|
||||
the extension, but keeping it un-suffixed to maintain backwards
|
||||
compatibility. */
|
||||
typedef cl_uint cl_kernel_sub_group_info;
|
||||
#endif
|
||||
|
||||
/* cl_kernel_sub_group_info */
|
||||
#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR 0x2033
|
||||
#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR 0x2034
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetKernelSubGroupInfoKHR(cl_kernel in_kernel,
|
||||
cl_device_id in_device,
|
||||
cl_kernel_sub_group_info param_name,
|
||||
size_t input_value_size,
|
||||
const void * input_value,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||
|
||||
typedef CL_API_ENTRY cl_int
|
||||
(CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(cl_kernel in_kernel,
|
||||
cl_device_id in_device,
|
||||
cl_kernel_sub_group_info param_name,
|
||||
size_t input_value_size,
|
||||
const void * input_value,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_mipmap_image extension
|
||||
*********************************/
|
||||
|
||||
/* cl_sampler_properties */
|
||||
#define CL_SAMPLER_MIP_FILTER_MODE_KHR 0x1155
|
||||
#define CL_SAMPLER_LOD_MIN_KHR 0x1156
|
||||
#define CL_SAMPLER_LOD_MAX_KHR 0x1157
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_priority_hints extension
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_priority_hints 1
|
||||
|
||||
typedef cl_uint cl_queue_priority_khr;
|
||||
|
||||
/* cl_command_queue_properties */
|
||||
#define CL_QUEUE_PRIORITY_KHR 0x1096
|
||||
|
||||
/* cl_queue_priority_khr */
|
||||
#define CL_QUEUE_PRIORITY_HIGH_KHR (1<<0)
|
||||
#define CL_QUEUE_PRIORITY_MED_KHR (1<<1)
|
||||
#define CL_QUEUE_PRIORITY_LOW_KHR (1<<2)
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_throttle_hints extension
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_throttle_hints 1
|
||||
|
||||
typedef cl_uint cl_queue_throttle_khr;
|
||||
|
||||
/* cl_command_queue_properties */
|
||||
#define CL_QUEUE_THROTTLE_KHR 0x1097
|
||||
|
||||
/* cl_queue_throttle_khr */
|
||||
#define CL_QUEUE_THROTTLE_HIGH_KHR (1<<0)
|
||||
#define CL_QUEUE_THROTTLE_MED_KHR (1<<1)
|
||||
#define CL_QUEUE_THROTTLE_LOW_KHR (1<<2)
|
||||
|
||||
|
||||
/*********************************
|
||||
* cl_khr_subgroup_named_barrier
|
||||
*********************************/
|
||||
/* This extension define is for backwards compatibility.
|
||||
It shouldn't be required since this extension has no new functions. */
|
||||
#define cl_khr_subgroup_named_barrier 1
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_MAX_NAMED_BARRIER_COUNT_KHR 0x2035
|
||||
|
||||
|
||||
/**********************************
|
||||
* cl_arm_import_memory extension *
|
||||
**********************************/
|
||||
#define cl_arm_import_memory 1
|
||||
|
||||
typedef intptr_t cl_import_properties_arm;
|
||||
|
||||
/* Default and valid proporties name for cl_arm_import_memory */
|
||||
#define CL_IMPORT_TYPE_ARM 0x40B2
|
||||
|
||||
/* Host process memory type default value for CL_IMPORT_TYPE_ARM property */
|
||||
#define CL_IMPORT_TYPE_HOST_ARM 0x40B3
|
||||
|
||||
/* DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||
#define CL_IMPORT_TYPE_DMA_BUF_ARM 0x40B4
|
||||
|
||||
/* Protected DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */
|
||||
#define CL_IMPORT_TYPE_PROTECTED_ARM 0x40B5
|
||||
|
||||
/* This extension adds a new function that allows for direct memory import into
|
||||
* OpenCL via the clImportMemoryARM function.
|
||||
*
|
||||
* Memory imported through this interface will be mapped into the device's page
|
||||
* tables directly, providing zero copy access. It will never fall back to copy
|
||||
* operations and aliased buffers.
|
||||
*
|
||||
* Types of memory supported for import are specified as additional extension
|
||||
* strings.
|
||||
*
|
||||
* This extension produces cl_mem allocations which are compatible with all other
|
||||
* users of cl_mem in the standard API.
|
||||
*
|
||||
* This extension maps pages with the same properties as the normal buffer creation
|
||||
* function clCreateBuffer.
|
||||
*/
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clImportMemoryARM( cl_context context,
|
||||
cl_mem_flags flags,
|
||||
const cl_import_properties_arm *properties,
|
||||
void *memory,
|
||||
size_t size,
|
||||
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/******************************************
|
||||
* cl_arm_shared_virtual_memory extension *
|
||||
******************************************/
|
||||
#define cl_arm_shared_virtual_memory 1
|
||||
|
||||
/* Used by clGetDeviceInfo */
|
||||
#define CL_DEVICE_SVM_CAPABILITIES_ARM 0x40B6
|
||||
|
||||
/* Used by clGetMemObjectInfo */
|
||||
#define CL_MEM_USES_SVM_POINTER_ARM 0x40B7
|
||||
|
||||
/* Used by clSetKernelExecInfoARM: */
|
||||
#define CL_KERNEL_EXEC_INFO_SVM_PTRS_ARM 0x40B8
|
||||
#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM_ARM 0x40B9
|
||||
|
||||
/* To be used by clGetEventInfo: */
|
||||
#define CL_COMMAND_SVM_FREE_ARM 0x40BA
|
||||
#define CL_COMMAND_SVM_MEMCPY_ARM 0x40BB
|
||||
#define CL_COMMAND_SVM_MEMFILL_ARM 0x40BC
|
||||
#define CL_COMMAND_SVM_MAP_ARM 0x40BD
|
||||
#define CL_COMMAND_SVM_UNMAP_ARM 0x40BE
|
||||
|
||||
/* Flag values returned by clGetDeviceInfo with CL_DEVICE_SVM_CAPABILITIES_ARM as the param_name. */
|
||||
#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER_ARM (1 << 0)
|
||||
#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER_ARM (1 << 1)
|
||||
#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM_ARM (1 << 2)
|
||||
#define CL_DEVICE_SVM_ATOMICS_ARM (1 << 3)
|
||||
|
||||
/* Flag values used by clSVMAllocARM: */
|
||||
#define CL_MEM_SVM_FINE_GRAIN_BUFFER_ARM (1 << 10)
|
||||
#define CL_MEM_SVM_ATOMICS_ARM (1 << 11)
|
||||
|
||||
typedef cl_bitfield cl_svm_mem_flags_arm;
|
||||
typedef cl_uint cl_kernel_exec_info_arm;
|
||||
typedef cl_bitfield cl_device_svm_capabilities_arm;
|
||||
|
||||
extern CL_API_ENTRY void * CL_API_CALL
|
||||
clSVMAllocARM(cl_context context,
|
||||
cl_svm_mem_flags_arm flags,
|
||||
size_t size,
|
||||
cl_uint alignment) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY void CL_API_CALL
|
||||
clSVMFreeARM(cl_context context,
|
||||
void * svm_pointer) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMFreeARM(cl_command_queue command_queue,
|
||||
cl_uint num_svm_pointers,
|
||||
void * svm_pointers[],
|
||||
void (CL_CALLBACK * pfn_free_func)(cl_command_queue queue,
|
||||
cl_uint num_svm_pointers,
|
||||
void * svm_pointers[],
|
||||
void * user_data),
|
||||
void * user_data,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMMemcpyARM(cl_command_queue command_queue,
|
||||
cl_bool blocking_copy,
|
||||
void * dst_ptr,
|
||||
const void * src_ptr,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMMemFillARM(cl_command_queue command_queue,
|
||||
void * svm_ptr,
|
||||
const void * pattern,
|
||||
size_t pattern_size,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMMapARM(cl_command_queue command_queue,
|
||||
cl_bool blocking_map,
|
||||
cl_map_flags flags,
|
||||
void * svm_ptr,
|
||||
size_t size,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueSVMUnmapARM(cl_command_queue command_queue,
|
||||
void * svm_ptr,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetKernelArgSVMPointerARM(cl_kernel kernel,
|
||||
cl_uint arg_index,
|
||||
const void * arg_value) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetKernelExecInfoARM(cl_kernel kernel,
|
||||
cl_kernel_exec_info_arm param_name,
|
||||
size_t param_value_size,
|
||||
const void * param_value) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
/********************************
|
||||
* cl_arm_get_core_id extension *
|
||||
********************************/
|
||||
|
||||
#ifdef CL_VERSION_1_2
|
||||
|
||||
#define cl_arm_get_core_id 1
|
||||
|
||||
/* Device info property for bitfield of cores present */
|
||||
#define CL_DEVICE_COMPUTE_UNITS_BITFIELD_ARM 0x40BF
|
||||
|
||||
#endif /* CL_VERSION_1_2 */
|
||||
|
||||
/*********************************
|
||||
* cl_arm_job_slot_selection
|
||||
*********************************/
|
||||
|
||||
#define cl_arm_job_slot_selection 1
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_JOB_SLOTS_ARM 0x41E0
|
||||
|
||||
/* cl_command_queue_properties */
|
||||
#define CL_QUEUE_JOB_SLOT_ARM 0x41E1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __CL_EXT_H */
|
||||
423
src/3rdparty/CL/cl_ext_intel.h
vendored
Normal file
423
src/3rdparty/CL/cl_ext_intel.h
vendored
Normal file
@@ -0,0 +1,423 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
/*****************************************************************************\
|
||||
|
||||
Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
|
||||
|
||||
THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
|
||||
MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
File Name: cl_ext_intel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Notes:
|
||||
|
||||
\*****************************************************************************/
|
||||
|
||||
#ifndef __CL_EXT_INTEL_H
|
||||
#define __CL_EXT_INTEL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***************************************
|
||||
* cl_intel_thread_local_exec extension *
|
||||
****************************************/
|
||||
|
||||
#define cl_intel_thread_local_exec 1
|
||||
|
||||
#define CL_QUEUE_THREAD_LOCAL_EXEC_ENABLE_INTEL (((cl_bitfield)1) << 31)
|
||||
|
||||
/***********************************************
|
||||
* cl_intel_device_partition_by_names extension *
|
||||
************************************************/
|
||||
|
||||
#define cl_intel_device_partition_by_names 1
|
||||
|
||||
#define CL_DEVICE_PARTITION_BY_NAMES_INTEL 0x4052
|
||||
#define CL_PARTITION_BY_NAMES_LIST_END_INTEL -1
|
||||
|
||||
/************************************************
|
||||
* cl_intel_accelerator extension *
|
||||
* cl_intel_motion_estimation extension *
|
||||
* cl_intel_advanced_motion_estimation extension *
|
||||
*************************************************/
|
||||
|
||||
#define cl_intel_accelerator 1
|
||||
#define cl_intel_motion_estimation 1
|
||||
#define cl_intel_advanced_motion_estimation 1
|
||||
|
||||
typedef struct _cl_accelerator_intel* cl_accelerator_intel;
|
||||
typedef cl_uint cl_accelerator_type_intel;
|
||||
typedef cl_uint cl_accelerator_info_intel;
|
||||
|
||||
typedef struct _cl_motion_estimation_desc_intel {
|
||||
cl_uint mb_block_type;
|
||||
cl_uint subpixel_mode;
|
||||
cl_uint sad_adjust_mode;
|
||||
cl_uint search_path_type;
|
||||
} cl_motion_estimation_desc_intel;
|
||||
|
||||
/* error codes */
|
||||
#define CL_INVALID_ACCELERATOR_INTEL -1094
|
||||
#define CL_INVALID_ACCELERATOR_TYPE_INTEL -1095
|
||||
#define CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL -1096
|
||||
#define CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL -1097
|
||||
|
||||
/* cl_accelerator_type_intel */
|
||||
#define CL_ACCELERATOR_TYPE_MOTION_ESTIMATION_INTEL 0x0
|
||||
|
||||
/* cl_accelerator_info_intel */
|
||||
#define CL_ACCELERATOR_DESCRIPTOR_INTEL 0x4090
|
||||
#define CL_ACCELERATOR_REFERENCE_COUNT_INTEL 0x4091
|
||||
#define CL_ACCELERATOR_CONTEXT_INTEL 0x4092
|
||||
#define CL_ACCELERATOR_TYPE_INTEL 0x4093
|
||||
|
||||
/* cl_motion_detect_desc_intel flags */
|
||||
#define CL_ME_MB_TYPE_16x16_INTEL 0x0
|
||||
#define CL_ME_MB_TYPE_8x8_INTEL 0x1
|
||||
#define CL_ME_MB_TYPE_4x4_INTEL 0x2
|
||||
|
||||
#define CL_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
|
||||
#define CL_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
|
||||
#define CL_ME_SUBPIXEL_MODE_QPEL_INTEL 0x2
|
||||
|
||||
#define CL_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
|
||||
#define CL_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x1
|
||||
|
||||
#define CL_ME_SEARCH_PATH_RADIUS_2_2_INTEL 0x0
|
||||
#define CL_ME_SEARCH_PATH_RADIUS_4_4_INTEL 0x1
|
||||
#define CL_ME_SEARCH_PATH_RADIUS_16_12_INTEL 0x5
|
||||
|
||||
#define CL_ME_SKIP_BLOCK_TYPE_16x16_INTEL 0x0
|
||||
#define CL_ME_CHROMA_INTRA_PREDICT_ENABLED_INTEL 0x1
|
||||
#define CL_ME_LUMA_INTRA_PREDICT_ENABLED_INTEL 0x2
|
||||
#define CL_ME_SKIP_BLOCK_TYPE_8x8_INTEL 0x4
|
||||
|
||||
#define CL_ME_FORWARD_INPUT_MODE_INTEL 0x1
|
||||
#define CL_ME_BACKWARD_INPUT_MODE_INTEL 0x2
|
||||
#define CL_ME_BIDIRECTION_INPUT_MODE_INTEL 0x3
|
||||
|
||||
#define CL_ME_BIDIR_WEIGHT_QUARTER_INTEL 16
|
||||
#define CL_ME_BIDIR_WEIGHT_THIRD_INTEL 21
|
||||
#define CL_ME_BIDIR_WEIGHT_HALF_INTEL 32
|
||||
#define CL_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 43
|
||||
#define CL_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 48
|
||||
|
||||
#define CL_ME_COST_PENALTY_NONE_INTEL 0x0
|
||||
#define CL_ME_COST_PENALTY_LOW_INTEL 0x1
|
||||
#define CL_ME_COST_PENALTY_NORMAL_INTEL 0x2
|
||||
#define CL_ME_COST_PENALTY_HIGH_INTEL 0x3
|
||||
|
||||
#define CL_ME_COST_PRECISION_QPEL_INTEL 0x0
|
||||
#define CL_ME_COST_PRECISION_HPEL_INTEL 0x1
|
||||
#define CL_ME_COST_PRECISION_PEL_INTEL 0x2
|
||||
#define CL_ME_COST_PRECISION_DPEL_INTEL 0x3
|
||||
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
|
||||
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
|
||||
#define CL_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
|
||||
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
|
||||
#define CL_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_ME_VERSION_INTEL 0x407E
|
||||
|
||||
#define CL_ME_VERSION_LEGACY_INTEL 0x0
|
||||
#define CL_ME_VERSION_ADVANCED_VER_1_INTEL 0x1
|
||||
#define CL_ME_VERSION_ADVANCED_VER_2_INTEL 0x2
|
||||
|
||||
extern CL_API_ENTRY cl_accelerator_intel CL_API_CALL
|
||||
clCreateAcceleratorINTEL(
|
||||
cl_context context,
|
||||
cl_accelerator_type_intel accelerator_type,
|
||||
size_t descriptor_size,
|
||||
const void* descriptor,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_accelerator_intel (CL_API_CALL *clCreateAcceleratorINTEL_fn)(
|
||||
cl_context context,
|
||||
cl_accelerator_type_intel accelerator_type,
|
||||
size_t descriptor_size,
|
||||
const void* descriptor,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetAcceleratorInfoINTEL(
|
||||
cl_accelerator_intel accelerator,
|
||||
cl_accelerator_info_intel param_name,
|
||||
size_t param_value_size,
|
||||
void* param_value,
|
||||
size_t* param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetAcceleratorInfoINTEL_fn)(
|
||||
cl_accelerator_intel accelerator,
|
||||
cl_accelerator_info_intel param_name,
|
||||
size_t param_value_size,
|
||||
void* param_value,
|
||||
size_t* param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainAcceleratorINTEL(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainAcceleratorINTEL_fn)(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseAcceleratorINTEL(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseAcceleratorINTEL_fn)(
|
||||
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
/******************************************
|
||||
* cl_intel_simultaneous_sharing extension *
|
||||
*******************************************/
|
||||
|
||||
#define cl_intel_simultaneous_sharing 1
|
||||
|
||||
#define CL_DEVICE_SIMULTANEOUS_INTEROPS_INTEL 0x4104
|
||||
#define CL_DEVICE_NUM_SIMULTANEOUS_INTEROPS_INTEL 0x4105
|
||||
|
||||
/***********************************
|
||||
* cl_intel_egl_image_yuv extension *
|
||||
************************************/
|
||||
|
||||
#define cl_intel_egl_image_yuv 1
|
||||
|
||||
#define CL_EGL_YUV_PLANE_INTEL 0x4107
|
||||
|
||||
/********************************
|
||||
* cl_intel_packed_yuv extension *
|
||||
*********************************/
|
||||
|
||||
#define cl_intel_packed_yuv 1
|
||||
|
||||
#define CL_YUYV_INTEL 0x4076
|
||||
#define CL_UYVY_INTEL 0x4077
|
||||
#define CL_YVYU_INTEL 0x4078
|
||||
#define CL_VYUY_INTEL 0x4079
|
||||
|
||||
/********************************************
|
||||
* cl_intel_required_subgroup_size extension *
|
||||
*********************************************/
|
||||
|
||||
#define cl_intel_required_subgroup_size 1
|
||||
|
||||
#define CL_DEVICE_SUB_GROUP_SIZES_INTEL 0x4108
|
||||
#define CL_KERNEL_SPILL_MEM_SIZE_INTEL 0x4109
|
||||
#define CL_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL 0x410A
|
||||
|
||||
/****************************************
|
||||
* cl_intel_driver_diagnostics extension *
|
||||
*****************************************/
|
||||
|
||||
#define cl_intel_driver_diagnostics 1
|
||||
|
||||
typedef cl_uint cl_diagnostics_verbose_level;
|
||||
|
||||
#define CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL 0x4106
|
||||
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_ALL_INTEL ( 0xff )
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL ( 1 )
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL ( 1 << 1 )
|
||||
#define CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL ( 1 << 2 )
|
||||
|
||||
/********************************
|
||||
* cl_intel_planar_yuv extension *
|
||||
*********************************/
|
||||
|
||||
#define CL_NV12_INTEL 0x410E
|
||||
|
||||
#define CL_MEM_NO_ACCESS_INTEL ( 1 << 24 )
|
||||
#define CL_MEM_ACCESS_FLAGS_UNRESTRICTED_INTEL ( 1 << 25 )
|
||||
|
||||
#define CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL 0x417E
|
||||
#define CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL 0x417F
|
||||
|
||||
/*******************************************************
|
||||
* cl_intel_device_side_avc_motion_estimation extension *
|
||||
********************************************************/
|
||||
|
||||
#define CL_DEVICE_AVC_ME_VERSION_INTEL 0x410B
|
||||
#define CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL 0x410C
|
||||
#define CL_DEVICE_AVC_ME_SUPPORTS_PREEMPTION_INTEL 0x410D
|
||||
|
||||
#define CL_AVC_ME_VERSION_0_INTEL 0x0; // No support.
|
||||
#define CL_AVC_ME_VERSION_1_INTEL 0x1; // First supported version.
|
||||
|
||||
#define CL_AVC_ME_MAJOR_16x16_INTEL 0x0
|
||||
#define CL_AVC_ME_MAJOR_16x8_INTEL 0x1
|
||||
#define CL_AVC_ME_MAJOR_8x16_INTEL 0x2
|
||||
#define CL_AVC_ME_MAJOR_8x8_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_MINOR_8x8_INTEL 0x0
|
||||
#define CL_AVC_ME_MINOR_8x4_INTEL 0x1
|
||||
#define CL_AVC_ME_MINOR_4x8_INTEL 0x2
|
||||
#define CL_AVC_ME_MINOR_4x4_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_MAJOR_FORWARD_INTEL 0x0
|
||||
#define CL_AVC_ME_MAJOR_BACKWARD_INTEL 0x1
|
||||
#define CL_AVC_ME_MAJOR_BIDIRECTIONAL_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_PARTITION_MASK_ALL_INTEL 0x0
|
||||
#define CL_AVC_ME_PARTITION_MASK_16x16_INTEL 0x7E
|
||||
#define CL_AVC_ME_PARTITION_MASK_16x8_INTEL 0x7D
|
||||
#define CL_AVC_ME_PARTITION_MASK_8x16_INTEL 0x7B
|
||||
#define CL_AVC_ME_PARTITION_MASK_8x8_INTEL 0x77
|
||||
#define CL_AVC_ME_PARTITION_MASK_8x4_INTEL 0x6F
|
||||
#define CL_AVC_ME_PARTITION_MASK_4x8_INTEL 0x5F
|
||||
#define CL_AVC_ME_PARTITION_MASK_4x4_INTEL 0x3F
|
||||
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_EXHAUSTIVE_INTEL 0x0
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_SMALL_INTEL 0x1
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_TINY_INTEL 0x2
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_EXTRA_TINY_INTEL 0x3
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_DIAMOND_INTEL 0x4
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_LARGE_DIAMOND_INTEL 0x5
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_RESERVED0_INTEL 0x6
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_RESERVED1_INTEL 0x7
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_CUSTOM_INTEL 0x8
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_16x12_RADIUS_INTEL 0x9
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_4x4_RADIUS_INTEL 0x2
|
||||
#define CL_AVC_ME_SEARCH_WINDOW_2x2_RADIUS_INTEL 0xa
|
||||
|
||||
#define CL_AVC_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
|
||||
#define CL_AVC_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
|
||||
#define CL_AVC_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
|
||||
#define CL_AVC_ME_SUBPIXEL_MODE_QPEL_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_COST_PRECISION_QPEL_INTEL 0x0
|
||||
#define CL_AVC_ME_COST_PRECISION_HPEL_INTEL 0x1
|
||||
#define CL_AVC_ME_COST_PRECISION_PEL_INTEL 0x2
|
||||
#define CL_AVC_ME_COST_PRECISION_DPEL_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_QUARTER_INTEL 0x10
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_THIRD_INTEL 0x15
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_HALF_INTEL 0x20
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 0x2B
|
||||
#define CL_AVC_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 0x30
|
||||
|
||||
#define CL_AVC_ME_BORDER_REACHED_LEFT_INTEL 0x0
|
||||
#define CL_AVC_ME_BORDER_REACHED_RIGHT_INTEL 0x2
|
||||
#define CL_AVC_ME_BORDER_REACHED_TOP_INTEL 0x4
|
||||
#define CL_AVC_ME_BORDER_REACHED_BOTTOM_INTEL 0x8
|
||||
|
||||
#define CL_AVC_ME_SKIP_BLOCK_PARTITION_16x16_INTEL 0x0
|
||||
#define CL_AVC_ME_SKIP_BLOCK_PARTITION_8x8_INTEL 0x4000
|
||||
|
||||
#define CL_AVC_ME_SKIP_BLOCK_16x16_FORWARD_ENABLE_INTEL ( 0x1 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_16x16_BACKWARD_ENABLE_INTEL ( 0x2 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_16x16_DUAL_ENABLE_INTEL ( 0x3 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_FORWARD_ENABLE_INTEL ( 0x55 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_BACKWARD_ENABLE_INTEL ( 0xAA << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_DUAL_ENABLE_INTEL ( 0xFF << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_0_FORWARD_ENABLE_INTEL ( 0x1 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_0_BACKWARD_ENABLE_INTEL ( 0x2 << 24 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_1_FORWARD_ENABLE_INTEL ( 0x1 << 26 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_1_BACKWARD_ENABLE_INTEL ( 0x2 << 26 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_2_FORWARD_ENABLE_INTEL ( 0x1 << 28 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_2_BACKWARD_ENABLE_INTEL ( 0x2 << 28 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_3_FORWARD_ENABLE_INTEL ( 0x1 << 30 )
|
||||
#define CL_AVC_ME_SKIP_BLOCK_8x8_3_BACKWARD_ENABLE_INTEL ( 0x2 << 30 )
|
||||
|
||||
#define CL_AVC_ME_BLOCK_BASED_SKIP_4x4_INTEL 0x00
|
||||
#define CL_AVC_ME_BLOCK_BASED_SKIP_8x8_INTEL 0x80
|
||||
|
||||
#define CL_AVC_ME_INTRA_16x16_INTEL 0x0
|
||||
#define CL_AVC_ME_INTRA_8x8_INTEL 0x1
|
||||
#define CL_AVC_ME_INTRA_4x4_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_16x16_INTEL 0x6
|
||||
#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_8x8_INTEL 0x5
|
||||
#define CL_AVC_ME_INTRA_LUMA_PARTITION_MASK_4x4_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_LEFT_MASK_ENABLE_INTEL 0x60
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_MASK_ENABLE_INTEL 0x10
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_RIGHT_MASK_ENABLE_INTEL 0x8
|
||||
#define CL_AVC_ME_INTRA_NEIGHBOR_UPPER_LEFT_MASK_ENABLE_INTEL 0x4
|
||||
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
|
||||
#define CL_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
|
||||
#define CL_AVC_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_FRAME_FORWARD_INTEL 0x1
|
||||
#define CL_AVC_ME_FRAME_BACKWARD_INTEL 0x2
|
||||
#define CL_AVC_ME_FRAME_DUAL_INTEL 0x3
|
||||
|
||||
#define CL_AVC_ME_SLICE_TYPE_PRED_INTEL 0x0
|
||||
#define CL_AVC_ME_SLICE_TYPE_BPRED_INTEL 0x1
|
||||
#define CL_AVC_ME_SLICE_TYPE_INTRA_INTEL 0x2
|
||||
|
||||
#define CL_AVC_ME_INTERLACED_SCAN_TOP_FIELD_INTEL 0x0
|
||||
#define CL_AVC_ME_INTERLACED_SCAN_BOTTOM_FIELD_INTEL 0x1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CL_EXT_INTEL_H */
|
||||
171
src/3rdparty/CL/cl_gl.h
vendored
Normal file
171
src/3rdparty/CL/cl_gl.h
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_GL_H
|
||||
#define __OPENCL_CL_GL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef cl_uint cl_gl_object_type;
|
||||
typedef cl_uint cl_gl_texture_info;
|
||||
typedef cl_uint cl_gl_platform_info;
|
||||
typedef struct __GLsync *cl_GLsync;
|
||||
|
||||
/* cl_gl_object_type = 0x2000 - 0x200F enum values are currently taken */
|
||||
#define CL_GL_OBJECT_BUFFER 0x2000
|
||||
#define CL_GL_OBJECT_TEXTURE2D 0x2001
|
||||
#define CL_GL_OBJECT_TEXTURE3D 0x2002
|
||||
#define CL_GL_OBJECT_RENDERBUFFER 0x2003
|
||||
#ifdef CL_VERSION_1_2
|
||||
#define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E
|
||||
#define CL_GL_OBJECT_TEXTURE1D 0x200F
|
||||
#define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010
|
||||
#define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011
|
||||
#endif
|
||||
|
||||
/* cl_gl_texture_info */
|
||||
#define CL_GL_TEXTURE_TARGET 0x2004
|
||||
#define CL_GL_MIPMAP_LEVEL 0x2005
|
||||
#ifdef CL_VERSION_1_2
|
||||
#define CL_GL_NUM_SAMPLES 0x2012
|
||||
#endif
|
||||
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLBuffer(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLuint bufobj,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
#ifdef CL_VERSION_1_2
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
#endif
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromGLRenderbuffer(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLuint renderbuffer,
|
||||
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLObjectInfo(cl_mem memobj,
|
||||
cl_gl_object_type * gl_object_type,
|
||||
cl_GLuint * gl_object_name) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLTextureInfo(cl_mem memobj,
|
||||
cl_gl_texture_info param_name,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireGLObjects(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseGLObjects(cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem * mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event * event_wait_list,
|
||||
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
||||
/* Deprecated OpenCL 1.1 APIs */
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture2D(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
|
||||
clCreateFromGLTexture3D(cl_context context,
|
||||
cl_mem_flags flags,
|
||||
cl_GLenum target,
|
||||
cl_GLint miplevel,
|
||||
cl_GLuint texture,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
/* cl_khr_gl_sharing extension */
|
||||
|
||||
#define cl_khr_gl_sharing 1
|
||||
|
||||
typedef cl_uint cl_gl_context_info;
|
||||
|
||||
/* Additional Error Codes */
|
||||
#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000
|
||||
|
||||
/* cl_gl_context_info */
|
||||
#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006
|
||||
#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007
|
||||
|
||||
/* Additional cl_context_properties */
|
||||
#define CL_GL_CONTEXT_KHR 0x2008
|
||||
#define CL_EGL_DISPLAY_KHR 0x2009
|
||||
#define CL_GLX_DISPLAY_KHR 0x200A
|
||||
#define CL_WGL_HDC_KHR 0x200B
|
||||
#define CL_CGL_SHAREGROUP_KHR 0x200C
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetGLContextInfoKHR(const cl_context_properties * properties,
|
||||
cl_gl_context_info param_name,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
|
||||
const cl_context_properties * properties,
|
||||
cl_gl_context_info param_name,
|
||||
size_t param_value_size,
|
||||
void * param_value,
|
||||
size_t * param_value_size_ret);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_GL_H */
|
||||
52
src/3rdparty/CL/cl_gl_ext.h
vendored
Normal file
52
src/3rdparty/CL/cl_gl_ext.h
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
|
||||
#ifndef __OPENCL_CL_GL_EXT_H
|
||||
#define __OPENCL_CL_GL_EXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <CL/cl_gl.h>
|
||||
|
||||
/*
|
||||
* cl_khr_gl_event extension
|
||||
*/
|
||||
#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
|
||||
|
||||
extern CL_API_ENTRY cl_event CL_API_CALL
|
||||
clCreateEventFromGLsyncKHR(cl_context context,
|
||||
cl_GLsync cl_GLsync,
|
||||
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_GL_EXT_H */
|
||||
1384
src/3rdparty/CL/cl_platform.h
vendored
Normal file
1384
src/3rdparty/CL/cl_platform.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
172
src/3rdparty/CL/cl_va_api_media_sharing_intel.h
vendored
Normal file
172
src/3rdparty/CL/cl_va_api_media_sharing_intel.h
vendored
Normal file
@@ -0,0 +1,172 @@
|
||||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2019 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
**********************************************************************************/
|
||||
/*****************************************************************************\
|
||||
|
||||
Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
|
||||
|
||||
THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
|
||||
MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
File Name: cl_va_api_media_sharing_intel.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Notes:
|
||||
|
||||
\*****************************************************************************/
|
||||
|
||||
|
||||
#ifndef __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
|
||||
#define __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_platform.h>
|
||||
#include <va/va.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************
|
||||
* cl_intel_va_api_media_sharing extension *
|
||||
*******************************************/
|
||||
|
||||
#define cl_intel_va_api_media_sharing 1
|
||||
|
||||
/* error codes */
|
||||
#define CL_INVALID_VA_API_MEDIA_ADAPTER_INTEL -1098
|
||||
#define CL_INVALID_VA_API_MEDIA_SURFACE_INTEL -1099
|
||||
#define CL_VA_API_MEDIA_SURFACE_ALREADY_ACQUIRED_INTEL -1100
|
||||
#define CL_VA_API_MEDIA_SURFACE_NOT_ACQUIRED_INTEL -1101
|
||||
|
||||
/* cl_va_api_device_source_intel */
|
||||
#define CL_VA_API_DISPLAY_INTEL 0x4094
|
||||
|
||||
/* cl_va_api_device_set_intel */
|
||||
#define CL_PREFERRED_DEVICES_FOR_VA_API_INTEL 0x4095
|
||||
#define CL_ALL_DEVICES_FOR_VA_API_INTEL 0x4096
|
||||
|
||||
/* cl_context_info */
|
||||
#define CL_CONTEXT_VA_API_DISPLAY_INTEL 0x4097
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_VA_API_MEDIA_SURFACE_INTEL 0x4098
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_VA_API_PLANE_INTEL 0x4099
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_ACQUIRE_VA_API_MEDIA_SURFACES_INTEL 0x409A
|
||||
#define CL_COMMAND_RELEASE_VA_API_MEDIA_SURFACES_INTEL 0x409B
|
||||
|
||||
typedef cl_uint cl_va_api_device_source_intel;
|
||||
typedef cl_uint cl_va_api_device_set_intel;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceIDsFromVA_APIMediaAdapterINTEL(
|
||||
cl_platform_id platform,
|
||||
cl_va_api_device_source_intel media_adapter_type,
|
||||
void* media_adapter,
|
||||
cl_va_api_device_set_intel media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(
|
||||
cl_platform_id platform,
|
||||
cl_va_api_device_source_intel media_adapter_type,
|
||||
void* media_adapter,
|
||||
cl_va_api_device_set_intel media_adapter_set,
|
||||
cl_uint num_entries,
|
||||
cl_device_id* devices,
|
||||
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromVA_APIMediaSurfaceINTEL(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
VASurfaceID* surface,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_mem (CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(
|
||||
cl_context context,
|
||||
cl_mem_flags flags,
|
||||
VASurfaceID* surface,
|
||||
cl_uint plane,
|
||||
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireVA_APIMediaSurfacesINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseVA_APIMediaSurfacesINTEL(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)(
|
||||
cl_command_queue command_queue,
|
||||
cl_uint num_objects,
|
||||
const cl_mem* mem_objects,
|
||||
cl_uint num_events_in_wait_list,
|
||||
const cl_event* event_wait_list,
|
||||
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H */
|
||||
|
||||
86
src/3rdparty/CL/cl_version.h
vendored
Normal file
86
src/3rdparty/CL/cl_version.h
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2018 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef __CL_VERSION_H
|
||||
#define __CL_VERSION_H
|
||||
|
||||
/* Detect which version to target */
|
||||
#if !defined(CL_TARGET_OPENCL_VERSION)
|
||||
#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
|
||||
#define CL_TARGET_OPENCL_VERSION 220
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION != 100 && \
|
||||
CL_TARGET_OPENCL_VERSION != 110 && \
|
||||
CL_TARGET_OPENCL_VERSION != 120 && \
|
||||
CL_TARGET_OPENCL_VERSION != 200 && \
|
||||
CL_TARGET_OPENCL_VERSION != 210 && \
|
||||
CL_TARGET_OPENCL_VERSION != 220
|
||||
#pragma message("cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220). Defaulting to 220 (OpenCL 2.2)")
|
||||
#undef CL_TARGET_OPENCL_VERSION
|
||||
#define CL_TARGET_OPENCL_VERSION 220
|
||||
#endif
|
||||
|
||||
|
||||
/* OpenCL Version */
|
||||
#if CL_TARGET_OPENCL_VERSION >= 220 && !defined(CL_VERSION_2_2)
|
||||
#define CL_VERSION_2_2 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 210 && !defined(CL_VERSION_2_1)
|
||||
#define CL_VERSION_2_1 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 200 && !defined(CL_VERSION_2_0)
|
||||
#define CL_VERSION_2_0 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 120 && !defined(CL_VERSION_1_2)
|
||||
#define CL_VERSION_1_2 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 110 && !defined(CL_VERSION_1_1)
|
||||
#define CL_VERSION_1_1 1
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION >= 100 && !defined(CL_VERSION_1_0)
|
||||
#define CL_VERSION_1_0 1
|
||||
#endif
|
||||
|
||||
/* Allow deprecated APIs for older OpenCL versions. */
|
||||
#if CL_TARGET_OPENCL_VERSION <= 210 && !defined(CL_USE_DEPRECATED_OPENCL_2_1_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_2_1_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 200 && !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 120 && !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 110 && !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#endif
|
||||
#if CL_TARGET_OPENCL_VERSION <= 100 && !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS)
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||
#endif
|
||||
|
||||
#endif /* __CL_VERSION_H */
|
||||
47
src/3rdparty/CL/opencl.h
vendored
Normal file
47
src/3rdparty/CL/opencl.h
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2015 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and/or associated documentation files (the
|
||||
* "Materials"), to deal in the Materials without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
* permit persons to whom the Materials are furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
||||
* KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
||||
* SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
||||
* https://www.khronos.org/registry/
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_H
|
||||
#define __OPENCL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_gl.h>
|
||||
#include <CL/cl_gl_ext.h>
|
||||
#include <CL/cl_ext.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCL_H */
|
||||
2342
src/3rdparty/adl/adl_defines.h
vendored
Normal file
2342
src/3rdparty/adl/adl_defines.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
44
src/3rdparty/adl/adl_sdk.h
vendored
Normal file
44
src/3rdparty/adl/adl_sdk.h
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// MIT LICENSE:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
/// \file adl_sdk.h
|
||||
/// \brief Contains the definition of the Memory Allocation Callback.\n <b>Included in ADL SDK</b>
|
||||
///
|
||||
/// \n\n
|
||||
/// This file contains the definition of the Memory Allocation Callback.\n
|
||||
/// It also includes definitions of the respective structures and constants.\n
|
||||
/// <b> This is the only header file to be included in a C/C++ project using ADL </b>
|
||||
|
||||
#ifndef ADL_SDK_H_
|
||||
#define ADL_SDK_H_
|
||||
|
||||
#include "adl_structures.h"
|
||||
|
||||
#if defined (LINUX)
|
||||
#define __stdcall
|
||||
#endif /* (LINUX) */
|
||||
|
||||
/// Memory Allocation Call back
|
||||
typedef void* ( __stdcall *ADL_MAIN_MALLOC_CALLBACK )( int );
|
||||
|
||||
|
||||
#endif /* ADL_SDK_H_ */
|
||||
3440
src/3rdparty/adl/adl_structures.h
vendored
Normal file
3440
src/3rdparty/adl/adl_structures.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
33
src/3rdparty/argon2.h
vendored
Normal file
33
src/3rdparty/argon2.h
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef XMRIG_3RDPARTY_ARGON2_H
|
||||
#define XMRIG_3RDPARTY_ARGON2_H
|
||||
|
||||
|
||||
#include "3rdparty/argon2/include/argon2.h"
|
||||
|
||||
|
||||
#endif /* XMRIG_3RDPARTY_ARGON2_H */
|
||||
88
src/3rdparty/argon2/CMakeLists.txt
vendored
Normal file
88
src/3rdparty/argon2/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
project(argon2 C)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
|
||||
set(ARGON2_SOURCES
|
||||
lib/argon2.c
|
||||
lib/core.c
|
||||
lib/encoding.c
|
||||
lib/genkat.c
|
||||
lib/impl-select.c
|
||||
lib/blake2/blake2.c
|
||||
)
|
||||
|
||||
set(ARGON2_X86_64_ENABLED ON)
|
||||
set(ARGON2_X86_64_LIBS argon2-sse2 argon2-ssse3 argon2-xop argon2-avx2 argon2-avx512f)
|
||||
set(ARGON2_X86_64_SOURCES arch/x86_64/lib/argon2-arch.c)
|
||||
|
||||
if (CMAKE_C_COMPILER_ID MATCHES MSVC)
|
||||
function(add_feature_impl FEATURE MSVC_FLAG DEF)
|
||||
add_library(argon2-${FEATURE} STATIC arch/x86_64/lib/argon2-${FEATURE}.c)
|
||||
target_include_directories(argon2-${FEATURE} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../)
|
||||
target_include_directories(argon2-${FEATURE} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib)
|
||||
set_target_properties(argon2-${FEATURE} PROPERTIES POSITION_INDEPENDENT_CODE True)
|
||||
|
||||
target_compile_options(argon2-${FEATURE} PRIVATE ${MSVC_FLAG})
|
||||
target_compile_definitions(argon2-${FEATURE} PRIVATE ${DEF})
|
||||
endfunction()
|
||||
|
||||
add_feature_impl(sse2 "" HAVE_SSE2)
|
||||
add_feature_impl(ssse3 "/arch:SSSE3" HAVE_SSSE3)
|
||||
add_feature_impl(xop "" HAVE_XOP)
|
||||
add_feature_impl(avx2 "/arch:AVX2" HAVE_AVX2)
|
||||
add_feature_impl(avx512f "/arch:AVX512F" HAVE_AVX512F)
|
||||
elseif (NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
function(add_feature_impl FEATURE GCC_FLAG DEF)
|
||||
add_library(argon2-${FEATURE} STATIC arch/x86_64/lib/argon2-${FEATURE}.c)
|
||||
target_include_directories(argon2-${FEATURE} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../)
|
||||
target_include_directories(argon2-${FEATURE} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib)
|
||||
set_target_properties(argon2-${FEATURE} PROPERTIES POSITION_INDEPENDENT_CODE True)
|
||||
|
||||
message("-- argon2: detecting feature '${FEATURE}'...")
|
||||
file(READ arch/x86_64/src/test-feature-${FEATURE}.c SOURCE_CODE)
|
||||
|
||||
# try without flag:
|
||||
check_c_source_compiles("${SOURCE_CODE}" FEATURE_${FEATURE}_NOFLAG)
|
||||
set(HAS_FEATURE ${FEATURE_${FEATURE}_NOFLAG})
|
||||
if (NOT "${HAS_FEATURE}")
|
||||
# try with -m<feature> flag:
|
||||
set(CMAKE_REQUIRED_FLAGS ${GCC_FLAG})
|
||||
check_c_source_compiles("${SOURCE_CODE}" FEATURE_${FEATURE}_FLAG)
|
||||
set(CMAKE_REQUIRED_FLAGS "")
|
||||
|
||||
set(HAS_FEATURE ${FEATURE_${FEATURE}_FLAG})
|
||||
if (${HAS_FEATURE})
|
||||
target_compile_options(argon2-${FEATURE} PRIVATE ${GCC_FLAG})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (${HAS_FEATURE})
|
||||
message("-- argon2: feature '${FEATURE}' detected!")
|
||||
target_compile_definitions(argon2-${FEATURE} PRIVATE ${DEF})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
add_feature_impl(sse2 -msse2 HAVE_SSE2)
|
||||
add_feature_impl(ssse3 -mssse3 HAVE_SSSE3)
|
||||
add_feature_impl(xop -mxop HAVE_XOP)
|
||||
add_feature_impl(avx2 -mavx2 HAVE_AVX2)
|
||||
add_feature_impl(avx512f -mavx512f HAVE_AVX512F)
|
||||
else()
|
||||
set(ARGON2_X86_64_ENABLED OFF)
|
||||
list(APPEND ARGON2_SOURCES arch/generic/lib/argon2-arch.c)
|
||||
endif()
|
||||
|
||||
if (ARGON2_X86_64_ENABLED)
|
||||
set(ARGON2_LIBS ${ARGON2_X86_64_LIBS})
|
||||
list(APPEND ARGON2_SOURCES ${ARGON2_X86_64_SOURCES})
|
||||
endif()
|
||||
|
||||
add_library(argon2 STATIC ${ARGON2_SOURCES})
|
||||
target_link_libraries(argon2 ${ARGON2_LIBS})
|
||||
|
||||
target_include_directories(argon2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../)
|
||||
target_include_directories(argon2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib)
|
||||
@@ -1,19 +1,21 @@
|
||||
Copyright Joyent, Inc. and other Node contributors.
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Ondrej Mosnáček
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
58
src/3rdparty/argon2/README.md
vendored
Normal file
58
src/3rdparty/argon2/README.md
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
# Argon2 [](https://travis-ci.org/WOnder93/argon2)
|
||||
A multi-arch library implementing the Argon2 password hashing algorithm.
|
||||
|
||||
This project is based on the [original source code](https://github.com/P-H-C/phc-winner-argon2) by the Argon2 authors. The goal of this project is to provide efficient Argon2 implementations for various HW architectures (x86, SSE, ARM, PowerPC, ...).
|
||||
|
||||
For the x86_64 architecture, the library implements a simple CPU dispatch which automatically selects the best implementation based on CPU flags and quick benchmarks.
|
||||
|
||||
# Building
|
||||
## Using GNU autotools
|
||||
|
||||
To prepare the build environment, run:
|
||||
```bash
|
||||
autoreconf -i
|
||||
./configure
|
||||
```
|
||||
|
||||
After that, just run `make` to build the library.
|
||||
|
||||
### Running tests
|
||||
After configuring the build environment, run `make check` to run the tests.
|
||||
|
||||
### Architecture options
|
||||
You can specify the target architecture by passing the `--host=...` flag to `./configure`.
|
||||
|
||||
Supported architectures:
|
||||
* `x86_64` – 64-bit x86 architecture
|
||||
* `generic` – use generic C impementation
|
||||
|
||||
## Using CMake
|
||||
|
||||
To prepare the build environment, run:
|
||||
```bash
|
||||
cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
```
|
||||
|
||||
Then you can run `make` to build the library.
|
||||
|
||||
## Using QMake/Qt Creator
|
||||
A [QMake](http://doc.qt.io/qt-4.8/qmake-manual.html) project is also available in the `qmake` directory. You can open it in the [Qt Creator IDE](http://wiki.qt.io/Category:Tools::QtCreator) or build it from terminal:
|
||||
```bash
|
||||
cd qmake
|
||||
# see table below for the list of possible ARCH and CONFIG values
|
||||
qmake ARCH=... CONFIG+=...
|
||||
make
|
||||
```
|
||||
|
||||
### Architecture options
|
||||
For QMake builds you can configure support for different architectures. Use the `ARCH` variable to choose the architecture and the `CONFIG` variable to set additional options.
|
||||
|
||||
Supported architectures:
|
||||
* `x86_64` – 64-bit x86 architecture
|
||||
* QMake config flags:
|
||||
* `USE_SSE2` – use SSE2 instructions
|
||||
* `USE_SSSE3` – use SSSE3 instructions
|
||||
* `USE_XOP` – use XOP instructions
|
||||
* `USE_AVX2` – use AVX2 instructions
|
||||
* `USE_AVX512F` – use AVX-512F instructions
|
||||
* `generic` – use generic C impementation
|
||||
20
src/3rdparty/argon2/arch/generic/lib/argon2-arch.c
vendored
Normal file
20
src/3rdparty/argon2/arch/generic/lib/argon2-arch.c
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "impl-select.h"
|
||||
|
||||
#define rotr64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
|
||||
|
||||
#include "argon2-template-64.h"
|
||||
|
||||
void fill_segment_default(const argon2_instance_t *instance,
|
||||
argon2_position_t position)
|
||||
{
|
||||
fill_segment_64(instance, position);
|
||||
}
|
||||
|
||||
void argon2_get_impl_list(argon2_impl_list *list)
|
||||
{
|
||||
list->count = 0;
|
||||
}
|
||||
38
src/3rdparty/argon2/arch/x86_64/lib/argon2-arch.c
vendored
Normal file
38
src/3rdparty/argon2/arch/x86_64/lib/argon2-arch.c
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "impl-select.h"
|
||||
|
||||
#include "argon2-sse2.h"
|
||||
#include "argon2-ssse3.h"
|
||||
#include "argon2-xop.h"
|
||||
#include "argon2-avx2.h"
|
||||
#include "argon2-avx512f.h"
|
||||
|
||||
/* NOTE: there is no portable intrinsic for 64-bit rotate, but any
|
||||
* sane compiler should be able to compile this into a ROR instruction: */
|
||||
#define rotr64(x, n) ((x) >> (n)) | ((x) << (64 - (n)))
|
||||
|
||||
#include "argon2-template-64.h"
|
||||
|
||||
void fill_segment_default(const argon2_instance_t *instance,
|
||||
argon2_position_t position)
|
||||
{
|
||||
fill_segment_64(instance, position);
|
||||
}
|
||||
|
||||
void argon2_get_impl_list(argon2_impl_list *list)
|
||||
{
|
||||
static const argon2_impl IMPLS[] = {
|
||||
{ "x86_64", NULL, fill_segment_default },
|
||||
{ "SSE2", xmrig_ar2_check_sse2, xmrig_ar2_fill_segment_sse2 },
|
||||
{ "SSSE3", xmrig_ar2_check_ssse3, xmrig_ar2_fill_segment_ssse3 },
|
||||
{ "XOP", xmrig_ar2_check_xop, xmrig_ar2_fill_segment_xop },
|
||||
{ "AVX2", xmrig_ar2_check_avx2, xmrig_ar2_fill_segment_avx2 },
|
||||
{ "AVX-512F", xmrig_ar2_check_avx512f, xmrig_ar2_fill_segment_avx512f },
|
||||
};
|
||||
|
||||
list->count = sizeof(IMPLS) / sizeof(IMPLS[0]);
|
||||
list->entries = IMPLS;
|
||||
}
|
||||
335
src/3rdparty/argon2/arch/x86_64/lib/argon2-avx2.c
vendored
Normal file
335
src/3rdparty/argon2/arch/x86_64/lib/argon2-avx2.c
vendored
Normal file
@@ -0,0 +1,335 @@
|
||||
#include "argon2-avx2.h"
|
||||
|
||||
#ifdef HAVE_AVX2
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
# include <x86intrin.h>
|
||||
#else
|
||||
# include <intrin.h>
|
||||
#endif
|
||||
|
||||
#define r16 (_mm256_setr_epi8( \
|
||||
2, 3, 4, 5, 6, 7, 0, 1, \
|
||||
10, 11, 12, 13, 14, 15, 8, 9, \
|
||||
18, 19, 20, 21, 22, 23, 16, 17, \
|
||||
26, 27, 28, 29, 30, 31, 24, 25))
|
||||
|
||||
#define r24 (_mm256_setr_epi8( \
|
||||
3, 4, 5, 6, 7, 0, 1, 2, \
|
||||
11, 12, 13, 14, 15, 8, 9, 10, \
|
||||
19, 20, 21, 22, 23, 16, 17, 18, \
|
||||
27, 28, 29, 30, 31, 24, 25, 26))
|
||||
|
||||
#define ror64_16(x) _mm256_shuffle_epi8((x), r16)
|
||||
#define ror64_24(x) _mm256_shuffle_epi8((x), r24)
|
||||
#define ror64_32(x) _mm256_shuffle_epi32((x), _MM_SHUFFLE(2, 3, 0, 1))
|
||||
#define ror64_63(x) \
|
||||
_mm256_xor_si256(_mm256_srli_epi64((x), 63), _mm256_add_epi64((x), (x)))
|
||||
|
||||
static __m256i f(__m256i x, __m256i y)
|
||||
{
|
||||
__m256i z = _mm256_mul_epu32(x, y);
|
||||
return _mm256_add_epi64(_mm256_add_epi64(x, y), _mm256_add_epi64(z, z));
|
||||
}
|
||||
|
||||
#define G1(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
A0 = f(A0, B0); \
|
||||
A1 = f(A1, B1); \
|
||||
\
|
||||
D0 = _mm256_xor_si256(D0, A0); \
|
||||
D1 = _mm256_xor_si256(D1, A1); \
|
||||
\
|
||||
D0 = ror64_32(D0); \
|
||||
D1 = ror64_32(D1); \
|
||||
\
|
||||
C0 = f(C0, D0); \
|
||||
C1 = f(C1, D1); \
|
||||
\
|
||||
B0 = _mm256_xor_si256(B0, C0); \
|
||||
B1 = _mm256_xor_si256(B1, C1); \
|
||||
\
|
||||
B0 = ror64_24(B0); \
|
||||
B1 = ror64_24(B1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define G2(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
A0 = f(A0, B0); \
|
||||
A1 = f(A1, B1); \
|
||||
\
|
||||
D0 = _mm256_xor_si256(D0, A0); \
|
||||
D1 = _mm256_xor_si256(D1, A1); \
|
||||
\
|
||||
D0 = ror64_16(D0); \
|
||||
D1 = ror64_16(D1); \
|
||||
\
|
||||
C0 = f(C0, D0); \
|
||||
C1 = f(C1, D1); \
|
||||
\
|
||||
B0 = _mm256_xor_si256(B0, C0); \
|
||||
B1 = _mm256_xor_si256(B1, C1); \
|
||||
\
|
||||
B0 = ror64_63(B0); \
|
||||
B1 = ror64_63(B1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define DIAGONALIZE1(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
B0 = _mm256_permute4x64_epi64(B0, _MM_SHUFFLE(0, 3, 2, 1)); \
|
||||
B1 = _mm256_permute4x64_epi64(B1, _MM_SHUFFLE(0, 3, 2, 1)); \
|
||||
\
|
||||
C0 = _mm256_permute4x64_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \
|
||||
C1 = _mm256_permute4x64_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \
|
||||
\
|
||||
D0 = _mm256_permute4x64_epi64(D0, _MM_SHUFFLE(2, 1, 0, 3)); \
|
||||
D1 = _mm256_permute4x64_epi64(D1, _MM_SHUFFLE(2, 1, 0, 3)); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define UNDIAGONALIZE1(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
B0 = _mm256_permute4x64_epi64(B0, _MM_SHUFFLE(2, 1, 0, 3)); \
|
||||
B1 = _mm256_permute4x64_epi64(B1, _MM_SHUFFLE(2, 1, 0, 3)); \
|
||||
\
|
||||
C0 = _mm256_permute4x64_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \
|
||||
C1 = _mm256_permute4x64_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \
|
||||
\
|
||||
D0 = _mm256_permute4x64_epi64(D0, _MM_SHUFFLE(0, 3, 2, 1)); \
|
||||
D1 = _mm256_permute4x64_epi64(D1, _MM_SHUFFLE(0, 3, 2, 1)); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define DIAGONALIZE2(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
__m256i tmp1, tmp2; \
|
||||
tmp1 = _mm256_blend_epi32(B0, B1, 0xCC); \
|
||||
tmp2 = _mm256_blend_epi32(B0, B1, 0x33); \
|
||||
B1 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \
|
||||
B0 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \
|
||||
\
|
||||
tmp1 = C0; \
|
||||
C0 = C1; \
|
||||
C1 = tmp1; \
|
||||
\
|
||||
tmp1 = _mm256_blend_epi32(D0, D1, 0xCC); \
|
||||
tmp2 = _mm256_blend_epi32(D0, D1, 0x33); \
|
||||
D0 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \
|
||||
D1 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define UNDIAGONALIZE2(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
__m256i tmp1, tmp2; \
|
||||
tmp1 = _mm256_blend_epi32(B0, B1, 0xCC); \
|
||||
tmp2 = _mm256_blend_epi32(B0, B1, 0x33); \
|
||||
B0 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \
|
||||
B1 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \
|
||||
\
|
||||
tmp1 = C0; \
|
||||
C0 = C1; \
|
||||
C1 = tmp1; \
|
||||
\
|
||||
tmp1 = _mm256_blend_epi32(D0, D1, 0xCC); \
|
||||
tmp2 = _mm256_blend_epi32(D0, D1, 0x33); \
|
||||
D1 = _mm256_permute4x64_epi64(tmp1, _MM_SHUFFLE(2,3,0,1)); \
|
||||
D0 = _mm256_permute4x64_epi64(tmp2, _MM_SHUFFLE(2,3,0,1)); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define BLAKE2_ROUND1(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
G1(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
G2(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
DIAGONALIZE1(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
G1(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
G2(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
UNDIAGONALIZE1(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define BLAKE2_ROUND2(A0, A1, B0, B1, C0, C1, D0, D1) \
|
||||
do { \
|
||||
G1(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
G2(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
DIAGONALIZE2(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
G1(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
G2(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
UNDIAGONALIZE2(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
enum {
|
||||
ARGON2_HWORDS_IN_BLOCK = ARGON2_OWORDS_IN_BLOCK / 2,
|
||||
};
|
||||
|
||||
static void fill_block(__m256i *s, const block *ref_block, block *next_block,
|
||||
int with_xor)
|
||||
{
|
||||
__m256i block_XY[ARGON2_HWORDS_IN_BLOCK];
|
||||
unsigned int i;
|
||||
|
||||
if (with_xor) {
|
||||
for (i = 0; i < ARGON2_HWORDS_IN_BLOCK; i++) {
|
||||
s[i] =_mm256_xor_si256(
|
||||
s[i], _mm256_loadu_si256((const __m256i *)ref_block->v + i));
|
||||
block_XY[i] = _mm256_xor_si256(
|
||||
s[i], _mm256_loadu_si256((const __m256i *)next_block->v + i));
|
||||
}
|
||||
|
||||
} else {
|
||||
for (i = 0; i < ARGON2_HWORDS_IN_BLOCK; i++) {
|
||||
block_XY[i] = s[i] =_mm256_xor_si256(
|
||||
s[i], _mm256_loadu_si256((const __m256i *)ref_block->v + i));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; ++i) {
|
||||
BLAKE2_ROUND1(
|
||||
s[8 * i + 0], s[8 * i + 1], s[8 * i + 2], s[8 * i + 3],
|
||||
s[8 * i + 4], s[8 * i + 5], s[8 * i + 6], s[8 * i + 7]);
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; ++i) {
|
||||
BLAKE2_ROUND2(
|
||||
s[4 * 0 + i], s[4 * 1 + i], s[4 * 2 + i], s[4 * 3 + i],
|
||||
s[4 * 4 + i], s[4 * 5 + i], s[4 * 6 + i], s[4 * 7 + i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < ARGON2_HWORDS_IN_BLOCK; i++) {
|
||||
s[i] = _mm256_xor_si256(s[i], block_XY[i]);
|
||||
_mm256_storeu_si256((__m256i *)next_block->v + i, s[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void next_addresses(block *address_block, block *input_block)
|
||||
{
|
||||
/*Temporary zero-initialized blocks*/
|
||||
__m256i zero_block[ARGON2_HWORDS_IN_BLOCK];
|
||||
__m256i zero2_block[ARGON2_HWORDS_IN_BLOCK];
|
||||
|
||||
memset(zero_block, 0, sizeof(zero_block));
|
||||
memset(zero2_block, 0, sizeof(zero2_block));
|
||||
|
||||
/*Increasing index counter*/
|
||||
input_block->v[6]++;
|
||||
|
||||
/*First iteration of G*/
|
||||
fill_block(zero_block, input_block, address_block, 0);
|
||||
|
||||
/*Second iteration of G*/
|
||||
fill_block(zero2_block, address_block, address_block, 0);
|
||||
}
|
||||
|
||||
void xmrig_ar2_fill_segment_avx2(const argon2_instance_t *instance, argon2_position_t position)
|
||||
{
|
||||
block *ref_block = NULL, *curr_block = NULL;
|
||||
block address_block, input_block;
|
||||
uint64_t pseudo_rand, ref_index, ref_lane;
|
||||
uint32_t prev_offset, curr_offset;
|
||||
uint32_t starting_index, i;
|
||||
__m256i state[ARGON2_HWORDS_IN_BLOCK];
|
||||
int data_independent_addressing;
|
||||
|
||||
if (instance == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
data_independent_addressing = (instance->type == Argon2_i) ||
|
||||
(instance->type == Argon2_id && (position.pass == 0) &&
|
||||
(position.slice < ARGON2_SYNC_POINTS / 2));
|
||||
|
||||
if (data_independent_addressing) {
|
||||
init_block_value(&input_block, 0);
|
||||
|
||||
input_block.v[0] = position.pass;
|
||||
input_block.v[1] = position.lane;
|
||||
input_block.v[2] = position.slice;
|
||||
input_block.v[3] = instance->memory_blocks;
|
||||
input_block.v[4] = instance->passes;
|
||||
input_block.v[5] = instance->type;
|
||||
}
|
||||
|
||||
starting_index = 0;
|
||||
|
||||
if ((0 == position.pass) && (0 == position.slice)) {
|
||||
starting_index = 2; /* we have already generated the first two blocks */
|
||||
|
||||
/* Don't forget to generate the first block of addresses: */
|
||||
if (data_independent_addressing) {
|
||||
next_addresses(&address_block, &input_block);
|
||||
}
|
||||
}
|
||||
|
||||
/* Offset of the current block */
|
||||
curr_offset = position.lane * instance->lane_length +
|
||||
position.slice * instance->segment_length + starting_index;
|
||||
|
||||
if (0 == curr_offset % instance->lane_length) {
|
||||
/* Last block in this lane */
|
||||
prev_offset = curr_offset + instance->lane_length - 1;
|
||||
} else {
|
||||
/* Previous block */
|
||||
prev_offset = curr_offset - 1;
|
||||
}
|
||||
|
||||
memcpy(state, ((instance->memory + prev_offset)->v), ARGON2_BLOCK_SIZE);
|
||||
|
||||
for (i = starting_index; i < instance->segment_length;
|
||||
++i, ++curr_offset, ++prev_offset) {
|
||||
/*1.1 Rotating prev_offset if needed */
|
||||
if (curr_offset % instance->lane_length == 1) {
|
||||
prev_offset = curr_offset - 1;
|
||||
}
|
||||
|
||||
/* 1.2 Computing the index of the reference block */
|
||||
/* 1.2.1 Taking pseudo-random value from the previous block */
|
||||
if (data_independent_addressing) {
|
||||
if (i % ARGON2_ADDRESSES_IN_BLOCK == 0) {
|
||||
next_addresses(&address_block, &input_block);
|
||||
}
|
||||
pseudo_rand = address_block.v[i % ARGON2_ADDRESSES_IN_BLOCK];
|
||||
} else {
|
||||
pseudo_rand = instance->memory[prev_offset].v[0];
|
||||
}
|
||||
|
||||
/* 1.2.2 Computing the lane of the reference block */
|
||||
ref_lane = ((pseudo_rand >> 32)) % instance->lanes;
|
||||
|
||||
if ((position.pass == 0) && (position.slice == 0)) {
|
||||
/* Can not reference other lanes yet */
|
||||
ref_lane = position.lane;
|
||||
}
|
||||
|
||||
/* 1.2.3 Computing the number of possible reference block within the
|
||||
* lane.
|
||||
*/
|
||||
position.index = i;
|
||||
ref_index = xmrig_ar2_index_alpha(instance, &position, pseudo_rand & 0xFFFFFFFF, ref_lane == position.lane);
|
||||
|
||||
/* 2 Creating a new block */
|
||||
ref_block =
|
||||
instance->memory + instance->lane_length * ref_lane + ref_index;
|
||||
curr_block = instance->memory + curr_offset;
|
||||
|
||||
/* version 1.2.1 and earlier: overwrite, not XOR */
|
||||
if (0 == position.pass || ARGON2_VERSION_10 == instance->version) {
|
||||
fill_block(state, ref_block, curr_block, 0);
|
||||
} else {
|
||||
fill_block(state, ref_block, curr_block, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extern int cpu_flags_has_avx2(void);
|
||||
int xmrig_ar2_check_avx2(void) { return cpu_flags_has_avx2(); }
|
||||
|
||||
#else
|
||||
|
||||
void xmrig_ar2_fill_segment_avx2(const argon2_instance_t *instance, argon2_position_t position) {}
|
||||
int xmrig_ar2_check_avx2(void) { return 0; }
|
||||
|
||||
#endif
|
||||
9
src/3rdparty/argon2/arch/x86_64/lib/argon2-avx2.h
vendored
Normal file
9
src/3rdparty/argon2/arch/x86_64/lib/argon2-avx2.h
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef ARGON2_AVX2_H
|
||||
#define ARGON2_AVX2_H
|
||||
|
||||
#include "core.h"
|
||||
|
||||
void xmrig_ar2_fill_segment_avx2(const argon2_instance_t *instance, argon2_position_t position);
|
||||
int xmrig_ar2_check_avx2(void);
|
||||
|
||||
#endif // ARGON2_AVX2_H
|
||||
319
src/3rdparty/argon2/arch/x86_64/lib/argon2-avx512f.c
vendored
Normal file
319
src/3rdparty/argon2/arch/x86_64/lib/argon2-avx512f.c
vendored
Normal file
@@ -0,0 +1,319 @@
|
||||
#include "argon2-avx512f.h"
|
||||
|
||||
#ifdef HAVE_AVX512F
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
# include <x86intrin.h>
|
||||
#else
|
||||
# include <intrin.h>
|
||||
#endif
|
||||
|
||||
#define ror64(x, n) _mm512_ror_epi64((x), (n))
|
||||
|
||||
static __m512i f(__m512i x, __m512i y)
|
||||
{
|
||||
__m512i z = _mm512_mul_epu32(x, y);
|
||||
return _mm512_add_epi64(_mm512_add_epi64(x, y), _mm512_add_epi64(z, z));
|
||||
}
|
||||
|
||||
#define G1(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
A0 = f(A0, B0); \
|
||||
A1 = f(A1, B1); \
|
||||
\
|
||||
D0 = _mm512_xor_si512(D0, A0); \
|
||||
D1 = _mm512_xor_si512(D1, A1); \
|
||||
\
|
||||
D0 = ror64(D0, 32); \
|
||||
D1 = ror64(D1, 32); \
|
||||
\
|
||||
C0 = f(C0, D0); \
|
||||
C1 = f(C1, D1); \
|
||||
\
|
||||
B0 = _mm512_xor_si512(B0, C0); \
|
||||
B1 = _mm512_xor_si512(B1, C1); \
|
||||
\
|
||||
B0 = ror64(B0, 24); \
|
||||
B1 = ror64(B1, 24); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define G2(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
A0 = f(A0, B0); \
|
||||
A1 = f(A1, B1); \
|
||||
\
|
||||
D0 = _mm512_xor_si512(D0, A0); \
|
||||
D1 = _mm512_xor_si512(D1, A1); \
|
||||
\
|
||||
D0 = ror64(D0, 16); \
|
||||
D1 = ror64(D1, 16); \
|
||||
\
|
||||
C0 = f(C0, D0); \
|
||||
C1 = f(C1, D1); \
|
||||
\
|
||||
B0 = _mm512_xor_si512(B0, C0); \
|
||||
B1 = _mm512_xor_si512(B1, C1); \
|
||||
\
|
||||
B0 = ror64(B0, 63); \
|
||||
B1 = ror64(B1, 63); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
B0 = _mm512_permutex_epi64(B0, _MM_SHUFFLE(0, 3, 2, 1)); \
|
||||
B1 = _mm512_permutex_epi64(B1, _MM_SHUFFLE(0, 3, 2, 1)); \
|
||||
\
|
||||
C0 = _mm512_permutex_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \
|
||||
C1 = _mm512_permutex_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \
|
||||
\
|
||||
D0 = _mm512_permutex_epi64(D0, _MM_SHUFFLE(2, 1, 0, 3)); \
|
||||
D1 = _mm512_permutex_epi64(D1, _MM_SHUFFLE(2, 1, 0, 3)); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
B0 = _mm512_permutex_epi64(B0, _MM_SHUFFLE(2, 1, 0, 3)); \
|
||||
B1 = _mm512_permutex_epi64(B1, _MM_SHUFFLE(2, 1, 0, 3)); \
|
||||
\
|
||||
C0 = _mm512_permutex_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \
|
||||
C1 = _mm512_permutex_epi64(C1, _MM_SHUFFLE(1, 0, 3, 2)); \
|
||||
\
|
||||
D0 = _mm512_permutex_epi64(D0, _MM_SHUFFLE(0, 3, 2, 1)); \
|
||||
D1 = _mm512_permutex_epi64(D1, _MM_SHUFFLE(0, 3, 2, 1)); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define BLAKE2_ROUND(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
G1(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
G2(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
G1(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
G2(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define SWAP_HALVES(A0, A1) \
|
||||
do { \
|
||||
__m512i t0, t1; \
|
||||
t0 = _mm512_shuffle_i64x2(A0, A1, _MM_SHUFFLE(1, 0, 1, 0)); \
|
||||
t1 = _mm512_shuffle_i64x2(A0, A1, _MM_SHUFFLE(3, 2, 3, 2)); \
|
||||
A0 = t0; \
|
||||
A1 = t1; \
|
||||
} while((void)0, 0)
|
||||
|
||||
#define SWAP_QUARTERS(A0, A1) \
|
||||
do { \
|
||||
SWAP_HALVES(A0, A1); \
|
||||
A0 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A0); \
|
||||
A1 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A1); \
|
||||
} while((void)0, 0)
|
||||
|
||||
#define UNSWAP_QUARTERS(A0, A1) \
|
||||
do { \
|
||||
A0 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A0); \
|
||||
A1 = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), A1); \
|
||||
SWAP_HALVES(A0, A1); \
|
||||
} while((void)0, 0)
|
||||
|
||||
#define BLAKE2_ROUND1(A0, C0, B0, D0, A1, C1, B1, D1) \
|
||||
do { \
|
||||
SWAP_HALVES(A0, B0); \
|
||||
SWAP_HALVES(C0, D0); \
|
||||
SWAP_HALVES(A1, B1); \
|
||||
SWAP_HALVES(C1, D1); \
|
||||
BLAKE2_ROUND(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
SWAP_HALVES(A0, B0); \
|
||||
SWAP_HALVES(C0, D0); \
|
||||
SWAP_HALVES(A1, B1); \
|
||||
SWAP_HALVES(C1, D1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define BLAKE2_ROUND2(A0, A1, B0, B1, C0, C1, D0, D1) \
|
||||
do { \
|
||||
SWAP_QUARTERS(A0, A1); \
|
||||
SWAP_QUARTERS(B0, B1); \
|
||||
SWAP_QUARTERS(C0, C1); \
|
||||
SWAP_QUARTERS(D0, D1); \
|
||||
BLAKE2_ROUND(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
UNSWAP_QUARTERS(A0, A1); \
|
||||
UNSWAP_QUARTERS(B0, B1); \
|
||||
UNSWAP_QUARTERS(C0, C1); \
|
||||
UNSWAP_QUARTERS(D0, D1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
enum {
|
||||
ARGON2_VECS_IN_BLOCK = ARGON2_OWORDS_IN_BLOCK / 4,
|
||||
};
|
||||
|
||||
static void fill_block(__m512i *s, const block *ref_block, block *next_block,
|
||||
int with_xor)
|
||||
{
|
||||
__m512i block_XY[ARGON2_VECS_IN_BLOCK];
|
||||
unsigned int i;
|
||||
|
||||
if (with_xor) {
|
||||
for (i = 0; i < ARGON2_VECS_IN_BLOCK; i++) {
|
||||
s[i] =_mm512_xor_si512(
|
||||
s[i], _mm512_loadu_si512((const __m512i *)ref_block->v + i));
|
||||
block_XY[i] = _mm512_xor_si512(
|
||||
s[i], _mm512_loadu_si512((const __m512i *)next_block->v + i));
|
||||
}
|
||||
|
||||
} else {
|
||||
for (i = 0; i < ARGON2_VECS_IN_BLOCK; i++) {
|
||||
block_XY[i] = s[i] =_mm512_xor_si512(
|
||||
s[i], _mm512_loadu_si512((const __m512i *)ref_block->v + i));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; ++i) {
|
||||
BLAKE2_ROUND1(
|
||||
s[8 * i + 0], s[8 * i + 1], s[8 * i + 2], s[8 * i + 3],
|
||||
s[8 * i + 4], s[8 * i + 5], s[8 * i + 6], s[8 * i + 7]);
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; ++i) {
|
||||
BLAKE2_ROUND2(
|
||||
s[2 * 0 + i], s[2 * 1 + i], s[2 * 2 + i], s[2 * 3 + i],
|
||||
s[2 * 4 + i], s[2 * 5 + i], s[2 * 6 + i], s[2 * 7 + i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < ARGON2_VECS_IN_BLOCK; i++) {
|
||||
s[i] = _mm512_xor_si512(s[i], block_XY[i]);
|
||||
_mm512_storeu_si512((__m512i *)next_block->v + i, s[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void next_addresses(block *address_block, block *input_block)
|
||||
{
|
||||
/*Temporary zero-initialized blocks*/
|
||||
__m512i zero_block[ARGON2_VECS_IN_BLOCK];
|
||||
__m512i zero2_block[ARGON2_VECS_IN_BLOCK];
|
||||
|
||||
memset(zero_block, 0, sizeof(zero_block));
|
||||
memset(zero2_block, 0, sizeof(zero2_block));
|
||||
|
||||
/*Increasing index counter*/
|
||||
input_block->v[6]++;
|
||||
|
||||
/*First iteration of G*/
|
||||
fill_block(zero_block, input_block, address_block, 0);
|
||||
|
||||
/*Second iteration of G*/
|
||||
fill_block(zero2_block, address_block, address_block, 0);
|
||||
}
|
||||
|
||||
void xmrig_ar2_fill_segment_avx512f(const argon2_instance_t *instance, argon2_position_t position)
|
||||
{
|
||||
block *ref_block = NULL, *curr_block = NULL;
|
||||
block address_block, input_block;
|
||||
uint64_t pseudo_rand, ref_index, ref_lane;
|
||||
uint32_t prev_offset, curr_offset;
|
||||
uint32_t starting_index, i;
|
||||
__m512i state[ARGON2_VECS_IN_BLOCK];
|
||||
int data_independent_addressing;
|
||||
|
||||
if (instance == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
data_independent_addressing = (instance->type == Argon2_i) ||
|
||||
(instance->type == Argon2_id && (position.pass == 0) &&
|
||||
(position.slice < ARGON2_SYNC_POINTS / 2));
|
||||
|
||||
if (data_independent_addressing) {
|
||||
init_block_value(&input_block, 0);
|
||||
|
||||
input_block.v[0] = position.pass;
|
||||
input_block.v[1] = position.lane;
|
||||
input_block.v[2] = position.slice;
|
||||
input_block.v[3] = instance->memory_blocks;
|
||||
input_block.v[4] = instance->passes;
|
||||
input_block.v[5] = instance->type;
|
||||
}
|
||||
|
||||
starting_index = 0;
|
||||
|
||||
if ((0 == position.pass) && (0 == position.slice)) {
|
||||
starting_index = 2; /* we have already generated the first two blocks */
|
||||
|
||||
/* Don't forget to generate the first block of addresses: */
|
||||
if (data_independent_addressing) {
|
||||
next_addresses(&address_block, &input_block);
|
||||
}
|
||||
}
|
||||
|
||||
/* Offset of the current block */
|
||||
curr_offset = position.lane * instance->lane_length +
|
||||
position.slice * instance->segment_length + starting_index;
|
||||
|
||||
if (0 == curr_offset % instance->lane_length) {
|
||||
/* Last block in this lane */
|
||||
prev_offset = curr_offset + instance->lane_length - 1;
|
||||
} else {
|
||||
/* Previous block */
|
||||
prev_offset = curr_offset - 1;
|
||||
}
|
||||
|
||||
memcpy(state, ((instance->memory + prev_offset)->v), ARGON2_BLOCK_SIZE);
|
||||
|
||||
for (i = starting_index; i < instance->segment_length;
|
||||
++i, ++curr_offset, ++prev_offset) {
|
||||
/*1.1 Rotating prev_offset if needed */
|
||||
if (curr_offset % instance->lane_length == 1) {
|
||||
prev_offset = curr_offset - 1;
|
||||
}
|
||||
|
||||
/* 1.2 Computing the index of the reference block */
|
||||
/* 1.2.1 Taking pseudo-random value from the previous block */
|
||||
if (data_independent_addressing) {
|
||||
if (i % ARGON2_ADDRESSES_IN_BLOCK == 0) {
|
||||
next_addresses(&address_block, &input_block);
|
||||
}
|
||||
pseudo_rand = address_block.v[i % ARGON2_ADDRESSES_IN_BLOCK];
|
||||
} else {
|
||||
pseudo_rand = instance->memory[prev_offset].v[0];
|
||||
}
|
||||
|
||||
/* 1.2.2 Computing the lane of the reference block */
|
||||
ref_lane = ((pseudo_rand >> 32)) % instance->lanes;
|
||||
|
||||
if ((position.pass == 0) && (position.slice == 0)) {
|
||||
/* Can not reference other lanes yet */
|
||||
ref_lane = position.lane;
|
||||
}
|
||||
|
||||
/* 1.2.3 Computing the number of possible reference block within the
|
||||
* lane.
|
||||
*/
|
||||
position.index = i;
|
||||
ref_index = xmrig_ar2_index_alpha(instance, &position, pseudo_rand & 0xFFFFFFFF, ref_lane == position.lane);
|
||||
|
||||
/* 2 Creating a new block */
|
||||
ref_block =
|
||||
instance->memory + instance->lane_length * ref_lane + ref_index;
|
||||
curr_block = instance->memory + curr_offset;
|
||||
|
||||
/* version 1.2.1 and earlier: overwrite, not XOR */
|
||||
if (0 == position.pass || ARGON2_VERSION_10 == instance->version) {
|
||||
fill_block(state, ref_block, curr_block, 0);
|
||||
} else {
|
||||
fill_block(state, ref_block, curr_block, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extern int cpu_flags_has_avx512f(void);
|
||||
int xmrig_ar2_check_avx512f(void) { return cpu_flags_has_avx512f(); }
|
||||
|
||||
#else
|
||||
|
||||
void xmrig_ar2_fill_segment_avx512f(const argon2_instance_t *instance, argon2_position_t position) {}
|
||||
int xmrig_ar2_check_avx512f(void) { return 0; }
|
||||
|
||||
#endif
|
||||
9
src/3rdparty/argon2/arch/x86_64/lib/argon2-avx512f.h
vendored
Normal file
9
src/3rdparty/argon2/arch/x86_64/lib/argon2-avx512f.h
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef ARGON2_AVX512F_H
|
||||
#define ARGON2_AVX512F_H
|
||||
|
||||
#include "core.h"
|
||||
|
||||
void xmrig_ar2_fill_segment_avx512f(const argon2_instance_t *instance, argon2_position_t position);
|
||||
int xmrig_ar2_check_avx512f(void);
|
||||
|
||||
#endif // ARGON2_AVX512F_H
|
||||
116
src/3rdparty/argon2/arch/x86_64/lib/argon2-sse2.c
vendored
Normal file
116
src/3rdparty/argon2/arch/x86_64/lib/argon2-sse2.c
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
#include "argon2-sse2.h"
|
||||
|
||||
#ifdef HAVE_SSE2
|
||||
#ifdef __GNUC__
|
||||
# include <x86intrin.h>
|
||||
#else
|
||||
# include <intrin.h>
|
||||
#endif
|
||||
|
||||
#define ror64_16(x) \
|
||||
_mm_shufflehi_epi16( \
|
||||
_mm_shufflelo_epi16((x), _MM_SHUFFLE(0, 3, 2, 1)), \
|
||||
_MM_SHUFFLE(0, 3, 2, 1))
|
||||
#define ror64_24(x) \
|
||||
_mm_xor_si128(_mm_srli_epi64((x), 24), _mm_slli_epi64((x), 40))
|
||||
#define ror64_32(x) _mm_shuffle_epi32((x), _MM_SHUFFLE(2, 3, 0, 1))
|
||||
#define ror64_63(x) \
|
||||
_mm_xor_si128(_mm_srli_epi64((x), 63), _mm_add_epi64((x), (x)))
|
||||
|
||||
static __m128i f(__m128i x, __m128i y)
|
||||
{
|
||||
__m128i z = _mm_mul_epu32(x, y);
|
||||
return _mm_add_epi64(_mm_add_epi64(x, y), _mm_add_epi64(z, z));
|
||||
}
|
||||
|
||||
#define G1(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
A0 = f(A0, B0); \
|
||||
A1 = f(A1, B1); \
|
||||
\
|
||||
D0 = _mm_xor_si128(D0, A0); \
|
||||
D1 = _mm_xor_si128(D1, A1); \
|
||||
\
|
||||
D0 = ror64_32(D0); \
|
||||
D1 = ror64_32(D1); \
|
||||
\
|
||||
C0 = f(C0, D0); \
|
||||
C1 = f(C1, D1); \
|
||||
\
|
||||
B0 = _mm_xor_si128(B0, C0); \
|
||||
B1 = _mm_xor_si128(B1, C1); \
|
||||
\
|
||||
B0 = ror64_24(B0); \
|
||||
B1 = ror64_24(B1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define G2(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
A0 = f(A0, B0); \
|
||||
A1 = f(A1, B1); \
|
||||
\
|
||||
D0 = _mm_xor_si128(D0, A0); \
|
||||
D1 = _mm_xor_si128(D1, A1); \
|
||||
\
|
||||
D0 = ror64_16(D0); \
|
||||
D1 = ror64_16(D1); \
|
||||
\
|
||||
C0 = f(C0, D0); \
|
||||
C1 = f(C1, D1); \
|
||||
\
|
||||
B0 = _mm_xor_si128(B0, C0); \
|
||||
B1 = _mm_xor_si128(B1, C1); \
|
||||
\
|
||||
B0 = ror64_63(B0); \
|
||||
B1 = ror64_63(B1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
__m128i t0 = D0; \
|
||||
__m128i t1 = B0; \
|
||||
D0 = _mm_unpackhi_epi64(D1, _mm_unpacklo_epi64(t0, t0)); \
|
||||
D1 = _mm_unpackhi_epi64(t0, _mm_unpacklo_epi64(D1, D1)); \
|
||||
B0 = _mm_unpackhi_epi64(B0, _mm_unpacklo_epi64(B1, B1)); \
|
||||
B1 = _mm_unpackhi_epi64(B1, _mm_unpacklo_epi64(t1, t1)); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
__m128i t0 = B0; \
|
||||
__m128i t1 = D0; \
|
||||
B0 = _mm_unpackhi_epi64(B1, _mm_unpacklo_epi64(B0, B0)); \
|
||||
B1 = _mm_unpackhi_epi64(t0, _mm_unpacklo_epi64(B1, B1)); \
|
||||
D0 = _mm_unpackhi_epi64(D0, _mm_unpacklo_epi64(D1, D1)); \
|
||||
D1 = _mm_unpackhi_epi64(D1, _mm_unpacklo_epi64(t1, t1)); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define BLAKE2_ROUND(A0, A1, B0, B1, C0, C1, D0, D1) \
|
||||
do { \
|
||||
G1(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
G2(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
G1(A0, B0, C1, D0, A1, B1, C0, D1); \
|
||||
G2(A0, B0, C1, D0, A1, B1, C0, D1); \
|
||||
\
|
||||
UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#include "argon2-template-128.h"
|
||||
|
||||
void xmrig_ar2_fill_segment_sse2(const argon2_instance_t *instance, argon2_position_t position)
|
||||
{
|
||||
fill_segment_128(instance, position);
|
||||
}
|
||||
|
||||
extern int cpu_flags_has_sse2(void);
|
||||
int xmrig_ar2_check_sse2(void) { return cpu_flags_has_sse2(); }
|
||||
|
||||
#else
|
||||
|
||||
void xmrig_ar2_fill_segment_sse2(const argon2_instance_t *instance, argon2_position_t position) {}
|
||||
int xmrig_ar2_check_sse2(void) { return 0; }
|
||||
|
||||
#endif
|
||||
9
src/3rdparty/argon2/arch/x86_64/lib/argon2-sse2.h
vendored
Normal file
9
src/3rdparty/argon2/arch/x86_64/lib/argon2-sse2.h
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef ARGON2_SSE2_H
|
||||
#define ARGON2_SSE2_H
|
||||
|
||||
#include "core.h"
|
||||
|
||||
void xmrig_ar2_fill_segment_sse2(const argon2_instance_t *instance, argon2_position_t position);
|
||||
int xmrig_ar2_check_sse2(void);
|
||||
|
||||
#endif // ARGON2_SSE2_H
|
||||
128
src/3rdparty/argon2/arch/x86_64/lib/argon2-ssse3.c
vendored
Normal file
128
src/3rdparty/argon2/arch/x86_64/lib/argon2-ssse3.c
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
#include "argon2-ssse3.h"
|
||||
|
||||
#ifdef HAVE_SSSE3
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
# include <x86intrin.h>
|
||||
#else
|
||||
# include <intrin.h>
|
||||
#endif
|
||||
|
||||
#define r16 (_mm_setr_epi8( \
|
||||
2, 3, 4, 5, 6, 7, 0, 1, \
|
||||
10, 11, 12, 13, 14, 15, 8, 9))
|
||||
|
||||
#define r24 (_mm_setr_epi8( \
|
||||
3, 4, 5, 6, 7, 0, 1, 2, \
|
||||
11, 12, 13, 14, 15, 8, 9, 10))
|
||||
|
||||
#define ror64_16(x) _mm_shuffle_epi8((x), r16)
|
||||
#define ror64_24(x) _mm_shuffle_epi8((x), r24)
|
||||
#define ror64_32(x) _mm_shuffle_epi32((x), _MM_SHUFFLE(2, 3, 0, 1))
|
||||
#define ror64_63(x) \
|
||||
_mm_xor_si128(_mm_srli_epi64((x), 63), _mm_add_epi64((x), (x)))
|
||||
|
||||
static __m128i f(__m128i x, __m128i y)
|
||||
{
|
||||
__m128i z = _mm_mul_epu32(x, y);
|
||||
return _mm_add_epi64(_mm_add_epi64(x, y), _mm_add_epi64(z, z));
|
||||
}
|
||||
|
||||
#define G1(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
A0 = f(A0, B0); \
|
||||
A1 = f(A1, B1); \
|
||||
\
|
||||
D0 = _mm_xor_si128(D0, A0); \
|
||||
D1 = _mm_xor_si128(D1, A1); \
|
||||
\
|
||||
D0 = ror64_32(D0); \
|
||||
D1 = ror64_32(D1); \
|
||||
\
|
||||
C0 = f(C0, D0); \
|
||||
C1 = f(C1, D1); \
|
||||
\
|
||||
B0 = _mm_xor_si128(B0, C0); \
|
||||
B1 = _mm_xor_si128(B1, C1); \
|
||||
\
|
||||
B0 = ror64_24(B0); \
|
||||
B1 = ror64_24(B1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define G2(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
A0 = f(A0, B0); \
|
||||
A1 = f(A1, B1); \
|
||||
\
|
||||
D0 = _mm_xor_si128(D0, A0); \
|
||||
D1 = _mm_xor_si128(D1, A1); \
|
||||
\
|
||||
D0 = ror64_16(D0); \
|
||||
D1 = ror64_16(D1); \
|
||||
\
|
||||
C0 = f(C0, D0); \
|
||||
C1 = f(C1, D1); \
|
||||
\
|
||||
B0 = _mm_xor_si128(B0, C0); \
|
||||
B1 = _mm_xor_si128(B1, C1); \
|
||||
\
|
||||
B0 = ror64_63(B0); \
|
||||
B1 = ror64_63(B1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
__m128i t0 = _mm_alignr_epi8(B1, B0, 8); \
|
||||
__m128i t1 = _mm_alignr_epi8(B0, B1, 8); \
|
||||
B0 = t0; \
|
||||
B1 = t1; \
|
||||
\
|
||||
t0 = _mm_alignr_epi8(D1, D0, 8); \
|
||||
t1 = _mm_alignr_epi8(D0, D1, 8); \
|
||||
D0 = t1; \
|
||||
D1 = t0; \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
__m128i t0 = _mm_alignr_epi8(B0, B1, 8); \
|
||||
__m128i t1 = _mm_alignr_epi8(B1, B0, 8); \
|
||||
B0 = t0; \
|
||||
B1 = t1; \
|
||||
\
|
||||
t0 = _mm_alignr_epi8(D0, D1, 8); \
|
||||
t1 = _mm_alignr_epi8(D1, D0, 8); \
|
||||
D0 = t1; \
|
||||
D1 = t0; \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define BLAKE2_ROUND(A0, A1, B0, B1, C0, C1, D0, D1) \
|
||||
do { \
|
||||
G1(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
G2(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
G1(A0, B0, C1, D0, A1, B1, C0, D1); \
|
||||
G2(A0, B0, C1, D0, A1, B1, C0, D1); \
|
||||
\
|
||||
UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#include "argon2-template-128.h"
|
||||
|
||||
void xmrig_ar2_fill_segment_ssse3(const argon2_instance_t *instance, argon2_position_t position)
|
||||
{
|
||||
fill_segment_128(instance, position);
|
||||
}
|
||||
|
||||
extern int cpu_flags_has_ssse3(void);
|
||||
int xmrig_ar2_check_ssse3(void) { return cpu_flags_has_ssse3(); }
|
||||
|
||||
#else
|
||||
|
||||
void xmrig_ar2_fill_segment_ssse3(const argon2_instance_t *instance, argon2_position_t position) {}
|
||||
int xmrig_ar2_check_ssse3(void) { return 0; }
|
||||
|
||||
#endif
|
||||
9
src/3rdparty/argon2/arch/x86_64/lib/argon2-ssse3.h
vendored
Normal file
9
src/3rdparty/argon2/arch/x86_64/lib/argon2-ssse3.h
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef ARGON2_SSSE3_H
|
||||
#define ARGON2_SSSE3_H
|
||||
|
||||
#include "core.h"
|
||||
|
||||
void xmrig_ar2_fill_segment_ssse3(const argon2_instance_t *instance, argon2_position_t position);
|
||||
int xmrig_ar2_check_ssse3(void);
|
||||
|
||||
#endif // ARGON2_SSSE3_H
|
||||
167
src/3rdparty/argon2/arch/x86_64/lib/argon2-template-128.h
vendored
Normal file
167
src/3rdparty/argon2/arch/x86_64/lib/argon2-template-128.h
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
# include <x86intrin.h>
|
||||
#else
|
||||
# include <intrin.h>
|
||||
#endif
|
||||
|
||||
#include "core.h"
|
||||
|
||||
static void fill_block(__m128i *s, const block *ref_block, block *next_block,
|
||||
int with_xor)
|
||||
{
|
||||
__m128i block_XY[ARGON2_OWORDS_IN_BLOCK];
|
||||
unsigned int i;
|
||||
|
||||
if (with_xor) {
|
||||
for (i = 0; i < ARGON2_OWORDS_IN_BLOCK; i++) {
|
||||
s[i] = _mm_xor_si128(
|
||||
s[i], _mm_loadu_si128((const __m128i *)ref_block->v + i));
|
||||
block_XY[i] = _mm_xor_si128(
|
||||
s[i], _mm_loadu_si128((const __m128i *)next_block->v + i));
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < ARGON2_OWORDS_IN_BLOCK; i++) {
|
||||
block_XY[i] = s[i] = _mm_xor_si128(
|
||||
s[i], _mm_loadu_si128((const __m128i *)ref_block->v + i));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 8; ++i) {
|
||||
BLAKE2_ROUND(
|
||||
s[8 * i + 0], s[8 * i + 1], s[8 * i + 2], s[8 * i + 3],
|
||||
s[8 * i + 4], s[8 * i + 5], s[8 * i + 6], s[8 * i + 7]);
|
||||
}
|
||||
|
||||
for (i = 0; i < 8; ++i) {
|
||||
BLAKE2_ROUND(
|
||||
s[8 * 0 + i], s[8 * 1 + i], s[8 * 2 + i], s[8 * 3 + i],
|
||||
s[8 * 4 + i], s[8 * 5 + i], s[8 * 6 + i], s[8 * 7 + i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < ARGON2_OWORDS_IN_BLOCK; i++) {
|
||||
s[i] = _mm_xor_si128(s[i], block_XY[i]);
|
||||
_mm_storeu_si128((__m128i *)next_block->v + i, s[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void next_addresses(block *address_block, block *input_block)
|
||||
{
|
||||
/*Temporary zero-initialized blocks*/
|
||||
__m128i zero_block[ARGON2_OWORDS_IN_BLOCK];
|
||||
__m128i zero2_block[ARGON2_OWORDS_IN_BLOCK];
|
||||
|
||||
memset(zero_block, 0, sizeof(zero_block));
|
||||
memset(zero2_block, 0, sizeof(zero2_block));
|
||||
|
||||
/*Increasing index counter*/
|
||||
input_block->v[6]++;
|
||||
|
||||
/*First iteration of G*/
|
||||
fill_block(zero_block, input_block, address_block, 0);
|
||||
|
||||
/*Second iteration of G*/
|
||||
fill_block(zero2_block, address_block, address_block, 0);
|
||||
}
|
||||
|
||||
static void fill_segment_128(const argon2_instance_t *instance,
|
||||
argon2_position_t position)
|
||||
{
|
||||
block *ref_block = NULL, *curr_block = NULL;
|
||||
block address_block, input_block;
|
||||
uint64_t pseudo_rand, ref_index, ref_lane;
|
||||
uint32_t prev_offset, curr_offset;
|
||||
uint32_t starting_index, i;
|
||||
__m128i state[ARGON2_OWORDS_IN_BLOCK];
|
||||
int data_independent_addressing;
|
||||
|
||||
if (instance == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
data_independent_addressing = (instance->type == Argon2_i) ||
|
||||
(instance->type == Argon2_id && (position.pass == 0) &&
|
||||
(position.slice < ARGON2_SYNC_POINTS / 2));
|
||||
|
||||
if (data_independent_addressing) {
|
||||
init_block_value(&input_block, 0);
|
||||
|
||||
input_block.v[0] = position.pass;
|
||||
input_block.v[1] = position.lane;
|
||||
input_block.v[2] = position.slice;
|
||||
input_block.v[3] = instance->memory_blocks;
|
||||
input_block.v[4] = instance->passes;
|
||||
input_block.v[5] = instance->type;
|
||||
}
|
||||
|
||||
starting_index = 0;
|
||||
|
||||
if ((0 == position.pass) && (0 == position.slice)) {
|
||||
starting_index = 2; /* we have already generated the first two blocks */
|
||||
|
||||
/* Don't forget to generate the first block of addresses: */
|
||||
if (data_independent_addressing) {
|
||||
next_addresses(&address_block, &input_block);
|
||||
}
|
||||
}
|
||||
|
||||
/* Offset of the current block */
|
||||
curr_offset = position.lane * instance->lane_length +
|
||||
position.slice * instance->segment_length + starting_index;
|
||||
|
||||
if (0 == curr_offset % instance->lane_length) {
|
||||
/* Last block in this lane */
|
||||
prev_offset = curr_offset + instance->lane_length - 1;
|
||||
} else {
|
||||
/* Previous block */
|
||||
prev_offset = curr_offset - 1;
|
||||
}
|
||||
|
||||
memcpy(state, ((instance->memory + prev_offset)->v), ARGON2_BLOCK_SIZE);
|
||||
|
||||
for (i = starting_index; i < instance->segment_length;
|
||||
++i, ++curr_offset, ++prev_offset) {
|
||||
/*1.1 Rotating prev_offset if needed */
|
||||
if (curr_offset % instance->lane_length == 1) {
|
||||
prev_offset = curr_offset - 1;
|
||||
}
|
||||
|
||||
/* 1.2 Computing the index of the reference block */
|
||||
/* 1.2.1 Taking pseudo-random value from the previous block */
|
||||
if (data_independent_addressing) {
|
||||
if (i % ARGON2_ADDRESSES_IN_BLOCK == 0) {
|
||||
next_addresses(&address_block, &input_block);
|
||||
}
|
||||
pseudo_rand = address_block.v[i % ARGON2_ADDRESSES_IN_BLOCK];
|
||||
} else {
|
||||
pseudo_rand = instance->memory[prev_offset].v[0];
|
||||
}
|
||||
|
||||
/* 1.2.2 Computing the lane of the reference block */
|
||||
ref_lane = ((pseudo_rand >> 32)) % instance->lanes;
|
||||
|
||||
if ((position.pass == 0) && (position.slice == 0)) {
|
||||
/* Can not reference other lanes yet */
|
||||
ref_lane = position.lane;
|
||||
}
|
||||
|
||||
/* 1.2.3 Computing the number of possible reference block within the
|
||||
* lane.
|
||||
*/
|
||||
position.index = i;
|
||||
ref_index = xmrig_ar2_index_alpha(instance, &position, pseudo_rand & 0xFFFFFFFF, ref_lane == position.lane);
|
||||
|
||||
/* 2 Creating a new block */
|
||||
ref_block =
|
||||
instance->memory + instance->lane_length * ref_lane + ref_index;
|
||||
curr_block = instance->memory + curr_offset;
|
||||
|
||||
/* version 1.2.1 and earlier: overwrite, not XOR */
|
||||
if (0 == position.pass || ARGON2_VERSION_10 == instance->version) {
|
||||
fill_block(state, ref_block, curr_block, 0);
|
||||
} else {
|
||||
fill_block(state, ref_block, curr_block, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
116
src/3rdparty/argon2/arch/x86_64/lib/argon2-xop.c
vendored
Normal file
116
src/3rdparty/argon2/arch/x86_64/lib/argon2-xop.c
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
#include "argon2-xop.h"
|
||||
|
||||
#ifdef HAVE_XOP
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
# include <x86intrin.h>
|
||||
#else
|
||||
# include <intrin.h>
|
||||
#endif
|
||||
|
||||
#define ror64(x, c) _mm_roti_epi64((x), -(c))
|
||||
|
||||
static __m128i f(__m128i x, __m128i y)
|
||||
{
|
||||
__m128i z = _mm_mul_epu32(x, y);
|
||||
return _mm_add_epi64(_mm_add_epi64(x, y), _mm_add_epi64(z, z));
|
||||
}
|
||||
|
||||
#define G1(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
A0 = f(A0, B0); \
|
||||
A1 = f(A1, B1); \
|
||||
\
|
||||
D0 = _mm_xor_si128(D0, A0); \
|
||||
D1 = _mm_xor_si128(D1, A1); \
|
||||
\
|
||||
D0 = ror64(D0, 32); \
|
||||
D1 = ror64(D1, 32); \
|
||||
\
|
||||
C0 = f(C0, D0); \
|
||||
C1 = f(C1, D1); \
|
||||
\
|
||||
B0 = _mm_xor_si128(B0, C0); \
|
||||
B1 = _mm_xor_si128(B1, C1); \
|
||||
\
|
||||
B0 = ror64(B0, 24); \
|
||||
B1 = ror64(B1, 24); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define G2(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
A0 = f(A0, B0); \
|
||||
A1 = f(A1, B1); \
|
||||
\
|
||||
D0 = _mm_xor_si128(D0, A0); \
|
||||
D1 = _mm_xor_si128(D1, A1); \
|
||||
\
|
||||
D0 = ror64(D0, 16); \
|
||||
D1 = ror64(D1, 16); \
|
||||
\
|
||||
C0 = f(C0, D0); \
|
||||
C1 = f(C1, D1); \
|
||||
\
|
||||
B0 = _mm_xor_si128(B0, C0); \
|
||||
B1 = _mm_xor_si128(B1, C1); \
|
||||
\
|
||||
B0 = ror64(B0, 63); \
|
||||
B1 = ror64(B1, 63); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
__m128i t0 = _mm_alignr_epi8(B1, B0, 8); \
|
||||
__m128i t1 = _mm_alignr_epi8(B0, B1, 8); \
|
||||
B0 = t0; \
|
||||
B1 = t1; \
|
||||
\
|
||||
t0 = _mm_alignr_epi8(D1, D0, 8); \
|
||||
t1 = _mm_alignr_epi8(D0, D1, 8); \
|
||||
D0 = t1; \
|
||||
D1 = t0; \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \
|
||||
do { \
|
||||
__m128i t0 = _mm_alignr_epi8(B0, B1, 8); \
|
||||
__m128i t1 = _mm_alignr_epi8(B1, B0, 8); \
|
||||
B0 = t0; \
|
||||
B1 = t1; \
|
||||
\
|
||||
t0 = _mm_alignr_epi8(D0, D1, 8); \
|
||||
t1 = _mm_alignr_epi8(D1, D0, 8); \
|
||||
D0 = t1; \
|
||||
D1 = t0; \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define BLAKE2_ROUND(A0, A1, B0, B1, C0, C1, D0, D1) \
|
||||
do { \
|
||||
G1(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
G2(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
\
|
||||
G1(A0, B0, C1, D0, A1, B1, C0, D1); \
|
||||
G2(A0, B0, C1, D0, A1, B1, C0, D1); \
|
||||
\
|
||||
UNDIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#include "argon2-template-128.h"
|
||||
|
||||
void xmrig_ar2_fill_segment_xop(const argon2_instance_t *instance, argon2_position_t position)
|
||||
{
|
||||
fill_segment_128(instance, position);
|
||||
}
|
||||
|
||||
extern int cpu_flags_has_xop(void);
|
||||
int xmrig_ar2_check_xop(void) { return cpu_flags_has_xop(); }
|
||||
|
||||
#else
|
||||
|
||||
void xmrig_ar2_fill_segment_xop(const argon2_instance_t *instance, argon2_position_t position) {}
|
||||
int xmrig_ar2_check_xop(void) { return 0; }
|
||||
|
||||
#endif
|
||||
9
src/3rdparty/argon2/arch/x86_64/lib/argon2-xop.h
vendored
Normal file
9
src/3rdparty/argon2/arch/x86_64/lib/argon2-xop.h
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef ARGON2_XOP_H
|
||||
#define ARGON2_XOP_H
|
||||
|
||||
#include "core.h"
|
||||
|
||||
void xmrig_ar2_fill_segment_xop(const argon2_instance_t *instance, argon2_position_t position);
|
||||
int xmrig_ar2_check_xop(void);
|
||||
|
||||
#endif // ARGON2_XOP_H
|
||||
8
src/3rdparty/argon2/arch/x86_64/src/test-feature-avx2.c
vendored
Normal file
8
src/3rdparty/argon2/arch/x86_64/src/test-feature-avx2.c
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <x86intrin.h>
|
||||
|
||||
void function_avx2(__m256i *dst, const __m256i *a, const __m256i *b)
|
||||
{
|
||||
*dst = _mm256_xor_si256(*a, *b);
|
||||
}
|
||||
|
||||
int main(void) { return 0; }
|
||||
8
src/3rdparty/argon2/arch/x86_64/src/test-feature-avx512f.c
vendored
Normal file
8
src/3rdparty/argon2/arch/x86_64/src/test-feature-avx512f.c
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <x86intrin.h>
|
||||
|
||||
void function_avx512f(__m512i *dst, const __m512i *a)
|
||||
{
|
||||
*dst = _mm512_ror_epi64(*a, 57);
|
||||
}
|
||||
|
||||
int main(void) { return 0; }
|
||||
8
src/3rdparty/argon2/arch/x86_64/src/test-feature-sse2.c
vendored
Normal file
8
src/3rdparty/argon2/arch/x86_64/src/test-feature-sse2.c
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <x86intrin.h>
|
||||
|
||||
void function_sse2(__m128i *dst, const __m128i *a, const __m128i *b)
|
||||
{
|
||||
*dst = _mm_xor_si128(*a, *b);
|
||||
}
|
||||
|
||||
int main(void) { return 0; }
|
||||
8
src/3rdparty/argon2/arch/x86_64/src/test-feature-ssse3.c
vendored
Normal file
8
src/3rdparty/argon2/arch/x86_64/src/test-feature-ssse3.c
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <x86intrin.h>
|
||||
|
||||
void function_ssse3(__m128i *dst, const __m128i *a, const __m128i *b)
|
||||
{
|
||||
*dst = _mm_shuffle_epi8(*a, *b);
|
||||
}
|
||||
|
||||
int main(void) { return 0; }
|
||||
8
src/3rdparty/argon2/arch/x86_64/src/test-feature-xop.c
vendored
Normal file
8
src/3rdparty/argon2/arch/x86_64/src/test-feature-xop.c
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <x86intrin.h>
|
||||
|
||||
void function_xop(__m128i *dst, const __m128i *a, int b)
|
||||
{
|
||||
*dst = _mm_roti_epi64(*a, b);
|
||||
}
|
||||
|
||||
int main(void) { return 0; }
|
||||
465
src/3rdparty/argon2/include/argon2.h
vendored
Normal file
465
src/3rdparty/argon2/include/argon2.h
vendored
Normal file
@@ -0,0 +1,465 @@
|
||||
/*
|
||||
* Argon2 source code package
|
||||
*
|
||||
* Written by Daniel Dinu and Dmitry Khovratovich, 2015
|
||||
*
|
||||
* This work is licensed under a Creative Commons CC0 1.0 License/Waiver.
|
||||
*
|
||||
* You should have received a copy of the CC0 Public Domain Dedication
|
||||
* along with this software. If not, see
|
||||
* <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
*/
|
||||
|
||||
#ifndef ARGON2_H
|
||||
#define ARGON2_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
|
||||
/* Symbols visibility control */
|
||||
#define ARGON2_PUBLIC
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Argon2 input parameter restrictions
|
||||
*/
|
||||
|
||||
/* Minimum and maximum number of lanes (degree of parallelism) */
|
||||
#define ARGON2_MIN_LANES UINT32_C(1)
|
||||
#define ARGON2_MAX_LANES UINT32_C(0xFFFFFF)
|
||||
|
||||
/* Minimum and maximum number of threads */
|
||||
#define ARGON2_MIN_THREADS UINT32_C(1)
|
||||
#define ARGON2_MAX_THREADS UINT32_C(0xFFFFFF)
|
||||
|
||||
/* Number of synchronization points between lanes per pass */
|
||||
#define ARGON2_SYNC_POINTS UINT32_C(4)
|
||||
|
||||
/* Minimum and maximum digest size in bytes */
|
||||
#define ARGON2_MIN_OUTLEN UINT32_C(4)
|
||||
#define ARGON2_MAX_OUTLEN UINT32_C(0xFFFFFFFF)
|
||||
|
||||
/* Minimum and maximum number of memory blocks (each of BLOCK_SIZE bytes) */
|
||||
#define ARGON2_MIN_MEMORY (2 * ARGON2_SYNC_POINTS) /* 2 blocks per slice */
|
||||
|
||||
#define ARGON2_MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
/* Max memory size is addressing-space/2, topping at 2^32 blocks (4 TB) */
|
||||
#define ARGON2_MAX_MEMORY_BITS \
|
||||
ARGON2_MIN(UINT32_C(32), (sizeof(void *) * CHAR_BIT - 10 - 1))
|
||||
#define ARGON2_MAX_MEMORY \
|
||||
ARGON2_MIN(UINT32_C(0xFFFFFFFF), UINT64_C(1) << ARGON2_MAX_MEMORY_BITS)
|
||||
|
||||
/* Minimum and maximum number of passes */
|
||||
#define ARGON2_MIN_TIME UINT32_C(1)
|
||||
#define ARGON2_MAX_TIME UINT32_C(0xFFFFFFFF)
|
||||
|
||||
/* Minimum and maximum password length in bytes */
|
||||
#define ARGON2_MIN_PWD_LENGTH UINT32_C(0)
|
||||
#define ARGON2_MAX_PWD_LENGTH UINT32_C(0xFFFFFFFF)
|
||||
|
||||
/* Minimum and maximum associated data length in bytes */
|
||||
#define ARGON2_MIN_AD_LENGTH UINT32_C(0)
|
||||
#define ARGON2_MAX_AD_LENGTH UINT32_C(0xFFFFFFFF)
|
||||
|
||||
/* Minimum and maximum salt length in bytes */
|
||||
#define ARGON2_MIN_SALT_LENGTH UINT32_C(8)
|
||||
#define ARGON2_MAX_SALT_LENGTH UINT32_C(0xFFFFFFFF)
|
||||
|
||||
/* Minimum and maximum key length in bytes */
|
||||
#define ARGON2_MIN_SECRET UINT32_C(0)
|
||||
#define ARGON2_MAX_SECRET UINT32_C(0xFFFFFFFF)
|
||||
|
||||
/* Flags to determine which fields are securely wiped (default = no wipe). */
|
||||
#define ARGON2_DEFAULT_FLAGS UINT32_C(0)
|
||||
#define ARGON2_FLAG_CLEAR_PASSWORD (UINT32_C(1) << 0)
|
||||
#define ARGON2_FLAG_CLEAR_SECRET (UINT32_C(1) << 1)
|
||||
#define ARGON2_FLAG_GENKAT (UINT32_C(1) << 3)
|
||||
|
||||
/* Global flag to determine if we are wiping internal memory buffers. This flag
|
||||
* is defined in core.c and deafults to 1 (wipe internal memory). */
|
||||
extern int FLAG_clear_internal_memory;
|
||||
|
||||
/* Error codes */
|
||||
typedef enum Argon2_ErrorCodes {
|
||||
ARGON2_OK = 0,
|
||||
|
||||
ARGON2_OUTPUT_PTR_NULL = -1,
|
||||
|
||||
ARGON2_OUTPUT_TOO_SHORT = -2,
|
||||
ARGON2_OUTPUT_TOO_LONG = -3,
|
||||
|
||||
ARGON2_PWD_TOO_SHORT = -4,
|
||||
ARGON2_PWD_TOO_LONG = -5,
|
||||
|
||||
ARGON2_SALT_TOO_SHORT = -6,
|
||||
ARGON2_SALT_TOO_LONG = -7,
|
||||
|
||||
ARGON2_AD_TOO_SHORT = -8,
|
||||
ARGON2_AD_TOO_LONG = -9,
|
||||
|
||||
ARGON2_SECRET_TOO_SHORT = -10,
|
||||
ARGON2_SECRET_TOO_LONG = -11,
|
||||
|
||||
ARGON2_TIME_TOO_SMALL = -12,
|
||||
ARGON2_TIME_TOO_LARGE = -13,
|
||||
|
||||
ARGON2_MEMORY_TOO_LITTLE = -14,
|
||||
ARGON2_MEMORY_TOO_MUCH = -15,
|
||||
|
||||
ARGON2_LANES_TOO_FEW = -16,
|
||||
ARGON2_LANES_TOO_MANY = -17,
|
||||
|
||||
ARGON2_PWD_PTR_MISMATCH = -18, /* NULL ptr with non-zero length */
|
||||
ARGON2_SALT_PTR_MISMATCH = -19, /* NULL ptr with non-zero length */
|
||||
ARGON2_SECRET_PTR_MISMATCH = -20, /* NULL ptr with non-zero length */
|
||||
ARGON2_AD_PTR_MISMATCH = -21, /* NULL ptr with non-zero length */
|
||||
|
||||
ARGON2_MEMORY_ALLOCATION_ERROR = -22,
|
||||
|
||||
ARGON2_FREE_MEMORY_CBK_NULL = -23,
|
||||
ARGON2_ALLOCATE_MEMORY_CBK_NULL = -24,
|
||||
|
||||
ARGON2_INCORRECT_PARAMETER = -25,
|
||||
ARGON2_INCORRECT_TYPE = -26,
|
||||
|
||||
ARGON2_OUT_PTR_MISMATCH = -27,
|
||||
|
||||
ARGON2_THREADS_TOO_FEW = -28,
|
||||
ARGON2_THREADS_TOO_MANY = -29,
|
||||
|
||||
ARGON2_MISSING_ARGS = -30,
|
||||
|
||||
ARGON2_ENCODING_FAIL = -31,
|
||||
|
||||
ARGON2_DECODING_FAIL = -32,
|
||||
|
||||
ARGON2_THREAD_FAIL = -33,
|
||||
|
||||
ARGON2_DECODING_LENGTH_FAIL = -34,
|
||||
|
||||
ARGON2_VERIFY_MISMATCH = -35
|
||||
} argon2_error_codes;
|
||||
|
||||
/* Memory allocator types --- for external allocation */
|
||||
typedef int (*allocate_fptr)(uint8_t **memory, size_t bytes_to_allocate);
|
||||
typedef void (*deallocate_fptr)(uint8_t *memory, size_t bytes_to_allocate);
|
||||
|
||||
/* Argon2 external data structures */
|
||||
|
||||
/*
|
||||
*****
|
||||
* Context: structure to hold Argon2 inputs:
|
||||
* output array and its length,
|
||||
* password and its length,
|
||||
* salt and its length,
|
||||
* secret and its length,
|
||||
* associated data and its length,
|
||||
* number of passes, amount of used memory (in KBytes, can be rounded up a bit)
|
||||
* number of parallel threads that will be run.
|
||||
* All the parameters above affect the output hash value.
|
||||
* Additionally, two function pointers can be provided to allocate and
|
||||
* deallocate the memory (if NULL, memory will be allocated internally).
|
||||
* Also, three flags indicate whether to erase password, secret as soon as they
|
||||
* are pre-hashed (and thus not needed anymore), and the entire memory
|
||||
*****
|
||||
* Simplest situation: you have output array out[8], password is stored in
|
||||
* pwd[32], salt is stored in salt[16], you do not have keys nor associated
|
||||
* data. You need to spend 1 GB of RAM and you run 5 passes of Argon2d with
|
||||
* 4 parallel lanes.
|
||||
* You want to erase the password, but you're OK with last pass not being
|
||||
* erased. You want to use the default memory allocator.
|
||||
* Then you initialize:
|
||||
Argon2_Context(out,8,pwd,32,salt,16,NULL,0,NULL,0,5,1<<20,4,4,NULL,NULL,true,false,false,false)
|
||||
*/
|
||||
typedef struct Argon2_Context {
|
||||
uint8_t *out; /* output array */
|
||||
uint32_t outlen; /* digest length */
|
||||
|
||||
uint8_t *pwd; /* password array */
|
||||
uint32_t pwdlen; /* password length */
|
||||
|
||||
uint8_t *salt; /* salt array */
|
||||
uint32_t saltlen; /* salt length */
|
||||
|
||||
uint8_t *secret; /* key array */
|
||||
uint32_t secretlen; /* key length */
|
||||
|
||||
uint8_t *ad; /* associated data array */
|
||||
uint32_t adlen; /* associated data length */
|
||||
|
||||
uint32_t t_cost; /* number of passes */
|
||||
uint32_t m_cost; /* amount of memory requested (KB) */
|
||||
uint32_t lanes; /* number of lanes */
|
||||
uint32_t threads; /* maximum number of threads */
|
||||
|
||||
uint32_t version; /* version number */
|
||||
|
||||
allocate_fptr allocate_cbk; /* pointer to memory allocator */
|
||||
deallocate_fptr free_cbk; /* pointer to memory deallocator */
|
||||
|
||||
uint32_t flags; /* array of bool options */
|
||||
} argon2_context;
|
||||
|
||||
/* Argon2 primitive type */
|
||||
typedef enum Argon2_type {
|
||||
Argon2_d = 0,
|
||||
Argon2_i = 1,
|
||||
Argon2_id = 2
|
||||
} argon2_type;
|
||||
|
||||
/* Version of the algorithm */
|
||||
typedef enum Argon2_version {
|
||||
ARGON2_VERSION_10 = 0x10,
|
||||
ARGON2_VERSION_13 = 0x13,
|
||||
ARGON2_VERSION_NUMBER = ARGON2_VERSION_13
|
||||
} argon2_version;
|
||||
|
||||
/*
|
||||
* Function that gives the string representation of an argon2_type.
|
||||
* @param type The argon2_type that we want the string for
|
||||
* @param uppercase Whether the string should have the first letter uppercase
|
||||
* @return NULL if invalid type, otherwise the string representation.
|
||||
*/
|
||||
ARGON2_PUBLIC const char *argon2_type2string(argon2_type type, int uppercase);
|
||||
|
||||
/*
|
||||
* Function that performs memory-hard hashing with certain degree of parallelism
|
||||
* @param context Pointer to the Argon2 internal structure
|
||||
* @return Error code if smth is wrong, ARGON2_OK otherwise
|
||||
*/
|
||||
ARGON2_PUBLIC int argon2_ctx(argon2_context *context, argon2_type type);
|
||||
|
||||
/**
|
||||
* Hashes a password with Argon2i, producing an encoded hash
|
||||
* @param t_cost Number of iterations
|
||||
* @param m_cost Sets memory usage to m_cost kibibytes
|
||||
* @param parallelism Number of threads and compute lanes
|
||||
* @param pwd Pointer to password
|
||||
* @param pwdlen Password size in bytes
|
||||
* @param salt Pointer to salt
|
||||
* @param saltlen Salt size in bytes
|
||||
* @param hashlen Desired length of the hash in bytes
|
||||
* @param encoded Buffer where to write the encoded hash
|
||||
* @param encodedlen Size of the buffer (thus max size of the encoded hash)
|
||||
* @pre Different parallelism levels will give different results
|
||||
* @pre Returns ARGON2_OK if successful
|
||||
*/
|
||||
ARGON2_PUBLIC int argon2i_hash_encoded(const uint32_t t_cost,
|
||||
const uint32_t m_cost,
|
||||
const uint32_t parallelism,
|
||||
const void *pwd, const size_t pwdlen,
|
||||
const void *salt, const size_t saltlen,
|
||||
const size_t hashlen, char *encoded,
|
||||
const size_t encodedlen);
|
||||
|
||||
/**
|
||||
* Hashes a password with Argon2i, producing a raw hash by allocating memory at
|
||||
* @hash
|
||||
* @param t_cost Number of iterations
|
||||
* @param m_cost Sets memory usage to m_cost kibibytes
|
||||
* @param parallelism Number of threads and compute lanes
|
||||
* @param pwd Pointer to password
|
||||
* @param pwdlen Password size in bytes
|
||||
* @param salt Pointer to salt
|
||||
* @param saltlen Salt size in bytes
|
||||
* @param hash Buffer where to write the raw hash - updated by the function
|
||||
* @param hashlen Desired length of the hash in bytes
|
||||
* @pre Different parallelism levels will give different results
|
||||
* @pre Returns ARGON2_OK if successful
|
||||
*/
|
||||
ARGON2_PUBLIC int argon2i_hash_raw(const uint32_t t_cost, const uint32_t m_cost,
|
||||
const uint32_t parallelism, const void *pwd,
|
||||
const size_t pwdlen, const void *salt,
|
||||
const size_t saltlen, void *hash,
|
||||
const size_t hashlen);
|
||||
|
||||
ARGON2_PUBLIC int argon2d_hash_encoded(const uint32_t t_cost,
|
||||
const uint32_t m_cost,
|
||||
const uint32_t parallelism,
|
||||
const void *pwd, const size_t pwdlen,
|
||||
const void *salt, const size_t saltlen,
|
||||
const size_t hashlen, char *encoded,
|
||||
const size_t encodedlen);
|
||||
|
||||
ARGON2_PUBLIC int argon2d_hash_raw(const uint32_t t_cost,
|
||||
const uint32_t m_cost,
|
||||
const uint32_t parallelism, const void *pwd,
|
||||
const size_t pwdlen, const void *salt,
|
||||
const size_t saltlen, void *hash,
|
||||
const size_t hashlen);
|
||||
|
||||
ARGON2_PUBLIC int argon2id_hash_encoded(const uint32_t t_cost,
|
||||
const uint32_t m_cost,
|
||||
const uint32_t parallelism,
|
||||
const void *pwd, const size_t pwdlen,
|
||||
const void *salt, const size_t saltlen,
|
||||
const size_t hashlen, char *encoded,
|
||||
const size_t encodedlen);
|
||||
|
||||
ARGON2_PUBLIC int argon2id_hash_raw(const uint32_t t_cost,
|
||||
const uint32_t m_cost,
|
||||
const uint32_t parallelism, const void *pwd,
|
||||
const size_t pwdlen, const void *salt,
|
||||
const size_t saltlen, void *hash,
|
||||
const size_t hashlen);
|
||||
|
||||
ARGON2_PUBLIC int argon2id_hash_raw_ex(const uint32_t t_cost,
|
||||
const uint32_t m_cost,
|
||||
const uint32_t parallelism, const void *pwd,
|
||||
const size_t pwdlen, const void *salt,
|
||||
const size_t saltlen, void *hash,
|
||||
const size_t hashlen,
|
||||
void *memory);
|
||||
|
||||
/* generic function underlying the above ones */
|
||||
ARGON2_PUBLIC int argon2_hash(const uint32_t t_cost, const uint32_t m_cost,
|
||||
const uint32_t parallelism, const void *pwd,
|
||||
const size_t pwdlen, const void *salt,
|
||||
const size_t saltlen, void *hash,
|
||||
const size_t hashlen, char *encoded,
|
||||
const size_t encodedlen, argon2_type type,
|
||||
const uint32_t version);
|
||||
|
||||
/**
|
||||
* Verifies a password against an encoded string
|
||||
* Encoded string is restricted as in validate_inputs()
|
||||
* @param encoded String encoding parameters, salt, hash
|
||||
* @param pwd Pointer to password
|
||||
* @pre Returns ARGON2_OK if successful
|
||||
*/
|
||||
ARGON2_PUBLIC int argon2i_verify(const char *encoded, const void *pwd,
|
||||
const size_t pwdlen);
|
||||
|
||||
ARGON2_PUBLIC int argon2d_verify(const char *encoded, const void *pwd,
|
||||
const size_t pwdlen);
|
||||
|
||||
ARGON2_PUBLIC int argon2id_verify(const char *encoded, const void *pwd,
|
||||
const size_t pwdlen);
|
||||
|
||||
/* generic function underlying the above ones */
|
||||
ARGON2_PUBLIC int argon2_verify(const char *encoded, const void *pwd,
|
||||
const size_t pwdlen, argon2_type type);
|
||||
|
||||
/**
|
||||
* Argon2d: Version of Argon2 that picks memory blocks depending
|
||||
* on the password and salt. Only for side-channel-free
|
||||
* environment!!
|
||||
*****
|
||||
* @param context Pointer to current Argon2 context
|
||||
* @return Zero if successful, a non zero error code otherwise
|
||||
*/
|
||||
ARGON2_PUBLIC int argon2d_ctx(argon2_context *context);
|
||||
|
||||
/**
|
||||
* Argon2i: Version of Argon2 that picks memory blocks
|
||||
* independent on the password and salt. Good for side-channels,
|
||||
* but worse w.r.t. tradeoff attacks if only one pass is used.
|
||||
*****
|
||||
* @param context Pointer to current Argon2 context
|
||||
* @return Zero if successful, a non zero error code otherwise
|
||||
*/
|
||||
ARGON2_PUBLIC int argon2i_ctx(argon2_context *context);
|
||||
|
||||
/**
|
||||
* Argon2id: Version of Argon2 where the first half-pass over memory is
|
||||
* password-independent, the rest are password-dependent (on the password and
|
||||
* salt). OK against side channels (they reduce to 1/2-pass Argon2i), and
|
||||
* better with w.r.t. tradeoff attacks (similar to Argon2d).
|
||||
*****
|
||||
* @param context Pointer to current Argon2 context
|
||||
* @return Zero if successful, a non zero error code otherwise
|
||||
*/
|
||||
ARGON2_PUBLIC int argon2id_ctx(argon2_context *context);
|
||||
|
||||
/**
|
||||
* Verify if a given password is correct for Argon2d hashing
|
||||
* @param context Pointer to current Argon2 context
|
||||
* @param hash The password hash to verify. The length of the hash is
|
||||
* specified by the context outlen member
|
||||
* @return Zero if successful, a non zero error code otherwise
|
||||
*/
|
||||
ARGON2_PUBLIC int argon2d_verify_ctx(argon2_context *context, const char *hash);
|
||||
|
||||
/**
|
||||
* Verify if a given password is correct for Argon2i hashing
|
||||
* @param context Pointer to current Argon2 context
|
||||
* @param hash The password hash to verify. The length of the hash is
|
||||
* specified by the context outlen member
|
||||
* @return Zero if successful, a non zero error code otherwise
|
||||
*/
|
||||
ARGON2_PUBLIC int argon2i_verify_ctx(argon2_context *context, const char *hash);
|
||||
|
||||
/**
|
||||
* Verify if a given password is correct for Argon2id hashing
|
||||
* @param context Pointer to current Argon2 context
|
||||
* @param hash The password hash to verify. The length of the hash is
|
||||
* specified by the context outlen member
|
||||
* @return Zero if successful, a non zero error code otherwise
|
||||
*/
|
||||
ARGON2_PUBLIC int argon2id_verify_ctx(argon2_context *context,
|
||||
const char *hash);
|
||||
|
||||
/* generic function underlying the above ones */
|
||||
ARGON2_PUBLIC int argon2_verify_ctx(argon2_context *context, const char *hash,
|
||||
argon2_type type);
|
||||
|
||||
/**
|
||||
* Get the associated error message for given error code
|
||||
* @return The error message associated with the given error code
|
||||
*/
|
||||
ARGON2_PUBLIC const char *argon2_error_message(int error_code);
|
||||
|
||||
/**
|
||||
* Returns the encoded hash length for the given input parameters
|
||||
* @param t_cost Number of iterations
|
||||
* @param m_cost Memory usage in kibibytes
|
||||
* @param parallelism Number of threads; used to compute lanes
|
||||
* @param saltlen Salt size in bytes
|
||||
* @param hashlen Hash size in bytes
|
||||
* @param type The argon2_type that we want the encoded length for
|
||||
* @return The encoded hash length in bytes
|
||||
*/
|
||||
ARGON2_PUBLIC size_t argon2_encodedlen(uint32_t t_cost, uint32_t m_cost,
|
||||
uint32_t parallelism, uint32_t saltlen,
|
||||
uint32_t hashlen, argon2_type type);
|
||||
|
||||
/* signals availability of argon2_select_impl: */
|
||||
#define ARGON2_SELECTABLE_IMPL
|
||||
|
||||
/**
|
||||
* Selects the fastest available optimized implementation.
|
||||
* @param out The file for debug output (e. g. stderr; pass NULL for no
|
||||
* debug output)
|
||||
* @param prefix What to print before each line; NULL is equivalent to empty
|
||||
* string
|
||||
*/
|
||||
ARGON2_PUBLIC void argon2_select_impl();
|
||||
ARGON2_PUBLIC const char *argon2_get_impl_name();
|
||||
ARGON2_PUBLIC int argon2_select_impl_by_name(const char *name);
|
||||
|
||||
/* signals support for passing preallocated memory: */
|
||||
#define ARGON2_PREALLOCATED_MEMORY
|
||||
|
||||
ARGON2_PUBLIC size_t argon2_memory_size(uint32_t m_cost, uint32_t parallelism);
|
||||
|
||||
/**
|
||||
* Function that performs memory-hard hashing with certain degree of parallelism
|
||||
* @param context Pointer to the Argon2 internal structure
|
||||
* @param type The Argon2 type
|
||||
* @param memory Preallocated memory for blocks (or NULL)
|
||||
* @param memory_size The size of preallocated memory
|
||||
* @return Error code if smth is wrong, ARGON2_OK otherwise
|
||||
*/
|
||||
ARGON2_PUBLIC int argon2_ctx_mem(argon2_context *context, argon2_type type,
|
||||
void *memory, size_t memory_size);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
192
src/3rdparty/argon2/lib/argon2-template-64.h
vendored
Normal file
192
src/3rdparty/argon2/lib/argon2-template-64.h
vendored
Normal file
@@ -0,0 +1,192 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "core.h"
|
||||
|
||||
#define MASK_32 UINT64_C(0xFFFFFFFF)
|
||||
|
||||
#define F(x, y) ((x) + (y) + 2 * ((x) & MASK_32) * ((y) & MASK_32))
|
||||
|
||||
#define G(a, b, c, d) \
|
||||
do { \
|
||||
a = F(a, b); \
|
||||
d = rotr64(d ^ a, 32); \
|
||||
c = F(c, d); \
|
||||
b = rotr64(b ^ c, 24); \
|
||||
a = F(a, b); \
|
||||
d = rotr64(d ^ a, 16); \
|
||||
c = F(c, d); \
|
||||
b = rotr64(b ^ c, 63); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define BLAKE2_ROUND_NOMSG(v0, v1, v2, v3, v4, v5, v6, v7, \
|
||||
v8, v9, v10, v11, v12, v13, v14, v15) \
|
||||
do { \
|
||||
G(v0, v4, v8, v12); \
|
||||
G(v1, v5, v9, v13); \
|
||||
G(v2, v6, v10, v14); \
|
||||
G(v3, v7, v11, v15); \
|
||||
G(v0, v5, v10, v15); \
|
||||
G(v1, v6, v11, v12); \
|
||||
G(v2, v7, v8, v13); \
|
||||
G(v3, v4, v9, v14); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define BLAKE2_ROUND_NOMSG1(v) \
|
||||
BLAKE2_ROUND_NOMSG( \
|
||||
(v)[ 0], (v)[ 1], (v)[ 2], (v)[ 3], \
|
||||
(v)[ 4], (v)[ 5], (v)[ 6], (v)[ 7], \
|
||||
(v)[ 8], (v)[ 9], (v)[10], (v)[11], \
|
||||
(v)[12], (v)[13], (v)[14], (v)[15])
|
||||
|
||||
#define BLAKE2_ROUND_NOMSG2(v) \
|
||||
BLAKE2_ROUND_NOMSG( \
|
||||
(v)[ 0], (v)[ 1], (v)[ 16], (v)[ 17], \
|
||||
(v)[ 32], (v)[ 33], (v)[ 48], (v)[ 49], \
|
||||
(v)[ 64], (v)[ 65], (v)[ 80], (v)[ 81], \
|
||||
(v)[ 96], (v)[ 97], (v)[112], (v)[113])
|
||||
|
||||
static void fill_block(const block *prev_block, const block *ref_block,
|
||||
block *next_block, int with_xor)
|
||||
{
|
||||
block blockR, block_tmp;
|
||||
|
||||
copy_block(&blockR, ref_block);
|
||||
xor_block(&blockR, prev_block);
|
||||
copy_block(&block_tmp, &blockR);
|
||||
if (with_xor) {
|
||||
xor_block(&block_tmp, next_block);
|
||||
}
|
||||
|
||||
/* Apply Blake2 on columns of 64-bit words: (0,1,...,15) , then
|
||||
(16,17,..31)... finally (112,113,...127) */
|
||||
BLAKE2_ROUND_NOMSG1(blockR.v + 0 * 16);
|
||||
BLAKE2_ROUND_NOMSG1(blockR.v + 1 * 16);
|
||||
BLAKE2_ROUND_NOMSG1(blockR.v + 2 * 16);
|
||||
BLAKE2_ROUND_NOMSG1(blockR.v + 3 * 16);
|
||||
BLAKE2_ROUND_NOMSG1(blockR.v + 4 * 16);
|
||||
BLAKE2_ROUND_NOMSG1(blockR.v + 5 * 16);
|
||||
BLAKE2_ROUND_NOMSG1(blockR.v + 6 * 16);
|
||||
BLAKE2_ROUND_NOMSG1(blockR.v + 7 * 16);
|
||||
|
||||
/* Apply Blake2 on rows of 64-bit words: (0,1,16,17,...112,113), then
|
||||
(2,3,18,19,...,114,115).. finally (14,15,30,31,...,126,127) */
|
||||
BLAKE2_ROUND_NOMSG2(blockR.v + 0 * 2);
|
||||
BLAKE2_ROUND_NOMSG2(blockR.v + 1 * 2);
|
||||
BLAKE2_ROUND_NOMSG2(blockR.v + 2 * 2);
|
||||
BLAKE2_ROUND_NOMSG2(blockR.v + 3 * 2);
|
||||
BLAKE2_ROUND_NOMSG2(blockR.v + 4 * 2);
|
||||
BLAKE2_ROUND_NOMSG2(blockR.v + 5 * 2);
|
||||
BLAKE2_ROUND_NOMSG2(blockR.v + 6 * 2);
|
||||
BLAKE2_ROUND_NOMSG2(blockR.v + 7 * 2);
|
||||
|
||||
copy_block(next_block, &block_tmp);
|
||||
xor_block(next_block, &blockR);
|
||||
}
|
||||
|
||||
static void next_addresses(block *address_block, block *input_block,
|
||||
const block *zero_block)
|
||||
{
|
||||
input_block->v[6]++;
|
||||
fill_block(zero_block, input_block, address_block, 0);
|
||||
fill_block(zero_block, address_block, address_block, 0);
|
||||
}
|
||||
|
||||
static void fill_segment_64(const argon2_instance_t *instance,
|
||||
argon2_position_t position)
|
||||
{
|
||||
block *ref_block, *curr_block, *prev_block;
|
||||
block address_block, input_block, zero_block;
|
||||
uint64_t pseudo_rand, ref_index, ref_lane;
|
||||
uint32_t prev_offset, curr_offset;
|
||||
uint32_t starting_index, i;
|
||||
int data_independent_addressing;
|
||||
|
||||
if (instance == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
data_independent_addressing = (instance->type == Argon2_i) ||
|
||||
(instance->type == Argon2_id && (position.pass == 0) &&
|
||||
(position.slice < ARGON2_SYNC_POINTS / 2));
|
||||
|
||||
if (data_independent_addressing) {
|
||||
init_block_value(&zero_block, 0);
|
||||
init_block_value(&input_block, 0);
|
||||
|
||||
input_block.v[0] = position.pass;
|
||||
input_block.v[1] = position.lane;
|
||||
input_block.v[2] = position.slice;
|
||||
input_block.v[3] = instance->memory_blocks;
|
||||
input_block.v[4] = instance->passes;
|
||||
input_block.v[5] = instance->type;
|
||||
}
|
||||
|
||||
starting_index = 0;
|
||||
|
||||
if ((0 == position.pass) && (0 == position.slice)) {
|
||||
starting_index = 2; /* we have already generated the first two blocks */
|
||||
|
||||
/* Don't forget to generate the first block of addresses: */
|
||||
if (data_independent_addressing) {
|
||||
next_addresses(&address_block, &input_block, &zero_block);
|
||||
}
|
||||
}
|
||||
|
||||
/* Offset of the current block */
|
||||
curr_offset = position.lane * instance->lane_length +
|
||||
position.slice * instance->segment_length + starting_index;
|
||||
|
||||
if (0 == curr_offset % instance->lane_length) {
|
||||
/* Last block in this lane */
|
||||
prev_offset = curr_offset + instance->lane_length - 1;
|
||||
} else {
|
||||
/* Previous block */
|
||||
prev_offset = curr_offset - 1;
|
||||
}
|
||||
|
||||
for (i = starting_index; i < instance->segment_length;
|
||||
++i, ++curr_offset, ++prev_offset) {
|
||||
/*1.1 Rotating prev_offset if needed */
|
||||
if (curr_offset % instance->lane_length == 1) {
|
||||
prev_offset = curr_offset - 1;
|
||||
}
|
||||
|
||||
/* 1.2 Computing the index of the reference block */
|
||||
/* 1.2.1 Taking pseudo-random value from the previous block */
|
||||
if (data_independent_addressing) {
|
||||
if (i % ARGON2_ADDRESSES_IN_BLOCK == 0) {
|
||||
next_addresses(&address_block, &input_block, &zero_block);
|
||||
}
|
||||
pseudo_rand = address_block.v[i % ARGON2_ADDRESSES_IN_BLOCK];
|
||||
} else {
|
||||
pseudo_rand = instance->memory[prev_offset].v[0];
|
||||
}
|
||||
|
||||
/* 1.2.2 Computing the lane of the reference block */
|
||||
ref_lane = ((pseudo_rand >> 32)) % instance->lanes;
|
||||
|
||||
if ((position.pass == 0) && (position.slice == 0)) {
|
||||
/* Can not reference other lanes yet */
|
||||
ref_lane = position.lane;
|
||||
}
|
||||
|
||||
/* 1.2.3 Computing the number of possible reference block within the
|
||||
* lane.
|
||||
*/
|
||||
position.index = i;
|
||||
ref_index = xmrig_ar2_index_alpha(instance, &position, pseudo_rand & 0xFFFFFFFF, ref_lane == position.lane);
|
||||
|
||||
/* 2 Creating a new block */
|
||||
ref_block =
|
||||
instance->memory + instance->lane_length * ref_lane + ref_index;
|
||||
curr_block = instance->memory + curr_offset;
|
||||
prev_block = instance->memory + prev_offset;
|
||||
|
||||
/* version 1.2.1 and earlier: overwrite, not XOR */
|
||||
if (0 == position.pass || ARGON2_VERSION_10 == instance->version) {
|
||||
fill_block(prev_block, ref_block, curr_block, 0);
|
||||
} else {
|
||||
fill_block(prev_block, ref_block, curr_block, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
504
src/3rdparty/argon2/lib/argon2.c
vendored
Normal file
504
src/3rdparty/argon2/lib/argon2.c
vendored
Normal file
@@ -0,0 +1,504 @@
|
||||
/*
|
||||
* Argon2 source code package
|
||||
*
|
||||
* Written by Daniel Dinu and Dmitry Khovratovich, 2015
|
||||
*
|
||||
* This work is licensed under a Creative Commons CC0 1.0 License/Waiver.
|
||||
*
|
||||
* You should have received a copy of the CC0 Public Domain Dedication along
|
||||
* with
|
||||
* this software. If not, see
|
||||
* <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "3rdparty/argon2.h"
|
||||
#include "encoding.h"
|
||||
#include "core.h"
|
||||
|
||||
const char *argon2_type2string(argon2_type type, int uppercase) {
|
||||
switch (type) {
|
||||
case Argon2_d:
|
||||
return uppercase ? "Argon2d" : "argon2d";
|
||||
case Argon2_i:
|
||||
return uppercase ? "Argon2i" : "argon2i";
|
||||
case Argon2_id:
|
||||
return uppercase ? "Argon2id" : "argon2id";
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void argon2_compute_memory_blocks(uint32_t *memory_blocks,
|
||||
uint32_t *segment_length,
|
||||
uint32_t m_cost, uint32_t lanes)
|
||||
{
|
||||
/* Minimum memory_blocks = 8L blocks, where L is the number of lanes */
|
||||
*memory_blocks = m_cost;
|
||||
if (*memory_blocks < 2 * ARGON2_SYNC_POINTS * lanes) {
|
||||
*memory_blocks = 2 * ARGON2_SYNC_POINTS * lanes;
|
||||
}
|
||||
|
||||
*segment_length = *memory_blocks / (lanes * ARGON2_SYNC_POINTS);
|
||||
/* Ensure that all segments have equal length */
|
||||
*memory_blocks = *segment_length * (lanes * ARGON2_SYNC_POINTS);
|
||||
}
|
||||
|
||||
size_t argon2_memory_size(uint32_t m_cost, uint32_t parallelism) {
|
||||
uint32_t memory_blocks, segment_length;
|
||||
argon2_compute_memory_blocks(&memory_blocks, &segment_length, m_cost,
|
||||
parallelism);
|
||||
return memory_blocks * ARGON2_BLOCK_SIZE;
|
||||
}
|
||||
|
||||
int argon2_ctx_mem(argon2_context *context, argon2_type type, void *memory,
|
||||
size_t memory_size) {
|
||||
/* 1. Validate all inputs */
|
||||
int result = xmrig_ar2_validate_inputs(context);
|
||||
uint32_t memory_blocks, segment_length;
|
||||
argon2_instance_t instance;
|
||||
|
||||
if (ARGON2_OK != result) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (Argon2_d != type && Argon2_i != type && Argon2_id != type) {
|
||||
return ARGON2_INCORRECT_TYPE;
|
||||
}
|
||||
|
||||
/* 2. Align memory size */
|
||||
argon2_compute_memory_blocks(&memory_blocks, &segment_length,
|
||||
context->m_cost, context->lanes);
|
||||
|
||||
/* check for sufficient memory size: */
|
||||
if (memory != NULL && (memory_size % ARGON2_BLOCK_SIZE != 0 ||
|
||||
memory_size / ARGON2_BLOCK_SIZE < memory_blocks)) {
|
||||
return ARGON2_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
|
||||
instance.version = context->version;
|
||||
instance.memory = (block *)memory;
|
||||
instance.passes = context->t_cost;
|
||||
instance.memory_blocks = memory_blocks;
|
||||
instance.segment_length = segment_length;
|
||||
instance.lane_length = segment_length * ARGON2_SYNC_POINTS;
|
||||
instance.lanes = context->lanes;
|
||||
instance.threads = context->threads;
|
||||
instance.type = type;
|
||||
instance.print_internals = !!(context->flags & ARGON2_FLAG_GENKAT);
|
||||
instance.keep_memory = memory != NULL;
|
||||
|
||||
if (instance.threads > instance.lanes) {
|
||||
instance.threads = instance.lanes;
|
||||
}
|
||||
|
||||
/* 3. Initialization: Hashing inputs, allocating memory, filling first
|
||||
* blocks
|
||||
*/
|
||||
result = xmrig_ar2_initialize(&instance, context);
|
||||
|
||||
if (ARGON2_OK != result) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 4. Filling memory */
|
||||
result = xmrig_ar2_fill_memory_blocks(&instance);
|
||||
|
||||
if (ARGON2_OK != result) {
|
||||
return result;
|
||||
}
|
||||
/* 5. Finalization */
|
||||
xmrig_ar2_finalize(context, &instance);
|
||||
|
||||
return ARGON2_OK;
|
||||
}
|
||||
|
||||
int argon2_ctx(argon2_context *context, argon2_type type) {
|
||||
return argon2_ctx_mem(context, type, NULL, 0);
|
||||
}
|
||||
|
||||
int argon2_hash(const uint32_t t_cost, const uint32_t m_cost,
|
||||
const uint32_t parallelism, const void *pwd,
|
||||
const size_t pwdlen, const void *salt, const size_t saltlen,
|
||||
void *hash, const size_t hashlen, char *encoded,
|
||||
const size_t encodedlen, argon2_type type,
|
||||
const uint32_t version){
|
||||
|
||||
argon2_context context;
|
||||
int result;
|
||||
uint8_t *out;
|
||||
|
||||
if (pwdlen > ARGON2_MAX_PWD_LENGTH) {
|
||||
return ARGON2_PWD_TOO_LONG;
|
||||
}
|
||||
|
||||
if (saltlen > ARGON2_MAX_SALT_LENGTH) {
|
||||
return ARGON2_SALT_TOO_LONG;
|
||||
}
|
||||
|
||||
if (hashlen > ARGON2_MAX_OUTLEN) {
|
||||
return ARGON2_OUTPUT_TOO_LONG;
|
||||
}
|
||||
|
||||
if (hashlen < ARGON2_MIN_OUTLEN) {
|
||||
return ARGON2_OUTPUT_TOO_SHORT;
|
||||
}
|
||||
|
||||
out = malloc(hashlen);
|
||||
if (!out) {
|
||||
return ARGON2_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
|
||||
context.out = (uint8_t *)out;
|
||||
context.outlen = (uint32_t)hashlen;
|
||||
context.pwd = CONST_CAST(uint8_t *)pwd;
|
||||
context.pwdlen = (uint32_t)pwdlen;
|
||||
context.salt = CONST_CAST(uint8_t *)salt;
|
||||
context.saltlen = (uint32_t)saltlen;
|
||||
context.secret = NULL;
|
||||
context.secretlen = 0;
|
||||
context.ad = NULL;
|
||||
context.adlen = 0;
|
||||
context.t_cost = t_cost;
|
||||
context.m_cost = m_cost;
|
||||
context.lanes = parallelism;
|
||||
context.threads = parallelism;
|
||||
context.allocate_cbk = NULL;
|
||||
context.free_cbk = NULL;
|
||||
context.flags = ARGON2_DEFAULT_FLAGS;
|
||||
context.version = version;
|
||||
|
||||
result = argon2_ctx(&context, type);
|
||||
|
||||
if (result != ARGON2_OK) {
|
||||
xmrig_ar2_clear_internal_memory(out, hashlen);
|
||||
free(out);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* if raw hash requested, write it */
|
||||
if (hash) {
|
||||
memcpy(hash, out, hashlen);
|
||||
}
|
||||
|
||||
/* if encoding requested, write it */
|
||||
if (encoded && encodedlen) {
|
||||
if (encode_string(encoded, encodedlen, &context, type) != ARGON2_OK) {
|
||||
xmrig_ar2_clear_internal_memory(out, hashlen); /* wipe buffers if error */
|
||||
xmrig_ar2_clear_internal_memory(encoded, encodedlen);
|
||||
free(out);
|
||||
return ARGON2_ENCODING_FAIL;
|
||||
}
|
||||
}
|
||||
xmrig_ar2_clear_internal_memory(out, hashlen);
|
||||
free(out);
|
||||
|
||||
return ARGON2_OK;
|
||||
}
|
||||
|
||||
int argon2i_hash_encoded(const uint32_t t_cost, const uint32_t m_cost,
|
||||
const uint32_t parallelism, const void *pwd,
|
||||
const size_t pwdlen, const void *salt,
|
||||
const size_t saltlen, const size_t hashlen,
|
||||
char *encoded, const size_t encodedlen) {
|
||||
|
||||
return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen,
|
||||
NULL, hashlen, encoded, encodedlen, Argon2_i,
|
||||
ARGON2_VERSION_NUMBER);
|
||||
}
|
||||
|
||||
int argon2i_hash_raw(const uint32_t t_cost, const uint32_t m_cost,
|
||||
const uint32_t parallelism, const void *pwd,
|
||||
const size_t pwdlen, const void *salt,
|
||||
const size_t saltlen, void *hash, const size_t hashlen) {
|
||||
|
||||
return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen,
|
||||
hash, hashlen, NULL, 0, Argon2_i, ARGON2_VERSION_NUMBER);
|
||||
}
|
||||
|
||||
int argon2d_hash_encoded(const uint32_t t_cost, const uint32_t m_cost,
|
||||
const uint32_t parallelism, const void *pwd,
|
||||
const size_t pwdlen, const void *salt,
|
||||
const size_t saltlen, const size_t hashlen,
|
||||
char *encoded, const size_t encodedlen) {
|
||||
|
||||
return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen,
|
||||
NULL, hashlen, encoded, encodedlen, Argon2_d,
|
||||
ARGON2_VERSION_NUMBER);
|
||||
}
|
||||
|
||||
int argon2d_hash_raw(const uint32_t t_cost, const uint32_t m_cost,
|
||||
const uint32_t parallelism, const void *pwd,
|
||||
const size_t pwdlen, const void *salt,
|
||||
const size_t saltlen, void *hash, const size_t hashlen) {
|
||||
|
||||
return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen,
|
||||
hash, hashlen, NULL, 0, Argon2_d, ARGON2_VERSION_NUMBER);
|
||||
}
|
||||
|
||||
int argon2id_hash_encoded(const uint32_t t_cost, const uint32_t m_cost,
|
||||
const uint32_t parallelism, const void *pwd,
|
||||
const size_t pwdlen, const void *salt,
|
||||
const size_t saltlen, const size_t hashlen,
|
||||
char *encoded, const size_t encodedlen) {
|
||||
|
||||
return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen,
|
||||
NULL, hashlen, encoded, encodedlen, Argon2_id,
|
||||
ARGON2_VERSION_NUMBER);
|
||||
}
|
||||
|
||||
int argon2id_hash_raw(const uint32_t t_cost, const uint32_t m_cost,
|
||||
const uint32_t parallelism, const void *pwd,
|
||||
const size_t pwdlen, const void *salt,
|
||||
const size_t saltlen, void *hash, const size_t hashlen) {
|
||||
return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen,
|
||||
hash, hashlen, NULL, 0, Argon2_id,
|
||||
ARGON2_VERSION_NUMBER);
|
||||
}
|
||||
|
||||
int argon2id_hash_raw_ex(const uint32_t t_cost, const uint32_t m_cost,
|
||||
const uint32_t parallelism, const void *pwd,
|
||||
const size_t pwdlen, const void *salt,
|
||||
const size_t saltlen, void *hash, const size_t hashlen, void *memory) {
|
||||
argon2_context context;
|
||||
|
||||
context.out = (uint8_t *)hash;
|
||||
context.outlen = (uint32_t)hashlen;
|
||||
context.pwd = CONST_CAST(uint8_t *)pwd;
|
||||
context.pwdlen = (uint32_t)pwdlen;
|
||||
context.salt = CONST_CAST(uint8_t *)salt;
|
||||
context.saltlen = (uint32_t)saltlen;
|
||||
context.secret = NULL;
|
||||
context.secretlen = 0;
|
||||
context.ad = NULL;
|
||||
context.adlen = 0;
|
||||
context.t_cost = t_cost;
|
||||
context.m_cost = m_cost;
|
||||
context.lanes = parallelism;
|
||||
context.threads = parallelism;
|
||||
context.allocate_cbk = NULL;
|
||||
context.free_cbk = NULL;
|
||||
context.flags = ARGON2_DEFAULT_FLAGS;
|
||||
context.version = ARGON2_VERSION_NUMBER;
|
||||
|
||||
return argon2_ctx_mem(&context, Argon2_id, memory, m_cost * 1024);
|
||||
}
|
||||
|
||||
static int argon2_compare(const uint8_t *b1, const uint8_t *b2, size_t len) {
|
||||
size_t i;
|
||||
uint8_t d = 0U;
|
||||
|
||||
for (i = 0U; i < len; i++) {
|
||||
d |= b1[i] ^ b2[i];
|
||||
}
|
||||
return (int)((1 & ((d - 1) >> 8)) - 1);
|
||||
}
|
||||
|
||||
int argon2_verify(const char *encoded, const void *pwd, const size_t pwdlen,
|
||||
argon2_type type) {
|
||||
|
||||
argon2_context ctx;
|
||||
uint8_t *desired_result = NULL;
|
||||
|
||||
int ret = ARGON2_OK;
|
||||
|
||||
size_t encoded_len;
|
||||
uint32_t max_field_len;
|
||||
|
||||
if (pwdlen > ARGON2_MAX_PWD_LENGTH) {
|
||||
return ARGON2_PWD_TOO_LONG;
|
||||
}
|
||||
|
||||
if (encoded == NULL) {
|
||||
return ARGON2_DECODING_FAIL;
|
||||
}
|
||||
|
||||
encoded_len = strlen(encoded);
|
||||
if (encoded_len > UINT32_MAX) {
|
||||
return ARGON2_DECODING_FAIL;
|
||||
}
|
||||
|
||||
/* No field can be longer than the encoded length */
|
||||
max_field_len = (uint32_t)encoded_len;
|
||||
|
||||
ctx.saltlen = max_field_len;
|
||||
ctx.outlen = max_field_len;
|
||||
|
||||
ctx.salt = malloc(ctx.saltlen);
|
||||
ctx.out = malloc(ctx.outlen);
|
||||
if (!ctx.salt || !ctx.out) {
|
||||
ret = ARGON2_MEMORY_ALLOCATION_ERROR;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ctx.pwd = (uint8_t *)pwd;
|
||||
ctx.pwdlen = (uint32_t)pwdlen;
|
||||
|
||||
ret = decode_string(&ctx, encoded, type);
|
||||
if (ret != ARGON2_OK) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* Set aside the desired result, and get a new buffer. */
|
||||
desired_result = ctx.out;
|
||||
ctx.out = malloc(ctx.outlen);
|
||||
if (!ctx.out) {
|
||||
ret = ARGON2_MEMORY_ALLOCATION_ERROR;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = argon2_verify_ctx(&ctx, (char *)desired_result, type);
|
||||
if (ret != ARGON2_OK) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
fail:
|
||||
free(ctx.salt);
|
||||
free(ctx.out);
|
||||
free(desired_result);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int argon2i_verify(const char *encoded, const void *pwd, const size_t pwdlen) {
|
||||
|
||||
return argon2_verify(encoded, pwd, pwdlen, Argon2_i);
|
||||
}
|
||||
|
||||
int argon2d_verify(const char *encoded, const void *pwd, const size_t pwdlen) {
|
||||
|
||||
return argon2_verify(encoded, pwd, pwdlen, Argon2_d);
|
||||
}
|
||||
|
||||
int argon2id_verify(const char *encoded, const void *pwd, const size_t pwdlen) {
|
||||
|
||||
return argon2_verify(encoded, pwd, pwdlen, Argon2_id);
|
||||
}
|
||||
|
||||
int argon2d_ctx(argon2_context *context) {
|
||||
return argon2_ctx(context, Argon2_d);
|
||||
}
|
||||
|
||||
int argon2i_ctx(argon2_context *context) {
|
||||
return argon2_ctx(context, Argon2_i);
|
||||
}
|
||||
|
||||
int argon2id_ctx(argon2_context *context) {
|
||||
return argon2_ctx(context, Argon2_id);
|
||||
}
|
||||
|
||||
int argon2_verify_ctx(argon2_context *context, const char *hash,
|
||||
argon2_type type) {
|
||||
int ret = argon2_ctx(context, type);
|
||||
if (ret != ARGON2_OK) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (argon2_compare((uint8_t *)hash, context->out, context->outlen)) {
|
||||
return ARGON2_VERIFY_MISMATCH;
|
||||
}
|
||||
|
||||
return ARGON2_OK;
|
||||
}
|
||||
|
||||
int argon2d_verify_ctx(argon2_context *context, const char *hash) {
|
||||
return argon2_verify_ctx(context, hash, Argon2_d);
|
||||
}
|
||||
|
||||
int argon2i_verify_ctx(argon2_context *context, const char *hash) {
|
||||
return argon2_verify_ctx(context, hash, Argon2_i);
|
||||
}
|
||||
|
||||
int argon2id_verify_ctx(argon2_context *context, const char *hash) {
|
||||
return argon2_verify_ctx(context, hash, Argon2_id);
|
||||
}
|
||||
|
||||
const char *argon2_error_message(int error_code) {
|
||||
switch (error_code) {
|
||||
case ARGON2_OK:
|
||||
return "OK";
|
||||
case ARGON2_OUTPUT_PTR_NULL:
|
||||
return "Output pointer is NULL";
|
||||
case ARGON2_OUTPUT_TOO_SHORT:
|
||||
return "Output is too short";
|
||||
case ARGON2_OUTPUT_TOO_LONG:
|
||||
return "Output is too long";
|
||||
case ARGON2_PWD_TOO_SHORT:
|
||||
return "Password is too short";
|
||||
case ARGON2_PWD_TOO_LONG:
|
||||
return "Password is too long";
|
||||
case ARGON2_SALT_TOO_SHORT:
|
||||
return "Salt is too short";
|
||||
case ARGON2_SALT_TOO_LONG:
|
||||
return "Salt is too long";
|
||||
case ARGON2_AD_TOO_SHORT:
|
||||
return "Associated data is too short";
|
||||
case ARGON2_AD_TOO_LONG:
|
||||
return "Associated data is too long";
|
||||
case ARGON2_SECRET_TOO_SHORT:
|
||||
return "Secret is too short";
|
||||
case ARGON2_SECRET_TOO_LONG:
|
||||
return "Secret is too long";
|
||||
case ARGON2_TIME_TOO_SMALL:
|
||||
return "Time cost is too small";
|
||||
case ARGON2_TIME_TOO_LARGE:
|
||||
return "Time cost is too large";
|
||||
case ARGON2_MEMORY_TOO_LITTLE:
|
||||
return "Memory cost is too small";
|
||||
case ARGON2_MEMORY_TOO_MUCH:
|
||||
return "Memory cost is too large";
|
||||
case ARGON2_LANES_TOO_FEW:
|
||||
return "Too few lanes";
|
||||
case ARGON2_LANES_TOO_MANY:
|
||||
return "Too many lanes";
|
||||
case ARGON2_PWD_PTR_MISMATCH:
|
||||
return "Password pointer is NULL, but password length is not 0";
|
||||
case ARGON2_SALT_PTR_MISMATCH:
|
||||
return "Salt pointer is NULL, but salt length is not 0";
|
||||
case ARGON2_SECRET_PTR_MISMATCH:
|
||||
return "Secret pointer is NULL, but secret length is not 0";
|
||||
case ARGON2_AD_PTR_MISMATCH:
|
||||
return "Associated data pointer is NULL, but ad length is not 0";
|
||||
case ARGON2_MEMORY_ALLOCATION_ERROR:
|
||||
return "Memory allocation error";
|
||||
case ARGON2_FREE_MEMORY_CBK_NULL:
|
||||
return "The free memory callback is NULL";
|
||||
case ARGON2_ALLOCATE_MEMORY_CBK_NULL:
|
||||
return "The allocate memory callback is NULL";
|
||||
case ARGON2_INCORRECT_PARAMETER:
|
||||
return "Argon2_Context context is NULL";
|
||||
case ARGON2_INCORRECT_TYPE:
|
||||
return "There is no such version of Argon2";
|
||||
case ARGON2_OUT_PTR_MISMATCH:
|
||||
return "Output pointer mismatch";
|
||||
case ARGON2_THREADS_TOO_FEW:
|
||||
return "Not enough threads";
|
||||
case ARGON2_THREADS_TOO_MANY:
|
||||
return "Too many threads";
|
||||
case ARGON2_MISSING_ARGS:
|
||||
return "Missing arguments";
|
||||
case ARGON2_ENCODING_FAIL:
|
||||
return "Encoding failed";
|
||||
case ARGON2_DECODING_FAIL:
|
||||
return "Decoding failed";
|
||||
case ARGON2_THREAD_FAIL:
|
||||
return "Threading failure";
|
||||
case ARGON2_DECODING_LENGTH_FAIL:
|
||||
return "Some of encoded parameters are too long or too short";
|
||||
case ARGON2_VERIFY_MISMATCH:
|
||||
return "The password does not match the supplied hash";
|
||||
default:
|
||||
return "Unknown error code";
|
||||
}
|
||||
}
|
||||
|
||||
size_t argon2_encodedlen(uint32_t t_cost, uint32_t m_cost, uint32_t parallelism,
|
||||
uint32_t saltlen, uint32_t hashlen, argon2_type type) {
|
||||
return strlen("$$v=$m=,t=,p=$$") + strlen(argon2_type2string(type, 0)) +
|
||||
numlen(t_cost) + numlen(m_cost) + numlen(parallelism) +
|
||||
b64len(saltlen) + b64len(hashlen) + numlen(ARGON2_VERSION_NUMBER) +
|
||||
1;
|
||||
}
|
||||
90
src/3rdparty/argon2/lib/blake2/blake2-impl.h
vendored
Normal file
90
src/3rdparty/argon2/lib/blake2/blake2-impl.h
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
#ifndef ARGON2_BLAKE2_IMPL_H
|
||||
#define ARGON2_BLAKE2_IMPL_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* Argon2 Team - Begin Code */
|
||||
/*
|
||||
Not an exhaustive list, but should cover the majority of modern platforms
|
||||
Additionally, the code will always be correct---this is only a performance
|
||||
tweak.
|
||||
*/
|
||||
#if (defined(__BYTE_ORDER__) && \
|
||||
(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) || \
|
||||
defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__MIPSEL__) || \
|
||||
defined(__AARCH64EL__) || defined(__amd64__) || defined(__i386__) || \
|
||||
defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) || \
|
||||
defined(_M_ARM)
|
||||
#define NATIVE_LITTLE_ENDIAN
|
||||
#endif
|
||||
/* Argon2 Team - End Code */
|
||||
|
||||
static inline uint32_t load32(const void *src) {
|
||||
#if defined(NATIVE_LITTLE_ENDIAN)
|
||||
return *(const uint32_t *)src;
|
||||
#else
|
||||
const uint8_t *p = (const uint8_t *)src;
|
||||
uint32_t w = *p++;
|
||||
w |= (uint32_t)(*p++) << 8;
|
||||
w |= (uint32_t)(*p++) << 16;
|
||||
w |= (uint32_t)(*p++) << 24;
|
||||
return w;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline uint64_t load64(const void *src) {
|
||||
#if defined(NATIVE_LITTLE_ENDIAN)
|
||||
return *(const uint64_t *)src;
|
||||
#else
|
||||
const uint8_t *p = (const uint8_t *)src;
|
||||
uint64_t w = *p++;
|
||||
w |= (uint64_t)(*p++) << 8;
|
||||
w |= (uint64_t)(*p++) << 16;
|
||||
w |= (uint64_t)(*p++) << 24;
|
||||
w |= (uint64_t)(*p++) << 32;
|
||||
w |= (uint64_t)(*p++) << 40;
|
||||
w |= (uint64_t)(*p++) << 48;
|
||||
w |= (uint64_t)(*p++) << 56;
|
||||
return w;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void store32(void *dst, uint32_t w) {
|
||||
#if defined(NATIVE_LITTLE_ENDIAN)
|
||||
*(uint32_t *)dst = w;
|
||||
#else
|
||||
uint8_t *p = (uint8_t *)dst;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void store64(void *dst, uint64_t w) {
|
||||
#if defined(NATIVE_LITTLE_ENDIAN)
|
||||
*(uint64_t *)dst = w;
|
||||
#else
|
||||
uint8_t *p = (uint8_t *)dst;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
w >>= 8;
|
||||
*p++ = (uint8_t)w;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // ARGON2_BLAKE2_IMPL_H
|
||||
225
src/3rdparty/argon2/lib/blake2/blake2.c
vendored
Normal file
225
src/3rdparty/argon2/lib/blake2/blake2.c
vendored
Normal file
@@ -0,0 +1,225 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "blake2/blake2.h"
|
||||
#include "blake2/blake2-impl.h"
|
||||
|
||||
#include "core.h"
|
||||
|
||||
static const uint64_t blake2b_IV[8] = {
|
||||
UINT64_C(0x6a09e667f3bcc908), UINT64_C(0xbb67ae8584caa73b),
|
||||
UINT64_C(0x3c6ef372fe94f82b), UINT64_C(0xa54ff53a5f1d36f1),
|
||||
UINT64_C(0x510e527fade682d1), UINT64_C(0x9b05688c2b3e6c1f),
|
||||
UINT64_C(0x1f83d9abfb41bd6b), UINT64_C(0x5be0cd19137e2179)
|
||||
};
|
||||
|
||||
#define rotr64(x, n) (((x) >> (n)) | ((x) << (64 - (n))))
|
||||
|
||||
static const unsigned int blake2b_sigma[12][16] = {
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
|
||||
{14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3},
|
||||
{11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4},
|
||||
{7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8},
|
||||
{9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13},
|
||||
{2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9},
|
||||
{12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11},
|
||||
{13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10},
|
||||
{6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5},
|
||||
{10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0},
|
||||
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
|
||||
{14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3},
|
||||
};
|
||||
|
||||
#define G(m, r, i, a, b, c, d) \
|
||||
do { \
|
||||
a = a + b + m[blake2b_sigma[r][2 * i + 0]]; \
|
||||
d = rotr64(d ^ a, 32); \
|
||||
c = c + d; \
|
||||
b = rotr64(b ^ c, 24); \
|
||||
a = a + b + m[blake2b_sigma[r][2 * i + 1]]; \
|
||||
d = rotr64(d ^ a, 16); \
|
||||
c = c + d; \
|
||||
b = rotr64(b ^ c, 63); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define ROUND(m, v, r) \
|
||||
do { \
|
||||
G(m, r, 0, v[0], v[4], v[ 8], v[12]); \
|
||||
G(m, r, 1, v[1], v[5], v[ 9], v[13]); \
|
||||
G(m, r, 2, v[2], v[6], v[10], v[14]); \
|
||||
G(m, r, 3, v[3], v[7], v[11], v[15]); \
|
||||
G(m, r, 4, v[0], v[5], v[10], v[15]); \
|
||||
G(m, r, 5, v[1], v[6], v[11], v[12]); \
|
||||
G(m, r, 6, v[2], v[7], v[ 8], v[13]); \
|
||||
G(m, r, 7, v[3], v[4], v[ 9], v[14]); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
void blake2b_compress(blake2b_state *S, const void *block, uint64_t f0)
|
||||
{
|
||||
uint64_t m[16];
|
||||
uint64_t v[16];
|
||||
|
||||
m[ 0] = load64((const uint64_t *)block + 0);
|
||||
m[ 1] = load64((const uint64_t *)block + 1);
|
||||
m[ 2] = load64((const uint64_t *)block + 2);
|
||||
m[ 3] = load64((const uint64_t *)block + 3);
|
||||
m[ 4] = load64((const uint64_t *)block + 4);
|
||||
m[ 5] = load64((const uint64_t *)block + 5);
|
||||
m[ 6] = load64((const uint64_t *)block + 6);
|
||||
m[ 7] = load64((const uint64_t *)block + 7);
|
||||
m[ 8] = load64((const uint64_t *)block + 8);
|
||||
m[ 9] = load64((const uint64_t *)block + 9);
|
||||
m[10] = load64((const uint64_t *)block + 10);
|
||||
m[11] = load64((const uint64_t *)block + 11);
|
||||
m[12] = load64((const uint64_t *)block + 12);
|
||||
m[13] = load64((const uint64_t *)block + 13);
|
||||
m[14] = load64((const uint64_t *)block + 14);
|
||||
m[15] = load64((const uint64_t *)block + 15);
|
||||
|
||||
v[ 0] = S->h[0];
|
||||
v[ 1] = S->h[1];
|
||||
v[ 2] = S->h[2];
|
||||
v[ 3] = S->h[3];
|
||||
v[ 4] = S->h[4];
|
||||
v[ 5] = S->h[5];
|
||||
v[ 6] = S->h[6];
|
||||
v[ 7] = S->h[7];
|
||||
v[ 8] = blake2b_IV[0];
|
||||
v[ 9] = blake2b_IV[1];
|
||||
v[10] = blake2b_IV[2];
|
||||
v[11] = blake2b_IV[3];
|
||||
v[12] = blake2b_IV[4] ^ S->t[0];
|
||||
v[13] = blake2b_IV[5] ^ S->t[1];
|
||||
v[14] = blake2b_IV[6] ^ f0;
|
||||
v[15] = blake2b_IV[7];
|
||||
|
||||
ROUND(m, v, 0);
|
||||
ROUND(m, v, 1);
|
||||
ROUND(m, v, 2);
|
||||
ROUND(m, v, 3);
|
||||
ROUND(m, v, 4);
|
||||
ROUND(m, v, 5);
|
||||
ROUND(m, v, 6);
|
||||
ROUND(m, v, 7);
|
||||
ROUND(m, v, 8);
|
||||
ROUND(m, v, 9);
|
||||
ROUND(m, v, 10);
|
||||
ROUND(m, v, 11);
|
||||
|
||||
S->h[0] ^= v[0] ^ v[ 8];
|
||||
S->h[1] ^= v[1] ^ v[ 9];
|
||||
S->h[2] ^= v[2] ^ v[10];
|
||||
S->h[3] ^= v[3] ^ v[11];
|
||||
S->h[4] ^= v[4] ^ v[12];
|
||||
S->h[5] ^= v[5] ^ v[13];
|
||||
S->h[6] ^= v[6] ^ v[14];
|
||||
S->h[7] ^= v[7] ^ v[15];
|
||||
}
|
||||
|
||||
static void blake2b_increment_counter(blake2b_state *S, uint64_t inc)
|
||||
{
|
||||
S->t[0] += inc;
|
||||
S->t[1] += (S->t[0] < inc);
|
||||
}
|
||||
|
||||
static void blake2b_init_state(blake2b_state *S)
|
||||
{
|
||||
memcpy(S->h, blake2b_IV, sizeof(S->h));
|
||||
S->t[1] = S->t[0] = 0;
|
||||
S->buflen = 0;
|
||||
}
|
||||
|
||||
void xmrig_ar2_blake2b_init(blake2b_state *S, size_t outlen)
|
||||
{
|
||||
blake2b_init_state(S);
|
||||
/* XOR initial state with param block: */
|
||||
S->h[0] ^= (uint64_t)outlen | (UINT64_C(1) << 16) | (UINT64_C(1) << 24);
|
||||
}
|
||||
|
||||
void xmrig_ar2_blake2b_update(blake2b_state *S, const void *in, size_t inlen)
|
||||
{
|
||||
const uint8_t *pin = (const uint8_t *)in;
|
||||
|
||||
if (S->buflen + inlen > BLAKE2B_BLOCKBYTES) {
|
||||
size_t left = S->buflen;
|
||||
size_t fill = BLAKE2B_BLOCKBYTES - left;
|
||||
memcpy(&S->buf[left], pin, fill);
|
||||
blake2b_increment_counter(S, BLAKE2B_BLOCKBYTES);
|
||||
blake2b_compress(S, S->buf, 0);
|
||||
S->buflen = 0;
|
||||
inlen -= fill;
|
||||
pin += fill;
|
||||
/* Avoid buffer copies when possible */
|
||||
while (inlen > BLAKE2B_BLOCKBYTES) {
|
||||
blake2b_increment_counter(S, BLAKE2B_BLOCKBYTES);
|
||||
blake2b_compress(S, pin, 0);
|
||||
inlen -= BLAKE2B_BLOCKBYTES;
|
||||
pin += BLAKE2B_BLOCKBYTES;
|
||||
}
|
||||
}
|
||||
memcpy(&S->buf[S->buflen], pin, inlen);
|
||||
S->buflen += inlen;
|
||||
}
|
||||
|
||||
void xmrig_ar2_blake2b_final(blake2b_state *S, void *out, size_t outlen)
|
||||
{
|
||||
uint8_t buffer[BLAKE2B_OUTBYTES] = {0};
|
||||
unsigned int i;
|
||||
|
||||
blake2b_increment_counter(S, S->buflen);
|
||||
memset(&S->buf[S->buflen], 0, BLAKE2B_BLOCKBYTES - S->buflen); /* Padding */
|
||||
blake2b_compress(S, S->buf, UINT64_C(0xFFFFFFFFFFFFFFFF));
|
||||
|
||||
for (i = 0; i < 8; ++i) { /* Output full hash to temp buffer */
|
||||
store64(buffer + i * sizeof(uint64_t), S->h[i]);
|
||||
}
|
||||
|
||||
memcpy(out, buffer, outlen);
|
||||
xmrig_ar2_clear_internal_memory(buffer, sizeof(buffer));
|
||||
xmrig_ar2_clear_internal_memory(S->buf, sizeof(S->buf));
|
||||
xmrig_ar2_clear_internal_memory(S->h, sizeof(S->h));
|
||||
}
|
||||
|
||||
void xmrig_ar2_blake2b_long(void *out, size_t outlen, const void *in, size_t inlen)
|
||||
{
|
||||
uint8_t *pout = (uint8_t *)out;
|
||||
blake2b_state blake_state;
|
||||
uint8_t outlen_bytes[sizeof(uint32_t)] = {0};
|
||||
|
||||
store32(outlen_bytes, (uint32_t)outlen);
|
||||
if (outlen <= BLAKE2B_OUTBYTES) {
|
||||
xmrig_ar2_blake2b_init(&blake_state, outlen);
|
||||
xmrig_ar2_blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes));
|
||||
xmrig_ar2_blake2b_update(&blake_state, in, inlen);
|
||||
xmrig_ar2_blake2b_final(&blake_state, pout, outlen);
|
||||
} else {
|
||||
uint32_t toproduce;
|
||||
uint8_t out_buffer[BLAKE2B_OUTBYTES];
|
||||
|
||||
xmrig_ar2_blake2b_init(&blake_state, BLAKE2B_OUTBYTES);
|
||||
xmrig_ar2_blake2b_update(&blake_state, outlen_bytes, sizeof(outlen_bytes));
|
||||
xmrig_ar2_blake2b_update(&blake_state, in, inlen);
|
||||
xmrig_ar2_blake2b_final(&blake_state, out_buffer, BLAKE2B_OUTBYTES);
|
||||
|
||||
memcpy(pout, out_buffer, BLAKE2B_OUTBYTES / 2);
|
||||
pout += BLAKE2B_OUTBYTES / 2;
|
||||
toproduce = (uint32_t)outlen - BLAKE2B_OUTBYTES / 2;
|
||||
|
||||
while (toproduce > BLAKE2B_OUTBYTES) {
|
||||
xmrig_ar2_blake2b_init(&blake_state, BLAKE2B_OUTBYTES);
|
||||
xmrig_ar2_blake2b_update(&blake_state, out_buffer, BLAKE2B_OUTBYTES);
|
||||
xmrig_ar2_blake2b_final(&blake_state, out_buffer, BLAKE2B_OUTBYTES);
|
||||
|
||||
memcpy(pout, out_buffer, BLAKE2B_OUTBYTES / 2);
|
||||
pout += BLAKE2B_OUTBYTES / 2;
|
||||
toproduce -= BLAKE2B_OUTBYTES / 2;
|
||||
}
|
||||
|
||||
xmrig_ar2_blake2b_init(&blake_state, toproduce);
|
||||
xmrig_ar2_blake2b_update(&blake_state, out_buffer, BLAKE2B_OUTBYTES);
|
||||
xmrig_ar2_blake2b_final(&blake_state, out_buffer, toproduce);
|
||||
|
||||
memcpy(pout, out_buffer, toproduce);
|
||||
|
||||
xmrig_ar2_clear_internal_memory(out_buffer, sizeof(out_buffer));
|
||||
}
|
||||
}
|
||||
30
src/3rdparty/argon2/lib/blake2/blake2.h
vendored
Normal file
30
src/3rdparty/argon2/lib/blake2/blake2.h
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef ARGON2_BLAKE2_H
|
||||
#define ARGON2_BLAKE2_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
enum blake2b_constant {
|
||||
BLAKE2B_BLOCKBYTES = 128,
|
||||
BLAKE2B_OUTBYTES = 64,
|
||||
BLAKE2B_KEYBYTES = 64,
|
||||
BLAKE2B_SALTBYTES = 16,
|
||||
BLAKE2B_PERSONALBYTES = 16
|
||||
};
|
||||
|
||||
typedef struct __blake2b_state {
|
||||
uint64_t h[8];
|
||||
uint64_t t[2];
|
||||
uint8_t buf[BLAKE2B_BLOCKBYTES];
|
||||
size_t buflen;
|
||||
} blake2b_state;
|
||||
|
||||
/* Streaming API */
|
||||
void xmrig_ar2_blake2b_init(blake2b_state *S, size_t outlen);
|
||||
void xmrig_ar2_blake2b_update(blake2b_state *S, const void *in, size_t inlen);
|
||||
void xmrig_ar2_blake2b_final(blake2b_state *S, void *out, size_t outlen);
|
||||
|
||||
void xmrig_ar2_blake2b_long(void *out, size_t outlen, const void *in, size_t inlen);
|
||||
|
||||
#endif // ARGON2_BLAKE2_H
|
||||
|
||||
526
src/3rdparty/argon2/lib/core.c
vendored
Normal file
526
src/3rdparty/argon2/lib/core.c
vendored
Normal file
@@ -0,0 +1,526 @@
|
||||
/*
|
||||
* Argon2 source code package
|
||||
*
|
||||
* Written by Daniel Dinu and Dmitry Khovratovich, 2015
|
||||
*
|
||||
* This work is licensed under a Creative Commons CC0 1.0 License/Waiver.
|
||||
*
|
||||
* You should have received a copy of the CC0 Public Domain Dedication along
|
||||
* with
|
||||
* this software. If not, see
|
||||
* <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
*/
|
||||
|
||||
/*For memory wiping*/
|
||||
#ifdef _MSC_VER
|
||||
#include <windows.h>
|
||||
#include <winbase.h> /* For SecureZeroMemory */
|
||||
#endif
|
||||
#if defined __STDC_LIB_EXT1__
|
||||
#define __STDC_WANT_LIB_EXT1__ 1
|
||||
#endif
|
||||
#define VC_GE_2005(version) (version >= 1400)
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "core.h"
|
||||
#include "blake2/blake2.h"
|
||||
#include "blake2/blake2-impl.h"
|
||||
|
||||
#include "genkat.h"
|
||||
|
||||
#if defined(__clang__)
|
||||
#if __has_attribute(optnone)
|
||||
#define NOT_OPTIMIZED __attribute__((optnone))
|
||||
#endif
|
||||
#elif defined(__GNUC__)
|
||||
#define GCC_VERSION \
|
||||
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
||||
#if GCC_VERSION >= 40400
|
||||
#define NOT_OPTIMIZED __attribute__((optimize("O0")))
|
||||
#endif
|
||||
#endif
|
||||
#ifndef NOT_OPTIMIZED
|
||||
#define NOT_OPTIMIZED
|
||||
#endif
|
||||
|
||||
/***************Instance and Position constructors**********/
|
||||
void init_block_value(block *b, uint8_t in) { memset(b->v, in, sizeof(b->v)); }
|
||||
|
||||
void copy_block(block *dst, const block *src) {
|
||||
memcpy(dst->v, src->v, sizeof(uint64_t) * ARGON2_QWORDS_IN_BLOCK);
|
||||
}
|
||||
|
||||
void xor_block(block *dst, const block *src) {
|
||||
int i;
|
||||
for (i = 0; i < ARGON2_QWORDS_IN_BLOCK; ++i) {
|
||||
dst->v[i] ^= src->v[i];
|
||||
}
|
||||
}
|
||||
|
||||
static void load_block(block *dst, const void *input) {
|
||||
unsigned i;
|
||||
for (i = 0; i < ARGON2_QWORDS_IN_BLOCK; ++i) {
|
||||
dst->v[i] = load64((const uint8_t *)input + i * sizeof(dst->v[i]));
|
||||
}
|
||||
}
|
||||
|
||||
static void store_block(void *output, const block *src) {
|
||||
unsigned i;
|
||||
for (i = 0; i < ARGON2_QWORDS_IN_BLOCK; ++i) {
|
||||
store64((uint8_t *)output + i * sizeof(src->v[i]), src->v[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/***************Memory functions*****************/
|
||||
|
||||
int xmrig_ar2_allocate_memory(const argon2_context *context, argon2_instance_t *instance) {
|
||||
size_t blocks = instance->memory_blocks;
|
||||
size_t memory_size = blocks * ARGON2_BLOCK_SIZE;
|
||||
|
||||
/* 0. Check for memory supplied by user: */
|
||||
/* NOTE: Sufficient memory size is already checked in argon2_ctx_mem() */
|
||||
if (instance->memory != NULL) {
|
||||
return ARGON2_OK;
|
||||
}
|
||||
|
||||
/* 1. Check for multiplication overflow */
|
||||
if (blocks != 0 && memory_size / ARGON2_BLOCK_SIZE != blocks) {
|
||||
return ARGON2_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
|
||||
/* 2. Try to allocate with appropriate allocator */
|
||||
if (context->allocate_cbk) {
|
||||
(context->allocate_cbk)((uint8_t **)&instance->memory, memory_size);
|
||||
} else {
|
||||
instance->memory = malloc(memory_size);
|
||||
}
|
||||
|
||||
if (instance->memory == NULL) {
|
||||
return ARGON2_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
|
||||
return ARGON2_OK;
|
||||
}
|
||||
|
||||
void xmrig_ar2_free_memory(const argon2_context *context, const argon2_instance_t *instance) {
|
||||
size_t memory_size = instance->memory_blocks * ARGON2_BLOCK_SIZE;
|
||||
|
||||
xmrig_ar2_clear_internal_memory(instance->memory, memory_size);
|
||||
|
||||
if (instance->keep_memory) {
|
||||
/* user-supplied memory -- do not free */
|
||||
return;
|
||||
}
|
||||
|
||||
if (context->free_cbk) {
|
||||
(context->free_cbk)((uint8_t *)instance->memory, memory_size);
|
||||
} else {
|
||||
free(instance->memory);
|
||||
}
|
||||
}
|
||||
|
||||
void NOT_OPTIMIZED xmrig_ar2_secure_wipe_memory(void *v, size_t n) {
|
||||
#if defined(_MSC_VER) && VC_GE_2005(_MSC_VER)
|
||||
SecureZeroMemory(v, n);
|
||||
#elif defined memset_s
|
||||
memset_s(v, n, 0, n);
|
||||
#elif defined(__OpenBSD__)
|
||||
explicit_bzero(v, n);
|
||||
#else
|
||||
static void *(*const volatile memset_sec)(void *, int, size_t) = &memset;
|
||||
memset_sec(v, 0, n);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Memory clear flag defaults to true. */
|
||||
int FLAG_clear_internal_memory = 0;
|
||||
void xmrig_ar2_clear_internal_memory(void *v, size_t n) {
|
||||
if (FLAG_clear_internal_memory && v) {
|
||||
xmrig_ar2_secure_wipe_memory(v, n);
|
||||
}
|
||||
}
|
||||
|
||||
void xmrig_ar2_finalize(const argon2_context *context, argon2_instance_t *instance) {
|
||||
if (context != NULL && instance != NULL && context->out != NULL) {
|
||||
block blockhash;
|
||||
uint32_t l;
|
||||
|
||||
copy_block(&blockhash, instance->memory + instance->lane_length - 1);
|
||||
|
||||
/* XOR the last blocks */
|
||||
for (l = 1; l < instance->lanes; ++l) {
|
||||
uint32_t last_block_in_lane =
|
||||
l * instance->lane_length + (instance->lane_length - 1);
|
||||
xor_block(&blockhash, instance->memory + last_block_in_lane);
|
||||
}
|
||||
|
||||
/* Hash the result */
|
||||
{
|
||||
uint8_t blockhash_bytes[ARGON2_BLOCK_SIZE];
|
||||
store_block(blockhash_bytes, &blockhash);
|
||||
xmrig_ar2_blake2b_long(context->out, context->outlen, blockhash_bytes, ARGON2_BLOCK_SIZE);
|
||||
/* clear blockhash and blockhash_bytes */
|
||||
xmrig_ar2_clear_internal_memory(blockhash.v, ARGON2_BLOCK_SIZE);
|
||||
xmrig_ar2_clear_internal_memory(blockhash_bytes, ARGON2_BLOCK_SIZE);
|
||||
}
|
||||
|
||||
if (instance->print_internals) {
|
||||
print_tag(context->out, context->outlen);
|
||||
}
|
||||
|
||||
xmrig_ar2_free_memory(context, instance);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t xmrig_ar2_index_alpha(const argon2_instance_t *instance, const argon2_position_t *position, uint32_t pseudo_rand, int same_lane) {
|
||||
/*
|
||||
* Pass 0:
|
||||
* This lane : all already finished segments plus already constructed
|
||||
* blocks in this segment
|
||||
* Other lanes : all already finished segments
|
||||
* Pass 1+:
|
||||
* This lane : (SYNC_POINTS - 1) last segments plus already constructed
|
||||
* blocks in this segment
|
||||
* Other lanes : (SYNC_POINTS - 1) last segments
|
||||
*/
|
||||
uint32_t reference_area_size;
|
||||
uint64_t relative_position;
|
||||
uint32_t start_position, absolute_position;
|
||||
|
||||
if (0 == position->pass) {
|
||||
/* First pass */
|
||||
if (0 == position->slice) {
|
||||
/* First slice */
|
||||
reference_area_size =
|
||||
position->index - 1; /* all but the previous */
|
||||
} else {
|
||||
if (same_lane) {
|
||||
/* The same lane => add current segment */
|
||||
reference_area_size =
|
||||
position->slice * instance->segment_length +
|
||||
position->index - 1;
|
||||
} else {
|
||||
reference_area_size =
|
||||
position->slice * instance->segment_length +
|
||||
((position->index == 0) ? (-1) : 0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* Second pass */
|
||||
if (same_lane) {
|
||||
reference_area_size = instance->lane_length -
|
||||
instance->segment_length + position->index -
|
||||
1;
|
||||
} else {
|
||||
reference_area_size = instance->lane_length -
|
||||
instance->segment_length +
|
||||
((position->index == 0) ? (-1) : 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* 1.2.4. Mapping pseudo_rand to 0..<reference_area_size-1> and produce
|
||||
* relative position */
|
||||
relative_position = pseudo_rand;
|
||||
relative_position = relative_position * relative_position >> 32;
|
||||
relative_position = reference_area_size - 1 -
|
||||
(reference_area_size * relative_position >> 32);
|
||||
|
||||
/* 1.2.5 Computing starting position */
|
||||
start_position = 0;
|
||||
|
||||
if (0 != position->pass) {
|
||||
start_position = (position->slice == ARGON2_SYNC_POINTS - 1)
|
||||
? 0
|
||||
: (position->slice + 1) * instance->segment_length;
|
||||
}
|
||||
|
||||
/* 1.2.6. Computing absolute position */
|
||||
absolute_position = (start_position + relative_position) %
|
||||
instance->lane_length; /* absolute position */
|
||||
return absolute_position;
|
||||
}
|
||||
|
||||
/* Single-threaded version for p=1 case */
|
||||
static int fill_memory_blocks_st(argon2_instance_t *instance) {
|
||||
uint32_t r, s, l;
|
||||
|
||||
for (r = 0; r < instance->passes; ++r) {
|
||||
for (s = 0; s < ARGON2_SYNC_POINTS; ++s) {
|
||||
for (l = 0; l < instance->lanes; ++l) {
|
||||
argon2_position_t position = { r, l, (uint8_t)s, 0 };
|
||||
xmrig_ar2_fill_segment(instance, position);
|
||||
}
|
||||
}
|
||||
|
||||
if (instance->print_internals) {
|
||||
internal_kat(instance, r); /* Print all memory blocks */
|
||||
}
|
||||
}
|
||||
return ARGON2_OK;
|
||||
}
|
||||
|
||||
int xmrig_ar2_fill_memory_blocks(argon2_instance_t *instance) {
|
||||
if (instance == NULL || instance->lanes == 0) {
|
||||
return ARGON2_INCORRECT_PARAMETER;
|
||||
}
|
||||
|
||||
return fill_memory_blocks_st(instance);
|
||||
}
|
||||
|
||||
int xmrig_ar2_validate_inputs(const argon2_context *context) {
|
||||
if (NULL == context) {
|
||||
return ARGON2_INCORRECT_PARAMETER;
|
||||
}
|
||||
|
||||
//if (NULL == context->out) {
|
||||
// return ARGON2_OUTPUT_PTR_NULL;
|
||||
//}
|
||||
|
||||
/* Validate output length */
|
||||
//if (ARGON2_MIN_OUTLEN > context->outlen) {
|
||||
// return ARGON2_OUTPUT_TOO_SHORT;
|
||||
//}
|
||||
|
||||
if (ARGON2_MAX_OUTLEN < context->outlen) {
|
||||
return ARGON2_OUTPUT_TOO_LONG;
|
||||
}
|
||||
|
||||
/* Validate password (required param) */
|
||||
if (NULL == context->pwd) {
|
||||
if (0 != context->pwdlen) {
|
||||
return ARGON2_PWD_PTR_MISMATCH;
|
||||
}
|
||||
}
|
||||
|
||||
if (ARGON2_MIN_PWD_LENGTH > context->pwdlen) {
|
||||
return ARGON2_PWD_TOO_SHORT;
|
||||
}
|
||||
|
||||
if (ARGON2_MAX_PWD_LENGTH < context->pwdlen) {
|
||||
return ARGON2_PWD_TOO_LONG;
|
||||
}
|
||||
|
||||
/* Validate salt (required param) */
|
||||
if (NULL == context->salt) {
|
||||
if (0 != context->saltlen) {
|
||||
return ARGON2_SALT_PTR_MISMATCH;
|
||||
}
|
||||
}
|
||||
|
||||
if (ARGON2_MIN_SALT_LENGTH > context->saltlen) {
|
||||
return ARGON2_SALT_TOO_SHORT;
|
||||
}
|
||||
|
||||
if (ARGON2_MAX_SALT_LENGTH < context->saltlen) {
|
||||
return ARGON2_SALT_TOO_LONG;
|
||||
}
|
||||
|
||||
/* Validate secret (optional param) */
|
||||
if (NULL == context->secret) {
|
||||
if (0 != context->secretlen) {
|
||||
return ARGON2_SECRET_PTR_MISMATCH;
|
||||
}
|
||||
} else {
|
||||
if (ARGON2_MIN_SECRET > context->secretlen) {
|
||||
return ARGON2_SECRET_TOO_SHORT;
|
||||
}
|
||||
if (ARGON2_MAX_SECRET < context->secretlen) {
|
||||
return ARGON2_SECRET_TOO_LONG;
|
||||
}
|
||||
}
|
||||
|
||||
/* Validate associated data (optional param) */
|
||||
if (NULL == context->ad) {
|
||||
if (0 != context->adlen) {
|
||||
return ARGON2_AD_PTR_MISMATCH;
|
||||
}
|
||||
} else {
|
||||
if (ARGON2_MIN_AD_LENGTH > context->adlen) {
|
||||
return ARGON2_AD_TOO_SHORT;
|
||||
}
|
||||
if (ARGON2_MAX_AD_LENGTH < context->adlen) {
|
||||
return ARGON2_AD_TOO_LONG;
|
||||
}
|
||||
}
|
||||
|
||||
/* Validate memory cost */
|
||||
if (ARGON2_MIN_MEMORY > context->m_cost) {
|
||||
return ARGON2_MEMORY_TOO_LITTLE;
|
||||
}
|
||||
|
||||
if (ARGON2_MAX_MEMORY < context->m_cost) {
|
||||
return ARGON2_MEMORY_TOO_MUCH;
|
||||
}
|
||||
|
||||
if (context->m_cost < 8 * context->lanes) {
|
||||
return ARGON2_MEMORY_TOO_LITTLE;
|
||||
}
|
||||
|
||||
/* Validate time cost */
|
||||
if (ARGON2_MIN_TIME > context->t_cost) {
|
||||
return ARGON2_TIME_TOO_SMALL;
|
||||
}
|
||||
|
||||
if (ARGON2_MAX_TIME < context->t_cost) {
|
||||
return ARGON2_TIME_TOO_LARGE;
|
||||
}
|
||||
|
||||
/* Validate lanes */
|
||||
if (ARGON2_MIN_LANES > context->lanes) {
|
||||
return ARGON2_LANES_TOO_FEW;
|
||||
}
|
||||
|
||||
if (ARGON2_MAX_LANES < context->lanes) {
|
||||
return ARGON2_LANES_TOO_MANY;
|
||||
}
|
||||
|
||||
/* Validate threads */
|
||||
if (ARGON2_MIN_THREADS > context->threads) {
|
||||
return ARGON2_THREADS_TOO_FEW;
|
||||
}
|
||||
|
||||
if (ARGON2_MAX_THREADS < context->threads) {
|
||||
return ARGON2_THREADS_TOO_MANY;
|
||||
}
|
||||
|
||||
if (NULL != context->allocate_cbk && NULL == context->free_cbk) {
|
||||
return ARGON2_FREE_MEMORY_CBK_NULL;
|
||||
}
|
||||
|
||||
if (NULL == context->allocate_cbk && NULL != context->free_cbk) {
|
||||
return ARGON2_ALLOCATE_MEMORY_CBK_NULL;
|
||||
}
|
||||
|
||||
return ARGON2_OK;
|
||||
}
|
||||
|
||||
void xmrig_ar2_fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance) {
|
||||
uint32_t l;
|
||||
/* Make the first and second block in each lane as G(H0||0||i) or
|
||||
G(H0||1||i) */
|
||||
uint8_t blockhash_bytes[ARGON2_BLOCK_SIZE];
|
||||
for (l = 0; l < instance->lanes; ++l) {
|
||||
|
||||
store32(blockhash + ARGON2_PREHASH_DIGEST_LENGTH, 0);
|
||||
store32(blockhash + ARGON2_PREHASH_DIGEST_LENGTH + 4, l);
|
||||
xmrig_ar2_blake2b_long(blockhash_bytes, ARGON2_BLOCK_SIZE, blockhash, ARGON2_PREHASH_SEED_LENGTH);
|
||||
load_block(&instance->memory[l * instance->lane_length + 0], blockhash_bytes);
|
||||
|
||||
store32(blockhash + ARGON2_PREHASH_DIGEST_LENGTH, 1);
|
||||
xmrig_ar2_blake2b_long(blockhash_bytes, ARGON2_BLOCK_SIZE, blockhash, ARGON2_PREHASH_SEED_LENGTH);
|
||||
load_block(&instance->memory[l * instance->lane_length + 1], blockhash_bytes);
|
||||
}
|
||||
xmrig_ar2_clear_internal_memory(blockhash_bytes, ARGON2_BLOCK_SIZE);
|
||||
}
|
||||
|
||||
void xmrig_ar2_initial_hash(uint8_t *blockhash, argon2_context *context,
|
||||
argon2_type type) {
|
||||
blake2b_state BlakeHash;
|
||||
uint8_t value[sizeof(uint32_t)];
|
||||
|
||||
if (NULL == context || NULL == blockhash) {
|
||||
return;
|
||||
}
|
||||
|
||||
xmrig_ar2_blake2b_init(&BlakeHash, ARGON2_PREHASH_DIGEST_LENGTH);
|
||||
|
||||
store32(&value, context->lanes);
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
|
||||
|
||||
store32(&value, context->outlen);
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
|
||||
|
||||
store32(&value, context->m_cost);
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
|
||||
|
||||
store32(&value, context->t_cost);
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
|
||||
|
||||
store32(&value, context->version);
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
|
||||
|
||||
store32(&value, (uint32_t)type);
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
|
||||
|
||||
store32(&value, context->pwdlen);
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
|
||||
|
||||
if (context->pwd != NULL) {
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)context->pwd,
|
||||
context->pwdlen);
|
||||
|
||||
if (context->flags & ARGON2_FLAG_CLEAR_PASSWORD) {
|
||||
xmrig_ar2_secure_wipe_memory(context->pwd, context->pwdlen);
|
||||
context->pwdlen = 0;
|
||||
}
|
||||
}
|
||||
|
||||
store32(&value, context->saltlen);
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
|
||||
|
||||
if (context->salt != NULL) {
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)context->salt,
|
||||
context->saltlen);
|
||||
}
|
||||
|
||||
store32(&value, context->secretlen);
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
|
||||
|
||||
if (context->secret != NULL) {
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)context->secret, context->secretlen);
|
||||
|
||||
if (context->flags & ARGON2_FLAG_CLEAR_SECRET) {
|
||||
xmrig_ar2_secure_wipe_memory(context->secret, context->secretlen);
|
||||
context->secretlen = 0;
|
||||
}
|
||||
}
|
||||
|
||||
store32(&value, context->adlen);
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)&value, sizeof(value));
|
||||
|
||||
if (context->ad != NULL) {
|
||||
xmrig_ar2_blake2b_update(&BlakeHash, (const uint8_t *)context->ad, context->adlen);
|
||||
}
|
||||
|
||||
xmrig_ar2_blake2b_final(&BlakeHash, blockhash, ARGON2_PREHASH_DIGEST_LENGTH);
|
||||
}
|
||||
|
||||
int xmrig_ar2_initialize(argon2_instance_t *instance, argon2_context *context) {
|
||||
uint8_t blockhash[ARGON2_PREHASH_SEED_LENGTH];
|
||||
int result = ARGON2_OK;
|
||||
|
||||
if (instance == NULL || context == NULL)
|
||||
return ARGON2_INCORRECT_PARAMETER;
|
||||
instance->context_ptr = context;
|
||||
|
||||
/* 1. Memory allocation */
|
||||
|
||||
result = xmrig_ar2_allocate_memory(context, instance);
|
||||
if (result != ARGON2_OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 2. Initial hashing */
|
||||
/* H_0 + 8 extra bytes to produce the first blocks */
|
||||
/* uint8_t blockhash[ARGON2_PREHASH_SEED_LENGTH]; */
|
||||
/* Hashing all inputs */
|
||||
xmrig_ar2_initial_hash(blockhash, context, instance->type);
|
||||
/* Zeroing 8 extra bytes */
|
||||
xmrig_ar2_clear_internal_memory(blockhash + ARGON2_PREHASH_DIGEST_LENGTH, ARGON2_PREHASH_SEED_LENGTH - ARGON2_PREHASH_DIGEST_LENGTH);
|
||||
|
||||
if (instance->print_internals) {
|
||||
initial_kat(blockhash, context, instance->type);
|
||||
}
|
||||
|
||||
/* 3. Creating first blocks, we always have at least two blocks in a slice
|
||||
*/
|
||||
xmrig_ar2_fill_first_blocks(blockhash, instance);
|
||||
/* Clearing the hash */
|
||||
xmrig_ar2_clear_internal_memory(blockhash, ARGON2_PREHASH_SEED_LENGTH);
|
||||
|
||||
return ARGON2_OK;
|
||||
}
|
||||
@@ -1,67 +1,47 @@
|
||||
/*
|
||||
Copyright (c) 2018-2019, tevador <tevador@gmail.com>
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the copyright holder nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* Original code from Argon2 reference source code package used under CC0 Licence
|
||||
* https://github.com/P-H-C/phc-winner-argon2
|
||||
* Copyright 2015
|
||||
* Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves
|
||||
*/
|
||||
* Argon2 source code package
|
||||
*
|
||||
* Written by Daniel Dinu and Dmitry Khovratovich, 2015
|
||||
*
|
||||
* This work is licensed under a Creative Commons CC0 1.0 License/Waiver.
|
||||
*
|
||||
* You should have received a copy of the CC0 Public Domain Dedication along
|
||||
* with
|
||||
* this software. If not, see
|
||||
* <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
*/
|
||||
|
||||
#ifndef ARGON2_CORE_H
|
||||
#define ARGON2_CORE_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "argon2.h"
|
||||
#include "3rdparty/argon2.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#if defined(_MSC_VER)
|
||||
#define ALIGN(n) __declspec(align(16))
|
||||
#elif defined(__GNUC__) || defined(__clang)
|
||||
#define ALIGN(x) __attribute__((__aligned__(x)))
|
||||
#else
|
||||
#define ALIGN(x)
|
||||
#endif
|
||||
|
||||
#define CONST_CAST(x) (x)(uintptr_t)
|
||||
|
||||
/**********************Argon2 internal constants*******************************/
|
||||
/**********************Argon2 internal constants*******************************/
|
||||
|
||||
enum argon2_core_constants {
|
||||
/* Memory block size in bytes */
|
||||
ARGON2_BLOCK_SIZE = 1024,
|
||||
ARGON2_QWORDS_IN_BLOCK = ARGON2_BLOCK_SIZE / 8,
|
||||
ARGON2_OWORDS_IN_BLOCK = ARGON2_BLOCK_SIZE / 16,
|
||||
ARGON2_HWORDS_IN_BLOCK = ARGON2_BLOCK_SIZE / 32,
|
||||
ARGON2_512BIT_WORDS_IN_BLOCK = ARGON2_BLOCK_SIZE / 64,
|
||||
/* Memory block size in bytes */
|
||||
ARGON2_BLOCK_SIZE = 1024,
|
||||
ARGON2_QWORDS_IN_BLOCK = ARGON2_BLOCK_SIZE / 8,
|
||||
ARGON2_OWORDS_IN_BLOCK = ARGON2_BLOCK_SIZE / 16,
|
||||
|
||||
/* Number of pseudo-random values generated by one call to Blake in Argon2i
|
||||
to
|
||||
generate reference block positions */
|
||||
ARGON2_ADDRESSES_IN_BLOCK = 128,
|
||||
/* Number of pseudo-random values generated by one call to Blake in Argon2i
|
||||
to
|
||||
generate reference block positions */
|
||||
ARGON2_ADDRESSES_IN_BLOCK = 128,
|
||||
|
||||
/* Pre-hashing digest length and its extension*/
|
||||
ARGON2_PREHASH_DIGEST_LENGTH = 64,
|
||||
ARGON2_PREHASH_SEED_LENGTH = 72
|
||||
/* Pre-hashing digest length and its extension*/
|
||||
ARGON2_PREHASH_DIGEST_LENGTH = 64,
|
||||
ARGON2_PREHASH_SEED_LENGTH = 72
|
||||
};
|
||||
|
||||
/*************************Argon2 internal data types***********************/
|
||||
@@ -76,13 +56,13 @@ typedef struct block_ { uint64_t v[ARGON2_QWORDS_IN_BLOCK]; } block;
|
||||
/*****************Functions that work with the block******************/
|
||||
|
||||
/* Initialize each byte of the block with @in */
|
||||
void rxa2_init_block_value(block *b, uint8_t in);
|
||||
void init_block_value(block *b, uint8_t in);
|
||||
|
||||
/* Copy block @src to block @dst */
|
||||
void rxa2_copy_block(block *dst, const block *src);
|
||||
void copy_block(block *dst, const block *src);
|
||||
|
||||
/* XOR @src onto @dst bytewise */
|
||||
void rxa2_xor_block(block *dst, const block *src);
|
||||
void xor_block(block *dst, const block *src);
|
||||
|
||||
/*
|
||||
* Argon2 instance: memory pointer, number of passes, amount of memory, type,
|
||||
@@ -91,17 +71,18 @@ void rxa2_xor_block(block *dst, const block *src);
|
||||
* thread
|
||||
*/
|
||||
typedef struct Argon2_instance_t {
|
||||
block *memory; /* Memory pointer */
|
||||
uint32_t version;
|
||||
uint32_t passes; /* Number of passes */
|
||||
uint32_t memory_blocks; /* Number of blocks in memory */
|
||||
uint32_t segment_length;
|
||||
uint32_t lane_length;
|
||||
uint32_t lanes;
|
||||
uint32_t threads;
|
||||
argon2_type type;
|
||||
int print_internals; /* whether to print the memory blocks */
|
||||
argon2_context *context_ptr; /* points back to original context */
|
||||
block *memory; /* Memory pointer */
|
||||
uint32_t version;
|
||||
uint32_t passes; /* Number of passes */
|
||||
uint32_t memory_blocks; /* Number of blocks in memory */
|
||||
uint32_t segment_length;
|
||||
uint32_t lane_length;
|
||||
uint32_t lanes;
|
||||
uint32_t threads;
|
||||
argon2_type type;
|
||||
int print_internals; /* whether to print the memory blocks */
|
||||
int keep_memory;
|
||||
argon2_context *context_ptr; /* points back to original context */
|
||||
} argon2_instance_t;
|
||||
|
||||
/*
|
||||
@@ -109,16 +90,16 @@ typedef struct Argon2_instance_t {
|
||||
* work between threads.
|
||||
*/
|
||||
typedef struct Argon2_position_t {
|
||||
uint32_t pass;
|
||||
uint32_t lane;
|
||||
uint8_t slice;
|
||||
uint32_t index;
|
||||
uint32_t pass;
|
||||
uint32_t lane;
|
||||
uint8_t slice;
|
||||
uint32_t index;
|
||||
} argon2_position_t;
|
||||
|
||||
/*Struct that holds the inputs for thread handling FillSegment*/
|
||||
typedef struct Argon2_thread_data {
|
||||
argon2_instance_t *instance_ptr;
|
||||
argon2_position_t pos;
|
||||
argon2_instance_t *instance_ptr;
|
||||
argon2_position_t pos;
|
||||
} argon2_thread_data;
|
||||
|
||||
/*************************Argon2 core functions********************************/
|
||||
@@ -126,38 +107,32 @@ typedef struct Argon2_thread_data {
|
||||
/* Allocates memory to the given pointer, uses the appropriate allocator as
|
||||
* specified in the context. Total allocated memory is num*size.
|
||||
* @param context argon2_context which specifies the allocator
|
||||
* @param memory pointer to the pointer to the memory
|
||||
* @param size the size in bytes for each element to be allocated
|
||||
* @param num the number of elements to be allocated
|
||||
* @return ARGON2_OK if @memory is a valid pointer and memory is allocated
|
||||
* @param instance the Argon2 instance
|
||||
* @return ARGON2_OK if memory is allocated successfully
|
||||
*/
|
||||
int rxa2_allocate_memory(const argon2_context *context, uint8_t **memory,
|
||||
size_t num, size_t size);
|
||||
int xmrig_ar2_allocate_memory(const argon2_context *context, argon2_instance_t *instance);
|
||||
|
||||
/*
|
||||
* Frees memory at the given pointer, uses the appropriate deallocator as
|
||||
* specified in the context. Also cleans the memory using clear_internal_memory.
|
||||
* @param context argon2_context which specifies the deallocator
|
||||
* @param memory pointer to buffer to be freed
|
||||
* @param size the size in bytes for each element to be deallocated
|
||||
* @param num the number of elements to be deallocated
|
||||
* @param instance the Argon2 instance
|
||||
*/
|
||||
void rxa2_free_memory(const argon2_context *context, uint8_t *memory,
|
||||
size_t num, size_t size);
|
||||
void xmrig_ar2_free_memory(const argon2_context *context, const argon2_instance_t *instance);
|
||||
|
||||
/* Function that securely cleans the memory. This ignores any flags set
|
||||
* regarding clearing memory. Usually one just calls clear_internal_memory.
|
||||
* @param mem Pointer to the memory
|
||||
* @param s Memory size in bytes
|
||||
*/
|
||||
void rxa2_secure_wipe_memory(void *v, size_t n);
|
||||
void xmrig_ar2_secure_wipe_memory(void *v, size_t n);
|
||||
|
||||
/* Function that securely clears the memory if FLAG_clear_internal_memory is
|
||||
* set. If the flag isn't set, this function does nothing.
|
||||
* @param mem Pointer to the memory
|
||||
* @param s Memory size in bytes
|
||||
*/
|
||||
void rxa2_clear_internal_memory(void *v, size_t n);
|
||||
ARGON2_PUBLIC void xmrig_ar2_clear_internal_memory(void *v, size_t n);
|
||||
|
||||
/*
|
||||
* Computes absolute position of reference block in the lane following a skewed
|
||||
@@ -169,9 +144,7 @@ void rxa2_clear_internal_memory(void *v, size_t n);
|
||||
* If so we can reference the current segment
|
||||
* @pre All pointers must be valid
|
||||
*/
|
||||
uint32_t rxa2_index_alpha(const argon2_instance_t *instance,
|
||||
const argon2_position_t *position, uint32_t pseudo_rand,
|
||||
int same_lane);
|
||||
uint32_t xmrig_ar2_index_alpha(const argon2_instance_t *instance, const argon2_position_t *position, uint32_t pseudo_rand, int same_lane);
|
||||
|
||||
/*
|
||||
* Function that validates all inputs against predefined restrictions and return
|
||||
@@ -180,7 +153,7 @@ uint32_t rxa2_index_alpha(const argon2_instance_t *instance,
|
||||
* @return ARGON2_OK if everything is all right, otherwise one of error codes
|
||||
* (all defined in <argon2.h>
|
||||
*/
|
||||
int rxa2_validate_inputs(const argon2_context *context);
|
||||
int xmrig_ar2_validate_inputs(const argon2_context *context);
|
||||
|
||||
/*
|
||||
* Hashes all the inputs into @a blockhash[PREHASH_DIGEST_LENGTH], clears
|
||||
@@ -192,8 +165,7 @@ int rxa2_validate_inputs(const argon2_context *context);
|
||||
* @pre @a blockhash must have at least @a PREHASH_DIGEST_LENGTH bytes
|
||||
* allocated
|
||||
*/
|
||||
void rxa2_initial_hash(uint8_t *blockhash, argon2_context *context,
|
||||
argon2_type type);
|
||||
void xmrig_ar2_initial_hash(uint8_t *blockhash, argon2_context *context, argon2_type type);
|
||||
|
||||
/*
|
||||
* Function creates first 2 blocks per lane
|
||||
@@ -201,7 +173,7 @@ void rxa2_initial_hash(uint8_t *blockhash, argon2_context *context,
|
||||
* @param blockhash Pointer to the pre-hashing digest
|
||||
* @pre blockhash must point to @a PREHASH_SEED_LENGTH allocated values
|
||||
*/
|
||||
void rxa2_fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance);
|
||||
void xmrig_ar2_fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance);
|
||||
|
||||
/*
|
||||
* Function allocates memory, hashes the inputs with Blake, and creates first
|
||||
@@ -213,7 +185,7 @@ void rxa2_fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instanc
|
||||
* @return Zero if successful, -1 if memory failed to allocate. @context->state
|
||||
* will be modified if successful.
|
||||
*/
|
||||
int rxa2_argon_initialize(argon2_instance_t *instance, argon2_context *context);
|
||||
int xmrig_ar2_initialize(argon2_instance_t *instance, argon2_context *context);
|
||||
|
||||
/*
|
||||
* XORing the last block of each lane, hashing it, making the tag. Deallocates
|
||||
@@ -226,18 +198,16 @@ int rxa2_argon_initialize(argon2_instance_t *instance, argon2_context *context);
|
||||
* @pre if context->free_cbk is not NULL, it should point to a function that
|
||||
* deallocates memory
|
||||
*/
|
||||
void rxa2_finalize(const argon2_context *context, argon2_instance_t *instance);
|
||||
void xmrig_ar2_finalize(const argon2_context *context, argon2_instance_t *instance);
|
||||
|
||||
/*
|
||||
* Function that fills the segment using previous segments also from other
|
||||
* threads
|
||||
* @param context current context
|
||||
* @param instance Pointer to the current instance
|
||||
* @param position Current position
|
||||
* @pre all block pointers must be valid
|
||||
*/
|
||||
void rxa2_fill_segment(const argon2_instance_t *instance,
|
||||
argon2_position_t position);
|
||||
void xmrig_ar2_fill_segment(const argon2_instance_t *instance, argon2_position_t position);
|
||||
|
||||
/*
|
||||
* Function that fills the entire memory t_cost times based on the first two
|
||||
@@ -245,10 +215,6 @@ void rxa2_fill_segment(const argon2_instance_t *instance,
|
||||
* @param instance Pointer to the current instance
|
||||
* @return ARGON2_OK if successful, @context->state
|
||||
*/
|
||||
int rxa2_fill_memory_blocks(argon2_instance_t *instance);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
int xmrig_ar2_fill_memory_blocks(argon2_instance_t *instance);
|
||||
|
||||
#endif
|
||||
432
src/3rdparty/argon2/lib/encoding.c
vendored
Normal file
432
src/3rdparty/argon2/lib/encoding.c
vendored
Normal file
@@ -0,0 +1,432 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include "encoding.h"
|
||||
#include "core.h"
|
||||
|
||||
/*
|
||||
* Example code for a decoder and encoder of "hash strings", with Argon2
|
||||
* parameters.
|
||||
*
|
||||
* This code comprises three sections:
|
||||
*
|
||||
* -- The first section contains generic Base64 encoding and decoding
|
||||
* functions. It is conceptually applicable to any hash function
|
||||
* implementation that uses Base64 to encode and decode parameters,
|
||||
* salts and outputs. It could be made into a library, provided that
|
||||
* the relevant functions are made public (non-static) and be given
|
||||
* reasonable names to avoid collisions with other functions.
|
||||
*
|
||||
* -- The second section is specific to Argon2. It encodes and decodes
|
||||
* the parameters, salts and outputs. It does not compute the hash
|
||||
* itself.
|
||||
*
|
||||
* The code was originally written by Thomas Pornin <pornin@bolet.org>,
|
||||
* to whom comments and remarks may be sent. It is released under what
|
||||
* should amount to Public Domain or its closest equivalent; the
|
||||
* following mantra is supposed to incarnate that fact with all the
|
||||
* proper legal rituals:
|
||||
*
|
||||
* ---------------------------------------------------------------------
|
||||
* This file is provided under the terms of Creative Commons CC0 1.0
|
||||
* Public Domain Dedication. To the extent possible under law, the
|
||||
* author (Thomas Pornin) has waived all copyright and related or
|
||||
* neighboring rights to this file. This work is published from: Canada.
|
||||
* ---------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2015 Thomas Pornin
|
||||
*/
|
||||
|
||||
/* ==================================================================== */
|
||||
/*
|
||||
* Common code; could be shared between different hash functions.
|
||||
*
|
||||
* Note: the Base64 functions below assume that uppercase letters (resp.
|
||||
* lowercase letters) have consecutive numerical codes, that fit on 8
|
||||
* bits. All modern systems use ASCII-compatible charsets, where these
|
||||
* properties are true. If you are stuck with a dinosaur of a system
|
||||
* that still defaults to EBCDIC then you already have much bigger
|
||||
* interoperability issues to deal with.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Some macros for constant-time comparisons. These work over values in
|
||||
* the 0..255 range. Returned value is 0x00 on "false", 0xFF on "true".
|
||||
*/
|
||||
#define EQ(x, y) ((((0U - ((unsigned)(x) ^ (unsigned)(y))) >> 8) & 0xFF) ^ 0xFF)
|
||||
#define GT(x, y) ((((unsigned)(y) - (unsigned)(x)) >> 8) & 0xFF)
|
||||
#define GE(x, y) (GT(y, x) ^ 0xFF)
|
||||
#define LT(x, y) GT(y, x)
|
||||
#define LE(x, y) GE(y, x)
|
||||
|
||||
/*
|
||||
* Convert value x (0..63) to corresponding Base64 character.
|
||||
*/
|
||||
static int b64_byte_to_char(unsigned x) {
|
||||
return (LT(x, 26) & (x + 'A')) |
|
||||
(GE(x, 26) & LT(x, 52) & (x + ('a' - 26))) |
|
||||
(GE(x, 52) & LT(x, 62) & (x + ('0' - 52))) | (EQ(x, 62) & '+') |
|
||||
(EQ(x, 63) & '/');
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert character c to the corresponding 6-bit value. If character c
|
||||
* is not a Base64 character, then 0xFF (255) is returned.
|
||||
*/
|
||||
static unsigned b64_char_to_byte(int c) {
|
||||
unsigned x;
|
||||
|
||||
x = (GE(c, 'A') & LE(c, 'Z') & (c - 'A')) |
|
||||
(GE(c, 'a') & LE(c, 'z') & (c - ('a' - 26))) |
|
||||
(GE(c, '0') & LE(c, '9') & (c - ('0' - 52))) | (EQ(c, '+') & 62) |
|
||||
(EQ(c, '/') & 63);
|
||||
return x | (EQ(x, 0) & (EQ(c, 'A') ^ 0xFF));
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert some bytes to Base64. 'dst_len' is the length (in characters)
|
||||
* of the output buffer 'dst'; if that buffer is not large enough to
|
||||
* receive the result (including the terminating 0), then (size_t)-1
|
||||
* is returned. Otherwise, the zero-terminated Base64 string is written
|
||||
* in the buffer, and the output length (counted WITHOUT the terminating
|
||||
* zero) is returned.
|
||||
*/
|
||||
static size_t to_base64(char *dst, size_t dst_len, const void *src,
|
||||
size_t src_len) {
|
||||
size_t olen;
|
||||
const unsigned char *buf;
|
||||
unsigned acc, acc_len;
|
||||
|
||||
olen = (src_len / 3) << 2;
|
||||
switch (src_len % 3) {
|
||||
case 2:
|
||||
olen++;
|
||||
/* fall through */
|
||||
case 1:
|
||||
olen += 2;
|
||||
break;
|
||||
}
|
||||
if (dst_len <= olen) {
|
||||
return (size_t)-1;
|
||||
}
|
||||
acc = 0;
|
||||
acc_len = 0;
|
||||
buf = (const unsigned char *)src;
|
||||
while (src_len-- > 0) {
|
||||
acc = (acc << 8) + (*buf++);
|
||||
acc_len += 8;
|
||||
while (acc_len >= 6) {
|
||||
acc_len -= 6;
|
||||
*dst++ = (char)b64_byte_to_char((acc >> acc_len) & 0x3F);
|
||||
}
|
||||
}
|
||||
if (acc_len > 0) {
|
||||
*dst++ = (char)b64_byte_to_char((acc << (6 - acc_len)) & 0x3F);
|
||||
}
|
||||
*dst++ = 0;
|
||||
return olen;
|
||||
}
|
||||
|
||||
/*
|
||||
* Decode Base64 chars into bytes. The '*dst_len' value must initially
|
||||
* contain the length of the output buffer '*dst'; when the decoding
|
||||
* ends, the actual number of decoded bytes is written back in
|
||||
* '*dst_len'.
|
||||
*
|
||||
* Decoding stops when a non-Base64 character is encountered, or when
|
||||
* the output buffer capacity is exceeded. If an error occurred (output
|
||||
* buffer is too small, invalid last characters leading to unprocessed
|
||||
* buffered bits), then NULL is returned; otherwise, the returned value
|
||||
* points to the first non-Base64 character in the source stream, which
|
||||
* may be the terminating zero.
|
||||
*/
|
||||
static const char *from_base64(void *dst, size_t *dst_len, const char *src) {
|
||||
size_t len;
|
||||
unsigned char *buf;
|
||||
unsigned acc, acc_len;
|
||||
|
||||
buf = (unsigned char *)dst;
|
||||
len = 0;
|
||||
acc = 0;
|
||||
acc_len = 0;
|
||||
for (;;) {
|
||||
unsigned d;
|
||||
|
||||
d = b64_char_to_byte(*src);
|
||||
if (d == 0xFF) {
|
||||
break;
|
||||
}
|
||||
src++;
|
||||
acc = (acc << 6) + d;
|
||||
acc_len += 6;
|
||||
if (acc_len >= 8) {
|
||||
acc_len -= 8;
|
||||
if ((len++) >= *dst_len) {
|
||||
return NULL;
|
||||
}
|
||||
*buf++ = (acc >> acc_len) & 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If the input length is equal to 1 modulo 4 (which is
|
||||
* invalid), then there will remain 6 unprocessed bits;
|
||||
* otherwise, only 0, 2 or 4 bits are buffered. The buffered
|
||||
* bits must also all be zero.
|
||||
*/
|
||||
if (acc_len > 4 || (acc & (((unsigned)1 << acc_len) - 1)) != 0) {
|
||||
return NULL;
|
||||
}
|
||||
*dst_len = len;
|
||||
return src;
|
||||
}
|
||||
|
||||
/*
|
||||
* Decode decimal integer from 'str'; the value is written in '*v'.
|
||||
* Returned value is a pointer to the next non-decimal character in the
|
||||
* string. If there is no digit at all, or the value encoding is not
|
||||
* minimal (extra leading zeros), or the value does not fit in an
|
||||
* 'unsigned long', then NULL is returned.
|
||||
*/
|
||||
static const char *decode_decimal(const char *str, unsigned long *v) {
|
||||
const char *orig;
|
||||
unsigned long acc;
|
||||
|
||||
acc = 0;
|
||||
for (orig = str;; str++) {
|
||||
int c;
|
||||
|
||||
c = *str;
|
||||
if (c < '0' || c > '9') {
|
||||
break;
|
||||
}
|
||||
c -= '0';
|
||||
if (acc > (ULONG_MAX / 10)) {
|
||||
return NULL;
|
||||
}
|
||||
acc *= 10;
|
||||
if ((unsigned long)c > (ULONG_MAX - acc)) {
|
||||
return NULL;
|
||||
}
|
||||
acc += (unsigned long)c;
|
||||
}
|
||||
if (str == orig || (*orig == '0' && str != (orig + 1))) {
|
||||
return NULL;
|
||||
}
|
||||
*v = acc;
|
||||
return str;
|
||||
}
|
||||
|
||||
/* ==================================================================== */
|
||||
/*
|
||||
* Code specific to Argon2.
|
||||
*
|
||||
* The code below applies the following format:
|
||||
*
|
||||
* $argon2<T>[$v=<num>]$m=<num>,t=<num>,p=<num>$<bin>$<bin>
|
||||
*
|
||||
* where <T> is either 'd', 'id', or 'i', <num> is a decimal integer (positive,
|
||||
* fits in an 'unsigned long'), and <bin> is Base64-encoded data (no '=' padding
|
||||
* characters, no newline or whitespace).
|
||||
*
|
||||
* The last two binary chunks (encoded in Base64) are, in that order,
|
||||
* the salt and the output. Both are required. The binary salt length and the
|
||||
* output length must be in the allowed ranges defined in argon2.h.
|
||||
*
|
||||
* The ctx struct must contain buffers large enough to hold the salt and pwd
|
||||
* when it is fed into decode_string.
|
||||
*/
|
||||
|
||||
int decode_string(argon2_context *ctx, const char *str, argon2_type type) {
|
||||
|
||||
/* check for prefix */
|
||||
#define CC(prefix) \
|
||||
do { \
|
||||
size_t cc_len = strlen(prefix); \
|
||||
if (strncmp(str, prefix, cc_len) != 0) { \
|
||||
return ARGON2_DECODING_FAIL; \
|
||||
} \
|
||||
str += cc_len; \
|
||||
} while ((void)0, 0)
|
||||
|
||||
/* optional prefix checking with supplied code */
|
||||
#define CC_opt(prefix, code) \
|
||||
do { \
|
||||
size_t cc_len = strlen(prefix); \
|
||||
if (strncmp(str, prefix, cc_len) == 0) { \
|
||||
str += cc_len; \
|
||||
{ code; } \
|
||||
} \
|
||||
} while ((void)0, 0)
|
||||
|
||||
/* Decoding prefix into uint32_t decimal */
|
||||
#define DECIMAL_U32(x) \
|
||||
do { \
|
||||
unsigned long dec_x; \
|
||||
str = decode_decimal(str, &dec_x); \
|
||||
if (str == NULL || dec_x > UINT32_MAX) { \
|
||||
return ARGON2_DECODING_FAIL; \
|
||||
} \
|
||||
(x) = (uint32_t)dec_x; \
|
||||
} while ((void)0, 0)
|
||||
|
||||
/* Decoding base64 into a binary buffer */
|
||||
#define BIN(buf, max_len, len) \
|
||||
do { \
|
||||
size_t bin_len = (max_len); \
|
||||
str = from_base64(buf, &bin_len, str); \
|
||||
if (str == NULL || bin_len > UINT32_MAX) { \
|
||||
return ARGON2_DECODING_FAIL; \
|
||||
} \
|
||||
(len) = (uint32_t)bin_len; \
|
||||
} while ((void)0, 0)
|
||||
|
||||
size_t maxsaltlen = ctx->saltlen;
|
||||
size_t maxoutlen = ctx->outlen;
|
||||
int validation_result;
|
||||
const char* type_string;
|
||||
|
||||
/* We should start with the argon2_type we are using */
|
||||
type_string = argon2_type2string(type, 0);
|
||||
if (!type_string) {
|
||||
return ARGON2_INCORRECT_TYPE;
|
||||
}
|
||||
|
||||
CC("$");
|
||||
CC(type_string);
|
||||
|
||||
/* Reading the version number if the default is suppressed */
|
||||
ctx->version = ARGON2_VERSION_10;
|
||||
CC_opt("$v=", DECIMAL_U32(ctx->version));
|
||||
|
||||
CC("$m=");
|
||||
DECIMAL_U32(ctx->m_cost);
|
||||
CC(",t=");
|
||||
DECIMAL_U32(ctx->t_cost);
|
||||
CC(",p=");
|
||||
DECIMAL_U32(ctx->lanes);
|
||||
ctx->threads = ctx->lanes;
|
||||
|
||||
CC("$");
|
||||
BIN(ctx->salt, maxsaltlen, ctx->saltlen);
|
||||
CC("$");
|
||||
BIN(ctx->out, maxoutlen, ctx->outlen);
|
||||
|
||||
/* The rest of the fields get the default values */
|
||||
ctx->secret = NULL;
|
||||
ctx->secretlen = 0;
|
||||
ctx->ad = NULL;
|
||||
ctx->adlen = 0;
|
||||
ctx->allocate_cbk = NULL;
|
||||
ctx->free_cbk = NULL;
|
||||
ctx->flags = ARGON2_DEFAULT_FLAGS;
|
||||
|
||||
/* On return, must have valid context */
|
||||
validation_result = xmrig_ar2_validate_inputs(ctx);
|
||||
if (validation_result != ARGON2_OK) {
|
||||
return validation_result;
|
||||
}
|
||||
|
||||
/* Can't have any additional characters */
|
||||
if (*str == 0) {
|
||||
return ARGON2_OK;
|
||||
} else {
|
||||
return ARGON2_DECODING_FAIL;
|
||||
}
|
||||
#undef CC
|
||||
#undef CC_opt
|
||||
#undef DECIMAL_U32
|
||||
#undef BIN
|
||||
}
|
||||
|
||||
int encode_string(char *dst, size_t dst_len, argon2_context *ctx,
|
||||
argon2_type type) {
|
||||
#define SS(str) \
|
||||
do { \
|
||||
size_t pp_len = strlen(str); \
|
||||
if (pp_len >= dst_len) { \
|
||||
return ARGON2_ENCODING_FAIL; \
|
||||
} \
|
||||
memcpy(dst, str, pp_len + 1); \
|
||||
dst += pp_len; \
|
||||
dst_len -= pp_len; \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define SX(x) \
|
||||
do { \
|
||||
char tmp[30]; \
|
||||
sprintf(tmp, "%lu", (unsigned long)(x)); \
|
||||
SS(tmp); \
|
||||
} while ((void)0, 0)
|
||||
|
||||
#define SB(buf, len) \
|
||||
do { \
|
||||
size_t sb_len = to_base64(dst, dst_len, buf, len); \
|
||||
if (sb_len == (size_t)-1) { \
|
||||
return ARGON2_ENCODING_FAIL; \
|
||||
} \
|
||||
dst += sb_len; \
|
||||
dst_len -= sb_len; \
|
||||
} while ((void)0, 0)
|
||||
|
||||
const char* type_string = argon2_type2string(type, 0);
|
||||
int validation_result = xmrig_ar2_validate_inputs(ctx);
|
||||
|
||||
if (!type_string) {
|
||||
return ARGON2_ENCODING_FAIL;
|
||||
}
|
||||
|
||||
if (validation_result != ARGON2_OK) {
|
||||
return validation_result;
|
||||
}
|
||||
|
||||
SS("$");
|
||||
SS(type_string);
|
||||
|
||||
SS("$v=");
|
||||
SX(ctx->version);
|
||||
|
||||
SS("$m=");
|
||||
SX(ctx->m_cost);
|
||||
SS(",t=");
|
||||
SX(ctx->t_cost);
|
||||
SS(",p=");
|
||||
SX(ctx->lanes);
|
||||
|
||||
SS("$");
|
||||
SB(ctx->salt, ctx->saltlen);
|
||||
|
||||
SS("$");
|
||||
SB(ctx->out, ctx->outlen);
|
||||
return ARGON2_OK;
|
||||
|
||||
#undef SS
|
||||
#undef SX
|
||||
#undef SB
|
||||
}
|
||||
|
||||
size_t b64len(uint32_t len) {
|
||||
size_t olen = ((size_t)len / 3) << 2;
|
||||
|
||||
switch (len % 3) {
|
||||
case 2:
|
||||
olen++;
|
||||
/* fall through */
|
||||
case 1:
|
||||
olen += 2;
|
||||
break;
|
||||
}
|
||||
|
||||
return olen;
|
||||
}
|
||||
|
||||
size_t numlen(uint32_t num) {
|
||||
size_t len = 1;
|
||||
while (num >= 10) {
|
||||
++len;
|
||||
num = num / 10;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
40
src/3rdparty/argon2/lib/encoding.h
vendored
Normal file
40
src/3rdparty/argon2/lib/encoding.h
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef ENCODING_H
|
||||
#define ENCODING_H
|
||||
#include "3rdparty/argon2.h"
|
||||
|
||||
#define ARGON2_MAX_DECODED_LANES UINT32_C(255)
|
||||
#define ARGON2_MIN_DECODED_SALT_LEN UINT32_C(8)
|
||||
#define ARGON2_MIN_DECODED_OUT_LEN UINT32_C(12)
|
||||
|
||||
/*
|
||||
* encode an Argon2 hash string into the provided buffer. 'dst_len'
|
||||
* contains the size, in characters, of the 'dst' buffer; if 'dst_len'
|
||||
* is less than the number of required characters (including the
|
||||
* terminating 0), then this function returns ARGON2_ENCODING_ERROR.
|
||||
*
|
||||
* on success, ARGON2_OK is returned.
|
||||
*/
|
||||
int encode_string(char *dst, size_t dst_len, argon2_context *ctx,
|
||||
argon2_type type);
|
||||
|
||||
/*
|
||||
* Decodes an Argon2 hash string into the provided structure 'ctx'.
|
||||
* The only fields that must be set prior to this call are ctx.saltlen and
|
||||
* ctx.outlen (which must be the maximal salt and out length values that are
|
||||
* allowed), ctx.salt and ctx.out (which must be buffers of the specified
|
||||
* length), and ctx.pwd and ctx.pwdlen which must hold a valid password.
|
||||
*
|
||||
* Invalid input string causes an error. On success, the ctx is valid and all
|
||||
* fields have been initialized.
|
||||
*
|
||||
* Returned value is ARGON2_OK on success, other ARGON2_ codes on error.
|
||||
*/
|
||||
int decode_string(argon2_context *ctx, const char *str, argon2_type type);
|
||||
|
||||
/* Returns the length of the encoded byte stream with length len */
|
||||
size_t b64len(uint32_t len);
|
||||
|
||||
/* Returns the length of the encoded number num */
|
||||
size_t numlen(uint32_t num);
|
||||
|
||||
#endif
|
||||
117
src/3rdparty/argon2/lib/genkat.c
vendored
Normal file
117
src/3rdparty/argon2/lib/genkat.c
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* Argon2 source code package
|
||||
*
|
||||
* Written by Daniel Dinu and Dmitry Khovratovich, 2015
|
||||
*
|
||||
* This work is licensed under a Creative Commons CC0 1.0 License/Waiver.
|
||||
*
|
||||
* You should have received a copy of the CC0 Public Domain Dedication along
|
||||
* with
|
||||
* this software. If not, see
|
||||
* <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "genkat.h"
|
||||
|
||||
void initial_kat(const uint8_t *blockhash, const argon2_context *context,
|
||||
argon2_type type) {
|
||||
unsigned i;
|
||||
|
||||
if (blockhash != NULL && context != NULL) {
|
||||
printf("=======================================\n");
|
||||
|
||||
printf("%s version number %d\n", argon2_type2string(type, 1),
|
||||
context->version);
|
||||
|
||||
printf("=======================================\n");
|
||||
|
||||
|
||||
printf("Memory: %u KiB, Iterations: %u, Parallelism: %u lanes, Tag "
|
||||
"length: %u bytes\n",
|
||||
context->m_cost, context->t_cost, context->lanes,
|
||||
context->outlen);
|
||||
|
||||
printf("Password[%u]: ", context->pwdlen);
|
||||
|
||||
if (context->flags & ARGON2_FLAG_CLEAR_PASSWORD) {
|
||||
printf("CLEARED\n");
|
||||
} else {
|
||||
for (i = 0; i < context->pwdlen; ++i) {
|
||||
printf("%2.2x ", ((unsigned char *)context->pwd)[i]);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
printf("Salt[%u]: ", context->saltlen);
|
||||
|
||||
for (i = 0; i < context->saltlen; ++i) {
|
||||
printf("%2.2x ", ((unsigned char *)context->salt)[i]);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
printf("Secret[%u]: ", context->secretlen);
|
||||
|
||||
if (context->flags & ARGON2_FLAG_CLEAR_SECRET) {
|
||||
printf("CLEARED\n");
|
||||
} else {
|
||||
for (i = 0; i < context->secretlen; ++i) {
|
||||
printf("%2.2x ", ((unsigned char *)context->secret)[i]);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
printf("Associated data[%u]: ", context->adlen);
|
||||
|
||||
for (i = 0; i < context->adlen; ++i) {
|
||||
printf("%2.2x ", ((unsigned char *)context->ad)[i]);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
printf("Pre-hashing digest: ");
|
||||
|
||||
for (i = 0; i < ARGON2_PREHASH_DIGEST_LENGTH; ++i) {
|
||||
printf("%2.2x ", ((unsigned char *)blockhash)[i]);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
void print_tag(const void *out, uint32_t outlen) {
|
||||
unsigned i;
|
||||
if (out != NULL) {
|
||||
printf("Tag: ");
|
||||
|
||||
for (i = 0; i < outlen; ++i) {
|
||||
printf("%2.2x ", ((uint8_t *)out)[i]);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
void internal_kat(const argon2_instance_t *instance, uint32_t pass) {
|
||||
|
||||
if (instance != NULL) {
|
||||
uint32_t i, j;
|
||||
printf("\n After pass %u:\n", pass);
|
||||
|
||||
for (i = 0; i < instance->memory_blocks; ++i) {
|
||||
uint32_t how_many_words =
|
||||
(instance->memory_blocks > ARGON2_QWORDS_IN_BLOCK)
|
||||
? 1
|
||||
: ARGON2_QWORDS_IN_BLOCK;
|
||||
|
||||
for (j = 0; j < how_many_words; ++j)
|
||||
printf("Block %.4u [%3u]: %016" PRIx64 "\n", i, j,
|
||||
instance->memory[i].v[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
47
src/3rdparty/argon2/lib/genkat.h
vendored
Normal file
47
src/3rdparty/argon2/lib/genkat.h
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Argon2 source code package
|
||||
*
|
||||
* Written by Daniel Dinu and Dmitry Khovratovich, 2015
|
||||
*
|
||||
* This work is licensed under a Creative Commons CC0 1.0 License/Waiver.
|
||||
*
|
||||
* You should have received a copy of the CC0 Public Domain Dedication along
|
||||
* with
|
||||
* this software. If not, see
|
||||
* <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
*/
|
||||
|
||||
#ifndef ARGON2_KAT_H
|
||||
#define ARGON2_KAT_H
|
||||
|
||||
#include "core.h"
|
||||
|
||||
/*
|
||||
* Initial KAT function that prints the inputs to the file
|
||||
* @param blockhash Array that contains pre-hashing digest
|
||||
* @param context Holds inputs
|
||||
* @param type Argon2 type
|
||||
* @pre blockhash must point to INPUT_INITIAL_HASH_LENGTH bytes
|
||||
* @pre context member pointers must point to allocated memory of size according
|
||||
* to the length values
|
||||
*/
|
||||
void initial_kat(const uint8_t *blockhash, const argon2_context *context,
|
||||
argon2_type type);
|
||||
|
||||
/*
|
||||
* Function that prints the output tag
|
||||
* @param out output array pointer
|
||||
* @param outlen digest length
|
||||
* @pre out must point to @a outlen bytes
|
||||
**/
|
||||
void print_tag(const void *out, uint32_t outlen);
|
||||
|
||||
/*
|
||||
* Function that prints the internal state at given moment
|
||||
* @param instance pointer to the current instance
|
||||
* @param pass current pass number
|
||||
* @pre instance must have necessary memory allocated
|
||||
**/
|
||||
void internal_kat(const argon2_instance_t *instance, uint32_t pass);
|
||||
|
||||
#endif
|
||||
117
src/3rdparty/argon2/lib/impl-select.c
vendored
Normal file
117
src/3rdparty/argon2/lib/impl-select.c
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "impl-select.h"
|
||||
#include "3rdparty/argon2.h"
|
||||
|
||||
|
||||
extern uint64_t uv_hrtime(void);
|
||||
|
||||
|
||||
#define BENCH_SAMPLES 1024U
|
||||
#define BENCH_MEM_BLOCKS 512
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
|
||||
static argon2_impl selected_argon_impl = { "default", NULL, fill_segment_default };
|
||||
|
||||
|
||||
/* the benchmark routine is not thread-safe, so we can use a global var here: */
|
||||
static block memory[BENCH_MEM_BLOCKS];
|
||||
|
||||
|
||||
static uint64_t benchmark_impl(const argon2_impl *impl) {
|
||||
memset(memory, 0, sizeof(memory));
|
||||
|
||||
argon2_instance_t instance;
|
||||
instance.version = ARGON2_VERSION_NUMBER;
|
||||
instance.memory = memory;
|
||||
instance.passes = 1;
|
||||
instance.memory_blocks = BENCH_MEM_BLOCKS;
|
||||
instance.segment_length = BENCH_MEM_BLOCKS / ARGON2_SYNC_POINTS;
|
||||
instance.lane_length = instance.segment_length * ARGON2_SYNC_POINTS;
|
||||
instance.lanes = 1;
|
||||
instance.threads = 1;
|
||||
instance.type = Argon2_id;
|
||||
|
||||
argon2_position_t pos;
|
||||
pos.lane = 0;
|
||||
pos.pass = 0;
|
||||
pos.slice = 0;
|
||||
pos.index = 0;
|
||||
|
||||
/* warm-up cache: */
|
||||
impl->fill_segment(&instance, pos);
|
||||
|
||||
/* OK, now measure: */
|
||||
const uint64_t time = uv_hrtime();
|
||||
|
||||
for (uint32_t i = 0; i < BENCH_SAMPLES; i++) {
|
||||
impl->fill_segment(&instance, pos);
|
||||
}
|
||||
|
||||
return uv_hrtime() - time;
|
||||
}
|
||||
|
||||
|
||||
void argon2_select_impl()
|
||||
{
|
||||
argon2_impl_list impls;
|
||||
const argon2_impl *best_impl = NULL;
|
||||
uint64_t best_bench = UINT_MAX;
|
||||
|
||||
argon2_get_impl_list(&impls);
|
||||
|
||||
for (uint32_t i = 0; i < impls.count; i++) {
|
||||
const argon2_impl *impl = &impls.entries[i];
|
||||
|
||||
if (impl->check != NULL && !impl->check()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const uint64_t bench = benchmark_impl(impl);
|
||||
if (bench < best_bench) {
|
||||
best_bench = bench;
|
||||
best_impl = impl;
|
||||
}
|
||||
}
|
||||
|
||||
if (best_impl != NULL) {
|
||||
selected_argon_impl = *best_impl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void xmrig_ar2_fill_segment(const argon2_instance_t *instance, argon2_position_t position)
|
||||
{
|
||||
selected_argon_impl.fill_segment(instance, position);
|
||||
}
|
||||
|
||||
|
||||
const char *argon2_get_impl_name()
|
||||
{
|
||||
return selected_argon_impl.name;
|
||||
}
|
||||
|
||||
|
||||
int argon2_select_impl_by_name(const char *name)
|
||||
{
|
||||
argon2_impl_list impls;
|
||||
argon2_get_impl_list(&impls);
|
||||
|
||||
for (uint32_t i = 0; i < impls.count; i++) {
|
||||
const argon2_impl *impl = &impls.entries[i];
|
||||
|
||||
if (strcasecmp(impl->name, name) == 0) {
|
||||
selected_argon_impl = *impl;
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user