1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-06 23:52:38 -05:00

Compare commits

...

146 Commits

Author SHA1 Message Date
XMRig
fa91cff515 v5.8.0 2020-03-03 12:09:10 +07:00
XMRig
f415814069 Merge branch 'dev' 2020-03-03 12:07:42 +07:00
xmrig
9cf78cf14b Update CHANGELOG.md 2020-03-03 10:07:44 +07:00
XMRig
8dc87576c5 Sync changes with proxy. 2020-03-01 14:04:58 +07:00
XMRig
f0db17be87 Move "Content-Type" header setting. 2020-03-01 12:57:19 +07:00
XMRig
616c52f266 #1572 Fix compile warning. 2020-03-01 11:59:53 +07:00
XMRig
5bad45925a v5.8.0-dev 2020-03-01 11:48:30 +07:00
XMRig
cdd9ea2496 Make "astrobwt" as primary user visible algorithm name. 2020-03-01 10:21:29 +07:00
SChernykh
14ef99ca67 AstroBWT algorithm (DERO) support
To test:

- Download https://github.com/deroproject/derosuite/releases/tag/AstroBWT
- Run daemon with `--testnet` in command line

In config.json:
- "coin":"dero"
- "url":"127.0.0.1:30306"
- "daemon:"true"
2020-02-29 22:41:24 +01:00
XMRig
2cd45a9e38 v5.7.1-dev 2020-02-25 15:25:31 +07:00
XMRig
a070035d97 Merge branch 'master' into dev 2020-02-25 15:24:51 +07:00
XMRig
012d7124cd v5.7.0 2020-02-25 05:41:43 +07:00
XMRig
cde1e2c5f3 Merge branch 'dev' 2020-02-25 05:41:12 +07:00
XMRig
ead441f5db Optimize file log. 2020-02-23 06:52:23 +07:00
xmrig
031e09fede Update CHANGELOG.md 2020-02-23 03:26:25 +07:00
XMRig
1ee27a564b HTTP subsystem refactoring, fixed possible crashes shortly after destroying daemon or self-select client. 2020-02-23 01:40:19 +07:00
XMRig
23c51c9a11 Fixed regression. 2020-02-22 04:51:37 +07:00
xmrig
f9e653ea9f Merge pull request #1563 from SChernykh/dev
Optimized CFROUND
2020-02-22 01:45:52 +07:00
SChernykh
131085be80 Optimized CFROUND
Shorter version using BMI2 instructionns
2020-02-21 19:00:58 +01:00
xmrig
12081e4f5b Merge pull request #1562 from SChernykh/dev
Fixed 32-bit compilation
2020-02-21 22:09:21 +07:00
SChernykh
e1b8f52e59 Fixed 32-bit compilation 2020-02-21 16:08:23 +01:00
XMRig
6dad42a4db v5.7.0-dev 2020-02-21 21:58:41 +07:00
xmrig
799d95d67a Update CHANGELOG.md 2020-02-21 21:51:29 +07:00
xmrig
b131c60f08 Merge pull request #1560 from SChernykh/dev
Tuned JIT compiler
2020-02-21 03:04:12 +07:00
SChernykh
1e2e247789 Merge branch 'dev' of https://github.com/SChernykh/xmrig into dev 2020-02-20 20:59:25 +01:00
SChernykh
0caeb41bff Tuned JIT compiler
0.3-0.4% speedup depending on CPU.
2020-02-20 20:59:22 +01:00
XMRig
fd0cbd448b Use "extra_nonce" for daemon client. 2020-02-21 01:31:22 +07:00
XMRig
bdf6e87dc5 Update default config example. 2020-02-19 01:28:13 +07:00
xmrig
88c7aca6f5 Merge pull request #1557 from SChernykh/dev
Refactored fma_soft() in randomx_vm.cl
2020-02-19 00:28:17 +07:00
SChernykh
887c891ab2 Refactored fma_soft() in randomx_vm.cl
Fixes #1554 (hopefully)
2020-02-18 18:19:03 +01:00
XMRig
2bc5fb10a7 Added "-x" and "--proxy" command line options. 2020-02-18 21:42:01 +07:00
XMRig
8497e9c54f Merge branch 'feature-socks5' into dev 2020-02-18 20:38:07 +07:00
XMRig
2e07e69697 Added IPv4 and IPv6 support for SOCKS5. 2020-02-18 19:24:49 +07:00
XMRig
2fea4e72b5 Implemented donate over SOCKS5. 2020-02-18 17:58:14 +07:00
xmrig
2863ade0c2 Merge pull request #1555 from SChernykh/dev
Fix crash when share is found before pool login
2020-02-18 02:26:40 +07:00
SChernykh
fb0b638cbb Fix crash when share is found before pool login 2020-02-17 20:22:09 +01:00
XMRig
1e2d011705 Initial SOCKS5 implementation. 2020-02-18 02:16:21 +07:00
XMRig
dfaca04167 v5.6.1-dev 2020-02-16 16:13:05 +07:00
XMRig
33b1d5f4b3 Merge branch 'master' into dev 2020-02-16 15:49:11 +07:00
XMRig
2499822106 v5.6.0 2020-02-15 21:24:56 +07:00
XMRig
9fe9e8989d Merge branch 'dev' 2020-02-15 21:23:59 +07:00
XMRig
311d3e1c18 Fixed wrong OpenCL platform on macOS. 2020-02-15 04:32:32 +07:00
XMRig
5e444553b1 Fixed build without NVML. 2020-02-15 04:07:11 +07:00
XMRig
16f011a47f v5.6.0-dev 2020-02-15 03:08:08 +07:00
xmrig
488049e695 Update CHANGELOG.md 2020-02-15 03:06:45 +07:00
XMRig
d23e5e15ba Added AMD GPUs health information for Linux (via sysfs). 2020-02-14 23:37:44 +07:00
XMRig
5ad52192fe Update year. 2020-02-14 02:41:21 +07:00
xmrig
937dc7b7c3 Merge pull request #1551 from SChernykh/dev
Added RandomX JIT for AMD Navi GPUs
2020-02-14 02:32:21 +07:00
SChernykh
7fa5e8706e Added RandomX JIT for AMD Navi GPUs 2020-02-13 20:15:08 +01:00
XMRig
2f27d5d108 Added printHealth to IBackend interface. 2020-02-14 01:11:53 +07:00
XMRig
56f23db878 Added ADL support for Windows. 2020-02-14 00:16:32 +07:00
xmrig
264e3928c2 Merge pull request #1546 from SChernykh/dev
Fixed generic OpenCL code for AMD Navi
2020-02-11 17:12:18 +07:00
SChernykh
ef629ba0d0 Fixed generic OpenCL code for AMD Navi 2020-02-10 22:00:40 +01:00
XMRig
aacdbc360b Merge branch 'bug-nonce-overflow' into dev 2020-02-06 22:00:53 +07:00
XMRig
e2e37c8cfb Fixed nicehash nonce overflow for GPU backends. 2020-02-06 22:00:03 +07:00
XMRig
c307433900 Fixed nicehash nonce overflow for CPU backend. 2020-02-06 17:19:08 +07:00
XMRig
97e6a6669f Merge branch 'network-stats' into dev 2020-02-05 18:44:43 +07:00
xmrig
e8f5cc67f8 Merge pull request #1536 from SChernykh/dev
Workaround for new AMD drivers (OpenCL)
2020-02-05 17:37:14 +07:00
SChernykh
8f9c1dd781 Workaround for new AMD drivers (OpenCL) 2020-02-04 23:11:46 +01:00
XMRig
60634366c1 v5.5.4-dev 2020-02-03 00:07:03 +07:00
XMRig
78bd280666 Merge branch 'master' into dev 2020-02-03 00:06:32 +07:00
XMRig
217540296f v5.5.3 2020-02-02 23:40:26 +07:00
XMRig
7eaabd4e00 Merge branch 'dev' 2020-02-02 23:39:49 +07:00
xmrig
ff59f3dbb4 Update CHANGELOG.md 2020-02-02 23:38:54 +07:00
xmrig
9c8da1d4d3 Merge pull request #1529 from SChernykh/dev
Crash fix for Bullodzer CPUs
2020-02-02 23:19:49 +07:00
SChernykh
ffc9f67751 Crash fix for Bullodzer CPUs 2020-02-02 17:16:59 +01:00
XMRig
bf1a0a0b83 v5.5.2 2020-02-02 13:30:29 +07:00
XMRig
f864687a96 Merge branch 'dev' 2020-02-02 13:29:13 +07:00
XMRig
030d6e5962 Update year. 2020-02-01 20:24:00 +07:00
xmrig
f609be6ec3 Update CHANGELOG.md 2020-02-01 18:47:11 +07:00
xmrig
aa4a4c9fd0 Merge pull request #1520 from SChernykh/dev
Fixed setThreadAffinity()
2020-01-29 17:48:37 +07:00
SChernykh
269d12d1be Fixed setThreadAffinity()
Added 1 ms sleep to guarantee thread rescheduling to the correct CPU core before returning.
2020-01-28 19:39:02 +01:00
xmrig
23a1ae0337 Merge pull request #1519 from SChernykh/dev
Removed MSR mod for Bulldozer
2020-01-27 22:20:21 +07:00
SChernykh
4571899664 Removed MSR mod for Bulldozer
It turned out to be useless: https://www.reddit.com/r/MoneroMining/comments/et7s7w/psa_amd_opteronfxa6a8a10_owners_needed_to_test/
2020-01-27 09:39:39 +01:00
xmrig
6d9b50b938 Merge pull request #1516 from SChernykh/dev
Fix compile error
2020-01-24 20:52:29 +07:00
SChernykh
cd763be05b Fix compile error 2020-01-24 14:09:07 +01:00
xmrig
4e6b24d67d Merge pull request #1515 from SChernykh/dev
Fix crash on Linux
2020-01-24 19:35:40 +07:00
SChernykh
42a7194e93 Fix crash on Linux 2020-01-24 13:34:12 +01:00
xmrig
01e063f6f5 Update CHANGELOG.md 2020-01-24 11:42:32 +07:00
xmrig
81e3f6e7d9 Merge pull request #1510 from SChernykh/dev
Optimized CFROUND
2020-01-23 12:49:13 +07:00
SChernykh
9f1753cc4f Optimized CFROUND 2020-01-22 20:11:00 +01:00
xmrig
39eafc3255 Merge pull request #1508 from SChernykh/dev
Added support for BMI2 instructions
2020-01-22 12:00:45 +07:00
SChernykh
d342968211 Added support for BMI2 instructions 2020-01-21 19:44:56 +01:00
XMRig
c5968e8896 New NetworkState. 2020-01-16 21:48:39 +07:00
xmrig
8e6f4d4ecb Merge pull request #1502 from SChernykh/dev
Optimizations for AMD Bulldozer
2020-01-15 20:26:06 +07:00
SChernykh
f80177cbd3 Optimizations for AMD Bulldozer
- Added support for XOP instructions
- Enabled Ryzen code for Bulldozer because it's faster there too
2020-01-15 13:04:26 +01:00
xmrig
32b0314990 Merge pull request #1501 from SChernykh/dev
MSR preset for Bulldozer CPUs
2020-01-15 08:57:14 +07:00
SChernykh
665e43fecc MSR preset for Bulldozer CPUs
Also fixed verbose output for MSR presets with masks.
2020-01-14 19:27:34 +01:00
xmrig
b5fb96dca0 Merge pull request #1500 from SChernykh/dev
JIT compiler: removed unnecessary memcpy from generateProgram()
2020-01-14 07:59:08 +07:00
SChernykh
73722ce186 JIT compiler: removed unnecessary memcpy from generateProgram() 2020-01-13 18:00:41 +01:00
XMRig
638ed7b4f2 v5.5.2-dev 2020-01-12 12:55:50 +07:00
XMRig
b5b12216d6 Merge branch 'master' into dev 2020-01-12 12:55:04 +07:00
xmrig
d2867a2ed8 Merge pull request #1495 from jtgrassie/missed-script-change
add intel change to boost script
2020-01-12 09:56:37 +07:00
Jethro Grassie
e290995999 add change to boost script 2020-01-11 21:42:48 -05:00
XMRig
9ae8907b3e v5.5.1 2020-01-12 08:34:01 +07:00
XMRig
a80f3e8190 Merge branch 'dev' 2020-01-12 08:32:16 +07:00
xmrig
b3d1ca6cb2 Update CHANGELOG.md 2020-01-12 07:43:29 +07:00
xmrig
0290b1ed3c Merge pull request #1493 from SChernykh/dev
Update MSR preset for Intel
2020-01-09 14:24:11 +07:00
SChernykh
869209389e Update MSR preset for Intel
As per https://github.com/xmrig/xmrig/issues/1433#issuecomment-572126184
2020-01-09 08:10:36 +01:00
XMRig
c6530e352f Code cleanup. 2020-01-07 10:13:01 +07:00
xmrig
706f588b36 Merge pull request #1489 from SChernykh/dev
JIT compiler tweaks
2020-01-07 02:41:40 +07:00
SChernykh
eb20dfbc94 JIT compiler tweaks 2020-01-06 13:57:48 +01:00
xmrig
f69ba3ea1d Update CHANGELOG.md 2020-01-03 19:54:28 +07:00
XMRig
88ff807700 Fix compile warnings. 2020-01-03 19:11:48 +07:00
XMRig
e76e75cdff Merge branch 'dev' of github.com:xmrig/xmrig into dev 2020-01-03 05:36:47 +07:00
XMRig
083c61754b Fixed unwanted resume after dataset change. 2020-01-03 05:36:22 +07:00
xmrig
146bbda33f Merge pull request #1477 from SChernykh/dev
Refactor Ryzen fix to fix compilation issues
2019-12-31 17:07:37 +07:00
SChernykh
c9f90e6770 Refactor Ryzen fix to fix compilation issues 2019-12-31 11:55:07 +02:00
xmrig
6a2a8579ae Merge pull request #1473 from SChernykh/dev
Auto-config for mobile Ryzen APUs
2019-12-31 02:36:30 +07:00
SChernykh
29dd2c2138 Cleanup 2019-12-30 20:55:03 +02:00
SChernykh
4e5aef0a8a Auto-config for mobile Ryzen APUs 2019-12-30 20:53:21 +02:00
XMRig
039c42b1fe v5.5.1-dev 2019-12-30 16:05:51 +07:00
XMRig
1e45349890 Merge branch 'master' into dev 2019-12-30 16:05:24 +07:00
XMRig
d64bbfa9c0 #1469 Fixed build with gcc 4.8. 2019-12-30 16:04:07 +07:00
XMRig
d5605a29b4 v5.5.0 2019-12-29 21:42:11 +07:00
XMRig
4c28fa6009 Merge branch 'dev' 2019-12-29 21:41:40 +07:00
XMRig
ad9ae6a143 Merge branch 'dev' of github.com:xmrig/xmrig into dev 2019-12-29 15:36:39 +07:00
XMRig
a5b0bc04cc Add "cn/ultra" alias for tlo-pool.raasu.org pool. 2019-12-29 15:36:05 +07:00
xmrig
f491e99bf9 Update CHANGELOG.md 2019-12-29 03:43:10 +07:00
XMRig
402c44b547 Added "cn-pico/tlo". 2019-12-29 00:29:19 +07:00
XMRig
ac4086b273 Fix build. 2019-12-28 02:00:08 +07:00
XMRig
f00769f758 Code style cleanup. 2019-12-28 01:45:54 +07:00
xmrig
6ceb4dfc4f Merge pull request #1465 from SChernykh/dev
Fix for 1st-gen Ryzen crashes
2019-12-27 18:26:26 +07:00
SChernykh
3a2941b719 Fix for 1st-gen Ryzen crashes 2019-12-27 12:40:38 +02:00
xmrig
99826a6b51 Update CHANGELOG.md 2019-12-27 15:03:24 +07:00
XMRig
4a9a7434f6 Revert Platform::setProcessPriority 2019-12-27 03:19:03 +07:00
XMRig
dbb721cb5e Removed "rx/v" algorithm. 2019-12-26 22:34:19 +07:00
xmrig
2a93bb2cee Update CHANGELOG.md 2019-12-25 05:01:19 +07:00
XMRig
7dfb4d9dc0 v5.5.0-dev 2019-12-25 04:53:38 +07:00
XMRig
22eca8e0d5 Fixed memory allocation checks. 2019-12-25 04:39:21 +07:00
XMRig
ecb46643e2 Added support for alternative CUDA plugin API. 2019-12-25 00:35:43 +07:00
xmrig
73d959a259 Update ALGORITHMS.md 2019-12-24 03:48:39 +07:00
XMRig
a95b179a60 Merge branch 'dev' of github.com:xmrig/xmrig into dev 2019-12-24 02:05:00 +07:00
XMRig
2e4a83547d Add console title for Windows. 2019-12-24 02:04:34 +07:00
xmrig
fd30294ca0 Merge pull request #1461 from suanlian1/patch-1
Monero already changed PoW on Nov 30, 2019
2019-12-24 01:07:44 +07:00
sairog
9b16a2736a Update README.md
Monero already changed PoW on Nov 30, 2019. Also minor text corrections.
2019-12-23 23:23:16 +05:30
XMRig
ea7aa4ccef Fixed MSVC build. 2019-12-23 00:37:43 +07:00
XMRig
d81845e1ab Merge branch 'feature-env' into dev 2019-12-23 00:29:38 +07:00
XMRig
f9d07229b4 Add extra variables. 2019-12-23 00:28:57 +07:00
XMRig
2d15c10e0f Added ENV support for "loader" option. 2019-12-22 19:48:33 +07:00
XMRig
5bd6a1c028 Added ENV support for "user", "pass" and "rig-id" fields. 2019-12-22 19:09:30 +07:00
XMRig
356e666e61 Added Env class. 2019-12-22 18:09:26 +07:00
XMRig
bdf12bca0f Make Process::location static. 2019-12-22 13:26:06 +07:00
XMRig
c44ae06d54 Added --randomx-no-rdmsr command line option. 2019-12-21 23:57:25 +07:00
XMRig
c7de9e6561 v5.4.1-dev 2019-12-21 23:42:18 +07:00
XMRig
00c9f89213 Merge branch 'master' into dev 2019-12-21 23:41:44 +07:00
208 changed files with 18566 additions and 6757 deletions

View File

@@ -1,3 +1,49 @@
# 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.

View File

@@ -9,15 +9,18 @@ option(WITH_CN_PICO "Enable CryptoNight-Pico algorithm" ON)
option(WITH_CN_GPU "Enable CryptoNight-GPU algorithm" ON)
option(WITH_RANDOMX "Enable RandomX algorithms family" ON)
option(WITH_ARGON2 "Enable Argon2 algorithms family" ON)
option(WITH_ASTROBWT "Enable AstroBWT algorithms family" 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 support" 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)
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)
@@ -52,7 +55,6 @@ set(HEADERS
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
@@ -102,7 +104,6 @@ set(SOURCES
src/core/Miner.cpp
src/net/JobResults.cpp
src/net/Network.cpp
src/net/NetworkState.cpp
src/net/strategies/DonateStrategy.cpp
src/Summary.cpp
src/xmrig.cpp
@@ -176,6 +177,7 @@ find_package(UV REQUIRED)
include(cmake/flags.cmake)
include(cmake/randomx.cmake)
include(cmake/argon2.cmake)
include(cmake/astrobwt.cmake)
include(cmake/OpenSSL.cmake)
include(cmake/asm.cmake)
include(cmake/cn-gpu.cmake)

View File

@@ -1,6 +1,6 @@
# XMRig
**:warning: [Monero will change PoW algorithm to RandomX on November 30.](https://github.com/xmrig/xmrig/issues/1204)**
**:warning: [Monero changed PoW algorithm to RandomX on November 30.](https://github.com/xmrig/xmrig/issues/1204)**
[![Github All Releases](https://img.shields.io/github/downloads/xmrig/xmrig/total.svg)](https://github.com/xmrig/xmrig/releases)
[![GitHub release](https://img.shields.io/github/release/xmrig/xmrig/all.svg)](https://github.com/xmrig/xmrig/releases)
@@ -38,7 +38,8 @@ Network:
-u, --user=USERNAME username for mining server
-p, --pass=PASSWORD password for mining server
-O, --userpass=U:P username:password pair for mining server
-k, --keepalive send keepalived packet for prevent timeout (needs pool support)
-x, --proxy=HOST:PORT connect through a SOCKS5 proxy
-k, --keepalive send keepalive packet for prevent timeout (needs pool support)
--nicehash enable nicehash.com support
--rig-id=ID rig identifier for pool-side statistics (needs pool support)
--tls enable SSL/TLS support (needs pool support)
@@ -62,11 +63,12 @@ CPU backend:
--cpu-no-yield prefer maximum hashrate rather than system response/stability
--no-huge-pages disable huge pages support
--asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer
--randomx-init=N threads count to initialize RandomX dataset
--randomx-init=N thread count to initialize RandomX dataset
--randomx-no-numa disable NUMA support for RandomX
--randomx-mode=MODE RandomX mode: auto, fast, light
--randomx-1gb-pages use 1GB hugepages for dataset (Linux only)
--randomx-wrmsr=N write value (0-15) to Intel MSR register 0x1a4 or do nothing (-1) (Linux only)
--randomx-wrmsr=N write custom value (0-15) to Intel MSR register 0x1a4 or disable MSR mod (-1)
--randomx-no-rdmsr disable reverting initial MSR values on exit
API:
--api-worker-id=ID custom worker-id for API

36
cmake/astrobwt.cmake Normal file
View File

@@ -0,0 +1,36 @@
if (WITH_ASTROBWT)
add_definitions(/DXMRIG_ALGO_ASTROBWT)
list(APPEND HEADERS_CRYPTO
src/crypto/astrobwt/AstroBWT.h
src/crypto/astrobwt/sha3.h
)
list(APPEND SOURCES_CRYPTO
src/crypto/astrobwt/AstroBWT.cpp
src/crypto/astrobwt/sha3.cpp
)
if (XMRIG_ARM)
list(APPEND HEADERS_CRYPTO
src/crypto/astrobwt/salsa20_ref/ecrypt-config.h
src/crypto/astrobwt/salsa20_ref/ecrypt-machine.h
src/crypto/astrobwt/salsa20_ref/ecrypt-portable.h
src/crypto/astrobwt/salsa20_ref/ecrypt-sync.h
)
list(APPEND SOURCES_CRYPTO
src/crypto/astrobwt/salsa20_ref/salsa20.c
)
else()
list(APPEND HEADERS_CRYPTO
src/crypto/astrobwt/Salsa20.hpp
)
list(APPEND SOURCES_CRYPTO
src/crypto/astrobwt/Salsa20.cpp
)
endif()
else()
remove_definitions(/DXMRIG_ALGO_ASTROBWT)
endif()

View File

@@ -81,6 +81,7 @@ if (WITH_RANDOMX)
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)
@@ -93,6 +94,7 @@ if (WITH_RANDOMX)
list(APPEND SOURCES_CRYPTO src/crypto/rx/msr/MsrItem.cpp)
else()
remove_definitions(/DXMRIG_FEATURE_MSR)
remove_definitions(/DXMRIG_FIX_RYZEN)
message("-- WITH_MSR=OFF")
endif()
else()

View File

@@ -25,7 +25,6 @@ Option `coin` useful for pools without algorithm negotiation support or daemon t
| `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. |

View File

@@ -13,7 +13,7 @@ if cat /proc/cpuinfo | grep "AMD Ryzen" > /dev/null;
elif cat /proc/cpuinfo | grep "Intel" > /dev/null;
then
echo "Detected Intel"
wrmsr -a 0x1a4 6
wrmsr -a 0x1a4 0xf
echo "MSR register values for Intel applied"
else
echo "No supported CPU detected"

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
View 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

File diff suppressed because it is too large Load Diff

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -64,13 +64,17 @@ public:
}
inline void nextRound(uint32_t rounds, uint32_t roundSize)
inline bool nextRound(uint32_t rounds, uint32_t roundSize)
{
bool ok = true;
m_rounds[index()]++;
if ((m_rounds[index()] % rounds) == 0) {
for (size_t i = 0; i < N; ++i) {
*nonce(i) = Nonce::next(index(), *nonce(i), rounds * roundSize, currentJob().isNicehash());
*nonce(i) = Nonce::next(index(), *nonce(i), rounds * roundSize, currentJob().isNicehash(), &ok);
if (!ok) {
break;
}
}
}
else {
@@ -78,6 +82,8 @@ public:
*nonce(i) += roundSize;
}
}
return ok;
}
@@ -114,16 +120,19 @@ inline uint32_t *xmrig::WorkerJob<1>::nonce(size_t)
template<>
inline void xmrig::WorkerJob<1>::nextRound(uint32_t rounds, uint32_t roundSize)
inline bool xmrig::WorkerJob<1>::nextRound(uint32_t rounds, uint32_t roundSize)
{
bool ok = true;
m_rounds[index()]++;
if ((m_rounds[index()] % rounds) == 0) {
*nonce() = Nonce::next(index(), *nonce(), rounds * roundSize, currentJob().isNicehash());
*nonce() = Nonce::next(index(), *nonce(), rounds * roundSize, currentJob().isNicehash(), &ok);
}
else {
*nonce() += roundSize;
}
return ok;
}

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -56,6 +56,7 @@ public:
virtual void execCommand(char command) = 0;
virtual void prepare(const Job &nextJob) = 0;
virtual void printHashrate(bool details) = 0;
virtual void printHealth() = 0;
virtual void setJob(const Job &job) = 0;
virtual void start(IWorker *worker, bool ready) = 0;
virtual void stop() = 0;

View File

@@ -45,6 +45,7 @@ class IRxStorage
public:
virtual ~IRxStorage() = default;
virtual bool isAllocated() const = 0;
virtual HugePagesInfo hugePages() const = 0;
virtual RxDataset *dataset(const Job &job, uint32_t nodeId) const = 0;
virtual void init(const RxSeed &seed, uint32_t threads, bool hugePages, bool oneGbPages, RxConfig::Mode mode, int priority) = 0;

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -319,6 +319,11 @@ void xmrig::CpuBackend::printHashrate(bool details)
}
void xmrig::CpuBackend::printHealth()
{
}
void xmrig::CpuBackend::setJob(const Job &job)
{
if (!isEnabled()) {

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -59,6 +59,7 @@ protected:
const String &type() const override;
void prepare(const Job &nextJob) override;
void printHashrate(bool details) override;
void printHealth() override;
void setJob(const Job &job) override;
void start(IWorker *worker, bool ready) override;
void stop() override;

View File

@@ -165,6 +165,7 @@ void xmrig::CpuConfig::generate()
count += xmrig::generate<Algorithm::CN_PICO>(m_threads, m_limit);
count += xmrig::generate<Algorithm::RANDOM_X>(m_threads, m_limit);
count += xmrig::generate<Algorithm::ARGON2>(m_threads, m_limit);
count += xmrig::generate<Algorithm::ASTROBWT>(m_threads, m_limit);
m_shouldSave = count > 0;
}

View File

@@ -143,6 +143,14 @@ size_t inline generate<Algorithm::ARGON2>(Threads<CpuThreads> &threads, uint32_t
#endif
#ifdef XMRIG_ALGO_ASTROBWT
template<>
size_t inline generate<Algorithm::ASTROBWT>(Threads<CpuThreads>& threads, uint32_t limit)
{
return generate("astrobwt", threads, Algorithm::ASTROBWT_DERO, limit);
}
#endif
} /* namespace xmrig */

View File

@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -44,10 +44,29 @@
#endif
#ifdef XMRIG_ALGO_ASTROBWT
# include "crypto/astrobwt/AstroBWT.h"
#endif
namespace xmrig {
static constexpr uint32_t kReserveCount = 32768;
template<size_t N>
inline bool nextRound(WorkerJob<N> &job)
{
if (!job.nextRound(kReserveCount, 1)) {
JobResults::done(job.currentJob());
return false;
}
return true;
}
} // namespace xmrig
@@ -154,7 +173,8 @@ bool xmrig::CpuWorker<N>::selfTest()
# ifdef XMRIG_ALGO_CN_PICO
if (m_algorithm.family() == Algorithm::CN_PICO) {
return verify(Algorithm::CN_PICO_0, test_output_pico_trtl);
return verify(Algorithm::CN_PICO_0, test_output_pico_trtl) &&
verify(Algorithm::CN_PICO_TLO, test_output_pico_tlo);
}
# endif
@@ -165,6 +185,12 @@ bool xmrig::CpuWorker<N>::selfTest()
}
# endif
# ifdef XMRIG_ALGO_ASTROBWT
if (m_algorithm.family() == Algorithm::ASTROBWT) {
return verify(Algorithm::ASTROBWT_DERO, astrobwt_dero_test_out);
}
# endif
return false;
}
@@ -220,14 +246,20 @@ void xmrig::CpuWorker<N>::start()
first = false;
randomx_calculate_hash_first(m_vm->get(), tempHash, m_job.blob(), job.size());
}
m_job.nextRound(kReserveCount, 1);
if (!nextRound(m_job)) {
break;
}
randomx_calculate_hash_next(m_vm->get(), tempHash, m_job.blob(), job.size(), m_hash);
}
else
# endif
{
fn(job.algorithm())(m_job.blob(), job.size(), m_hash, m_ctx, job.height());
m_job.nextRound(kReserveCount, 1);
if (!nextRound(m_job)) {
break;
};
}
for (size_t i = 0; i < N; ++i) {

View File

@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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

View File

@@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2019 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -62,6 +62,7 @@ public:
virtual Assembly::Id assembly() const = 0;
virtual bool hasAES() const = 0;
virtual bool hasAVX2() const = 0;
virtual bool hasBMI2() const = 0;
virtual bool hasOneGbPages() const = 0;
virtual const char *backend() const = 0;
virtual const char *brand() const = 0;

View File

@@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2019 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -153,6 +153,7 @@ xmrig::AdvancedCpuInfo::AdvancedCpuInfo() :
}
m_avx2 = data.flags[CPU_FEATURE_AVX2] && data.flags[CPU_FEATURE_OSXSAVE];
m_bmi2 = data.flags[CPU_FEATURE_BMI2];
}
@@ -171,6 +172,17 @@ xmrig::CpuThreads xmrig::AdvancedCpuInfo::threads(const Algorithm &algorithm, ui
size_t cache = 0;
size_t count = 0;
# ifdef XMRIG_ALGO_ASTROBWT
if (algorithm == Algorithm::ASTROBWT_DERO) {
CpuThreads t;
count = threads();
for (size_t i = 0; i < count; ++i) {
t.add(i, 0);
}
return t;
}
# endif
if (m_L3) {
cache = m_L2_exclusive ? (m_L2 + m_L3) : m_L3;
}

View File

@@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2019 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -43,6 +43,7 @@ protected:
inline Assembly::Id assembly() const override { return m_assembly; }
inline bool hasAES() const override { return m_aes; }
inline bool hasAVX2() const override { return m_avx2; }
inline bool hasBMI2() const override { return m_bmi2; }
inline bool hasOneGbPages() const override { return m_pdpe1gb; }
inline const char *backend() const override { return m_backend; }
inline const char *brand() const override { return m_brand; }
@@ -59,6 +60,7 @@ private:
Assembly m_assembly;
bool m_aes = false;
bool m_avx2 = false;
bool m_bmi2 = false;
bool m_L2_exclusive = false;
char m_backend[32]{};
char m_brand[64 + 5]{};

View File

@@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2019 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -45,6 +45,10 @@
# define bit_AVX2 (1 << 5)
#endif
#ifndef bit_BMI2
# define bit_BMI2 (1 << 8)
#endif
#ifndef bit_PDPE1GB
# define bit_PDPE1GB (1 << 26)
#endif
@@ -141,6 +145,12 @@ static inline bool has_avx2()
}
static inline bool has_bmi2()
{
return has_feature(EXTENDED_FEATURES, EBX_Reg, bit_BMI2);
}
static inline bool has_pdpe1gb()
{
return has_feature(PROCESSOR_EXT_INFO, EDX_Reg, bit_PDPE1GB);
@@ -154,6 +164,7 @@ xmrig::BasicCpuInfo::BasicCpuInfo() :
m_threads(std::thread::hardware_concurrency()),
m_aes(has_aes_ni()),
m_avx2(has_avx2()),
m_bmi2(has_bmi2()),
m_pdpe1gb(has_pdpe1gb())
{
cpu_brand_string(m_brand);
@@ -247,5 +258,15 @@ xmrig::CpuThreads xmrig::BasicCpuInfo::threads(const Algorithm &algorithm, uint3
}
# endif
# ifdef XMRIG_ALGO_ASTROBWT
if (algorithm.family() == Algorithm::ASTROBWT) {
CpuThreads threads;
for (size_t i = 0; i < count; ++i) {
threads.add(i, 0);
}
return threads;
}
# endif
return CpuThreads(std::max<size_t>(count / 2, 1), 1);
}

View File

@@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2019 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -44,6 +44,7 @@ protected:
inline Assembly::Id assembly() const override { return m_assembly; }
inline bool hasAES() const override { return m_aes; }
inline bool hasAVX2() const override { return m_avx2; }
inline bool hasBMI2() const override { return m_bmi2; }
inline bool hasOneGbPages() const override { return m_pdpe1gb; }
inline const char *brand() const override { return m_brand; }
inline MsrMod msrMod() const override { return m_msrMod; }
@@ -63,6 +64,7 @@ private:
Assembly m_assembly = Assembly::NONE;
bool m_aes = false;
const bool m_avx2 = false;
const bool m_bmi2 = false;
const bool m_pdpe1gb = false;
MsrMod m_msrMod = MSR_MOD_NONE;
Vendor m_vendor = VENDOR_UNKNOWN;

View File

@@ -216,6 +216,12 @@ bool xmrig::HwlocCpuInfo::membind(hwloc_const_bitmap_t nodeset)
xmrig::CpuThreads xmrig::HwlocCpuInfo::threads(const Algorithm &algorithm, uint32_t limit) const
{
# ifdef XMRIG_ALGO_ASTROBWT
if (algorithm == Algorithm::ASTROBWT_DERO) {
return BasicCpuInfo::threads(algorithm, limit);
}
# endif
if (L2() == 0 && L3() == 0) {
return BasicCpuInfo::threads(algorithm, limit);
}

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -254,7 +254,8 @@ public:
}
}
LOG_INFO(CYAN_BOLD("#%u") YELLOW(" %s") MAGENTA_BOLD("%4uW") CSI "1;%um %2uC" CLEAR WHITE_BOLD("%s") "%s",
LOG_INFO("%s" CYAN_BOLD(" #%u") YELLOW(" %s") MAGENTA_BOLD("%4uW") CSI "1;%um %2uC" CLEAR WHITE_BOLD("%s") "%s",
tag,
device.index(),
device.topology().toString().data(),
health.power,
@@ -338,13 +339,8 @@ const xmrig::String &xmrig::CudaBackend::type() const
}
void xmrig::CudaBackend::execCommand(char command)
void xmrig::CudaBackend::execCommand(char)
{
# ifdef XMRIG_FEATURE_NVML
if (command == 'e' || command == 'E') {
d_ptr->printHealth();
}
# endif
}
@@ -387,6 +383,14 @@ void xmrig::CudaBackend::printHashrate(bool details)
}
void xmrig::CudaBackend::printHealth()
{
# ifdef XMRIG_FEATURE_NVML
d_ptr->printHealth();
# endif
}
void xmrig::CudaBackend::setJob(const Job &job)
{
const auto &cuda = d_ptr->controller->config()->cuda();
@@ -455,15 +459,6 @@ void xmrig::CudaBackend::stop()
void xmrig::CudaBackend::tick(uint64_t ticks)
{
d_ptr->workers.tick(ticks);
# ifdef XMRIG_FEATURE_NVML
if (isEnabled()) {
auto seconds = d_ptr->controller->config()->healthPrintTime();
if (seconds && ticks && (ticks % (seconds * 2)) == 0) {
d_ptr->printHealth();
}
}
# endif
}

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -59,6 +59,7 @@ protected:
void execCommand(char command) override;
void prepare(const Job &nextJob) override;
void printHashrate(bool details) override;
void printHealth() override;
void setJob(const Job &job) override;
void start(IWorker *worker, bool ready) override;
void stop() override;

View File

@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -78,9 +78,15 @@ xmrig::CudaWorker::CudaWorker(size_t id, const CudaLaunchData &data) :
break;
}
if (!m_runner || !m_runner->init()) {
if (!m_runner) {
return;
}
if (!m_runner->init()) {
delete m_runner;
m_runner = nullptr;
}
}
@@ -133,7 +139,9 @@ void xmrig::CudaWorker::start()
}
const size_t batch_size = intensity();
m_job.nextRound(roundSize(batch_size), batch_size);
if (!m_job.nextRound(roundSize(batch_size), batch_size)) {
JobResults::done(m_job.currentJob());
}
storeStats();
std::this_thread::yield();

View File

@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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

View File

@@ -47,7 +47,7 @@ xmrig::CudaBaseRunner::~CudaBaseRunner()
bool xmrig::CudaBaseRunner::init()
{
m_ctx = CudaLib::alloc(m_data.thread.index(), m_data.thread.bfactor(), m_data.thread.bsleep());
if (CudaLib::deviceInfo(m_ctx, m_data.thread.blocks(), m_data.thread.threads(), m_data.algorithm, m_data.thread.datasetHost()) != 0) {
if (!callWrapper(CudaLib::deviceInfo(m_ctx, m_data.thread.blocks(), m_data.thread.threads(), m_data.algorithm, m_data.thread.datasetHost()))) {
return false;
}

View File

@@ -31,8 +31,9 @@
#include "crypto/rx/RxDataset.h"
xmrig::CudaRxRunner::CudaRxRunner(size_t index, const CudaLaunchData &data) : CudaBaseRunner(index, data),
m_datasetHost(data.thread.datasetHost() > 0)
xmrig::CudaRxRunner::CudaRxRunner(size_t index, const CudaLaunchData &data) :
CudaBaseRunner(index, data),
m_datasetHost(data.thread.datasetHost() > 0)
{
m_intensity = m_data.thread.threads() * m_data.thread.blocks();
const size_t scratchpads_size = m_intensity * m_data.algorithm.l3();

View File

@@ -41,7 +41,7 @@ xmrig::CudaDevice::CudaDevice(uint32_t index, int32_t bfactor, int32_t bsleep) :
m_index(index)
{
auto ctx = CudaLib::alloc(index, bfactor, bsleep);
if (CudaLib::deviceInfo(ctx, 0, 0, Algorithm::INVALID) != 0) {
if (!CudaLib::deviceInfo(ctx, 0, 0, Algorithm::INVALID)) {
CudaLib::release(ctx);
return;
@@ -107,7 +107,7 @@ uint32_t xmrig::CudaDevice::smx() const
void xmrig::CudaDevice::generate(const Algorithm &algorithm, CudaThreads &threads) const
{
if (CudaLib::deviceInfo(m_ctx, -1, -1, algorithm) != 0) {
if (!CudaLib::deviceInfo(m_ctx, -1, -1, algorithm)) {
return;
}

View File

@@ -28,6 +28,7 @@
#include "backend/cuda/wrappers/CudaLib.h"
#include "base/kernel/Env.h"
#include "crypto/rx/RxAlgo.h"
@@ -49,6 +50,7 @@ static const char *kAlloc = "alloc";
static const char *kCnHash = "cnHash";
static const char *kDeviceCount = "deviceCount";
static const char *kDeviceInfo = "deviceInfo";
static const char *kDeviceInfo_v2 = "deviceInfo_v2";
static const char *kDeviceInit = "deviceInit";
static const char *kDeviceInt = "deviceInt";
static const char *kDeviceName = "deviceName";
@@ -61,6 +63,7 @@ static const char *kRelease = "release";
static const char *kRxHash = "rxHash";
static const char *kRxPrepare = "rxPrepare";
static const char *kSetJob = "setJob";
static const char *kSetJob_v2 = "setJob_v2";
static const char *kSymbolNotFound = "symbol not found";
static const char *kVersion = "version";
@@ -69,6 +72,7 @@ using alloc_t = nvid_ctx * (*)(uint32_
using cnHash_t = bool (*)(nvid_ctx *, uint32_t, uint64_t, uint64_t, uint32_t *, uint32_t *);
using deviceCount_t = uint32_t (*)();
using deviceInfo_t = int32_t (*)(nvid_ctx *, int32_t, int32_t, int32_t, int32_t);
using deviceInfo_v2_t = bool (*)(nvid_ctx *, int32_t, int32_t, const char *, int32_t);
using deviceInit_t = bool (*)(nvid_ctx *);
using deviceInt_t = int32_t (*)(nvid_ctx *, CudaLib::DeviceProperty);
using deviceName_t = const char * (*)(nvid_ctx *);
@@ -81,6 +85,7 @@ using release_t = void (*)(nvid_ctx *);
using rxHash_t = bool (*)(nvid_ctx *, uint32_t, uint64_t, uint32_t *, uint32_t *);
using rxPrepare_t = bool (*)(nvid_ctx *, const void *, size_t, bool, uint32_t);
using setJob_t = bool (*)(nvid_ctx *, const void *, size_t, int32_t);
using setJob_v2_t = bool (*)(nvid_ctx *, const void *, size_t, const char *);
using version_t = uint32_t (*)(Version);
@@ -88,6 +93,7 @@ static alloc_t pAlloc = nullptr;
static cnHash_t pCnHash = nullptr;
static deviceCount_t pDeviceCount = nullptr;
static deviceInfo_t pDeviceInfo = nullptr;
static deviceInfo_v2_t pDeviceInfo_v2 = nullptr;
static deviceInit_t pDeviceInit = nullptr;
static deviceInt_t pDeviceInt = nullptr;
static deviceName_t pDeviceName = nullptr;
@@ -100,6 +106,7 @@ static release_t pRelease = nullptr;
static rxHash_t pRxHash = nullptr;
static rxPrepare_t pRxPrepare = nullptr;
static setJob_t pSetJob = nullptr;
static setJob_v2_t pSetJob_v2 = nullptr;
static version_t pVersion = nullptr;
@@ -117,7 +124,7 @@ String CudaLib::m_loader;
bool xmrig::CudaLib::init(const char *fileName)
{
if (!m_initialized) {
m_loader = fileName == nullptr ? defaultLoader() : fileName;
m_loader = fileName == nullptr ? defaultLoader() : Env::expand(fileName);
m_ready = uv_dlopen(m_loader, &cudaLib) == 0 && load();
m_initialized = true;
}
@@ -144,6 +151,18 @@ bool xmrig::CudaLib::cnHash(nvid_ctx *ctx, uint32_t startNonce, uint64_t height,
}
bool xmrig::CudaLib::deviceInfo(nvid_ctx *ctx, int32_t blocks, int32_t threads, const Algorithm &algorithm, int32_t dataset_host) noexcept
{
const Algorithm algo = RxAlgo::id(algorithm);
if (pDeviceInfo_v2) {
return pDeviceInfo_v2(ctx, blocks, threads, algo.isValid() ? algo.shortName() : nullptr, dataset_host);
}
return pDeviceInfo(ctx, blocks, threads, algo, dataset_host) == 0;
}
bool xmrig::CudaLib::deviceInit(nvid_ctx *ctx) noexcept
{
return pDeviceInit(ctx);
@@ -164,7 +183,12 @@ bool xmrig::CudaLib::rxPrepare(nvid_ctx *ctx, const void *dataset, size_t datase
bool xmrig::CudaLib::setJob(nvid_ctx *ctx, const void *data, size_t size, const Algorithm &algorithm) noexcept
{
return pSetJob(ctx, data, size, RxAlgo::id(algorithm));
const Algorithm algo = RxAlgo::id(algorithm);
if (pSetJob_v2) {
return pSetJob_v2(ctx, data, size, algo.shortName());
}
return pSetJob(ctx, data, size, algo);
}
@@ -186,12 +210,6 @@ const char *xmrig::CudaLib::pluginVersion() noexcept
}
int xmrig::CudaLib::deviceInfo(nvid_ctx *ctx, int32_t blocks, int32_t threads, const Algorithm &algorithm, int32_t dataset_host) noexcept
{
return pDeviceInfo(ctx, blocks, threads, RxAlgo::id(algorithm), dataset_host);
}
int32_t xmrig::CudaLib::deviceInt(nvid_ctx *ctx, DeviceProperty property) noexcept
{
return pDeviceInt(ctx, property);
@@ -291,11 +309,13 @@ bool xmrig::CudaLib::load()
return false;
}
uv_dlsym(&cudaLib, kDeviceInfo_v2, reinterpret_cast<void**>(&pDeviceInfo_v2));
uv_dlsym(&cudaLib, kSetJob_v2, reinterpret_cast<void**>(&pSetJob_v2));
try {
DLSYM(Alloc);
DLSYM(CnHash);
DLSYM(DeviceCount);
DLSYM(DeviceInfo);
DLSYM(DeviceInit);
DLSYM(DeviceInt);
DLSYM(DeviceName);
@@ -307,8 +327,15 @@ bool xmrig::CudaLib::load()
DLSYM(Release);
DLSYM(RxHash);
DLSYM(RxPrepare);
DLSYM(SetJob);
DLSYM(Version);
if (!pDeviceInfo_v2) {
DLSYM(DeviceInfo);
}
if (!pSetJob_v2) {
DLSYM(SetJob);
}
} catch (std::exception &ex) {
return false;
}
@@ -319,7 +346,7 @@ bool xmrig::CudaLib::load()
}
const char *xmrig::CudaLib::defaultLoader()
xmrig::String xmrig::CudaLib::defaultLoader()
{
# if defined(__APPLE__)
return "/System/Library/Frameworks/OpenCL.framework/OpenCL"; // FIXME

View File

@@ -74,6 +74,7 @@ public:
static inline const String &loader() { return m_loader; }
static bool cnHash(nvid_ctx *ctx, uint32_t startNonce, uint64_t height, uint64_t target, uint32_t *rescount, uint32_t *resnonce);
static bool deviceInfo(nvid_ctx *ctx, int32_t blocks, int32_t threads, const Algorithm &algorithm, int32_t dataset_host = -1) noexcept;
static bool deviceInit(nvid_ctx *ctx) noexcept;
static bool rxHash(nvid_ctx *ctx, uint32_t startNonce, uint64_t target, uint32_t *rescount, uint32_t *resnonce) noexcept;
static bool rxPrepare(nvid_ctx *ctx, const void *dataset, size_t datasetSize, bool dataset_host, uint32_t batchSize) noexcept;
@@ -81,7 +82,6 @@ public:
static const char *deviceName(nvid_ctx *ctx) noexcept;
static const char *lastError(nvid_ctx *ctx) noexcept;
static const char *pluginVersion() noexcept;
static int deviceInfo(nvid_ctx *ctx, int32_t blocks, int32_t threads, const Algorithm &algorithm, int32_t dataset_host = -1) noexcept;
static int32_t deviceInt(nvid_ctx *ctx, DeviceProperty property) noexcept;
static nvid_ctx *alloc(uint32_t id, int32_t bfactor, int32_t bsleep) noexcept;
static std::string version(uint32_t version);
@@ -95,7 +95,7 @@ public:
private:
static bool load();
static const char *defaultLoader();
static String defaultLoader();
static bool m_initialized;
static bool m_ready;

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -27,11 +27,11 @@
#include <string>
#include "backend/opencl/OclBackend.h"
#include "backend/common/Hashrate.h"
#include "backend/common/interfaces/IWorker.h"
#include "backend/common/Tags.h"
#include "backend/common/Workers.h"
#include "backend/opencl/OclBackend.h"
#include "backend/opencl/OclConfig.h"
#include "backend/opencl/OclLaunchData.h"
#include "backend/opencl/OclWorker.h"
@@ -52,6 +52,13 @@
#endif
#ifdef XMRIG_FEATURE_ADL
#include "backend/opencl/wrappers/AdlLib.h"
namespace xmrig { static const char *kAdlLabel = "ADL"; }
#endif
namespace xmrig {
@@ -59,14 +66,15 @@ extern template class Threads<OclThreads>;
constexpr const size_t oneMiB = 1024U * 1024U;
static const char *kLabel = "OPENCL";
static const char *tag = MAGENTA_BG_BOLD(WHITE_BOLD_S " ocl ");
static const String kType = "opencl";
static std::mutex mutex;
static void printDisabled(const char *reason)
static void printDisabled(const char *label, const char *reason)
{
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") RED_BOLD("disabled") "%s", "OPENCL", reason);
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") RED_BOLD("disabled") "%s", label, reason);
}
@@ -129,11 +137,11 @@ public:
void init(const OclConfig &cl)
{
if (!cl.isEnabled()) {
return printDisabled("");
return printDisabled(kLabel, "");
}
if (!OclLib::init(cl.loader())) {
return printDisabled(RED_S " (failed to load OpenCL runtime)");
return printDisabled(kLabel, RED_S " (failed to load OpenCL runtime)");
}
if (platform.isValid()) {
@@ -142,14 +150,30 @@ public:
platform = cl.platform();
if (!platform.isValid()) {
return printDisabled(RED_S " (selected OpenCL platform NOT found)");
return printDisabled(kLabel, RED_S " (selected OpenCL platform NOT found)");
}
devices = platform.devices();
if (devices.empty()) {
return printDisabled(RED_S " (no devices)");
return printDisabled(kLabel, RED_S " (no devices)");
}
# ifdef XMRIG_FEATURE_ADL
if (cl.isAdlEnabled()) {
if (AdlLib::init()) {
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") "press " MAGENTA_BG(WHITE_BOLD_S "e") " for health report",
kAdlLabel
);
}
else {
printDisabled(kAdlLabel, RED_S " (failed to load ADL)");
}
}
else {
printDisabled(kAdlLabel, "");
}
# endif
Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") CYAN_BOLD("#%zu ") WHITE_BOLD("%s") "/" WHITE_BOLD("%s"), "OPENCL", platform.index(), platform.name().data(), platform.version().data());
for (const OclDevice &device : devices) {
@@ -204,6 +228,32 @@ public:
}
# ifdef XMRIG_FEATURE_ADL
void printHealth()
{
if (!AdlLib::isReady()) {
return;
}
for (const auto &device : devices) {
const auto health = AdlLib::health(device);
LOG_INFO("%s" CYAN_BOLD(" #%u") YELLOW(" %s") MAGENTA_BOLD("%4uW") CSI "1;%um %2uC" CYAN_BOLD(" %4u") CYAN("RPM") WHITE_BOLD(" %u/%u") "MHz",
tag,
device.index(),
device.topology().toString().data(),
health.power,
health.temperature < 60 ? 32 : (health.temperature > 85 ? 31 : 33),
health.temperature,
health.rpm,
health.clock,
health.memClock
);
}
}
# endif
Algorithm algo;
Controller *controller;
OclContext context;
@@ -237,6 +287,10 @@ xmrig::OclBackend::~OclBackend()
delete d_ptr;
OclLib::close();
# ifdef XMRIG_FEATURE_ADL
AdlLib::close();
# endif
}
@@ -270,6 +324,11 @@ const xmrig::String &xmrig::OclBackend::type() const
}
void xmrig::OclBackend::execCommand(char)
{
}
void xmrig::OclBackend::prepare(const Job &)
{
}
@@ -309,6 +368,14 @@ void xmrig::OclBackend::printHashrate(bool details)
}
void xmrig::OclBackend::printHealth()
{
# ifdef XMRIG_FEATURE_ADL
d_ptr->printHealth();
# endif
}
void xmrig::OclBackend::setJob(const Job &job)
{
const auto &cl = d_ptr->controller->config()->cl();

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -51,15 +51,15 @@ public:
~OclBackend() override;
protected:
inline void execCommand(char) override {}
bool isEnabled() const override;
bool isEnabled(const Algorithm &algorithm) const override;
const Hashrate *hashrate() const override;
const String &profileName() const override;
const String &type() const override;
void execCommand(char command) override;
void prepare(const Job &nextJob) override;
void printHashrate(bool details) override;
void printHealth() override;
void setJob(const Job &job) override;
void start(IWorker *worker, bool ready) override;
void stop() override;

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -35,14 +35,21 @@
namespace xmrig {
static const char *kAMD = "AMD";
static const char *kCache = "cache";
static const char *kDevicesHint = "devices-hint";
static const char *kEnabled = "enabled";
static const char *kINTEL = "INTEL";
static const char *kLoader = "loader";
#ifndef XMRIG_OS_APPLE
static const char *kAMD = "AMD";
static const char *kINTEL = "INTEL";
static const char *kNVIDIA = "NVIDIA";
static const char *kPlatform = "platform";
#endif
#ifdef XMRIG_FEATURE_ADL
static const char *kAdl = "adl";
#endif
extern template class Threads<OclThreads>;
@@ -51,10 +58,11 @@ extern template class Threads<OclThreads>;
}
xmrig::OclConfig::OclConfig() :
m_platformVendor(kAMD)
{
}
#ifndef XMRIG_OS_APPLE
xmrig::OclConfig::OclConfig() : m_platformVendor(kAMD) {}
#else
xmrig::OclConfig::OclConfig() = default;
#endif
xmrig::OclPlatform xmrig::OclConfig::platform() const
@@ -64,6 +72,7 @@ xmrig::OclPlatform xmrig::OclConfig::platform() const
return {};
}
# ifndef XMRIG_OS_APPLE
if (!m_platformVendor.isEmpty()) {
String search;
String vendor = m_platformVendor;
@@ -93,6 +102,9 @@ xmrig::OclPlatform xmrig::OclConfig::platform() const
}
return {};
# else
return platforms[0];
# endif
}
@@ -106,7 +118,14 @@ rapidjson::Value xmrig::OclConfig::toJSON(rapidjson::Document &doc) const
obj.AddMember(StringRef(kEnabled), m_enabled, allocator);
obj.AddMember(StringRef(kCache), m_cache, allocator);
obj.AddMember(StringRef(kLoader), m_loader.toJSON(), allocator);
# ifndef XMRIG_OS_APPLE
obj.AddMember(StringRef(kPlatform), m_platformVendor.isEmpty() ? Value(m_platformIndex) : m_platformVendor.toJSON(), allocator);
# endif
# ifdef XMRIG_FEATURE_ADL
obj.AddMember(StringRef(kAdl), m_adl, allocator);
# endif
m_threads.toJSON(obj, doc);
@@ -152,9 +171,16 @@ void xmrig::OclConfig::read(const rapidjson::Value &value)
m_cache = Json::getBool(value, kCache, m_cache);
m_loader = Json::getString(value, kLoader);
# ifndef XMRIG_OS_APPLE
setPlatform(Json::getValue(value, kPlatform));
# endif
setDevicesHint(Json::getString(value, kDevicesHint));
# ifdef XMRIG_FEATURE_ADL
m_adl = Json::getBool(value, kAdl, m_adl);
# endif
m_threads.read(value);
generate();
@@ -214,6 +240,7 @@ void xmrig::OclConfig::setDevicesHint(const char *devicesHint)
}
#ifndef XMRIG_OS_APPLE
void xmrig::OclConfig::setPlatform(const rapidjson::Value &platform)
{
if (platform.IsString()) {
@@ -224,3 +251,4 @@ void xmrig::OclConfig::setPlatform(const rapidjson::Value &platform)
m_platformIndex = platform.GetUint();
}
}
#endif

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -51,19 +51,31 @@ public:
inline const String &loader() const { return m_loader; }
inline const Threads<OclThreads> &threads() const { return m_threads; }
# ifdef XMRIG_FEATURE_ADL
inline bool isAdlEnabled() const { return m_adl; }
# endif
private:
void generate();
void setDevicesHint(const char *devicesHint);
void setPlatform(const rapidjson::Value &platform);
bool m_cache = true;
bool m_enabled = false;
bool m_shouldSave = false;
std::vector<uint32_t> m_devicesHint;
String m_loader;
String m_platformVendor;
Threads<OclThreads> m_threads;
# ifndef XMRIG_OS_APPLE
void setPlatform(const rapidjson::Value &platform);
String m_platformVendor;
uint32_t m_platformIndex = 0;
# endif
# ifdef XMRIG_FEATURE_ADL
bool m_adl = true;
# endif
};

View File

@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -25,7 +25,6 @@
#include "backend/opencl/OclWorker.h"
#include "backend/common/Tags.h"
#include "backend/opencl/runners/OclCnRunner.h"
#include "backend/opencl/runners/tools/OclSharedData.h"
@@ -187,7 +186,9 @@ void xmrig::OclWorker::start()
JobResults::submit(m_job.currentJob(), results, results[0xFF]);
}
m_job.nextRound(roundSize(m_intensity), m_intensity);
if (!m_job.nextRound(roundSize(m_intensity), m_intensity)) {
JobResults::done(m_job.currentJob());
}
storeStats(t);
std::this_thread::yield();

View File

@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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

View File

@@ -16,14 +16,15 @@
#define ALGO_CN_HEAVY_TUBE 15
#define ALGO_CN_HEAVY_XHV 16
#define ALGO_CN_PICO_0 17
#define ALGO_RX_0 18
#define ALGO_RX_WOW 19
#define ALGO_RX_LOKI 20
#define ALGO_RX_ARQMA 21
#define ALGO_RX_SFX 22
#define ALGO_RX_V 23
#define ALGO_CN_PICO_TLO 18
#define ALGO_RX_0 19
#define ALGO_RX_WOW 20
#define ALGO_RX_LOKI 21
#define ALGO_RX_ARQMA 22
#define ALGO_RX_SFX 23
#define ALGO_AR2_CHUKWA 24
#define ALGO_AR2_WRKZ 25
#define ALGO_ASTROBWT_DERO 26
#define FAMILY_UNKNOWN 0
#define FAMILY_CN 1
@@ -32,3 +33,4 @@
#define FAMILY_CN_PICO 4
#define FAMILY_RANDOM_X 5
#define FAMILY_ARGON2 6
#define FAMILY_ASTROBWT 7

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -43,6 +43,62 @@ along with RandomX OpenCL. If not, see <http://www.gnu.org/licenses/>.
#define RANDOMX_JUMP_BITS 8
#define RANDOMX_JUMP_OFFSET 8
#if GCN_VERSION >= 15
#define S_SETPC_B64_S12_13 0xbe80200cu
#define V_AND_B32_CALC_ADDRESS 0x3638000eu
#define GLOBAL_LOAD_DWORDX2_SCRATCHPAD_LOAD 0xdc348000u
#define S_WAITCNT_SCRATCHPAD_LOAD2 0xbf8c3f70u
#define V_READLANE_B32_SCRATCHPAD_LOAD2 0xd7600000u
#define S_MUL_HI_U32_IMUL_R 0x9a8f1010u
#define S_MUL_I32_IMUL 0x93000000u
#define S_MUL_HI_U32_IMUL_R_2 0x9a8fff10u
#define S_MUL_HI_U32_IMUL_M 0x9aa10e10u
#define S_MOV_B32_IMUL_RCP 0xbea003ffu
#define S_MUL_HI_U32_IMUL_RCP 0x9a8f2010u
#define S_XOR_B32_64 0x89000000u
#define S_MOV_B32_XOR_R 0xbebe03ffu
#define S_LSHR 0x90000000u
#define S_LSHL 0x8f000000u
#define S_OR 0x88000000u
#define S_AND 0x87000000u
#define S_BFE 0x94000000u
#define DS_SWIZZLE_B32_FSWAP_R 0xd8d48001u
#define V_ADD_F64 0xd564003cu
#define V_AND_B32 0x36000000u
#define GLOBAL_LOAD_DWORD_SCRATCHPAD_LOAD_FP 0xdc308000u
#define V_XOR_B32 0x3a000000u
#define V_MUL_F64 0xd5650044u
#else
#define S_SETPC_B64_S12_13 0xbe801d0cu
#define V_AND_B32_CALC_ADDRESS 0x2638000eu
#define GLOBAL_LOAD_DWORDX2_SCRATCHPAD_LOAD 0xdc548000u
#define S_WAITCNT_SCRATCHPAD_LOAD2 0xbf8c0f70u
#define V_READLANE_B32_SCRATCHPAD_LOAD2 0xd2890000u
#define S_MUL_HI_U32_IMUL_R 0x960f1010u
#define S_MUL_I32_IMUL 0x92000000u
#define S_MUL_HI_U32_IMUL_R_2 0x960fff10u
#define S_MUL_HI_U32_IMUL_M 0x96210e10u
#define S_MOV_B32_IMUL_RCP 0xbea000ffu
#define S_MUL_HI_U32_IMUL_RCP 0x960f2010u
#define S_XOR_B32_64 0x88000000u
#define S_MOV_B32_XOR_R 0xbebe00ffu
#define S_LSHR 0x8f000000u
#define S_LSHL 0x8e000000u
#define S_OR 0x87000000u
#define S_AND 0x86000000u
#define S_BFE 0x93000000u
#define DS_SWIZZLE_B32_FSWAP_R 0xd87a8001u
#define V_ADD_F64 0xd280003cu
#define V_AND_B32 0x26000000u
#define GLOBAL_LOAD_DWORD_SCRATCHPAD_LOAD_FP 0xdc508000u
#define V_XOR_B32 0x2a000000u
#define V_MUL_F64 0xd2810044u
#endif
__global uint* jit_scratchpad_calc_address(__global uint* p, uint src, uint imm32, uint mask_reg, uint batch_size)
{
// s_add_i32 s14, s(16 + src * 2), imm32
@@ -50,7 +106,7 @@ __global uint* jit_scratchpad_calc_address(__global uint* p, uint src, uint imm3
*(p++) = imm32;
// v_and_b32 v28, s14, mask_reg
*(p++) = 0x2638000eu | (mask_reg << 9);
*(p++) = V_AND_B32_CALC_ADDRESS | (mask_reg << 9);
return p;
}
@@ -70,7 +126,7 @@ __global uint* jit_scratchpad_load(__global uint* p, uint vgpr_index)
#if GCN_VERSION >= 14
// global_load_dwordx2 v[vgpr_index:vgpr_index+1], v28, s[0:1]
*(p++) = 0xdc548000u;
*(p++) = GLOBAL_LOAD_DWORDX2_SCRATCHPAD_LOAD;
*(p++) = 0x0000001cu | (vgpr_index << 24);
#else
*(p++) = 0x32543902u; // v_add_u32 v42, vcc, v2, v28
@@ -87,14 +143,14 @@ __global uint* jit_scratchpad_load2(__global uint* p, uint vgpr_index, int vmcnt
{
// s_waitcnt vmcnt(N)
if (vmcnt >= 0)
*(p++) = 0xbf8c0f70u | (vmcnt & 15) | ((vmcnt >> 4) << 14);
*(p++) = S_WAITCNT_SCRATCHPAD_LOAD2 | (vmcnt & 15) | ((vmcnt >> 4) << 14);
// v_readlane_b32 s14, vgpr_index, 0
*(p++) = 0xd289000eu;
*(p++) = V_READLANE_B32_SCRATCHPAD_LOAD2 | 14;
*(p++) = 0x00010100u | vgpr_index;
// v_readlane_b32 s15, vgpr_index + 1, 0
*(p++) = 0xd289000fu;
*(p++) = V_READLANE_B32_SCRATCHPAD_LOAD2 | 15;
*(p++) = 0x00010100u | (vgpr_index + 1);
return p;
@@ -107,9 +163,12 @@ __global uint* jit_scratchpad_calc_address_fp(__global uint* p, uint src, uint i
*(p++) = imm32;
// v_and_b32 v28, s14, mask_reg
*(p++) = 0x2638000eu | (mask_reg << 9);
*(p++) = V_AND_B32 | 0x38000eu | (mask_reg << 9);
#if GCN_VERSION >= 14
#if GCN_VERSION >= 15
// v_add_nc_u32 v28, v28, v44
*(p++) = 0x4a38591cu;
#elif GCN_VERSION == 14
// v_add_u32 v28, v28, v44
*(p++) = 0x6838591cu;
#else
@@ -126,7 +185,7 @@ __global uint* jit_scratchpad_load_fp(__global uint* p, uint vgpr_index)
#if GCN_VERSION >= 14
// global_load_dword v(vgpr_index), v28, s[0:1]
*(p++) = 0xdc508000u;
*(p++) = GLOBAL_LOAD_DWORD_SCRATCHPAD_LOAD_FP;
*(p++) = 0x0000001cu | (vgpr_index << 24);
#else
*(p++) = 0x32543902u; // v_add_u32 v42, vcc, v2, v28
@@ -143,7 +202,7 @@ __global uint* jit_scratchpad_load2_fp(__global uint* p, uint vgpr_index, int vm
{
// s_waitcnt vmcnt(N)
if (vmcnt >= 0)
*(p++) = 0xbf8c0f70u | (vmcnt & 15) | ((vmcnt >> 4) << 14);
*(p++) = S_WAITCNT_SCRATCHPAD_LOAD2 | (vmcnt & 15) | ((vmcnt >> 4) << 14);
// v_cvt_f64_i32 v[28:29], vgpr_index
*(p++) = 0x7e380900u | vgpr_index;
@@ -164,7 +223,7 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
if (shift > 0) // p = 3/4
{
// s_lshl_b64 s[14:15], s[(16 + src * 2):(17 + src * 2)], shift
*(p++) = 0x8e8e8010u | (src << 1) | (shift << 8);
*(p++) = S_LSHL | 0x8e8010u | (src << 1) | (shift << 8);
// s_add_u32 s(16 + dst * 2), s(16 + dst * 2), s14
*(p++) = 0x80100e10u | (dst << 1) | (dst << 17);
@@ -283,7 +342,7 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
{
#if GCN_VERSION >= 14
// s_mul_hi_u32 s15, s(16 + dst * 2), s(16 + src * 2)
*(p++) = 0x960f1010u | (dst << 1) | (src << 9);
*(p++) = S_MUL_HI_U32_IMUL_R | (dst << 1) | (src << 9);
#else
// v_mov_b32 v28, s(16 + dst * 2)
*(p++) = 0x7e380210u | (dst << 1);
@@ -296,25 +355,25 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
#endif
// s_mul_i32 s14, s(16 + dst * 2), s(17 + src * 2)
*(p++) = 0x920e1110u | (dst << 1) | (src << 9);
*(p++) = S_MUL_I32_IMUL | 0x0e1110u | (dst << 1) | (src << 9);
// s_add_u32 s15, s15, s14
*(p++) = 0x800f0e0fu;
// s_mul_i32 s14, s(17 + dst * 2), s(16 + src * 2)
*(p++) = 0x920e1011u | (dst << 1) | (src << 9);
*(p++) = S_MUL_I32_IMUL | 0x0e1011u | (dst << 1) | (src << 9);
// s_add_u32 s(17 + dst * 2), s15, s14
*(p++) = 0x80110e0fu | (dst << 17);
// s_mul_i32 s(16 + dst * 2), s(16 + dst * 2), s(16 + src * 2)
*(p++) = 0x92101010u | (dst << 1) | (dst << 17) | (src << 9);
*(p++) = S_MUL_I32_IMUL | 0x101010u | (dst << 1) | (dst << 17) | (src << 9);
}
else // p = 1/8
{
#if GCN_VERSION >= 14
// s_mul_hi_u32 s15, s(16 + dst * 2), imm32
*(p++) = 0x960fff10u | (dst << 1);
*(p++) = S_MUL_HI_U32_IMUL_R_2 | (dst << 1);
*(p++) = inst.y;
#else
// v_mov_b32 v28, imm32
@@ -335,14 +394,14 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
}
// s_mul_i32 s14, s(17 + dst * 2), imm32
*(p++) = 0x920eff11u | (dst << 1);
*(p++) = S_MUL_I32_IMUL | 0x0eff11u | (dst << 1);
*(p++) = inst.y;
// s_add_u32 s(17 + dst * 2), s15, s14
*(p++) = 0x80110e0fu | (dst << 17);
// s_mul_i32 s(16 + dst * 2), s(16 + dst * 2), imm32
*(p++) = 0x9210ff10u | (dst << 1) | (dst << 17);
*(p++) = S_MUL_I32_IMUL | 0x10ff10u | (dst << 1) | (dst << 17);
*(p++) = inst.y;
}
@@ -369,7 +428,7 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
#if GCN_VERSION >= 14
// s_mul_hi_u32 s33, s(16 + dst * 2), s14
*(p++) = 0x96210e10u | (dst << 1);
*(p++) = S_MUL_HI_U32_IMUL_M | (dst << 1);
#else
// v_mov_b32 v28, s(16 + dst * 2)
*(p++) = 0x7e380210u | (dst << 1);
@@ -382,19 +441,19 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
#endif
// s_mul_i32 s32, s(16 + dst * 2), s15
*(p++) = 0x92200f10u | (dst << 1);
*(p++) = S_MUL_I32_IMUL | 0x200f10u | (dst << 1);
// s_add_u32 s33, s33, s32
*(p++) = 0x80212021u;
// s_mul_i32 s32, s(17 + dst * 2), s14
*(p++) = 0x92200e11u | (dst << 1);
*(p++) = S_MUL_I32_IMUL | 0x200e11u | (dst << 1);
// s_add_u32 s(17 + dst * 2), s33, s32
*(p++) = 0x80112021u | (dst << 17);
// s_mul_i32 s(16 + dst * 2), s(16 + dst * 2), s14
*(p++) = 0x92100e10u | (dst << 1) | (dst << 17);
*(p++) = S_MUL_I32_IMUL | 0x100e10u | (dst << 1) | (dst << 17);
}
// (12*7/8 + 8*1/8 + 28) + 24 = 63.5 bytes on average
@@ -404,10 +463,17 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
if (opcode < RANDOMX_FREQ_IMULH_R)
{
#if GCN_VERSION >= 15
*(p++) = 0xbe8e0410u | (dst << 1); // s_mov_b64 s[14:15], s[16 + dst * 2:17 + dst * 2]
*(p++) = 0xbea60410u | (src << 1); // s_mov_b64 s[38:39], s[16 + src * 2:17 + src * 2]
*(p++) = 0xbebc213au; // s_swappc_b64 s[60:61], s[58:59]
*(p++) = 0xbe90040eu | (dst << 17); // s_mov_b64 s[16 + dst * 2:17 + dst * 2], s[14:15]
#else
*(p++) = 0xbe8e0110u | (dst << 1); // s_mov_b64 s[14:15], s[16 + dst * 2:17 + dst * 2]
*(p++) = 0xbea60110u | (src << 1); // s_mov_b64 s[38:39], s[16 + src * 2:17 + src * 2]
*(p++) = 0xbebc1e3au; // s_swappc_b64 s[60:61], s[58:59]
*(p++) = 0xbe90010eu | (dst << 17); // s_mov_b64 s[16 + dst * 2:17 + dst * 2], s[14:15]
#endif
// 16 bytes
return p;
@@ -430,9 +496,15 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
{
p = jit_scratchpad_load2(p, prefetch_vgpr_index ? -prefetch_vgpr_index : 28, prefetch_vgpr_index ? vmcnt : 0);
#if GCN_VERSION >= 15
*(p++) = 0xbea60410u | (dst << 1); // s_mov_b64 s[38:39], s[16 + src * 2:17 + src * 2]
*(p++) = 0xbebc213au; // s_swappc_b64 s[60:61], s[58:59]
*(p++) = 0xbe90040eu | (dst << 17); // s_mov_b64 s[16 + dst * 2:17 + dst * 2], s[14:15]
#else
*(p++) = 0xbea60110u | (dst << 1); // s_mov_b64 s[38:39], s[16 + src * 2:17 + src * 2]
*(p++) = 0xbebc1e3au; // s_swappc_b64 s[60:61], s[58:59]
*(p++) = 0xbe90010eu | (dst << 17); // s_mov_b64 s[16 + dst * 2:17 + dst * 2], s[14:15]
#endif
}
// (12*7/8 + 8*1/8 + 28) + 12 = 51.5 bytes on average
@@ -442,10 +514,17 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
if (opcode < RANDOMX_FREQ_ISMULH_R)
{
#if GCN_VERSION >= 15
*(p++) = 0xbe8e0410u | (dst << 1); // s_mov_b64 s[14:15], s[16 + dst * 2:17 + dst * 2]
*(p++) = 0xbea60410u | (src << 1); // s_mov_b64 s[38:39], s[16 + src * 2:17 + src * 2]
*(p++) = 0xbebc2138u; // s_swappc_b64 s[60:61], s[56:57]
*(p++) = 0xbe90040eu | (dst << 17); // s_mov_b64 s[16 + dst * 2:17 + dst * 2], s[14:15]
#else
*(p++) = 0xbe8e0110u | (dst << 1); // s_mov_b64 s[14:15], s[16 + dst * 2:17 + dst * 2]
*(p++) = 0xbea60110u | (src << 1); // s_mov_b64 s[38:39], s[16 + src * 2:17 + src * 2]
*(p++) = 0xbebc1e38u; // s_swappc_b64 s[60:61], s[56:57]
*(p++) = 0xbe90010eu | (dst << 17); // s_mov_b64 s[16 + dst * 2:17 + dst * 2], s[14:15]
#endif
// 16 bytes
return p;
@@ -468,9 +547,15 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
{
p = jit_scratchpad_load2(p, prefetch_vgpr_index ? -prefetch_vgpr_index : 28, prefetch_vgpr_index ? vmcnt : 0);
#if GCN_VERSION >= 15
*(p++) = 0xbea60410u | (dst << 1); // s_mov_b64 s[38:39], s[16 + dst * 2:17 + dst * 2]
*(p++) = 0xbebc2138u; // s_swappc_b64 s[60:61], s[56:57]
*(p++) = 0xbe90040eu | (dst << 17); // s_mov_b64 s[16 + dst * 2:17 + dst * 2], s[14:15]
#else
*(p++) = 0xbea60110u | (dst << 1); // s_mov_b64 s[38:39], s[16 + dst * 2:17 + dst * 2]
*(p++) = 0xbebc1e38u; // s_swappc_b64 s[60:61], s[56:57]
*(p++) = 0xbe90010eu | (dst << 17); // s_mov_b64 s[16 + dst * 2:17 + dst * 2], s[14:15]
#endif
}
// (12*7/8 + 8*1/8 + 28) + 12 = 51.5 bytes on average
@@ -484,10 +569,10 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
{
const uint2 rcp_value = as_uint2(imul_rcp_value(inst.y));
*(p++) = 0xbea000ffu; // s_mov_b32 s32, imm32
*(p++) = S_MOV_B32_IMUL_RCP; // s_mov_b32 s32, imm32
*(p++) = rcp_value.x;
#if GCN_VERSION >= 14
*(p++) = 0x960f2010u | (dst << 1); // s_mul_hi_u32 s15, s(16 + dst * 2), s32
*(p++) = S_MUL_HI_U32_IMUL_RCP | (dst << 1); // s_mul_hi_u32 s15, s(16 + dst * 2), s32
#else
// v_mov_b32 v28, s32
*(p++) = 0x7e380220u;
@@ -498,12 +583,12 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
*(p++) = 0xd289000fu;
*(p++) = 0x0001011cu;
#endif
*(p++) = 0x920eff10u | (dst << 1); // s_mul_i32 s14, s(16 + dst * 2), imm32
*(p++) = S_MUL_I32_IMUL | 0x0eff10u | (dst << 1); // s_mul_i32 s14, s(16 + dst * 2), imm32
*(p++) = rcp_value.y;
*(p++) = 0x800f0e0fu; // s_add_u32 s15, s15, s14
*(p++) = 0x920e2011u | (dst << 1); // s_mul_i32 s14, s(17 + dst * 2), s32
*(p++) = S_MUL_I32_IMUL | 0x0e2011u | (dst << 1); // s_mul_i32 s14, s(17 + dst * 2), s32
*(p++) = 0x80110e0fu | (dst << 17); // s_add_u32 s(17 + dst * 2), s15, s14
*(p++) = 0x92102010u | (dst << 1) | (dst << 17);// s_mul_i32 s(16 + dst * 2), s(16 + dst * 2), s32
*(p++) = S_MUL_I32_IMUL | 0x102010u | (dst << 1) | (dst << 17);// s_mul_i32 s(16 + dst * 2), s(16 + dst * 2), s32
}
// 36 bytes
@@ -526,23 +611,23 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
if (src != dst) // p = 7/8
{
// s_xor_b64 s[16 + dst * 2:17 + dst * 2], s[16 + dst * 2:17 + dst * 2], s[16 + src * 2:17 + src * 2]
*(p++) = 0x88901010u | (dst << 1) | (dst << 17) | (src << 9);
*(p++) = S_XOR_B32_64 | 0x901010u | (dst << 1) | (dst << 17) | (src << 9);
}
else // p = 1/8
{
if (as_int(inst.y) < 0) // p = 1/2
{
// s_mov_b32 s62, imm32
*(p++) = 0xbebe00ffu;
*(p++) = S_MOV_B32_XOR_R;
*(p++) = inst.y;
// s_xor_b64 s[16 + dst * 2:17 + dst * 2], s[16 + dst * 2:17 + dst * 2], s[62:63]
*(p++) = 0x88903e10u | (dst << 1) | (dst << 17);
*(p++) = S_XOR_B32_64 | 0x903e10u | (dst << 1) | (dst << 17);
}
else
{
// s_xor_b32 s(16 + dst * 2), s(16 + dst * 2), imm32
*(p++) = 0x8810ff10u | (dst << 1) | (dst << 17);
*(p++) = S_XOR_B32_64 | 0x10ff10u | (dst << 1) | (dst << 17);
*(p++) = inst.y;
}
}
@@ -569,7 +654,7 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
p = jit_scratchpad_load2(p, prefetch_vgpr_index ? -prefetch_vgpr_index : 28, prefetch_vgpr_index ? vmcnt : 0);
// s_xor_b64 s[16 + dst * 2:17 + dst * 2], s[16 + dst * 2:17 + dst * 2], s[14:15]
*(p++) = 0x88900e10u | (dst << 1) | (dst << 17);
*(p++) = S_XOR_B32_64 | 0x900e10u | (dst << 1) | (dst << 17);
}
// (12*7/8 + 8*1/8 + 28) + 4 = 43.5 bytes on average
@@ -584,24 +669,24 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
if (opcode < RANDOMX_FREQ_IROR_R)
{
// s_lshr_b64 s[32:33], s[16 + dst * 2:17 + dst * 2], s(16 + src * 2)
*(p++) = 0x8fa01010u | (dst << 1) | (src << 9);
*(p++) = S_LSHR | 0xa01010u | (dst << 1) | (src << 9);
// s_sub_u32 s15, 64, s(16 + src * 2)
*(p++) = 0x808f10c0u | (src << 9);
// s_lshl_b64 s[34:35], s[16 + dst * 2:17 + dst * 2], s15
*(p++) = 0x8ea20f10u | (dst << 1);
*(p++) = S_LSHL | 0xa20f10u | (dst << 1);
}
else
{
// s_lshl_b64 s[32:33], s[16 + dst * 2:17 + dst * 2], s(16 + src * 2)
*(p++) = 0x8ea01010u | (dst << 1) | (src << 9);
*(p++) = S_LSHL | 0xa01010u | (dst << 1) | (src << 9);
// s_sub_u32 s15, 64, s(16 + src * 2)
*(p++) = 0x808f10c0u | (src << 9);
// s_lshr_b64 s[34:35], s[16 + dst * 2:17 + dst * 2], s15
*(p++) = 0x8fa20f10u | (dst << 1);
*(p++) = S_LSHR | 0xa20f10u | (dst << 1);
}
}
else // p = 1/8
@@ -609,14 +694,14 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
const uint shift = ((opcode < RANDOMX_FREQ_IROR_R) ? inst.y : -inst.y) & 63;
// s_lshr_b64 s[32:33], s[16 + dst * 2:17 + dst * 2], shift
*(p++) = 0x8fa08010u | (dst << 1) | (shift << 8);
*(p++) = S_LSHR | 0xa08010u | (dst << 1) | (shift << 8);
// s_lshl_b64 s[34:35], s[16 + dst * 2:17 + dst * 2], 64 - shift
*(p++) = 0x8ea28010u | (dst << 1) | ((64 - shift) << 8);
*(p++) = S_LSHL | 0xa28010u | (dst << 1) | ((64 - shift) << 8);
}
// s_or_b64 s[16 + dst * 2:17 + dst * 2], s[32:33], s[34:35]
*(p++) = 0x87902220u | (dst << 17);
*(p++) = S_OR | 0x902220u | (dst << 17);
// 12*7/8 + 8/8 + 4 = 15.5 bytes on average
return p;
@@ -627,9 +712,15 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
{
if (src != dst)
{
#if GCN_VERSION >= 15
*(p++) = 0xbea00410u | (dst << 1); // s_mov_b64 s[32:33], s[16 + dst * 2:17 + dst * 2]
*(p++) = 0xbe900410u | (src << 1) | (dst << 17);// s_mov_b64 s[16 + dst * 2:17 + dst * 2], s[16 + src * 2:17 + src * 2]
*(p++) = 0xbe900420u | (src << 17); // s_mov_b64 s[16 + src * 2:17 + Src * 2], s[32:33]
#else
*(p++) = 0xbea00110u | (dst << 1); // s_mov_b64 s[32:33], s[16 + dst * 2:17 + dst * 2]
*(p++) = 0xbe900110u | (src << 1) | (dst << 17);// s_mov_b64 s[16 + dst * 2:17 + dst * 2], s[16 + src * 2:17 + src * 2]
*(p++) = 0xbe900120u | (src << 17); // s_mov_b64 s[16 + src * 2:17 + Src * 2], s[32:33]
#endif
}
// 12*7/8 = 10.5 bytes on average
@@ -640,11 +731,11 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
if (opcode < RANDOMX_FREQ_FSWAP_R)
{
// ds_swizzle_b32 v(60 + dst * 2), v(60 + dst * 2) offset:0x8001
*(p++) = 0xd87a8001u;
*(p++) = DS_SWIZZLE_B32_FSWAP_R;
*(p++) = 0x3c00003cu + (dst << 1) + (dst << 25);
// ds_swizzle_b32 v(61 + dst * 2), v(61 + dst * 2) offset:0x8001
*(p++) = 0xd87a8001u;
*(p++) = DS_SWIZZLE_B32_FSWAP_R;
*(p++) = 0x3d00003du + (dst << 1) + (dst << 25);
// s_waitcnt lgkmcnt(0)
@@ -658,7 +749,7 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
if (opcode < RANDOMX_FREQ_FADD_R)
{
// v_add_f64 v[60 + dst * 2:61 + dst * 2], v[60 + dst * 2:61 + dst * 2], v[52 + src * 2:53 + src * 2]
*(p++) = 0xd280003cu + ((dst & 3) << 1);
*(p++) = V_ADD_F64 + ((dst & 3) << 1);
*(p++) = 0x0002693cu + ((dst & 3) << 1) + ((src & 3) << 10);
// 8 bytes
@@ -679,7 +770,7 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
p = jit_scratchpad_load2_fp(p, prefetch_vgpr_index ? -prefetch_vgpr_index : 28, prefetch_vgpr_index ? vmcnt : 0);
// v_add_f64 v[60 + dst * 2:61 + dst * 2], v[60 + dst * 2:61 + dst * 2], v[28:29]
*(p++) = 0xd280003cu + ((dst & 3) << 1);
*(p++) = V_ADD_F64 + ((dst & 3) << 1);
*(p++) = 0x0002393cu + ((dst & 3) << 1);
}
@@ -691,7 +782,7 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
if (opcode < RANDOMX_FREQ_FSUB_R)
{
// v_add_f64 v[60 + dst * 2:61 + dst * 2], v[60 + dst * 2:61 + dst * 2], -v[52 + src * 2:53 + src * 2]
*(p++) = 0xd280003cu + ((dst & 3) << 1);
*(p++) = V_ADD_F64 + ((dst & 3) << 1);
*(p++) = 0x4002693cu + ((dst & 3) << 1) + ((src & 3) << 10);
// 8 bytes
@@ -712,7 +803,7 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
p = jit_scratchpad_load2_fp(p, prefetch_vgpr_index ? -prefetch_vgpr_index : 28, prefetch_vgpr_index ? vmcnt : 0);
// v_add_f64 v[60 + dst * 2:61 + dst * 2], v[60 + dst * 2:61 + dst * 2], -v[28:29]
*(p++) = 0xd280003cu + ((dst & 3) << 1);
*(p++) = V_ADD_F64 + ((dst & 3) << 1);
*(p++) = 0x4002393cu + ((dst & 3) << 1);
}
@@ -724,7 +815,7 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
if (opcode < RANDOMX_FREQ_FSCAL_R)
{
// v_xor_b32 v(61 + dst * 2), v(61 + dst * 2), v51
*(p++) = 0x2a7a673du + ((dst & 3) << 1) + ((dst & 3) << 18);
*(p++) = (V_XOR_B32 | 0x7a673du) + ((dst & 3) << 1) + ((dst & 3) << 18);
// 4 bytes
return p;
@@ -734,7 +825,7 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
if (opcode < RANDOMX_FREQ_FMUL_R)
{
// v_mul_f64 v[68 + dst * 2:69 + dst * 2], v[68 + dst * 2:69 + dst * 2], v[52 + src * 2:53 + src * 2]
*(p++) = 0xd2810044u + ((dst & 3) << 1);
*(p++) = V_MUL_F64 + ((dst & 3) << 1);
*(p++) = 0x00026944u + ((dst & 3) << 1) + ((src & 3) << 10);
// 8 bytes
@@ -755,7 +846,11 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
p = jit_scratchpad_load2_fp(p, prefetch_vgpr_index ? -prefetch_vgpr_index : 28, prefetch_vgpr_index ? vmcnt : 0);
// s_swappc_b64 s[60:61], s[48 + dst * 2:49 + dst * 2]
#if GCN_VERSION >= 15
*(p++) = 0xbebc2130u + ((dst & 3) << 1);
#else
*(p++) = 0xbebc1e30u + ((dst & 3) << 1);
#endif
}
// 32 + 4 = 36 bytes
@@ -766,7 +861,11 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
if (opcode < RANDOMX_FREQ_FSQRT_R)
{
// s_swappc_b64 s[60:61], s[40 + dst * 2:41 + dst * 2]
#if GCN_VERSION >= 15
*(p++) = 0xbebc2128u + ((dst & 3) << 1);
#else
*(p++) = 0xbebc1e28u + ((dst & 3) << 1);
#endif
// 4 bytes
return p;
@@ -789,7 +888,7 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
const uint conditionMaskReg = 70 + (mod >> 4);
// s_and_b32 s14, s(16 + dst * 2), conditionMaskReg
*(p++) = 0x860e0010u | (dst << 1) | (conditionMaskReg << 8);
*(p++) = S_AND | 0x0e0010u | (dst << 1) | (conditionMaskReg << 8);
// s_cbranch_scc0 target
const int delta = ((last_branch_target - p) - 1);
@@ -805,26 +904,30 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
const uint shift = inst.y & 63;
if (shift == 63)
{
*(p++) = 0x8e0e8110u | (src << 1); // s_lshl_b32 s14, s(16 + src * 2), 1
*(p++) = 0x8f0f9f11u | (src << 1); // s_lshr_b32 s15, s(17 + src * 2), 31
*(p++) = 0x870e0f0eu; // s_or_b32 s14, s14, s15
*(p++) = 0x860e830eu; // s_and_b32 s14, s14, 3
*(p++) = S_LSHL | 0x0e8110u | (src << 1); // s_lshl_b32 s14, s(16 + src * 2), 1
*(p++) = S_LSHR | 0x0f9f11u | (src << 1); // s_lshr_b32 s15, s(17 + src * 2), 31
*(p++) = S_OR | 0x0e0f0eu; // s_or_b32 s14, s14, s15
*(p++) = S_AND | 0x0e830eu; // s_and_b32 s14, s14, 3
}
else
{
// s_bfe_u64 s[14:15], s[16:17], (shift,width=2)
*(p++) = 0x938eff10u | (src << 1);
*(p++) = S_BFE | 0x8eff10u | (src << 1);
*(p++) = shift | (2 << 16);
}
// s_brev_b32 s14, s14
*(p++) = 0xbe8e080eu;
// s_lshr_b32 s66, s14, 30
*(p++) = 0x8f429e0eu;
// s_setreg_b32 hwreg(mode, 2, 2), s66
#if GCN_VERSION >= 15
*(p++) = 0xbe8e0b0eu;
*(p++) = 0x90429e0eu;
*(p++) = 0xb9c20881u;
#else
*(p++) = 0xbe8e080eu;
*(p++) = 0x8f429e0eu;
*(p++) = 0xb9420881u;
#endif
// 20 bytes
return p;
@@ -843,6 +946,10 @@ __global uint* jit_emit_instruction(__global uint* p, __global uint* last_branch
// v28 = offset
#if GCN_VERSION >= 14
#if GCN_VERSION >= 15
// s_waitcnt vmcnt(0)
*(p++) = 0xbf8c3f70u;
#endif
// global_store_dwordx2 v28, v[vgpr_id:vgpr_id + 1], s[0:1]
*(p++) = 0xdc748000u;
*(p++) = 0x0000001cu | (vgpr_id << 8);
@@ -903,7 +1010,7 @@ __global uint* generate_jit_code(__global uint2* e, __global uint2* p0, __global
int prefetch_data_count;
#pragma unroll 1
for (int pass = 0; pass < 2; ++pass)
for (volatile int pass = 0; pass < 2; ++pass)
{
#if RANDOMX_PROGRAM_SIZE > 256
int registerLastChanged[8] = { -1, -1, -1, -1, -1, -1, -1, -1 };
@@ -1419,14 +1526,14 @@ __global uint* generate_jit_code(__global uint2* e, __global uint2* p0, __global
{
// Code size limit exceeded!!!
// Jump back to randomx_run kernel
*(p++) = 0xbe801d0cu; // s_setpc_b64 s[12:13]
*(p++) = S_SETPC_B64_S12_13; // s_setpc_b64 s[12:13]
return p;
}
} while (!done);
}
// Jump back to randomx_run kernel
*(p++) = 0xbe801d0cu; // s_setpc_b64 s[12:13]
*(p++) = S_SETPC_B64_S12_13; // s_setpc_b64 s[12:13]
return p;
}

View File

@@ -0,0 +1,742 @@
/*
Copyright (c) 2019-2020 SChernykh
This file is part of RandomX OpenCL.
RandomX OpenCL 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.
RandomX OpenCL 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 RandomX OpenCL. If not, see <http://www.gnu.org/licenses/>.
*/
.rocm
.gpu GFX1010
.arch_minor 1
.arch_stepping 0
.eflags 53
.llvm10binfmt
.metadatav3
.md_version 1, 0
.globaldata
.fill 64, 1, 0
.kernel randomx_run
.config
.dims x
.sgprsnum 96
.vgprsnum 128
.shared_vgprs 0
.dx10clamp
.ieeemode
.floatmode 0xf0
.priority 0
.exceptions 0
.userdatanum 6
# https://llvm.org/docs/AMDGPUUsage.html#amdgpu-amdhsa-compute-pgm-rsrc1-gfx6-gfx10-table
# https://llvm.org/docs/AMDGPUUsage.html#amdgpu-amdhsa-compute-pgm-rsrc2-gfx6-gfx10-table
# https://llvm.org/docs/AMDGPUUsage.html#amdgpu-amdhsa-compute-pgm-rsrc3-gfx10-table
.pgmrsrc1 0x40af0105
.pgmrsrc2 0x0000008c
.pgmrsrc3 0x00000000
.group_segment_fixed_size 256
.private_segment_fixed_size 0
.kernel_code_entry_offset 0x10c0
.use_private_segment_buffer
.use_kernarg_segment_ptr
.use_wave32
.config
.md_symname "randomx_run.kd"
.md_language "OpenCL C", 1, 2
.reqd_work_group_size 32, 1, 1
.md_kernarg_segment_size 104
.md_kernarg_segment_align 8
.md_group_segment_fixed_size 256
.md_private_segment_fixed_size 0
.md_wavefront_size 32
.md_sgprsnum 96
.md_vgprsnum 128
.spilledsgprs 0
.spilledvgprs 0
.max_flat_work_group_size 32
.arg dataset, "uchar*", 8, 0, globalbuf, u8, global, default const
.arg scratchpad, "uchar*", 8, 8, globalbuf, u8, global, default
.arg registers, "ulong*", 8, 16, globalbuf, u64, global, default
.arg rounding_modes, "uint*", 8, 24, globalbuf, u32, global, default
.arg programs, "uint*", 8, 32, globalbuf, u32, global, default
.arg batch_size, "uint", 4, 40, value, u32
.arg rx_parameters, "uint", 4, 44, value, u32
.arg , "", 8, 48, gox, i64
.arg , "", 8, 56, goy, i64
.arg , "", 8, 64, goz, i64
.arg , "", 8, 72, none, i8
.arg , "", 8, 80, none, i8
.arg , "", 8, 88, none, i8
.arg , "", 8, 96, multigridsyncarg, i8
.text
randomx_run:
# clear all caches
s_dcache_wb
s_waitcnt vmcnt(0) & lgkmcnt(0)
s_waitcnt_vscnt null, 0x0
s_icache_inv
s_branch begin
# pgmrsrc2 = 0x0000008c, bits 1:5 = 6, so first 6 SGPRs (s0-s7) contain user data
# s6 contains group id
# v0 contains local id
begin:
# s[0:1] - pointer to registers
# s[2:3] - pointer to rounding modes
s_load_dwordx4 s[0:3], s[4:5], 0x10
# s[8:9] - group_id*group_size
s_mov_b32 s9, 0
s_lshl_b32 s8, s6, 5
# v0 - local id (sub)
# v39 - R[sub]
v_lshlrev_b32 v39, 3, v0
s_mov_b32 s12, s7
# vcc_lo = "if (sub < 8)"
v_cmp_gt_u32 vcc_lo, 8, v0
s_waitcnt lgkmcnt(0)
# load rounding mode
s_lshl_b32 s16, s6, 2
s_add_u32 s64, s2, s16
s_addc_u32 s65, s3, 0
v_mov_b32 v1, 0
global_load_dword v1, v1, s[64:65]
s_waitcnt vmcnt(0)
v_readlane_b32 s66, v1, 0
s_setreg_b32 hwreg(mode, 2, 2), s66
s_mov_b32 s67, 0
# ((__local ulong*) R)[sub] = ((__global ulong*) registers)[sub];
s_lshl_b64 s[2:3], s[8:9], 3
s_mov_b32 s32, s12
s_add_u32 s0, s0, s2
s_addc_u32 s1, s1, s3
v_add_co_u32 v1, s0, s0, v39
v_add_co_ci_u32 v2, s0, s1, 0, s0
global_load_dwordx2 v[4:5], v[1:2], off
s_waitcnt vmcnt(0)
ds_write_b64 v39, v[4:5]
s_waitcnt vmcnt(0) & lgkmcnt(0)
s_waitcnt_vscnt null, 0x0
# "if (sub >= 8) return"
s_and_saveexec_b32 s0, vcc_lo
s_cbranch_execz program_end
# s[8:9] - pointer to dataset
# s[10:11] - pointer to scratchpads
# s[0:1] - pointer to programs
s_load_dwordx4 s[8:11], s[4:5], 0x0
s_load_dwordx2 s[0:1], s[4:5], 0x20
# rx_parameters
s_load_dword s20, s[4:5], 0x2c
v_mov_b32 v5, 0
v_mov_b32 v10, 0
s_waitcnt_vscnt null, 0x0
ds_read_b64 v[8:9], v39
v_cmp_gt_u32 vcc_lo, 4, v0
v_lshlrev_b32 v0, 3, v0
ds_read2_b64 v[25:28], v5 offset0:16 offset1:17
ds_read_b32 v11, v5 offset:152
ds_read_b64 v[35:36], v5 offset:168
ds_read2_b64 v[20:23], v5 offset0:18 offset1:20
v_cndmask_b32 v4, 0xffffff, -1, vcc_lo
v_add_nc_u32 v5, v39, v0
s_waitcnt lgkmcnt(0)
v_mov_b32 v13, s11
v_mov_b32 v7, s1
v_mov_b32 v6, s0
# Scratchpad L1 size
s_bfe_u32 s21, s20, 0x050000
s_lshl_b32 s21, 1, s21
# Scratchpad L2 size
s_bfe_u32 s22, s20, 0x050005
s_lshl_b32 s22, 1, s22
# Scratchpad L3 size
s_bfe_u32 s0, s20, 0x05000A
s_lshl_b32 s23, 1, s0
# program iterations
s_bfe_u32 s24, s20, 0x04000F
s_lshl_b32 s24, 1, s24
v_mov_b32 v12, s10
v_mad_u64_u32 v[6:7], s2, 10048, s6, v[6:7]
# s[4:5] - pointer to current program
v_readlane_b32 s4, v6, 0
v_readlane_b32 s5, v7, 0
s_lshl_b32 s2, 1, s0
v_add_co_u32 v14, s0, s8, v11
v_cndmask_b32 v34, v36, 0, vcc_lo
v_cndmask_b32 v24, v23, 0, vcc_lo
v_cndmask_b32 v3, v22, 0, vcc_lo
s_add_i32 s3, s2, 64
v_add_co_ci_u32 v29, s0, s9, v10, s0
v_cndmask_b32 v35, v35, 0, vcc_lo
v_add_co_u32 v22, vcc_lo, v14, v0
# v[12:13] - pointer to current scratchpad
v_mad_u64_u32 v[12:13], s2, s3, s6, v[12:13]
v_mov_b32 v10, v26
v_mov_b32 v11, v25
v_lshlrev_b32 v36, 3, v27
v_lshlrev_b32 v37, 3, v28
v_lshlrev_b32 v20, 3, v20
v_lshlrev_b32 v21, 3, v21
v_add_co_ci_u32 v23, vcc_lo, 0, v29, vcc_lo
# rename registers
# v6 - R[sub]
v_mov_b32 v6, v39
# loop counter
s_sub_u32 s2, s24, 1
# used in IXOR_R instruction
s_mov_b32 s63, -1
# used in CBRANCH instruction
s_mov_b32 s70, (0xFF << 8)
s_mov_b32 s71, (0xFF << 9)
s_mov_b32 s72, (0xFF << 10)
s_mov_b32 s73, (0xFF << 11)
s_mov_b32 s74, (0xFF << 12)
s_mov_b32 s75, (0xFF << 13)
s_mov_b32 s76, (0xFF << 14)
s_mov_b32 s77, (0xFF << 15)
s_mov_b32 s78, (0xFF << 16)
s_mov_b32 s79, (0xFF << 17)
s_mov_b32 s80, (0xFF << 18)
s_mov_b32 s81, (0xFF << 19)
s_mov_b32 s82, (0xFF << 20)
s_mov_b32 s83, (0xFF << 21)
s_mov_b32 s84, (0xFF << 22)
s_mov_b32 s85, (0xFF << 23)
# ScratchpadL3Mask64
s_sub_u32 s86, s23, 64
# Scratchpad masks for scratchpads
v_sub_nc_u32 v38, s21, 8
v_sub_nc_u32 v39, s22, 8
v_sub_nc_u32 v50, s23, 8
# mask for FSCAL_R
v_mov_b32 v51, 0x80F00000
# load scratchpad base address
v_readlane_b32 s0, v12, 0
v_readlane_b32 s1, v13, 0
# v41, v44 = 0
v_mov_b32 v41, 0
v_mov_b32 v44, 0
# v41 = 0 on lane 0, set it to 8 on lane 1
# v44 = 0 on lane 0, set it to 4 on lane 1
s_mov_b64 exec, 2
v_mov_b32 v41, 8
v_mov_b32 v44, 4
# load group A registers
# Read low 8 bytes into lane 0 and high 8 bytes into lane 1
s_mov_b64 exec, 3
ds_read2_b64 v[52:55], v41 offset0:24 offset1:26
ds_read2_b64 v[56:59], v41 offset0:28 offset1:30
# xmantissaMask
v_mov_b32 v77, (1 << 24) - 1
# xexponentMask
ds_read_b64 v[78:79], v41 offset:160
# Restore execution mask
s_mov_b64 exec, 255
# sign mask (used in FSQRT_R)
v_mov_b32 v82, 0x80000000
# used in FSQRT_R to check for "positive normal value" (v_cmpx_class_f64)
s_mov_b32 s68, 256
s_mov_b32 s69, 0
# High 32 bits of "1.0" constant (used in FDIV_M)
v_mov_b32 v83, (1023 << 20)
# Used to multiply FP64 values by 0.5
v_mov_b32 v84, (1 << 20)
s_getpc_b64 s[14:15]
cur_addr:
# get addresses of FSQRT_R subroutines
s_add_u32 s40, s14, fsqrt_r_sub0 - cur_addr
s_addc_u32 s41, s15, 0
s_add_u32 s42, s14, fsqrt_r_sub1 - cur_addr
s_addc_u32 s43, s15, 0
s_add_u32 s44, s14, fsqrt_r_sub2 - cur_addr
s_addc_u32 s45, s15, 0
s_add_u32 s46, s14, fsqrt_r_sub3 - cur_addr
s_addc_u32 s47, s15, 0
# get addresses of FDIV_M subroutines
s_add_u32 s48, s14, fdiv_m_sub0 - cur_addr
s_addc_u32 s49, s15, 0
s_add_u32 s50, s14, fdiv_m_sub1 - cur_addr
s_addc_u32 s51, s15, 0
s_add_u32 s52, s14, fdiv_m_sub2 - cur_addr
s_addc_u32 s53, s15, 0
s_add_u32 s54, s14, fdiv_m_sub3 - cur_addr
s_addc_u32 s55, s15, 0
# get address for ISMULH_R subroutine
s_add_u32 s56, s14, ismulh_r_sub - cur_addr
s_addc_u32 s57, s15, 0
# get address for IMULH_R subroutine
s_add_u32 s58, s14, imulh_r_sub - cur_addr
s_addc_u32 s59, s15, 0
/*
used: v0-v6, v8-v37
not used: v7
*/
main_loop:
s_waitcnt_vscnt null, 0x0
# v[27:28] = R[readReg0]
# v[29:30] = R[readReg1]
ds_read_b64 v[27:28], v37
ds_read_b64 v[29:30], v36
s_waitcnt lgkmcnt(0)
# R[readReg0] ^ R[readReg0] (high 32 bits)
v_xor_b32 v28, v28, v30
# spAddr1
v_xor_b32 v25, v28, v25
v_and_b32 v25, s86, v25
v_add_nc_u32 v25, v25, v0
v_add_co_u32 v16, vcc_lo, s0, v25
# R[readReg0] ^ R[readReg0] (low 32 bits)
v_xor_b32 v25, v27, v29
v_mov_b32 v29, v11
v_add_co_ci_u32 v17, vcc_lo, 0, s1, vcc_lo
v_xor_b32 v25, v25, v26
# load from spAddr1
global_load_dwordx2 v[27:28], v[16:17], off
# spAddr0
v_and_b32 v25, s86, v25
v_add_nc_u32 v25, v25, v0
v_add_co_u32 v31, vcc_lo, s0, v25
v_add_co_ci_u32 v32, vcc_lo, 0, s1, vcc_lo
v_add_co_u32 v29, vcc_lo, v22, v29
# load from spAddr0
global_load_dwordx2 v[25:26], v[31:32], off
v_add_co_ci_u32 v30, vcc_lo, 0, v23, vcc_lo
v_mov_b32 v33, v11
s_and_b32 vcc_lo, exec_lo, vcc_lo
s_waitcnt vmcnt(1)
v_cvt_f64_i32 v[14:15], v28
v_cvt_f64_i32 v[12:13], v27
v_or_b32 v14, v14, v35
s_waitcnt vmcnt(0)
# R[sub] ^= *p0;
v_xor_b32 v8, v25, v8
v_xor_b32 v9, v26, v9
v_and_b32 v26, v4, v15
v_and_b32 v19, v4, v13
v_or_b32 v15, v26, v34
v_or_b32 v18, v12, v3
v_mov_b32 v26, 0
v_or_b32 v19, v19, v24
v_mov_b32 v25, v26
ds_write2_b64 v5, v[18:19], v[14:15] offset0:8 offset1:9
# load from dataset
global_load_dwordx2 v[18:19], v[29:30], off
# load group F,E registers
# Read low 8 bytes into lane 0 and high 8 bytes into lane 1
s_mov_b64 exec, 3
s_waitcnt lgkmcnt(0)
ds_read2_b64 v[60:63], v41 offset0:8 offset1:10
ds_read2_b64 v[64:67], v41 offset0:12 offset1:14
ds_read2_b64 v[68:71], v41 offset0:16 offset1:18
ds_read2_b64 v[72:75], v41 offset0:20 offset1:22
# load VM integer registers
v_readlane_b32 s16, v8, 0
v_readlane_b32 s17, v9, 0
v_readlane_b32 s18, v8, 1
v_readlane_b32 s19, v9, 1
v_readlane_b32 s20, v8, 2
v_readlane_b32 s21, v9, 2
v_readlane_b32 s22, v8, 3
v_readlane_b32 s23, v9, 3
v_readlane_b32 s24, v8, 4
v_readlane_b32 s25, v9, 4
v_readlane_b32 s26, v8, 5
v_readlane_b32 s27, v9, 5
v_readlane_b32 s28, v8, 6
v_readlane_b32 s29, v9, 6
v_readlane_b32 s30, v8, 7
v_readlane_b32 s31, v9, 7
s_waitcnt lgkmcnt(0)
# Use only first 2 lanes for the program
s_mov_b64 exec, 3
# call JIT code
s_swappc_b64 s[12:13], s[4:5]
# Write out group F,E registers
# Write low 8 bytes from lane 0 and high 8 bytes from lane 1
ds_write2_b64 v41, v[60:61], v[62:63] offset0:8 offset1:10
ds_write2_b64 v41, v[64:65], v[66:67] offset0:12 offset1:14
ds_write2_b64 v41, v[68:69], v[70:71] offset0:16 offset1:18
ds_write2_b64 v41, v[72:73], v[74:75] offset0:20 offset1:22
# store VM integer registers
v_writelane_b32 v8, s16, 0
v_writelane_b32 v9, s17, 0
v_writelane_b32 v8, s18, 1
v_writelane_b32 v9, s19, 1
v_writelane_b32 v8, s20, 2
v_writelane_b32 v9, s21, 2
v_writelane_b32 v8, s22, 3
v_writelane_b32 v9, s23, 3
v_writelane_b32 v8, s24, 4
v_writelane_b32 v9, s25, 4
v_writelane_b32 v8, s26, 5
v_writelane_b32 v9, s27, 5
v_writelane_b32 v8, s28, 6
v_writelane_b32 v9, s29, 6
v_writelane_b32 v8, s30, 7
v_writelane_b32 v9, s31, 7
# Turn back on 8 execution lanes
s_mov_b64 exec, 255
# Write out VM integer registers
ds_write_b64 v6, v[8:9]
s_waitcnt lgkmcnt(0)
# R[readReg2], R[readReg3]
ds_read_b32 v11, v21
ds_read_b32 v27, v20
s_waitcnt lgkmcnt(0)
# mx ^= R[readReg2] ^ R[readReg3];
v_xor_b32 v11, v11, v27
v_xor_b32 v10, v10, v11
# v[27:28] = R[sub]
# v[29:30] = F[sub]
ds_read2_b64 v[27:30], v6 offset1:8
# mx &= CacheLineAlignMask;
v_and_b32 v11, 0x7fffffc0, v10
v_mov_b32 v10, v33
s_waitcnt lgkmcnt(0)
# const ulong next_r = R[sub] ^ data;
s_waitcnt lgkmcnt(0)
v_xor_b32 v8, v27, v18
v_xor_b32 v9, v28, v19
# *p1 = next_r;
global_store_dwordx2 v[16:17], v[8:9], off
# v[27:28] = E[sub]
ds_read_b64 v[27:28], v6 offset:128
# R[sub] = next_r;
ds_write_b64 v6, v[8:9]
s_waitcnt lgkmcnt(1)
# *p0 = as_ulong(F[sub]) ^ as_ulong(E[sub]);
v_xor_b32 v29, v27, v29
v_xor_b32 v30, v28, v30
global_store_dwordx2 v[31:32], v[29:30], off
s_sub_u32 s2, s2, 1
s_cbranch_scc0 main_loop
main_loop_end:
global_store_dwordx2 v[1:2], v[8:9], off
global_store_dwordx2 v[1:2], v[29:30], off inst_offset:64
global_store_dwordx2 v[1:2], v[27:28], off inst_offset:128
# store rounding mode
v_mov_b32 v0, 0
v_mov_b32 v1, s66
global_store_dword v0, v1, s[64:65]
program_end:
s_endpgm
fsqrt_r_sub0:
s_setreg_b32 hwreg(mode, 2, 2), s67
v_rsq_f64 v[28:29], v[68:69]
# Improve initial approximation (can be skipped)
#v_mul_f64 v[42:43], v[28:29], v[68:69]
#v_mul_f64 v[48:49], v[28:29], -0.5
#v_fma_f64 v[48:49], v[48:49], v[42:43], 0.5
#v_fma_f64 v[28:29], v[28:29], v[48:49], v[28:29]
v_mul_f64 v[42:43], v[28:29], v[68:69]
v_mov_b32 v48, v28
v_sub_nc_u32 v49, v29, v84
v_mov_b32 v46, v28
v_xor_b32 v47, v49, v82
v_fma_f64 v[46:47], v[46:47], v[42:43], 0.5
v_fma_f64 v[42:43], v[42:43], v[46:47], v[42:43]
v_fma_f64 v[48:49], v[48:49], v[46:47], v[48:49]
v_fma_f64 v[46:47], -v[42:43], v[42:43], v[68:69]
s_setreg_b32 hwreg(mode, 2, 2), s66
v_fma_f64 v[42:43], v[46:47], v[48:49], v[42:43]
v_cmpx_class_f64 v[68:69], s[68:69]
v_mov_b32 v68, v42
v_mov_b32 v69, v43
s_mov_b64 exec, 3
s_setpc_b64 s[60:61]
fsqrt_r_sub1:
s_setreg_b32 hwreg(mode, 2, 2), s67
v_rsq_f64 v[28:29], v[70:71]
# Improve initial approximation (can be skipped)
#v_mul_f64 v[42:43], v[28:29], v[70:71]
#v_mul_f64 v[48:49], v[28:29], -0.5
#v_fma_f64 v[48:49], v[48:49], v[42:43], 0.5
#v_fma_f64 v[28:29], v[28:29], v[48:49], v[28:29]
v_mul_f64 v[42:43], v[28:29], v[70:71]
v_mov_b32 v48, v28
v_sub_nc_u32 v49, v29, v84
v_mov_b32 v46, v28
v_xor_b32 v47, v49, v82
v_fma_f64 v[46:47], v[46:47], v[42:43], 0.5
v_fma_f64 v[42:43], v[42:43], v[46:47], v[42:43]
v_fma_f64 v[48:49], v[48:49], v[46:47], v[48:49]
v_fma_f64 v[46:47], -v[42:43], v[42:43], v[70:71]
s_setreg_b32 hwreg(mode, 2, 2), s66
v_fma_f64 v[42:43], v[46:47], v[48:49], v[42:43]
v_cmpx_class_f64 v[70:71], s[68:69]
v_mov_b32 v70, v42
v_mov_b32 v71, v43
s_mov_b64 exec, 3
s_setpc_b64 s[60:61]
fsqrt_r_sub2:
s_setreg_b32 hwreg(mode, 2, 2), s67
v_rsq_f64 v[28:29], v[72:73]
# Improve initial approximation (can be skipped)
#v_mul_f64 v[42:43], v[28:29], v[72:73]
#v_mul_f64 v[48:49], v[28:29], -0.5
#v_fma_f64 v[48:49], v[48:49], v[42:43], 0.5
#v_fma_f64 v[28:29], v[28:29], v[48:49], v[28:29]
v_mul_f64 v[42:43], v[28:29], v[72:73]
v_mov_b32 v48, v28
v_sub_nc_u32 v49, v29, v84
v_mov_b32 v46, v28
v_xor_b32 v47, v49, v82
v_fma_f64 v[46:47], v[46:47], v[42:43], 0.5
v_fma_f64 v[42:43], v[42:43], v[46:47], v[42:43]
v_fma_f64 v[48:49], v[48:49], v[46:47], v[48:49]
v_fma_f64 v[46:47], -v[42:43], v[42:43], v[72:73]
s_setreg_b32 hwreg(mode, 2, 2), s66
v_fma_f64 v[42:43], v[46:47], v[48:49], v[42:43]
v_cmpx_class_f64 v[72:73], s[68:69]
v_mov_b32 v72, v42
v_mov_b32 v73, v43
s_mov_b64 exec, 3
s_setpc_b64 s[60:61]
fsqrt_r_sub3:
s_setreg_b32 hwreg(mode, 2, 2), s67
v_rsq_f64 v[28:29], v[74:75]
# Improve initial approximation (can be skipped)
#v_mul_f64 v[42:43], v[28:29], v[74:75]
#v_mul_f64 v[48:49], v[28:29], -0.5
#v_fma_f64 v[48:49], v[48:49], v[42:43], 0.5
#v_fma_f64 v[28:29], v[28:29], v[48:49], v[28:29]
v_mul_f64 v[42:43], v[28:29], v[74:75]
v_mov_b32 v48, v28
v_sub_nc_u32 v49, v29, v84
v_mov_b32 v46, v28
v_xor_b32 v47, v49, v82
v_fma_f64 v[46:47], v[46:47], v[42:43], 0.5
v_fma_f64 v[42:43], v[42:43], v[46:47], v[42:43]
v_fma_f64 v[48:49], v[48:49], v[46:47], v[48:49]
v_fma_f64 v[46:47], -v[42:43], v[42:43], v[74:75]
s_setreg_b32 hwreg(mode, 2, 2), s66
v_fma_f64 v[42:43], v[46:47], v[48:49], v[42:43]
v_cmpx_class_f64 v[74:75], s[68:69]
v_mov_b32 v74, v42
v_mov_b32 v75, v43
s_mov_b64 exec, 3
s_setpc_b64 s[60:61]
fdiv_m_sub0:
v_or_b32 v28, v28, v78
v_and_or_b32 v29, v29, v77, v79
s_setreg_b32 hwreg(mode, 2, 2), s67
v_rcp_f64 v[48:49], v[28:29]
v_fma_f64 v[80:81], -v[28:29], v[48:49], 1.0
v_fma_f64 v[48:49], v[48:49], v[80:81], v[48:49]
v_mul_f64 v[80:81], v[68:69], v[48:49]
v_fma_f64 v[42:43], -v[28:29], v[80:81], v[68:69]
s_setreg_b32 hwreg(mode, 2, 2), s66
v_fma_f64 v[42:43], v[42:43], v[48:49], v[80:81]
v_div_fixup_f64 v[80:81], v[42:43], v[28:29], v[68:69]
v_cmpx_eq_f64 v[68:69], v[28:29]
v_mov_b32 v80, 0
v_mov_b32 v81, v83
s_mov_b64 exec, 3
v_mov_b32 v68, v80
v_mov_b32 v69, v81
s_setpc_b64 s[60:61]
fdiv_m_sub1:
v_or_b32 v28, v28, v78
v_and_or_b32 v29, v29, v77, v79
s_setreg_b32 hwreg(mode, 2, 2), s67
v_rcp_f64 v[48:49], v[28:29]
v_fma_f64 v[80:81], -v[28:29], v[48:49], 1.0
v_fma_f64 v[48:49], v[48:49], v[80:81], v[48:49]
v_mul_f64 v[80:81], v[70:71], v[48:49]
v_fma_f64 v[42:43], -v[28:29], v[80:81], v[70:71]
s_setreg_b32 hwreg(mode, 2, 2), s66
v_fma_f64 v[42:43], v[42:43], v[48:49], v[80:81]
v_div_fixup_f64 v[80:81], v[42:43], v[28:29], v[70:71]
v_cmpx_eq_f64 v[70:71], v[28:29]
v_mov_b32 v80, 0
v_mov_b32 v81, v83
s_mov_b64 exec, 3
v_mov_b32 v70, v80
v_mov_b32 v71, v81
s_setpc_b64 s[60:61]
fdiv_m_sub2:
v_or_b32 v28, v28, v78
v_and_or_b32 v29, v29, v77, v79
s_setreg_b32 hwreg(mode, 2, 2), s67
v_rcp_f64 v[48:49], v[28:29]
v_fma_f64 v[80:81], -v[28:29], v[48:49], 1.0
v_fma_f64 v[48:49], v[48:49], v[80:81], v[48:49]
v_mul_f64 v[80:81], v[72:73], v[48:49]
v_fma_f64 v[42:43], -v[28:29], v[80:81], v[72:73]
s_setreg_b32 hwreg(mode, 2, 2), s66
v_fma_f64 v[42:43], v[42:43], v[48:49], v[80:81]
v_div_fixup_f64 v[80:81], v[42:43], v[28:29], v[72:73]
v_cmpx_eq_f64 v[72:73], v[28:29]
v_mov_b32 v80, 0
v_mov_b32 v81, v83
s_mov_b64 exec, 3
v_mov_b32 v72, v80
v_mov_b32 v73, v81
s_setpc_b64 s[60:61]
fdiv_m_sub3:
v_or_b32 v28, v28, v78
v_and_or_b32 v29, v29, v77, v79
s_setreg_b32 hwreg(mode, 2, 2), s67
v_rcp_f64 v[48:49], v[28:29]
v_fma_f64 v[80:81], -v[28:29], v[48:49], 1.0
v_fma_f64 v[48:49], v[48:49], v[80:81], v[48:49]
v_mul_f64 v[80:81], v[74:75], v[48:49]
v_fma_f64 v[42:43], -v[28:29], v[80:81], v[74:75]
s_setreg_b32 hwreg(mode, 2, 2), s66
v_fma_f64 v[42:43], v[42:43], v[48:49], v[80:81]
v_div_fixup_f64 v[80:81], v[42:43], v[28:29], v[74:75]
v_cmpx_eq_f64 v[74:75], v[28:29]
v_mov_b32 v80, 0
v_mov_b32 v81, v83
s_mov_b64 exec, 3
v_mov_b32 v74, v80
v_mov_b32 v75, v81
s_setpc_b64 s[60:61]
ismulh_r_sub:
s_mov_b64 exec, 1
v_mov_b32 v45, s14
v_mul_hi_u32 v40, s38, v45
v_mov_b32 v47, s15
v_mad_u64_u32 v[42:43], s32, s38, v47, v[40:41]
v_mov_b32 v40, v42
v_mad_u64_u32 v[45:46], s32, s39, v45, v[40:41]
v_mad_u64_u32 v[42:43], s32, s39, v47, v[43:44]
v_add_co_u32 v42, vcc_lo, v42, v46
v_add_co_ci_u32 v43, vcc_lo, 0, v43, vcc_lo
v_readlane_b32 s32, v42, 0
v_readlane_b32 s33, v43, 0
s_cmp_lt_i32 s15, 0
s_cselect_b64 s[34:35], s[38:39], 0
s_sub_u32 s32, s32, s34
s_subb_u32 s33, s33, s35
s_cmp_lt_i32 s39, 0
s_cselect_b64 s[34:35], s[14:15], 0
s_sub_u32 s14, s32, s34
s_subb_u32 s15, s33, s35
s_mov_b64 exec, 3
s_setpc_b64 s[60:61]
imulh_r_sub:
s_mov_b64 exec, 1
v_mov_b32 v45, s38
v_mul_hi_u32 v40, s14, v45
v_mov_b32 v47, s39
v_mad_u64_u32 v[42:43], s32, s14, v47, v[40:41]
v_mov_b32 v40, v42
v_mad_u64_u32 v[45:46], s32, s15, v45, v[40:41]
v_mad_u64_u32 v[42:43], s32, s15, v47, v[43:44]
v_add_co_u32 v42, vcc_lo, v42, v46
v_add_co_ci_u32 v43, vcc_lo, 0, v43, vcc_lo
v_readlane_b32 s14, v42, 0
v_readlane_b32 s15, v43, 0
s_mov_b64 exec, 3
s_setpc_b64 s[60:61]

View File

@@ -0,0 +1,303 @@
/*
This file was auto-generated from randomx_run_gfx1010.asm:
clrxasm randomx_run_gfx1010.asm -o randomx_run_gfx1010.bin
bin2h -c randomx_run_gfx1010_bin < randomx_run_gfx1010.bin > randomx_run_gfx1010.h
clrxasm can be downloaded here: https://github.com/CLRX/CLRX-mirror/releases
bin2h can be downloaded here: http://www.deadnode.org/sw/bin2h/
*/
static unsigned char randomx_run_gfx1010_bin[]={
0x7f,0x45,0x4c,0x46,0x02,0x01,0x01,0x40,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0xe0,0x00,0x01,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x40
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0x00,0x00,0x00,0x40,0x00,0x38,0x00,0x08,0x00,0x40,0x00,0x0c,0x00,0x0a,0x00,0x06
,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0
,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x02
,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x60
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x52,0xe5,0x74,0x64,0x04,0x00,0x00,0x00,0x00
,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x51,0xe5,0x74,0x64,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x34,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x34,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07
,0x00,0x00,0x00,0x20,0x06,0x00,0x00,0x20,0x00,0x00,0x00,0x41,0x4d,0x44,0x47,0x50,0x55,0x00,0x00,0x82,0xae,0x61,0x6d,0x64,0x68,0x73,0x61,0x2e,0x6b,0x65,0x72,0x6e
,0x65,0x6c,0x73,0x91,0xde,0x00,0x10,0xa5,0x2e,0x61,0x72,0x67,0x73,0x9e,0x88,0xae,0x2e,0x61,0x64,0x64,0x72,0x65,0x73,0x73,0x5f,0x73,0x70,0x61,0x63,0x65,0xa6,0x67
,0x6c,0x6f,0x62,0x61,0x6c,0xa9,0x2e,0x69,0x73,0x5f,0x63,0x6f,0x6e,0x73,0x74,0xc3,0xa5,0x2e,0x6e,0x61,0x6d,0x65,0xa7,0x64,0x61,0x74,0x61,0x73,0x65,0x74,0xa7,0x2e
,0x6f,0x66,0x66,0x73,0x65,0x74,0x00,0xa5,0x2e,0x73,0x69,0x7a,0x65,0x08,0xaa,0x2e,0x74,0x79,0x70,0x65,0x5f,0x6e,0x61,0x6d,0x65,0xa6,0x75,0x63,0x68,0x61,0x72,0x2a
,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6b,0x69,0x6e,0x64,0xad,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x5f,0x62,0x75,0x66,0x66,0x65,0x72,0xab,0x2e,0x76,0x61,0x6c,0x75
,0x65,0x5f,0x74,0x79,0x70,0x65,0xa2,0x75,0x38,0x87,0xae,0x2e,0x61,0x64,0x64,0x72,0x65,0x73,0x73,0x5f,0x73,0x70,0x61,0x63,0x65,0xa6,0x67,0x6c,0x6f,0x62,0x61,0x6c
,0xa5,0x2e,0x6e,0x61,0x6d,0x65,0xaa,0x73,0x63,0x72,0x61,0x74,0x63,0x68,0x70,0x61,0x64,0xa7,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x08,0xa5,0x2e,0x73,0x69,0x7a,0x65
,0x08,0xaa,0x2e,0x74,0x79,0x70,0x65,0x5f,0x6e,0x61,0x6d,0x65,0xa6,0x75,0x63,0x68,0x61,0x72,0x2a,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6b,0x69,0x6e,0x64,0xad
,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x5f,0x62,0x75,0x66,0x66,0x65,0x72,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x74,0x79,0x70,0x65,0xa2,0x75,0x38,0x87,0xae,0x2e,0x61
,0x64,0x64,0x72,0x65,0x73,0x73,0x5f,0x73,0x70,0x61,0x63,0x65,0xa6,0x67,0x6c,0x6f,0x62,0x61,0x6c,0xa5,0x2e,0x6e,0x61,0x6d,0x65,0xa9,0x72,0x65,0x67,0x69,0x73,0x74
,0x65,0x72,0x73,0xa7,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x10,0xa5,0x2e,0x73,0x69,0x7a,0x65,0x08,0xaa,0x2e,0x74,0x79,0x70,0x65,0x5f,0x6e,0x61,0x6d,0x65,0xa6,0x75
,0x6c,0x6f,0x6e,0x67,0x2a,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6b,0x69,0x6e,0x64,0xad,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x5f,0x62,0x75,0x66,0x66,0x65,0x72,0xab
,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x74,0x79,0x70,0x65,0xa3,0x75,0x36,0x34,0x87,0xae,0x2e,0x61,0x64,0x64,0x72,0x65,0x73,0x73,0x5f,0x73,0x70,0x61,0x63,0x65,0xa6
,0x67,0x6c,0x6f,0x62,0x61,0x6c,0xa5,0x2e,0x6e,0x61,0x6d,0x65,0xae,0x72,0x6f,0x75,0x6e,0x64,0x69,0x6e,0x67,0x5f,0x6d,0x6f,0x64,0x65,0x73,0xa7,0x2e,0x6f,0x66,0x66
,0x73,0x65,0x74,0x18,0xa5,0x2e,0x73,0x69,0x7a,0x65,0x08,0xaa,0x2e,0x74,0x79,0x70,0x65,0x5f,0x6e,0x61,0x6d,0x65,0xa5,0x75,0x69,0x6e,0x74,0x2a,0xab,0x2e,0x76,0x61
,0x6c,0x75,0x65,0x5f,0x6b,0x69,0x6e,0x64,0xad,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x5f,0x62,0x75,0x66,0x66,0x65,0x72,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x74,0x79
,0x70,0x65,0xa3,0x75,0x33,0x32,0x87,0xae,0x2e,0x61,0x64,0x64,0x72,0x65,0x73,0x73,0x5f,0x73,0x70,0x61,0x63,0x65,0xa6,0x67,0x6c,0x6f,0x62,0x61,0x6c,0xa5,0x2e,0x6e
,0x61,0x6d,0x65,0xa8,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,0x73,0xa7,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x20,0xa5,0x2e,0x73,0x69,0x7a,0x65,0x08,0xaa,0x2e,0x74,0x79
,0x70,0x65,0x5f,0x6e,0x61,0x6d,0x65,0xa5,0x75,0x69,0x6e,0x74,0x2a,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6b,0x69,0x6e,0x64,0xad,0x67,0x6c,0x6f,0x62,0x61,0x6c
,0x5f,0x62,0x75,0x66,0x66,0x65,0x72,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x74,0x79,0x70,0x65,0xa3,0x75,0x33,0x32,0x86,0xa5,0x2e,0x6e,0x61,0x6d,0x65,0xaa,0x62
,0x61,0x74,0x63,0x68,0x5f,0x73,0x69,0x7a,0x65,0xa7,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x28,0xa5,0x2e,0x73,0x69,0x7a,0x65,0x04,0xaa,0x2e,0x74,0x79,0x70,0x65,0x5f
,0x6e,0x61,0x6d,0x65,0xa4,0x75,0x69,0x6e,0x74,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6b,0x69,0x6e,0x64,0xa8,0x62,0x79,0x5f,0x76,0x61,0x6c,0x75,0x65,0xab,0x2e
,0x76,0x61,0x6c,0x75,0x65,0x5f,0x74,0x79,0x70,0x65,0xa3,0x75,0x33,0x32,0x86,0xa5,0x2e,0x6e,0x61,0x6d,0x65,0xad,0x72,0x78,0x5f,0x70,0x61,0x72,0x61,0x6d,0x65,0x74
,0x65,0x72,0x73,0xa7,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x2c,0xa5,0x2e,0x73,0x69,0x7a,0x65,0x04,0xaa,0x2e,0x74,0x79,0x70,0x65,0x5f,0x6e,0x61,0x6d,0x65,0xa4,0x75
,0x69,0x6e,0x74,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6b,0x69,0x6e,0x64,0xa8,0x62,0x79,0x5f,0x76,0x61,0x6c,0x75,0x65,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f
,0x74,0x79,0x70,0x65,0xa3,0x75,0x33,0x32,0x84,0xa7,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x30,0xa5,0x2e,0x73,0x69,0x7a,0x65,0x08,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65
,0x5f,0x6b,0x69,0x6e,0x64,0xb6,0x68,0x69,0x64,0x64,0x65,0x6e,0x5f,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x5f,0x6f,0x66,0x66,0x73,0x65,0x74,0x5f,0x78,0xab,0x2e,0x76,0x61
,0x6c,0x75,0x65,0x5f,0x74,0x79,0x70,0x65,0xa3,0x69,0x36,0x34,0x84,0xa7,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x38,0xa5,0x2e,0x73,0x69,0x7a,0x65,0x08,0xab,0x2e,0x76
,0x61,0x6c,0x75,0x65,0x5f,0x6b,0x69,0x6e,0x64,0xb6,0x68,0x69,0x64,0x64,0x65,0x6e,0x5f,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x5f,0x6f,0x66,0x66,0x73,0x65,0x74,0x5f,0x79
,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x74,0x79,0x70,0x65,0xa3,0x69,0x36,0x34,0x84,0xa7,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x40,0xa5,0x2e,0x73,0x69,0x7a,0x65
,0x08,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6b,0x69,0x6e,0x64,0xb6,0x68,0x69,0x64,0x64,0x65,0x6e,0x5f,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x5f,0x6f,0x66,0x66,0x73
,0x65,0x74,0x5f,0x7a,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x74,0x79,0x70,0x65,0xa3,0x69,0x36,0x34,0x84,0xa7,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x48,0xa5,0x2e
,0x73,0x69,0x7a,0x65,0x08,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6b,0x69,0x6e,0x64,0xab,0x68,0x69,0x64,0x64,0x65,0x6e,0x5f,0x6e,0x6f,0x6e,0x65,0xab,0x2e,0x76
,0x61,0x6c,0x75,0x65,0x5f,0x74,0x79,0x70,0x65,0xa2,0x69,0x38,0x84,0xa7,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x50,0xa5,0x2e,0x73,0x69,0x7a,0x65,0x08,0xab,0x2e,0x76
,0x61,0x6c,0x75,0x65,0x5f,0x6b,0x69,0x6e,0x64,0xab,0x68,0x69,0x64,0x64,0x65,0x6e,0x5f,0x6e,0x6f,0x6e,0x65,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x74,0x79,0x70
,0x65,0xa2,0x69,0x38,0x84,0xa7,0x2e,0x6f,0x66,0x66,0x73,0x65,0x74,0x58,0xa5,0x2e,0x73,0x69,0x7a,0x65,0x08,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6b,0x69,0x6e
,0x64,0xab,0x68,0x69,0x64,0x64,0x65,0x6e,0x5f,0x6e,0x6f,0x6e,0x65,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x74,0x79,0x70,0x65,0xa2,0x69,0x38,0x84,0xa7,0x2e,0x6f
,0x66,0x66,0x73,0x65,0x74,0x60,0xa5,0x2e,0x73,0x69,0x7a,0x65,0x08,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x6b,0x69,0x6e,0x64,0xb9,0x68,0x69,0x64,0x64,0x65,0x6e
,0x5f,0x6d,0x75,0x6c,0x74,0x69,0x67,0x72,0x69,0x64,0x5f,0x73,0x79,0x6e,0x63,0x5f,0x61,0x72,0x67,0xab,0x2e,0x76,0x61,0x6c,0x75,0x65,0x5f,0x74,0x79,0x70,0x65,0xa2
,0x69,0x38,0xb9,0x2e,0x67,0x72,0x6f,0x75,0x70,0x5f,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x5f,0x66,0x69,0x78,0x65,0x64,0x5f,0x73,0x69,0x7a,0x65,0xcd,0x01,0x00,0xb6
,0x2e,0x6b,0x65,0x72,0x6e,0x61,0x72,0x67,0x5f,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x5f,0x61,0x6c,0x69,0x67,0x6e,0x08,0xb5,0x2e,0x6b,0x65,0x72,0x6e,0x61,0x72,0x67
,0x5f,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x5f,0x73,0x69,0x7a,0x65,0x68,0xa9,0x2e,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67,0x65,0xa8,0x4f,0x70,0x65,0x6e,0x43,0x4c,0x20
,0x43,0xb1,0x2e,0x6c,0x61,0x6e,0x67,0x75,0x61,0x67,0x65,0x5f,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x92,0x01,0x02,0xb8,0x2e,0x6d,0x61,0x78,0x5f,0x66,0x6c,0x61,0x74
,0x5f,0x77,0x6f,0x72,0x6b,0x67,0x72,0x6f,0x75,0x70,0x5f,0x73,0x69,0x7a,0x65,0x20,0xa5,0x2e,0x6e,0x61,0x6d,0x65,0xab,0x72,0x61,0x6e,0x64,0x6f,0x6d,0x78,0x5f,0x72
,0x75,0x6e,0xbb,0x2e,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x5f,0x73,0x65,0x67,0x6d,0x65,0x6e,0x74,0x5f,0x66,0x69,0x78,0x65,0x64,0x5f,0x73,0x69,0x7a,0x65,0x00,0xb4
,0x2e,0x72,0x65,0x71,0x64,0x5f,0x77,0x6f,0x72,0x6b,0x67,0x72,0x6f,0x75,0x70,0x5f,0x73,0x69,0x7a,0x65,0x93,0x20,0x01,0x01,0xab,0x2e,0x73,0x67,0x70,0x72,0x5f,0x63
,0x6f,0x75,0x6e,0x74,0x60,0xb1,0x2e,0x73,0x67,0x70,0x72,0x5f,0x73,0x70,0x69,0x6c,0x6c,0x5f,0x63,0x6f,0x75,0x6e,0x74,0x00,0xa7,0x2e,0x73,0x79,0x6d,0x62,0x6f,0x6c
,0xae,0x72,0x61,0x6e,0x64,0x6f,0x6d,0x78,0x5f,0x72,0x75,0x6e,0x2e,0x6b,0x64,0xab,0x2e,0x76,0x67,0x70,0x72,0x5f,0x63,0x6f,0x75,0x6e,0x74,0xcc,0x80,0xb1,0x2e,0x76
,0x67,0x70,0x72,0x5f,0x73,0x70,0x69,0x6c,0x6c,0x5f,0x63,0x6f,0x75,0x6e,0x74,0x00,0xaf,0x2e,0x77,0x61,0x76,0x65,0x66,0x72,0x6f,0x6e,0x74,0x5f,0x73,0x69,0x7a,0x65
,0x20,0xae,0x61,0x6d,0x64,0x68,0x73,0x61,0x2e,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x92,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x12,0x03,0x06,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x11,0x03,0x05,0x00,0xc0,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01
,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x72,0x61,0x6e,0x64,0x6f,0x6d,0x78,0x5f
,0x72,0x75,0x6e,0x00,0x72,0x61,0x6e,0x64,0x6f,0x6d,0x78,0x5f,0x72,0x75,0x6e,0x2e,0x6b,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcf,0x03,0xaf,0x40,0x8c,0x00,0x00,0x00,0x09,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x84,0xf4,0x00,0x00,0x00,0x00,0x70,0x00,0x8c,0xbf,0x00,0x00,0xfd,0xbb,0x00,0x00,0x93,0xbf,0x00,0x00,0x82,0xbf,0x02,0x00,0x08,0xf4,0x10,0x00,0x00,0xfa,0x80
,0x03,0x89,0xbe,0x06,0x85,0x08,0x8f,0x83,0x00,0x4e,0x34,0x07,0x03,0x8c,0xbe,0x88,0x00,0x88,0x7d,0x7f,0xc0,0x8c,0xbf,0x06,0x82,0x10,0x8f,0x02,0x10,0x40,0x80,0x03
,0x80,0x41,0x82,0x80,0x02,0x02,0x7e,0x00,0x80,0x30,0xdc,0x01,0x00,0x40,0x01,0x70,0x3f,0x8c,0xbf,0x42,0x00,0x60,0xd7,0x01,0x01,0x01,0x00,0x81,0x08,0xc2,0xb9,0x80
,0x03,0xc3,0xbe,0x08,0x83,0x82,0x8f,0x0c,0x03,0xa0,0xbe,0x00,0x02,0x00,0x80,0x01,0x03,0x01,0x82,0x01,0x00,0x0f,0xd7,0x00,0x4e,0x02,0x00,0x02,0x00,0x28,0xd5,0x01
,0x00,0x01,0x00,0x00,0x80,0x34,0xdc,0x01,0x00,0x7d,0x04,0x70,0x3f,0x8c,0xbf,0x00,0x00,0x34,0xd9,0x27,0x04,0x00,0x00,0x70,0x00,0x8c,0xbf,0x00,0x00,0xfd,0xbb,0x6a
,0x3c,0x80,0xbe,0x65,0x01,0x88,0xbf,0x02,0x02,0x08,0xf4,0x00,0x00,0x00,0xfa,0x02,0x00,0x04,0xf4,0x20,0x00,0x00,0xfa,0x02,0x05,0x00,0xf4,0x2c,0x00,0x00,0xfa,0x80
,0x02,0x0a,0x7e,0x80,0x02,0x14,0x7e,0x00,0x00,0xfd,0xbb,0x00,0x00,0xd8,0xd9,0x27,0x00,0x00,0x08,0x84,0x00,0x88,0x7d,0x83,0x00,0x00,0x34,0x10,0x11,0xdc,0xd9,0x05
,0x00,0x00,0x19,0x98,0x00,0xd8,0xd8,0x05,0x00,0x00,0x0b,0xa8,0x00,0xd8,0xd9,0x05,0x00,0x00,0x23,0x12,0x14,0xdc,0xd9,0x05,0x00,0x00,0x14,0x04,0x00,0x01,0xd5,0xff
,0x82,0xa9,0x01,0xff,0xff,0xff,0x00,0x27,0x01,0x0a,0x4a,0x7f,0xc0,0x8c,0xbf,0x0b,0x02,0x1a,0x7e,0x01,0x02,0x0e,0x7e,0x00,0x02,0x0c,0x7e,0x14,0xff,0x95,0x93,0x00
,0x00,0x05,0x00,0x81,0x15,0x15,0x8f,0x14,0xff,0x96,0x93,0x05,0x00,0x05,0x00,0x81,0x16,0x16,0x8f,0x14,0xff,0x80,0x93,0x0a,0x00,0x05,0x00,0x81,0x00,0x17,0x8f,0x14
,0xff,0x98,0x93,0x0f,0x00,0x04,0x00,0x81,0x18,0x18,0x8f,0x0a,0x02,0x18,0x7e,0x06,0x02,0x76,0xd5,0xff,0x0c,0x18,0x04,0x40,0x27,0x00,0x00,0x04,0x00,0x60,0xd7,0x06
,0x01,0x01,0x00,0x05,0x00,0x60,0xd7,0x07,0x01,0x01,0x00,0x81,0x00,0x02,0x8f,0x0e,0x00,0x0f,0xd7,0x08,0x16,0x02,0x00,0x22,0x00,0x01,0xd5,0x24,0x01,0xa9,0x01,0x18
,0x00,0x01,0xd5,0x17,0x01,0xa9,0x01,0x03,0x00,0x01,0xd5,0x16,0x01,0xa9,0x01,0x02,0xc0,0x03,0x81,0x1d,0x00,0x28,0xd5,0x09,0x14,0x02,0x00,0x23,0x00,0x01,0xd5,0x23
,0x01,0xa9,0x01,0x16,0x6a,0x0f,0xd7,0x0e,0x01,0x02,0x00,0x0c,0x02,0x76,0xd5,0x03,0x0c,0x30,0x04,0x1a,0x03,0x14,0x7e,0x19,0x03,0x16,0x7e,0x83,0x36,0x48,0x34,0x83
,0x38,0x4a,0x34,0x83,0x28,0x28,0x34,0x83,0x2a,0x2a,0x34,0x80,0x3a,0x2e,0x50,0x27,0x03,0x0c,0x7e,0x18,0x81,0x82,0x80,0xc1,0x03,0xbf,0xbe,0xff,0x03,0xc6,0xbe,0x00
,0xff,0x00,0x00,0xff,0x03,0xc7,0xbe,0x00,0xfe,0x01,0x00,0xff,0x03,0xc8,0xbe,0x00,0xfc,0x03,0x00,0xff,0x03,0xc9,0xbe,0x00,0xf8,0x07,0x00,0xff,0x03,0xca,0xbe,0x00
,0xf0,0x0f,0x00,0xff,0x03,0xcb,0xbe,0x00,0xe0,0x1f,0x00,0xff,0x03,0xcc,0xbe,0x00,0xc0,0x3f,0x00,0xff,0x03,0xcd,0xbe,0x00,0x80,0x7f,0x00,0xff,0x03,0xce,0xbe,0x00
,0x00,0xff,0x00,0xff,0x03,0xcf,0xbe,0x00,0x00,0xfe,0x01,0xff,0x03,0xd0,0xbe,0x00,0x00,0xfc,0x03,0xff,0x03,0xd1,0xbe,0x00,0x00,0xf8,0x07,0xff,0x03,0xd2,0xbe,0x00
,0x00,0xf0,0x0f,0xff,0x03,0xd3,0xbe,0x00,0x00,0xe0,0x1f,0xff,0x03,0xd4,0xbe,0x00,0x00,0xc0,0x3f,0xff,0x03,0xd5,0xbe,0x00,0x00,0x80,0x7f,0x17,0xc0,0xd6,0x80,0x26
,0x00,0x26,0xd5,0x15,0x10,0x01,0x00,0x27,0x00,0x26,0xd5,0x16,0x10,0x01,0x00,0x32,0x00,0x26,0xd5,0x17,0x10,0x01,0x00,0xff,0x02,0x66,0x7e,0x00,0x00,0xf0,0x80,0x00
,0x00,0x60,0xd7,0x0c,0x01,0x01,0x00,0x01,0x00,0x60,0xd7,0x0d,0x01,0x01,0x00,0x80,0x02,0x52,0x7e,0x80,0x02,0x58,0x7e,0x82,0x04,0xfe,0xbe,0x88,0x02,0x52,0x7e,0x84
,0x02,0x58,0x7e,0x83,0x04,0xfe,0xbe,0x18,0x1a,0xdc,0xd9,0x29,0x00,0x00,0x34,0x1c,0x1e,0xdc,0xd9,0x29,0x00,0x00,0x38,0xff,0x02,0x9a,0x7e,0xff,0xff,0xff,0x00,0xa0
,0x00,0xd8,0xd9,0x29,0x00,0x00,0x4e,0xff,0x04,0xfe,0xbe,0xff,0x00,0x00,0x00,0xff,0x02,0xa4,0x7e,0x00,0x00,0x00,0x80,0xff,0x03,0xc4,0xbe,0x00,0x01,0x00,0x00,0x80
,0x03,0xc5,0xbe,0xff,0x02,0xa6,0x7e,0x00,0x00,0xf0,0x3f,0xff,0x02,0xa8,0x7e,0x00,0x00,0x10,0x00,0x00,0x1f,0x8e,0xbe,0x0e,0xff,0x28,0x80,0x48,0x03,0x00,0x00,0x0f
,0x80,0x29,0x82,0x0e,0xff,0x2a,0x80,0xac,0x03,0x00,0x00,0x0f,0x80,0x2b,0x82,0x0e,0xff,0x2c,0x80,0x10,0x04,0x00,0x00,0x0f,0x80,0x2d,0x82,0x0e,0xff,0x2e,0x80,0x74
,0x04,0x00,0x00,0x0f,0x80,0x2f,0x82,0x0e,0xff,0x30,0x80,0xd8,0x04,0x00,0x00,0x0f,0x80,0x31,0x82,0x0e,0xff,0x32,0x80,0x3c,0x05,0x00,0x00,0x0f,0x80,0x33,0x82,0x0e
,0xff,0x34,0x80,0xa0,0x05,0x00,0x00,0x0f,0x80,0x35,0x82,0x0e,0xff,0x36,0x80,0x04,0x06,0x00,0x00,0x0f,0x80,0x37,0x82,0x0e,0xff,0x38,0x80,0x68,0x06,0x00,0x00,0x0f
,0x80,0x39,0x82,0x0e,0xff,0x3a,0x80,0xdc,0x06,0x00,0x00,0x0f,0x80,0x3b,0x82,0x00,0x00,0xfd,0xbb,0x00,0x00,0xd8,0xd9,0x25,0x00,0x00,0x1b,0x00,0x00,0xd8,0xd9,0x24
,0x00,0x00,0x1d,0x7f,0xc0,0x8c,0xbf,0x1c,0x3d,0x38,0x3a,0x1c,0x33,0x32,0x3a,0x56,0x32,0x32,0x36,0x19,0x01,0x32,0x4a,0x10,0x6a,0x0f,0xd7,0x00,0x32,0x02,0x00,0x1b
,0x3b,0x32,0x3a,0x0b,0x03,0x3a,0x7e,0x11,0x6a,0x28,0xd5,0x80,0x02,0xa8,0x01,0x19,0x35,0x32,0x3a,0x00,0x80,0x34,0xdc,0x10,0x00,0x7d,0x1b,0x56,0x32,0x32,0x36,0x19
,0x01,0x32,0x4a,0x1f,0x6a,0x0f,0xd7,0x00,0x32,0x02,0x00,0x20,0x6a,0x28,0xd5,0x80,0x02,0xa8,0x01,0x1d,0x6a,0x0f,0xd7,0x16,0x3b,0x02,0x00,0x00,0x80,0x34,0xdc,0x1f
,0x00,0x7d,0x19,0x80,0x2e,0x3c,0x50,0x0b,0x03,0x42,0x7e,0x7e,0x6a,0x6a,0x87,0x71,0x3f,0x8c,0xbf,0x1c,0x09,0x1c,0x7e,0x1b,0x09,0x18,0x7e,0x0e,0x47,0x1c,0x38,0x70
,0x3f,0x8c,0xbf,0x19,0x11,0x10,0x3a,0x1a,0x13,0x12,0x3a,0x04,0x1f,0x34,0x36,0x04,0x1b,0x26,0x36,0x1a,0x45,0x1e,0x38,0x0c,0x07,0x24,0x38,0x80,0x02,0x34,0x7e,0x13
,0x31,0x26,0x38,0x1a,0x03,0x32,0x7e,0x08,0x09,0x38,0xd9,0x05,0x12,0x0e,0x00,0x00,0x80,0x34,0xdc,0x1d,0x00,0x7d,0x12,0x83,0x04,0xfe,0xbe,0x7f,0xc0,0x8c,0xbf,0x08
,0x0a,0xdc,0xd9,0x29,0x00,0x00,0x3c,0x0c,0x0e,0xdc,0xd9,0x29,0x00,0x00,0x40,0x10,0x12,0xdc,0xd9,0x29,0x00,0x00,0x44,0x14,0x16,0xdc,0xd9,0x29,0x00,0x00,0x48,0x10
,0x00,0x60,0xd7,0x08,0x01,0x01,0x00,0x11,0x00,0x60,0xd7,0x09,0x01,0x01,0x00,0x12,0x00,0x60,0xd7,0x08,0x03,0x01,0x00,0x13,0x00,0x60,0xd7,0x09,0x03,0x01,0x00,0x14
,0x00,0x60,0xd7,0x08,0x05,0x01,0x00,0x15,0x00,0x60,0xd7,0x09,0x05,0x01,0x00,0x16,0x00,0x60,0xd7,0x08,0x07,0x01,0x00,0x17,0x00,0x60,0xd7,0x09,0x07,0x01,0x00,0x18
,0x00,0x60,0xd7,0x08,0x09,0x01,0x00,0x19,0x00,0x60,0xd7,0x09,0x09,0x01,0x00,0x1a,0x00,0x60,0xd7,0x08,0x0b,0x01,0x00,0x1b,0x00,0x60,0xd7,0x09,0x0b,0x01,0x00,0x1c
,0x00,0x60,0xd7,0x08,0x0d,0x01,0x00,0x1d,0x00,0x60,0xd7,0x09,0x0d,0x01,0x00,0x1e,0x00,0x60,0xd7,0x08,0x0f,0x01,0x00,0x1f,0x00,0x60,0xd7,0x09,0x0f,0x01,0x00,0x7f
,0xc0,0x8c,0xbf,0x83,0x04,0xfe,0xbe,0x04,0x21,0x8c,0xbe,0x08,0x0a,0x38,0xd9,0x29,0x3c,0x3e,0x00,0x0c,0x0e,0x38,0xd9,0x29,0x40,0x42,0x00,0x10,0x12,0x38,0xd9,0x29
,0x44,0x46,0x00,0x14,0x16,0x38,0xd9,0x29,0x48,0x4a,0x00,0x08,0x00,0x61,0xd7,0x10,0x00,0x01,0x00,0x09,0x00,0x61,0xd7,0x11,0x00,0x01,0x00,0x08,0x00,0x61,0xd7,0x12
,0x02,0x01,0x00,0x09,0x00,0x61,0xd7,0x13,0x02,0x01,0x00,0x08,0x00,0x61,0xd7,0x14,0x04,0x01,0x00,0x09,0x00,0x61,0xd7,0x15,0x04,0x01,0x00,0x08,0x00,0x61,0xd7,0x16
,0x06,0x01,0x00,0x09,0x00,0x61,0xd7,0x17,0x06,0x01,0x00,0x08,0x00,0x61,0xd7,0x18,0x08,0x01,0x00,0x09,0x00,0x61,0xd7,0x19,0x08,0x01,0x00,0x08,0x00,0x61,0xd7,0x1a
,0x0a,0x01,0x00,0x09,0x00,0x61,0xd7,0x1b,0x0a,0x01,0x00,0x08,0x00,0x61,0xd7,0x1c,0x0c,0x01,0x00,0x09,0x00,0x61,0xd7,0x1d,0x0c,0x01,0x00,0x08,0x00,0x61,0xd7,0x1e
,0x0e,0x01,0x00,0x09,0x00,0x61,0xd7,0x1f,0x0e,0x01,0x00,0xff,0x04,0xfe,0xbe,0xff,0x00,0x00,0x00,0x00,0x00,0x34,0xd9,0x06,0x08,0x00,0x00,0x7f,0xc0,0x8c,0xbf,0x00
,0x00,0xd8,0xd8,0x15,0x00,0x00,0x0b,0x00,0x00,0xd8,0xd8,0x14,0x00,0x00,0x1b,0x7f,0xc0,0x8c,0xbf,0x0b,0x37,0x16,0x3a,0x0a,0x17,0x14,0x3a,0x00,0x08,0xdc,0xd9,0x06
,0x00,0x00,0x1b,0xff,0x14,0x16,0x36,0xc0,0xff,0xff,0x7f,0x21,0x03,0x14,0x7e,0x7f,0xc0,0x8c,0xbf,0x7f,0xc0,0x8c,0xbf,0x1b,0x25,0x10,0x3a,0x1c,0x27,0x12,0x3a,0x00
,0x80,0x74,0xdc,0x10,0x08,0x7d,0x00,0x80,0x00,0xd8,0xd9,0x06,0x00,0x00,0x1b,0x00,0x00,0x34,0xd9,0x06,0x08,0x00,0x00,0x7f,0xc1,0x8c,0xbf,0x1b,0x3b,0x3a,0x3a,0x1c
,0x3d,0x3c,0x3a,0x00,0x80,0x74,0xdc,0x1f,0x1d,0x7d,0x00,0x02,0x81,0x82,0x80,0x57,0xff,0x84,0xbf,0x00,0x80,0x74,0xdc,0x01,0x08,0x7d,0x00,0x40,0x80,0x74,0xdc,0x01
,0x1d,0x7d,0x00,0x80,0x80,0x74,0xdc,0x01,0x1b,0x7d,0x00,0x80,0x02,0x00,0x7e,0x42,0x02,0x02,0x7e,0x00,0x80,0x70,0xdc,0x00,0x01,0x40,0x00,0x00,0x00,0x81,0xbf,0x81
,0x08,0xc3,0xb9,0x44,0x63,0x38,0x7e,0x2a,0x00,0x65,0xd5,0x1c,0x89,0x02,0x00,0x1c,0x03,0x60,0x7e,0x1d,0xa9,0x62,0x4c,0x1c,0x03,0x5c,0x7e,0x31,0xa5,0x5e,0x3a,0x2e
,0x00,0x4c,0xd5,0x2e,0x55,0xc2,0x03,0x2a,0x00,0x4c,0xd5,0x2a,0x5d,0xaa,0x04,0x30,0x00,0x4c,0xd5,0x30,0x5d,0xc2,0x04,0x2e,0x00,0x4c,0xd5,0x2a,0x55,0x12,0x25,0x81
,0x08,0xc2,0xb9,0x2a,0x00,0x4c,0xd5,0x2e,0x61,0xaa,0x04,0x00,0x00,0xb8,0xd4,0x44,0x89,0x00,0x00,0x2a,0x03,0x88,0x7e,0x2b,0x03,0x8a,0x7e,0x83,0x04,0xfe,0xbe,0x3c
,0x20,0x80,0xbe,0x81,0x08,0xc3,0xb9,0x46,0x63,0x38,0x7e,0x2a,0x00,0x65,0xd5,0x1c,0x8d,0x02,0x00,0x1c,0x03,0x60,0x7e,0x1d,0xa9,0x62,0x4c,0x1c,0x03,0x5c,0x7e,0x31
,0xa5,0x5e,0x3a,0x2e,0x00,0x4c,0xd5,0x2e,0x55,0xc2,0x03,0x2a,0x00,0x4c,0xd5,0x2a,0x5d,0xaa,0x04,0x30,0x00,0x4c,0xd5,0x30,0x5d,0xc2,0x04,0x2e,0x00,0x4c,0xd5,0x2a
,0x55,0x1a,0x25,0x81,0x08,0xc2,0xb9,0x2a,0x00,0x4c,0xd5,0x2e,0x61,0xaa,0x04,0x00,0x00,0xb8,0xd4,0x46,0x89,0x00,0x00,0x2a,0x03,0x8c,0x7e,0x2b,0x03,0x8e,0x7e,0x83
,0x04,0xfe,0xbe,0x3c,0x20,0x80,0xbe,0x81,0x08,0xc3,0xb9,0x48,0x63,0x38,0x7e,0x2a,0x00,0x65,0xd5,0x1c,0x91,0x02,0x00,0x1c,0x03,0x60,0x7e,0x1d,0xa9,0x62,0x4c,0x1c
,0x03,0x5c,0x7e,0x31,0xa5,0x5e,0x3a,0x2e,0x00,0x4c,0xd5,0x2e,0x55,0xc2,0x03,0x2a,0x00,0x4c,0xd5,0x2a,0x5d,0xaa,0x04,0x30,0x00,0x4c,0xd5,0x30,0x5d,0xc2,0x04,0x2e
,0x00,0x4c,0xd5,0x2a,0x55,0x22,0x25,0x81,0x08,0xc2,0xb9,0x2a,0x00,0x4c,0xd5,0x2e,0x61,0xaa,0x04,0x00,0x00,0xb8,0xd4,0x48,0x89,0x00,0x00,0x2a,0x03,0x90,0x7e,0x2b
,0x03,0x92,0x7e,0x83,0x04,0xfe,0xbe,0x3c,0x20,0x80,0xbe,0x81,0x08,0xc3,0xb9,0x4a,0x63,0x38,0x7e,0x2a,0x00,0x65,0xd5,0x1c,0x95,0x02,0x00,0x1c,0x03,0x60,0x7e,0x1d
,0xa9,0x62,0x4c,0x1c,0x03,0x5c,0x7e,0x31,0xa5,0x5e,0x3a,0x2e,0x00,0x4c,0xd5,0x2e,0x55,0xc2,0x03,0x2a,0x00,0x4c,0xd5,0x2a,0x5d,0xaa,0x04,0x30,0x00,0x4c,0xd5,0x30
,0x5d,0xc2,0x04,0x2e,0x00,0x4c,0xd5,0x2a,0x55,0x2a,0x25,0x81,0x08,0xc2,0xb9,0x2a,0x00,0x4c,0xd5,0x2e,0x61,0xaa,0x04,0x00,0x00,0xb8,0xd4,0x4a,0x89,0x00,0x00,0x2a
,0x03,0x94,0x7e,0x2b,0x03,0x96,0x7e,0x83,0x04,0xfe,0xbe,0x3c,0x20,0x80,0xbe,0x1c,0x9d,0x38,0x38,0x1d,0x00,0x71,0xd7,0x1d,0x9b,0x3e,0x05,0x81,0x08,0xc3,0xb9,0x1c
,0x5f,0x60,0x7e,0x50,0x00,0x4c,0xd5,0x1c,0x61,0xca,0x23,0x30,0x00,0x4c,0xd5,0x30,0xa1,0xc2,0x04,0x50,0x00,0x65,0xd5,0x44,0x61,0x02,0x00,0x2a,0x00,0x4c,0xd5,0x1c
,0xa1,0x12,0x25,0x81,0x08,0xc2,0xb9,0x2a,0x00,0x4c,0xd5,0x2a,0x61,0x42,0x05,0x50,0x00,0x60,0xd5,0x2a,0x39,0x12,0x05,0x44,0x39,0x64,0x7c,0x80,0x02,0xa0,0x7e,0x53
,0x03,0xa2,0x7e,0x83,0x04,0xfe,0xbe,0x50,0x03,0x88,0x7e,0x51,0x03,0x8a,0x7e,0x3c,0x20,0x80,0xbe,0x1c,0x9d,0x38,0x38,0x1d,0x00,0x71,0xd7,0x1d,0x9b,0x3e,0x05,0x81
,0x08,0xc3,0xb9,0x1c,0x5f,0x60,0x7e,0x50,0x00,0x4c,0xd5,0x1c,0x61,0xca,0x23,0x30,0x00,0x4c,0xd5,0x30,0xa1,0xc2,0x04,0x50,0x00,0x65,0xd5,0x46,0x61,0x02,0x00,0x2a
,0x00,0x4c,0xd5,0x1c,0xa1,0x1a,0x25,0x81,0x08,0xc2,0xb9,0x2a,0x00,0x4c,0xd5,0x2a,0x61,0x42,0x05,0x50,0x00,0x60,0xd5,0x2a,0x39,0x1a,0x05,0x46,0x39,0x64,0x7c,0x80
,0x02,0xa0,0x7e,0x53,0x03,0xa2,0x7e,0x83,0x04,0xfe,0xbe,0x50,0x03,0x8c,0x7e,0x51,0x03,0x8e,0x7e,0x3c,0x20,0x80,0xbe,0x1c,0x9d,0x38,0x38,0x1d,0x00,0x71,0xd7,0x1d
,0x9b,0x3e,0x05,0x81,0x08,0xc3,0xb9,0x1c,0x5f,0x60,0x7e,0x50,0x00,0x4c,0xd5,0x1c,0x61,0xca,0x23,0x30,0x00,0x4c,0xd5,0x30,0xa1,0xc2,0x04,0x50,0x00,0x65,0xd5,0x48
,0x61,0x02,0x00,0x2a,0x00,0x4c,0xd5,0x1c,0xa1,0x22,0x25,0x81,0x08,0xc2,0xb9,0x2a,0x00,0x4c,0xd5,0x2a,0x61,0x42,0x05,0x50,0x00,0x60,0xd5,0x2a,0x39,0x22,0x05,0x48
,0x39,0x64,0x7c,0x80,0x02,0xa0,0x7e,0x53,0x03,0xa2,0x7e,0x83,0x04,0xfe,0xbe,0x50,0x03,0x90,0x7e,0x51,0x03,0x92,0x7e,0x3c,0x20,0x80,0xbe,0x1c,0x9d,0x38,0x38,0x1d
,0x00,0x71,0xd7,0x1d,0x9b,0x3e,0x05,0x81,0x08,0xc3,0xb9,0x1c,0x5f,0x60,0x7e,0x50,0x00,0x4c,0xd5,0x1c,0x61,0xca,0x23,0x30,0x00,0x4c,0xd5,0x30,0xa1,0xc2,0x04,0x50
,0x00,0x65,0xd5,0x4a,0x61,0x02,0x00,0x2a,0x00,0x4c,0xd5,0x1c,0xa1,0x2a,0x25,0x81,0x08,0xc2,0xb9,0x2a,0x00,0x4c,0xd5,0x2a,0x61,0x42,0x05,0x50,0x00,0x60,0xd5,0x2a
,0x39,0x2a,0x05,0x4a,0x39,0x64,0x7c,0x80,0x02,0xa0,0x7e,0x53,0x03,0xa2,0x7e,0x83,0x04,0xfe,0xbe,0x50,0x03,0x94,0x7e,0x51,0x03,0x96,0x7e,0x3c,0x20,0x80,0xbe,0x81
,0x04,0xfe,0xbe,0x0e,0x02,0x5a,0x7e,0x28,0x00,0x6a,0xd5,0x26,0x5a,0x02,0x00,0x0f,0x02,0x5e,0x7e,0x2a,0x20,0x76,0xd5,0x26,0x5e,0xa2,0x04,0x2a,0x03,0x50,0x7e,0x2d
,0x20,0x76,0xd5,0x27,0x5a,0xa2,0x04,0x2a,0x20,0x76,0xd5,0x27,0x5e,0xae,0x04,0x2a,0x6a,0x0f,0xd7,0x2a,0x5d,0x02,0x00,0x80,0x56,0x56,0x50,0x20,0x00,0x60,0xd7,0x2a
,0x01,0x01,0x00,0x21,0x00,0x60,0xd7,0x2b,0x01,0x01,0x00,0x0f,0x80,0x04,0xbf,0x26,0x80,0xa2,0x85,0x20,0x22,0xa0,0x80,0x21,0x23,0xa1,0x82,0x27,0x80,0x04,0xbf,0x0e
,0x80,0xa2,0x85,0x20,0x22,0x8e,0x80,0x21,0x23,0x8f,0x82,0x83,0x04,0xfe,0xbe,0x3c,0x20,0x80,0xbe,0x81,0x04,0xfe,0xbe,0x26,0x02,0x5a,0x7e,0x28,0x00,0x6a,0xd5,0x0e
,0x5a,0x02,0x00,0x27,0x02,0x5e,0x7e,0x2a,0x20,0x76,0xd5,0x0e,0x5e,0xa2,0x04,0x2a,0x03,0x50,0x7e,0x2d,0x20,0x76,0xd5,0x0f,0x5a,0xa2,0x04,0x2a,0x20,0x76,0xd5,0x0f
,0x5e,0xae,0x04,0x2a,0x6a,0x0f,0xd7,0x2a,0x5d,0x02,0x00,0x80,0x56,0x56,0x50,0x0e,0x00,0x60,0xd7,0x2a,0x01,0x01,0x00,0x0f,0x00,0x60,0xd7,0x2b,0x01,0x01,0x00,0x83
,0x04,0xfe,0xbe,0x3c,0x20,0x80,0xbe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43
,0x4c,0x52,0x58,0x20,0x52,0x4f,0x43,0x6d,0x42,0x69,0x6e,0x47,0x65,0x6e,0x65,0x72,0x61,0x74,0x6f,0x72,0x20,0x30,0x2e,0x31,0x2e,0x39,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x02,0x07,0x00,0x00
,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x12,0x03,0x06,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x11,0x03,0x05,0x00,0xc0,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x2e,0x6e,0x6f,0x74,0x65,0x00,0x2e,0x64,0x79,0x6e,0x73,0x79,0x6d,0x00,0x2e,0x68,0x61,0x73,0x68,0x00,0x2e,0x64,0x79,0x6e,0x73,0x74,0x72,0x00,0x2e,0x72,0x6f,0x64
,0x61,0x74,0x61,0x00,0x2e,0x74,0x65,0x78,0x74,0x00,0x2e,0x64,0x79,0x6e,0x61,0x6d,0x69,0x63,0x00,0x2e,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x00,0x2e,0x73,0x79,0x6d
,0x74,0x61,0x62,0x00,0x2e,0x73,0x68,0x73,0x74,0x72,0x74,0x61,0x62,0x00,0x2e,0x73,0x74,0x72,0x74,0x61,0x62,0x00,0x00,0x5f,0x44,0x59,0x4e,0x41,0x4d,0x49,0x43,0x00
,0x72,0x61,0x6e,0x64,0x6f,0x6d,0x78,0x5f,0x72,0x75,0x6e,0x00,0x72,0x61,0x6e,0x64,0x6f,0x6d,0x78,0x5f,0x72,0x75,0x6e,0x2e,0x6b,0x64,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01
,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x34
,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07
,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x48
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f
,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x18
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15
,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x1c
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1d
,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x40
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25
,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x28
,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2b
,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x60
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x34
,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x1b
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3d
,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x60
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45
,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x57
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4f
,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x25
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
const int randomx_run_gfx1010_bin_size=9312;

View File

@@ -316,7 +316,7 @@ __kernel void init_vm(__global const void* entropy_data, __global void* vm_state
uint64_t registerLatencyFP = 0;
uint64_t registerReadCycleFP = 0;
uint32_t ScratchpadHighLatency = 0;
uint32_t ScratchpadLatency = 0;
volatile uint32_t ScratchpadLatency = 0;
int32_t first_available_slot = 0;
int32_t first_allowed_slot_cfround = 0;
@@ -1425,15 +1425,18 @@ double fma_soft(double a, double b, double c, uint32_t rounding_mode)
}
const uint64_t mantissa_size = 52;
const uint64_t mantissa_mask = (1UL << mantissa_size) - 1;
const uint64_t mantissa_high_bit = 1UL << mantissa_size;
const uint64_t mantissa_mask = (1UL << 52) - 1;
const uint64_t exponent_size = 11;
const uint64_t exponent_mask = (1 << exponent_size) - 1;
const uint32_t exponent_a = (as_uint2(a).y >> 20) & exponent_mask;
const uint32_t exponent_b = (as_uint2(b).y >> 20) & exponent_mask;
const uint32_t exponent_c = (as_uint2(c).y >> 20) & exponent_mask;
uint2 a2 = as_uint2(a);
uint2 b2 = as_uint2(b);
uint2 c2 = as_uint2(c);
const uint32_t exponent_a = (a2.y >> 20) & exponent_mask;
const uint32_t exponent_b = (b2.y >> 20) & exponent_mask;
const uint32_t exponent_c = (c2.y >> 20) & exponent_mask;
if ((exponent_a == 2047) || (exponent_b == 2047) || (exponent_c == 2047))
{
@@ -1441,13 +1444,17 @@ double fma_soft(double a, double b, double c, uint32_t rounding_mode)
return as_double(inf);
}
const uint64_t mantissa_a = (as_ulong(a) & mantissa_mask) | mantissa_high_bit;
const uint64_t mantissa_b = (as_ulong(b) & mantissa_mask) | mantissa_high_bit;
const uint64_t mantissa_c = (as_ulong(c) & mantissa_mask) | mantissa_high_bit;
const uint32_t sign_a = a2.y >> 31;
const uint32_t sign_b = b2.y >> 31;
const uint32_t sign_c = c2.y >> 31;
const uint32_t sign_a = as_uint2(a).y >> 31;
const uint32_t sign_b = as_uint2(b).y >> 31;
const uint32_t sign_c = as_uint2(c).y >> 31;
a2.y = (a2.y & ((1U << 20) - 1)) | (1U << 20);
b2.y = (b2.y & ((1U << 20) - 1)) | (1U << 20);
c2.y = (c2.y & ((1U << 20) - 1)) | (1U << 20);
uint64_t mantissa_a = as_ulong(a2);
uint64_t mantissa_b = as_ulong(b2);
uint64_t mantissa_c = as_ulong(c2);
uint64_t mul_result[2];
mul_result[0] = mantissa_a * mantissa_b;
@@ -1585,7 +1592,7 @@ double fma_soft(double a, double b, double c, uint32_t rounding_mode)
if (rounding_mode + sign_fma_result == 2)
{
fma_result[1] += round_up;
if (fma_result[1] == mantissa_high_bit)
if (fma_result[1] == (1UL << mantissa_size))
{
fma_result[1] = 0;
++exponent_fma_result;

View File

@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -40,9 +40,16 @@ bool ocl_generic_rx_generator(const OclDevice &device, const Algorithm &algorith
return false;
}
// Mobile Ryzen APUs
if (device.type() == OclDevice::Raven) {
threads.add(OclThread(device.index(), (device.computeUnits() > 4) ? 256 : 128, 8, 1, true, true, 6));
return true;
}
const size_t mem = device.globalMemSize();
auto config = RxAlgo::base(algorithm);
bool gcnAsm = false;
bool isNavi = false;
switch (device.type()) {
case OclDevice::Baffin:
@@ -53,6 +60,13 @@ bool ocl_generic_rx_generator(const OclDevice &device, const Algorithm &algorith
gcnAsm = true;
break;
case OclDevice::Navi_10:
case OclDevice::Navi_12:
case OclDevice::Navi_14:
gcnAsm = true;
isNavi = true;
break;
default:
break;
}
@@ -69,8 +83,9 @@ bool ocl_generic_rx_generator(const OclDevice &device, const Algorithm &algorith
uint32_t intensity = static_cast<uint32_t>((mem - (datasetHost ? 0 : dataset_mem)) / per_thread_mem / 2);
// Too high intensity makes hashrate worse
if (intensity > device.computeUnits() * 16) {
intensity = device.computeUnits() * 16;
const uint32_t intensityCoeff = isNavi ? 64 : 16;
if (intensity > device.computeUnits() * intensityCoeff) {
intensity = device.computeUnits() * intensityCoeff;
}
intensity -= intensity % 64;

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -30,12 +30,10 @@
#include "crypto/rx/RxAlgo.h"
void xmrig::RxRunKernel::enqueue(cl_command_queue queue, size_t threads)
void xmrig::RxRunKernel::enqueue(cl_command_queue queue, size_t threads, size_t workgroup_size)
{
const size_t gthreads = threads * 64;
static const size_t lthreads = 64;
enqueueNDRange(queue, 1, nullptr, &gthreads, &lthreads);
const size_t gthreads = threads * workgroup_size;
enqueueNDRange(queue, 1, nullptr, &gthreads, &workgroup_size);
}

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -40,7 +40,7 @@ class RxRunKernel : public OclKernel
public:
inline RxRunKernel(cl_program program) : OclKernel(program, "randomx_run") {}
void enqueue(cl_command_queue queue, size_t threads);
void enqueue(cl_command_queue queue, size_t threads, size_t workgroup_size);
void setArgs(cl_mem dataset, cl_mem scratchpads, cl_mem registers, cl_mem rounding, cl_mem programs, uint32_t batch_size, const Algorithm &algorithm);
};

View File

@@ -31,7 +31,7 @@ if (WITH_OPENCL)
src/backend/opencl/wrappers/OclLib.h
src/backend/opencl/wrappers/OclPlatform.h
src/backend/opencl/wrappers/OclVendor.h
)
)
set(SOURCES_BACKEND_OPENCL
src/backend/opencl/cl/OclSource.cpp
@@ -59,75 +59,93 @@ if (WITH_OPENCL)
src/backend/opencl/wrappers/OclKernel.cpp
src/backend/opencl/wrappers/OclLib.cpp
src/backend/opencl/wrappers/OclPlatform.cpp
)
)
if (WIN32)
list(APPEND SOURCES_BACKEND_OPENCL src/backend/opencl/OclCache_win.cpp)
else()
list(APPEND SOURCES_BACKEND_OPENCL src/backend/opencl/OclCache_unix.cpp)
endif()
if (WIN32)
list(APPEND SOURCES_BACKEND_OPENCL src/backend/opencl/OclCache_win.cpp)
else()
list(APPEND SOURCES_BACKEND_OPENCL src/backend/opencl/OclCache_unix.cpp)
endif()
if (WITH_RANDOMX)
list(APPEND HEADERS_BACKEND_OPENCL
src/backend/opencl/kernels/rx/Blake2bHashRegistersKernel.h
src/backend/opencl/kernels/rx/Blake2bInitialHashKernel.h
src/backend/opencl/kernels/rx/ExecuteVmKernel.h
src/backend/opencl/kernels/rx/FillAesKernel.h
src/backend/opencl/kernels/rx/FindSharesKernel.h
src/backend/opencl/kernels/rx/HashAesKernel.cpp
src/backend/opencl/kernels/rx/InitVmKernel.h
src/backend/opencl/kernels/rx/RxJitKernel.h
src/backend/opencl/kernels/rx/RxRunKernel.h
src/backend/opencl/runners/OclRxBaseRunner.h
src/backend/opencl/runners/OclRxJitRunner.h
src/backend/opencl/runners/OclRxVmRunner.h
)
if (WITH_RANDOMX)
list(APPEND HEADERS_BACKEND_OPENCL
src/backend/opencl/kernels/rx/Blake2bHashRegistersKernel.h
src/backend/opencl/kernels/rx/Blake2bInitialHashKernel.h
src/backend/opencl/kernels/rx/ExecuteVmKernel.h
src/backend/opencl/kernels/rx/FillAesKernel.h
src/backend/opencl/kernels/rx/FindSharesKernel.h
src/backend/opencl/kernels/rx/HashAesKernel.cpp
src/backend/opencl/kernels/rx/InitVmKernel.h
src/backend/opencl/kernels/rx/RxJitKernel.h
src/backend/opencl/kernels/rx/RxRunKernel.h
src/backend/opencl/runners/OclRxBaseRunner.h
src/backend/opencl/runners/OclRxJitRunner.h
src/backend/opencl/runners/OclRxVmRunner.h
)
list(APPEND SOURCES_BACKEND_OPENCL
src/backend/opencl/generators/ocl_generic_rx_generator.cpp
src/backend/opencl/kernels/rx/Blake2bHashRegistersKernel.cpp
src/backend/opencl/kernels/rx/Blake2bInitialHashKernel.cpp
src/backend/opencl/kernels/rx/ExecuteVmKernel.cpp
src/backend/opencl/kernels/rx/FillAesKernel.cpp
src/backend/opencl/kernels/rx/FindSharesKernel.cpp
src/backend/opencl/kernels/rx/HashAesKernel.cpp
src/backend/opencl/kernels/rx/InitVmKernel.cpp
src/backend/opencl/kernels/rx/RxJitKernel.cpp
src/backend/opencl/kernels/rx/RxRunKernel.cpp
src/backend/opencl/runners/OclRxBaseRunner.cpp
src/backend/opencl/runners/OclRxJitRunner.cpp
src/backend/opencl/runners/OclRxVmRunner.cpp
)
endif()
list(APPEND SOURCES_BACKEND_OPENCL
src/backend/opencl/generators/ocl_generic_rx_generator.cpp
src/backend/opencl/kernels/rx/Blake2bHashRegistersKernel.cpp
src/backend/opencl/kernels/rx/Blake2bInitialHashKernel.cpp
src/backend/opencl/kernels/rx/ExecuteVmKernel.cpp
src/backend/opencl/kernels/rx/FillAesKernel.cpp
src/backend/opencl/kernels/rx/FindSharesKernel.cpp
src/backend/opencl/kernels/rx/HashAesKernel.cpp
src/backend/opencl/kernels/rx/InitVmKernel.cpp
src/backend/opencl/kernels/rx/RxJitKernel.cpp
src/backend/opencl/kernels/rx/RxRunKernel.cpp
src/backend/opencl/runners/OclRxBaseRunner.cpp
src/backend/opencl/runners/OclRxJitRunner.cpp
src/backend/opencl/runners/OclRxVmRunner.cpp
)
endif()
if (WITH_CN_GPU AND CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND HEADERS_BACKEND_OPENCL
src/backend/opencl/kernels/Cn00RyoKernel.h
src/backend/opencl/kernels/Cn1RyoKernel.h
src/backend/opencl/kernels/Cn2RyoKernel.h
src/backend/opencl/runners/OclRyoRunner.h
)
if (WITH_CN_GPU AND CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND HEADERS_BACKEND_OPENCL
src/backend/opencl/kernels/Cn00RyoKernel.h
src/backend/opencl/kernels/Cn1RyoKernel.h
src/backend/opencl/kernels/Cn2RyoKernel.h
src/backend/opencl/runners/OclRyoRunner.h
)
list(APPEND SOURCES_BACKEND_OPENCL
src/backend/opencl/generators/ocl_generic_cn_gpu_generator.cpp
src/backend/opencl/kernels/Cn00RyoKernel.cpp
src/backend/opencl/kernels/Cn1RyoKernel.cpp
src/backend/opencl/kernels/Cn2RyoKernel.cpp
src/backend/opencl/runners/OclRyoRunner.cpp
)
endif()
list(APPEND SOURCES_BACKEND_OPENCL
src/backend/opencl/generators/ocl_generic_cn_gpu_generator.cpp
src/backend/opencl/kernels/Cn00RyoKernel.cpp
src/backend/opencl/kernels/Cn1RyoKernel.cpp
src/backend/opencl/kernels/Cn2RyoKernel.cpp
src/backend/opencl/runners/OclRyoRunner.cpp
)
endif()
if (WITH_STRICT_CACHE)
add_definitions(/DXMRIG_STRICT_OPENCL_CACHE)
else()
remove_definitions(/DXMRIG_STRICT_OPENCL_CACHE)
endif()
if (WITH_STRICT_CACHE)
add_definitions(/DXMRIG_STRICT_OPENCL_CACHE)
else()
remove_definitions(/DXMRIG_STRICT_OPENCL_CACHE)
endif()
if (WITH_INTERLEAVE_DEBUG_LOG)
add_definitions(/DXMRIG_INTERLEAVE_DEBUG)
endif()
if (WITH_INTERLEAVE_DEBUG_LOG)
add_definitions(/DXMRIG_INTERLEAVE_DEBUG)
endif()
if (WITH_ADL AND (XMRIG_OS_WIN OR XMRIG_OS_LINUX))
add_definitions(/DXMRIG_FEATURE_ADL)
list(APPEND HEADERS_BACKEND_OPENCL
src/backend/opencl/wrappers/AdlHealth.h
src/backend/opencl/wrappers/AdlLib.h
)
if (XMRIG_OS_WIN)
list(APPEND SOURCES_BACKEND_OPENCL src/backend/opencl/wrappers/AdlLib.cpp)
else()
list(APPEND SOURCES_BACKEND_OPENCL src/backend/opencl/wrappers/AdlLib_linux.cpp)
endif()
else()
remove_definitions(/DXMRIG_FEATURE_ADL)
endif()
else()
remove_definitions(/DXMRIG_FEATURE_OPENCL)
remove_definitions(/DXMRIG_FEATURE_ADL)
set(HEADERS_BACKEND_OPENCL "")
set(SOURCES_BACKEND_OPENCL "")

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -23,7 +23,6 @@
*/
#include "backend/opencl/runners/OclRxBaseRunner.h"
#include "backend/opencl/kernels/rx/Blake2bHashRegistersKernel.h"
#include "backend/opencl/kernels/rx/Blake2bInitialHashKernel.h"
#include "backend/opencl/kernels/rx/FillAesKernel.h"
@@ -52,10 +51,14 @@ xmrig::OclRxBaseRunner::OclRxBaseRunner(size_t index, const OclLaunchData &data)
m_worksize = 8;
}
if (data.device.type() == OclDevice::Vega_10 || data.device.type() == OclDevice::Vega_20) {
if (data.device.type() == OclDevice::Vega_10 || data.device.type() == OclDevice::Vega_20 || data.device.type() == OclDevice::Raven) {
m_gcn_version = 14;
}
if (data.device.type() == OclDevice::Navi_10 || data.device.type() == OclDevice::Navi_12 || data.device.type() == OclDevice::Navi_14) {
m_gcn_version = 15;
}
m_options += " -DALGO=" + std::to_string(RxAlgo::id(m_algorithm));
m_options += " -DWORKERS_PER_HASH=" + std::to_string(m_worksize);
m_options += " -DGCN_VERSION=" + std::to_string(m_gcn_version);

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -23,9 +23,9 @@
*/
#include "backend/opencl/runners/OclRxJitRunner.h"
#include "backend/opencl/cl/rx/randomx_run_gfx803.h"
#include "backend/opencl/cl/rx/randomx_run_gfx900.h"
#include "backend/opencl/cl/rx/randomx_run_gfx1010.h"
#include "backend/opencl/kernels/rx/Blake2bHashRegistersKernel.h"
#include "backend/opencl/kernels/rx/HashAesKernel.h"
#include "backend/opencl/kernels/rx/RxJitKernel.h"
@@ -84,7 +84,7 @@ void xmrig::OclRxJitRunner::execute(uint32_t iteration)
OclLib::finish(m_queue);
m_randomx_run->enqueue(m_queue, m_intensity);
m_randomx_run->enqueue(m_queue, m_intensity, (m_gcn_version == 15) ? 32 : 64);
}
@@ -120,8 +120,23 @@ bool xmrig::OclRxJitRunner::loadAsmProgram()
elf_header_flags = *reinterpret_cast<uint32_t*>((binary_data.data() + elf_header_flags_offset));
}
const size_t len = (m_gcn_version == 14) ? randomx_run_gfx900_bin_size : randomx_run_gfx803_bin_size;
unsigned char *binary = (m_gcn_version == 14) ? randomx_run_gfx900_bin : randomx_run_gfx803_bin;
size_t len;
unsigned char *binary;
switch (m_gcn_version) {
case 14:
len = randomx_run_gfx900_bin_size;
binary = randomx_run_gfx900_bin;
break;
case 15:
len = randomx_run_gfx1010_bin_size;
binary = randomx_run_gfx1010_bin;
break;
default:
len = randomx_run_gfx803_bin_size;
binary = randomx_run_gfx803_bin;
break;
}
// Set correct internal device ID in the pre-compiled binary
if (elf_header_flags) {

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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

View File

@@ -0,0 +1,38 @@
/* XMRig
* Copyright 2008-2018 Advanced Micro Devices, Inc.
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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_ADLHEALTH_H
#define XMRIG_ADLHEALTH_H
#include <cstdint>
#include <vector>
struct AdlHealth
{
uint32_t clock = 0;
uint32_t memClock = 0;
uint32_t power = 0;
uint32_t rpm = 0;
uint32_t temperature = 0;
};
#endif /* XMRIG_ADLHEALTH_H */

View File

@@ -0,0 +1,265 @@
/* XMRig
* Copyright 2008-2018 Advanced Micro Devices, Inc.
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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/>.
*/
#include <stdexcept>
#include <uv.h>
#include "backend/opencl/wrappers/AdlLib.h"
#include "3rdparty/adl/adl_sdk.h"
#include "3rdparty/adl/adl_structures.h"
#include "backend/opencl/wrappers/OclDevice.h"
namespace xmrig {
static std::vector<AdapterInfo> adapters;
static uv_lib_t adlLib;
static const char *kSymbolNotFound = "symbol not found";
static const char *kADL_Main_Control_Create = "ADL_Main_Control_Create";
static const char *kADL_Main_Control_Destroy = "ADL_Main_Control_Destroy";
static const char *kADL_Adapter_NumberOfAdapters_Get = "ADL_Adapter_NumberOfAdapters_Get";
static const char *kADL_Adapter_AdapterInfo_Get = "ADL_Adapter_AdapterInfo_Get";
static const char *kADL2_Overdrive_Caps = "ADL2_Overdrive_Caps";
static const char *kADL2_OverdriveN_FanControl_Get = "ADL2_OverdriveN_FanControl_Get";
static const char *kADL2_New_QueryPMLogData_Get = "ADL2_New_QueryPMLogData_Get";
static const char *kADL2_OverdriveN_Temperature_Get = "ADL2_OverdriveN_Temperature_Get";
static const char *kADL2_OverdriveN_PerformanceStatus_Get = "ADL2_OverdriveN_PerformanceStatus_Get";
static const char *kADL2_Overdrive6_CurrentPower_Get = "ADL2_Overdrive6_CurrentPower_Get";
using ADL_MAIN_CONTROL_CREATE = int (*)(ADL_MAIN_MALLOC_CALLBACK, int);
using ADL_MAIN_CONTROL_DESTROY = int (*)();
using ADL_ADAPTER_NUMBEROFADAPTERS_GET = int (*)(int *);
using ADL_ADAPTER_ADAPTERINFO_GET = int (*)(LPAdapterInfo, int);
using ADL2_OVERDRIVE_CAPS = int (*)(ADL_CONTEXT_HANDLE, int, int *, int *, int *);
using ADL2_OVERDRIVEN_FANCONTROL_GET = int (*)(ADL_CONTEXT_HANDLE, int, ADLODNFanControl *);
using ADL2_NEW_QUERYPMLOGDATA_GET = int (*)(ADL_CONTEXT_HANDLE, int, ADLPMLogDataOutput *);
using ADL2_OVERDRIVEN_TEMPERATURE_GET = int (*)(ADL_CONTEXT_HANDLE, int, int, int *);
using ADL2_OVERDRIVEN_PERFORMANCESTATUS_GET = int (*)(ADL_CONTEXT_HANDLE, int, ADLODNPerformanceStatus *);
using ADL2_OVERDRIVE6_CURRENTPOWER_GET = int (*)(ADL_CONTEXT_HANDLE, int, int, int *);
ADL_MAIN_CONTROL_CREATE ADL_Main_Control_Create = nullptr;
ADL_MAIN_CONTROL_DESTROY ADL_Main_Control_Destroy = nullptr;
ADL_ADAPTER_NUMBEROFADAPTERS_GET ADL_Adapter_NumberOfAdapters_Get = nullptr;
ADL_ADAPTER_ADAPTERINFO_GET ADL_Adapter_AdapterInfo_Get = nullptr;
ADL2_OVERDRIVE_CAPS ADL2_Overdrive_Caps = nullptr;
ADL2_OVERDRIVEN_FANCONTROL_GET ADL2_OverdriveN_FanControl_Get = nullptr;
ADL2_NEW_QUERYPMLOGDATA_GET ADL2_New_QueryPMLogData_Get = nullptr;
ADL2_OVERDRIVEN_TEMPERATURE_GET ADL2_OverdriveN_Temperature_Get = nullptr;
ADL2_OVERDRIVEN_PERFORMANCESTATUS_GET ADL2_OverdriveN_PerformanceStatus_Get = nullptr;
ADL2_OVERDRIVE6_CURRENTPOWER_GET ADL2_Overdrive6_CurrentPower_Get = nullptr;
#define DLSYM(x) if (uv_dlsym(&adlLib, k##x, reinterpret_cast<void**>(&(x))) == -1) { throw std::runtime_error(kSymbolNotFound); }
bool AdlLib::m_initialized = false;
bool AdlLib::m_ready = false;
static void * __stdcall ADL_Main_Memory_Alloc(int iSize)
{
return malloc(iSize);
}
static inline bool matchTopology(const PciTopology &topology, const AdapterInfo &adapter)
{
return adapter.iBusNumber > -1 && topology.bus() == adapter.iBusNumber && topology.device() == adapter.iDeviceNumber && topology.function() == adapter.iFunctionNumber;
}
static void getFan_v7(const AdapterInfo &adapter, AdlHealth &health)
{
ADLODNFanControl data;
memset(&data, 0, sizeof(ADLODNFanControl));
if (ADL2_OverdriveN_FanControl_Get(nullptr, adapter.iAdapterIndex, &data) == ADL_OK) {
health.rpm = data.iCurrentFanSpeed;
}
}
static void getTemp_v7(const AdapterInfo &adapter, AdlHealth &health)
{
int temp = 0;
if (ADL2_OverdriveN_Temperature_Get(nullptr, adapter.iAdapterIndex, 1, &temp) == ADL_OK) {
health.temperature = temp / 1000;
}
}
static void getClocks_v7(const AdapterInfo &adapter, AdlHealth &health)
{
ADLODNPerformanceStatus data;
memset(&data, 0, sizeof(ADLODNPerformanceStatus));
if (ADL2_OverdriveN_PerformanceStatus_Get(nullptr, adapter.iAdapterIndex, &data) == ADL_OK) {
health.clock = data.iCoreClock / 100;
health.memClock = data.iMemoryClock / 100;
}
}
static void getPower_v7(const AdapterInfo &adapter, AdlHealth &health)
{
int power = 0;
if (ADL2_Overdrive6_CurrentPower_Get && ADL2_Overdrive6_CurrentPower_Get(nullptr, adapter.iAdapterIndex, 0, &power) == ADL_OK) {
health.power = static_cast<uint32_t>(power / 256.0);
}
}
static void getSensorsData_v8(const AdapterInfo &adapter, AdlHealth &health)
{
if (!ADL2_New_QueryPMLogData_Get) {
return;
}
ADLPMLogDataOutput data;
memset(&data, 0, sizeof(ADLPMLogDataOutput));
if (ADL2_New_QueryPMLogData_Get(nullptr, adapter.iAdapterIndex, &data) != ADL_OK) {
return;
}
auto sensorValue = [&data](ADLSensorType type) { return data.sensors[type].supported ? data.sensors[type].value : 0; };
health.clock = sensorValue(PMLOG_CLK_GFXCLK);
health.memClock = sensorValue(PMLOG_CLK_MEMCLK);
health.power = sensorValue(PMLOG_ASIC_POWER);
health.rpm = sensorValue(PMLOG_FAN_RPM);
health.temperature = sensorValue(PMLOG_TEMPERATURE_HOTSPOT);
}
} // namespace xmrig
bool xmrig::AdlLib::init()
{
if (!m_initialized) {
m_ready = dlopen() && load();
m_initialized = true;
}
return m_ready;
}
const char *xmrig::AdlLib::lastError() noexcept
{
return uv_dlerror(&adlLib);
}
void xmrig::AdlLib::close()
{
if (m_ready) {
ADL_Main_Control_Destroy();
}
uv_dlclose(&adlLib);
}
AdlHealth xmrig::AdlLib::health(const OclDevice &device)
{
if (!isReady() || device.vendorId() != OCL_VENDOR_AMD) {
return {};
}
int supported, enabled, version;
AdlHealth health;
for (const auto &adapter : adapters) {
if (matchTopology(device.topology(), adapter)) {
if (ADL2_Overdrive_Caps(nullptr, adapter.iAdapterIndex, &supported, &enabled, &version) != ADL_OK) {
continue;
}
if (version == 7) {
getFan_v7(adapter, health);
getTemp_v7(adapter, health);
getClocks_v7(adapter, health);
getPower_v7(adapter, health);
}
else if (version == 8) {
getSensorsData_v8(adapter, health);
}
break;
}
}
return health;
}
bool xmrig::AdlLib::dlopen()
{
return uv_dlopen("atiadlxx.dll", &adlLib) == 0;
}
bool xmrig::AdlLib::load()
{
try {
DLSYM(ADL_Main_Control_Create);
DLSYM(ADL_Main_Control_Destroy);
DLSYM(ADL_Adapter_NumberOfAdapters_Get);
DLSYM(ADL_Adapter_AdapterInfo_Get);
DLSYM(ADL2_Overdrive_Caps);
DLSYM(ADL2_OverdriveN_FanControl_Get);
DLSYM(ADL2_OverdriveN_Temperature_Get);
DLSYM(ADL2_OverdriveN_PerformanceStatus_Get);
} catch (std::exception &ex) {
return false;
}
try {
DLSYM(ADL2_Overdrive6_CurrentPower_Get);
DLSYM(ADL2_New_QueryPMLogData_Get);
} catch (std::exception &ex) {}
if (ADL_Main_Control_Create(ADL_Main_Memory_Alloc, 1) != ADL_OK) {
return false;
}
int count = 0;
if (ADL_Adapter_NumberOfAdapters_Get(&count) != ADL_OK) {
return false;
}
if (count == 0) {
return false;
}
adapters.resize(count);
const size_t size = sizeof(adapters[0]) * adapters.size();
memset(adapters.data(), 0, size);
return ADL_Adapter_AdapterInfo_Get(adapters.data(), size) == ADL_OK;
}

View File

@@ -0,0 +1,57 @@
/* XMRig
* Copyright 2008-2018 Advanced Micro Devices, Inc.
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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_ADLLIB_H
#define XMRIG_ADLLIB_H
#include "backend/opencl/wrappers/AdlHealth.h"
namespace xmrig {
class OclDevice;
class AdlLib
{
public:
static bool init();
static const char *lastError() noexcept;
static void close();
static AdlHealth health(const OclDevice &device);
static inline bool isInitialized() noexcept { return m_initialized; }
static inline bool isReady() noexcept { return m_ready; }
private:
static bool dlopen();
static bool load();
static bool m_initialized;
static bool m_ready;
};
} // namespace xmrig
#endif /* XMRIG_ADLLIB_H */

View File

@@ -0,0 +1,138 @@
/* XMRig
* Copyright 2008-2018 Advanced Micro Devices, Inc.
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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/>.
*/
#include "backend/opencl/wrappers/AdlLib.h"
#include "backend/opencl/wrappers/OclDevice.h"
#include <fstream>
#include <string>
#include <sys/stat.h>
#include <sys/types.h>
namespace xmrig {
bool AdlLib::m_initialized = false;
bool AdlLib::m_ready = false;
static const std::string kPrefix = "/sys/bus/pci/drivers/amdgpu/";
static inline bool sysfs_is_file(const char *path)
{
struct stat sb;
return stat(path, &sb) == 0 && ((sb.st_mode & S_IFMT) == S_IFREG);
}
static inline std::string sysfs_prefix(const PciTopology &topology)
{
std::string path = kPrefix + "0000:" + topology.toString().data() + "/hwmon/hwmon";
if (sysfs_is_file((path + "2/name").c_str())) {
return path + "2/";
}
if (sysfs_is_file((path + "3/name").c_str())) {
return path + "3/";
}
return {};
}
uint32_t sysfs_read(const std::string &path)
{
std::ifstream file(path);
if (!file.is_open()) {
return 0;
}
uint32_t value = 0;
file >> value;
return value;
}
} // namespace xmrig
bool xmrig::AdlLib::init()
{
if (!m_initialized) {
m_ready = dlopen() && load();
m_initialized = true;
}
return m_ready;
}
const char *xmrig::AdlLib::lastError() noexcept
{
return nullptr;
}
void xmrig::AdlLib::close()
{
}
AdlHealth xmrig::AdlLib::health(const OclDevice &device)
{
if (!isReady() || device.vendorId() != OCL_VENDOR_AMD) {
return {};
}
const auto prefix = sysfs_prefix(device.topology());
if (prefix.empty()) {
return {};
}
AdlHealth health;
health.clock = sysfs_read(prefix + "freq1_input") / 1000000;
health.memClock = sysfs_read(prefix + "freq2_input") / 1000000;
health.power = sysfs_read(prefix + "power1_average") / 1000000;
health.rpm = sysfs_read(prefix + "fan1_input");
health.temperature = sysfs_read(prefix + "temp2_input") / 1000;
return health;
}
bool xmrig::AdlLib::dlopen()
{
struct stat sb;
if (stat(kPrefix.c_str(), &sb) == -1) {
return false;
}
return (sb.st_mode & S_IFMT) == S_IFDIR;
}
bool xmrig::AdlLib::load()
{
return true;
}

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -24,7 +24,6 @@
#include "backend/opencl/wrappers/OclDevice.h"
#include "backend/opencl/OclGenerator.h"
#include "backend/opencl/OclThreads.h"
#include "backend/opencl/wrappers/OclLib.h"
@@ -33,6 +32,10 @@
#include "crypto/common/Algorithm.h"
#include "rapidjson/document.h"
#ifdef XMRIG_FEATURE_ADL
# include "backend/opencl/wrappers/AdlLib.h"
#endif
#include <algorithm>
@@ -107,6 +110,14 @@ static OclDevice::Type getType(const String &name)
return OclDevice::Navi_10;
}
if (name == "gfx1011") {
return OclDevice::Navi_12;
}
if (name == "gfx1012") {
return OclDevice::Navi_14;
}
if (name == "gfx804") {
return OclDevice::Lexa;
}
@@ -200,5 +211,20 @@ void xmrig::OclDevice::toJSON(rapidjson::Value &out, rapidjson::Document &doc) c
out.AddMember("bus_id", topology().toString().toJSON(doc), allocator);
out.AddMember("cu", computeUnits(), allocator);
out.AddMember("global_mem", static_cast<uint64_t>(globalMemSize()), allocator);
# ifdef XMRIG_FEATURE_ADL
if (AdlLib::isReady()) {
auto data = AdlLib::health(*this);
Value health(kObjectType);
health.AddMember("temperature", data.temperature, allocator);
health.AddMember("power", data.power, allocator);
health.AddMember("clock", data.clock, allocator);
health.AddMember("mem_clock", data.memClock, allocator);
health.AddMember("rpm", data.rpm, allocator);
out.AddMember("health", health, allocator);
}
# endif
}
#endif

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -56,7 +56,9 @@ public:
Vega_10,
Vega_20,
Raven,
Navi_10
Navi_10,
Navi_12,
Navi_14
};
OclDevice() = delete;

View File

@@ -28,10 +28,12 @@
#include <uv.h>
#include "backend/opencl/wrappers/OclLib.h"
#include "backend/common/Tags.h"
#include "backend/opencl/wrappers/OclError.h"
#include "backend/opencl/wrappers/OclLib.h"
#include "base/io/log/Log.h"
#include "base/kernel/Env.h"
#if defined(OCL_DEBUG_REFERENCE_COUNT)
# define LOG_REFS(x, ...) xmrig::Log::print(xmrig::Log::WARNING, x, ##__VA_ARGS__)
@@ -188,7 +190,7 @@ static String getOclString(FUNC fn, OBJ obj, PARAM param)
bool xmrig::OclLib::init(const char *fileName)
{
if (!m_initialized) {
m_loader = fileName == nullptr ? defaultLoader() : fileName;
m_loader = fileName == nullptr ? defaultLoader() : Env::expand(fileName);
m_ready = uv_dlopen(m_loader, &oclLib) == 0 && load();
m_initialized = true;
}
@@ -257,7 +259,7 @@ bool xmrig::OclLib::load()
}
const char *xmrig::OclLib::defaultLoader()
xmrig::String xmrig::OclLib::defaultLoader()
{
# if defined(__APPLE__)
return "/System/Library/Frameworks/OpenCL.framework/OpenCL";

View File

@@ -102,7 +102,7 @@ public:
private:
static bool load();
static const char *defaultLoader();
static String defaultLoader();
static bool m_initialized;
static bool m_ready;

View File

@@ -26,17 +26,13 @@
#include <uv.h>
#ifndef _WIN32
# include <unistd.h>
#endif
#include "base/api/Api.h"
#include "3rdparty/http-parser/http_parser.h"
#include "base/api/interfaces/IApiListener.h"
#include "base/api/requests/HttpApiRequest.h"
#include "base/io/json/Json.h"
#include "base/kernel/Base.h"
#include "base/kernel/Env.h"
#include "base/tools/Buffer.h"
#include "base/tools/Chrono.h"
#include "core/config/Config.h"
@@ -158,7 +154,7 @@ void xmrig::Api::exec(IApiRequest &request)
auto &reply = request.reply();
reply.AddMember("id", StringRef(m_id), allocator);
reply.AddMember("worker_id", StringRef(m_workerId), allocator);
reply.AddMember("worker_id", m_workerId.toJSON(), allocator);
reply.AddMember("uptime", (Chrono::currentMSecsSinceEpoch() - m_timestamp) / 1000, allocator);
reply.AddMember("restricted", request.isRestricted(), allocator);
reply.AddMember("resources", getResources(request.doc()), allocator);
@@ -245,12 +241,8 @@ void xmrig::Api::genId(const String &id)
void xmrig::Api::genWorkerId(const String &id)
{
memset(m_workerId, 0, sizeof(m_workerId));
if (id.size() > 0) {
strncpy(m_workerId, id.data(), sizeof(m_workerId) - 1);
}
else {
gethostname(m_workerId, sizeof(m_workerId) - 1);
m_workerId = Env::expand(id);
if (m_workerId.isEmpty()) {
m_workerId = Env::hostname();
}
}

View File

@@ -32,6 +32,7 @@
#include "base/kernel/interfaces/IBaseListener.h"
#include "base/tools/Object.h"
#include "base/tools/String.h"
namespace xmrig {
@@ -71,7 +72,7 @@ private:
Base *m_base;
char m_id[32]{};
char m_workerId[128]{};
String m_workerId;
const uint64_t m_timestamp;
Httpd *m_httpd = nullptr;
std::vector<IApiListener *> m_listeners;

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -54,6 +54,8 @@ xmrig::Httpd::Httpd(Base *base) :
m_server(nullptr),
m_port(0)
{
m_httpListener = std::make_shared<HttpListener>(this);
base->addListener(this);
}
@@ -69,7 +71,7 @@ bool xmrig::Httpd::start()
return true;
}
m_http = new HttpServer(this);
m_http = new HttpServer(m_httpListener);
m_server = new TcpServer(config.host(), config.port(), m_http);
const int rc = m_server->bind();

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -26,14 +26,15 @@
#define XMRIG_HTTPD_H
#include <cstdint>
#include "base/kernel/interfaces/IBaseListener.h"
#include "base/kernel/interfaces/IHttpListener.h"
#include "base/net/http/HttpListener.h"
#include "base/tools/Object.h"
#include <cstdint>
#include <memory>
namespace xmrig {
@@ -62,6 +63,7 @@ private:
Base *m_base;
HttpServer *m_http;
std::shared_ptr<IHttpListener> m_httpListener;
TcpServer *m_server;
uint16_t m_port;
};

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -69,21 +69,23 @@ public:
virtual ~IApiRequest() = default;
virtual bool accept() = 0;
virtual bool hasParseError() const = 0;
virtual bool isDone() const = 0;
virtual bool isNew() const = 0;
virtual bool isRestricted() const = 0;
virtual const rapidjson::Value &json() const = 0;
virtual const String &rpcMethod() const = 0;
virtual const String &url() const = 0;
virtual int version() const = 0;
virtual Method method() const = 0;
virtual rapidjson::Document &doc() = 0;
virtual rapidjson::Value &reply() = 0;
virtual RequestType type() const = 0;
virtual Source source() const = 0;
virtual void done(int status) = 0;
virtual bool accept() = 0;
virtual bool hasParseError() const = 0;
virtual bool isDone() const = 0;
virtual bool isNew() const = 0;
virtual bool isRestricted() const = 0;
virtual const rapidjson::Value &json() const = 0;
virtual const String &rpcMethod() const = 0;
virtual const String &url() const = 0;
virtual int version() const = 0;
virtual Method method() const = 0;
virtual rapidjson::Document &doc() = 0;
virtual rapidjson::Value &reply() = 0;
virtual RequestType type() const = 0;
virtual Source source() const = 0;
virtual void done(int status) = 0;
virtual void setRpcError(int code, const char *message = nullptr) = 0;
virtual void setRpcResult(rapidjson::Value &result) = 0;
};

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -53,6 +53,10 @@ static inline const char *rpcError(int code) {
return "Invalid params";
}
if (code >= HTTP_STATUS_BAD_REQUEST && code <= HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED) {
return http_status_str(static_cast<http_status>(code));
}
return "Internal error";
}
@@ -82,7 +86,7 @@ xmrig::HttpApiRequest::HttpApiRequest(const HttpData &req, bool restricted) :
return;
}
m_rpcMethod = Json::getString(json(), "method");
m_rpcMethod = Json::getString(m_body, "method");
if (m_rpcMethod.isEmpty()) {
done(RPC_INVALID_REQUEST);
@@ -129,6 +133,10 @@ bool xmrig::HttpApiRequest::accept()
const rapidjson::Value &xmrig::HttpApiRequest::json() const
{
if (type() == REQ_JSON_RPC) {
return Json::getValue(m_body, "params");
}
return m_body;
}
@@ -150,25 +158,14 @@ void xmrig::HttpApiRequest::done(int status)
m_res.setStatus(HTTP_STATUS_OK);
if (status != HTTP_STATUS_OK) {
if (status == HTTP_STATUS_NOT_FOUND) {
status = RPC_METHOD_NOT_FOUND;
}
Value error(kObjectType);
error.AddMember("code", status, allocator);
error.AddMember("message", StringRef(rpcError(status)), allocator);
reply().AddMember(StringRef(kError), error, allocator);
setRpcError(status == HTTP_STATUS_NOT_FOUND ? RPC_METHOD_NOT_FOUND : status);
}
else if (!reply().HasMember(kResult)) {
Value result(kObjectType);
result.AddMember("status", "OK", allocator);
reply().AddMember(StringRef(kResult), result, allocator);
setRpcResult(result);
}
reply().AddMember("jsonrpc", "2.0", allocator);
reply().AddMember(StringRef(kId), Value().CopyFrom(Json::getValue(json(), kId), allocator), allocator);
}
else {
m_res.setStatus(status);
@@ -176,3 +173,38 @@ void xmrig::HttpApiRequest::done(int status)
m_res.end();
}
void xmrig::HttpApiRequest::setRpcError(int code, const char *message)
{
using namespace rapidjson;
auto &allocator = doc().GetAllocator();
Value error(kObjectType);
error.AddMember("code", code, allocator);
error.AddMember("message", message ? StringRef(message) : StringRef(rpcError(code)), allocator);
rpcDone(kError, error);
}
void xmrig::HttpApiRequest::setRpcResult(rapidjson::Value &result)
{
rpcDone(kResult, result);
}
void xmrig::HttpApiRequest::rpcDone(const char *key, rapidjson::Value &value)
{
ApiRequest::done(0);
using namespace rapidjson;
auto &allocator = doc().GetAllocator();
reply().AddMember(StringRef(key), value, allocator);
reply().AddMember("jsonrpc", "2.0", allocator);
reply().AddMember(StringRef(kId), Value().CopyFrom(Json::getValue(m_body, kId), allocator), allocator);
m_res.setStatus(HTTP_STATUS_OK);
m_res.end();
}

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -53,8 +53,12 @@ protected:
const rapidjson::Value &json() const override;
Method method() const override;
void done(int status) override;
void setRpcError(int code, const char *message = nullptr) override;
void setRpcResult(rapidjson::Value &result) override;
private:
void rpcDone(const char *key, rapidjson::Value &value);
const HttpData &m_req;
HttpApiResponse m_res;
int m_parsed = 0;

View File

@@ -6,12 +6,14 @@ set(HEADERS_BASE
src/base/io/json/JsonRequest.h
src/base/io/log/backends/ConsoleLog.h
src/base/io/log/backends/FileLog.h
src/base/io/log/FileLogWriter.h
src/base/io/log/Log.h
src/base/io/Watcher.h
src/base/kernel/Base.h
src/base/kernel/config/BaseConfig.h
src/base/kernel/config/BaseTransform.h
src/base/kernel/Entry.h
src/base/kernel/Env.h
src/base/kernel/interfaces/IBaseListener.h
src/base/kernel/interfaces/IClient.h
src/base/kernel/interfaces/IClientListener.h
@@ -33,13 +35,18 @@ set(HEADERS_BASE
src/base/net/dns/Dns.h
src/base/net/dns/DnsRecord.h
src/base/net/http/Http.h
src/base/net/http/HttpListener.h
src/base/net/stratum/BaseClient.h
src/base/net/stratum/Client.h
src/base/net/stratum/Job.h
src/base/net/stratum/NetworkState.h
src/base/net/stratum/Pool.h
src/base/net/stratum/Pools.h
src/base/net/stratum/ProxyUrl.h
src/base/net/stratum/Socks5.h
src/base/net/stratum/strategies/FailoverStrategy.h
src/base/net/stratum/strategies/SinglePoolStrategy.h
src/base/net/stratum/strategies/StrategyProxy.h
src/base/net/stratum/SubmitResult.h
src/base/net/stratum/Url.h
src/base/net/tools/RecvBuf.h
@@ -60,12 +67,14 @@ set(SOURCES_BASE
src/base/io/json/JsonRequest.cpp
src/base/io/log/backends/ConsoleLog.cpp
src/base/io/log/backends/FileLog.cpp
src/base/io/log/FileLogWriter.cpp
src/base/io/log/Log.cpp
src/base/io/Watcher.cpp
src/base/kernel/Base.cpp
src/base/kernel/config/BaseConfig.cpp
src/base/kernel/config/BaseTransform.cpp
src/base/kernel/Entry.cpp
src/base/kernel/Env.cpp
src/base/kernel/Platform.cpp
src/base/kernel/Process.cpp
src/base/kernel/Signals.cpp
@@ -75,8 +84,11 @@ set(SOURCES_BASE
src/base/net/stratum/BaseClient.cpp
src/base/net/stratum/Client.cpp
src/base/net/stratum/Job.cpp
src/base/net/stratum/NetworkState.cpp
src/base/net/stratum/Pool.cpp
src/base/net/stratum/Pools.cpp
src/base/net/stratum/ProxyUrl.cpp
src/base/net/stratum/Socks5.cpp
src/base/net/stratum/strategies/FailoverStrategy.cpp
src/base/net/stratum/strategies/SinglePoolStrategy.cpp
src/base/net/stratum/Url.cpp
@@ -167,3 +179,15 @@ else()
remove_definitions(/DXMRIG_FEATURE_HTTP)
remove_definitions(/DXMRIG_FEATURE_API)
endif()
if (WITH_ENV_VARS AND CMAKE_CXX_COMPILER_ID MATCHES GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
set(WITH_ENV_VARS OFF)
endif()
if (WITH_ENV_VARS)
add_definitions(/DXMRIG_FEATURE_ENV)
else()
remove_definitions(/DXMRIG_FEATURE_ENV)
endif()

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -40,7 +40,9 @@ static const rapidjson::Value kNullValue;
bool xmrig::Json::getBool(const rapidjson::Value &obj, const char *key, bool defaultValue)
{
assert(obj.IsObject());
if (isEmpty(obj)) {
return defaultValue;
}
auto i = obj.FindMember(key);
if (i != obj.MemberEnd() && i->value.IsBool()) {
@@ -51,9 +53,17 @@ bool xmrig::Json::getBool(const rapidjson::Value &obj, const char *key, bool def
}
bool xmrig::Json::isEmpty(const rapidjson::Value &obj)
{
return !obj.IsObject() || obj.ObjectEmpty();
}
const char *xmrig::Json::getString(const rapidjson::Value &obj, const char *key, const char *defaultValue)
{
assert(obj.IsObject());
if (isEmpty(obj)) {
return defaultValue;
}
auto i = obj.FindMember(key);
if (i != obj.MemberEnd() && i->value.IsString()) {
@@ -66,7 +76,9 @@ const char *xmrig::Json::getString(const rapidjson::Value &obj, const char *key,
const rapidjson::Value &xmrig::Json::getArray(const rapidjson::Value &obj, const char *key)
{
assert(obj.IsObject());
if (isEmpty(obj)) {
return kNullValue;
}
auto i = obj.FindMember(key);
if (i != obj.MemberEnd() && i->value.IsArray()) {
@@ -79,7 +91,9 @@ const rapidjson::Value &xmrig::Json::getArray(const rapidjson::Value &obj, const
const rapidjson::Value &xmrig::Json::getObject(const rapidjson::Value &obj, const char *key)
{
assert(obj.IsObject());
if (isEmpty(obj)) {
return kNullValue;
}
auto i = obj.FindMember(key);
if (i != obj.MemberEnd() && i->value.IsObject()) {
@@ -92,7 +106,9 @@ const rapidjson::Value &xmrig::Json::getObject(const rapidjson::Value &obj, cons
const rapidjson::Value &xmrig::Json::getValue(const rapidjson::Value &obj, const char *key)
{
assert(obj.IsObject());
if (isEmpty(obj)) {
return kNullValue;
}
auto i = obj.FindMember(key);
if (i != obj.MemberEnd()) {
@@ -105,7 +121,9 @@ const rapidjson::Value &xmrig::Json::getValue(const rapidjson::Value &obj, const
int xmrig::Json::getInt(const rapidjson::Value &obj, const char *key, int defaultValue)
{
assert(obj.IsObject());
if (isEmpty(obj)) {
return defaultValue;
}
auto i = obj.FindMember(key);
if (i != obj.MemberEnd() && i->value.IsInt()) {
@@ -118,7 +136,9 @@ int xmrig::Json::getInt(const rapidjson::Value &obj, const char *key, int defaul
int64_t xmrig::Json::getInt64(const rapidjson::Value &obj, const char *key, int64_t defaultValue)
{
assert(obj.IsObject());
if (isEmpty(obj)) {
return defaultValue;
}
auto i = obj.FindMember(key);
if (i != obj.MemberEnd() && i->value.IsInt64()) {
@@ -131,7 +151,9 @@ int64_t xmrig::Json::getInt64(const rapidjson::Value &obj, const char *key, int6
uint64_t xmrig::Json::getUint64(const rapidjson::Value &obj, const char *key, uint64_t defaultValue)
{
assert(obj.IsObject());
if (isEmpty(obj)) {
return defaultValue;
}
auto i = obj.FindMember(key);
if (i != obj.MemberEnd() && i->value.IsUint64()) {
@@ -144,7 +166,9 @@ uint64_t xmrig::Json::getUint64(const rapidjson::Value &obj, const char *key, ui
unsigned xmrig::Json::getUint(const rapidjson::Value &obj, const char *key, unsigned defaultValue)
{
assert(obj.IsObject());
if (isEmpty(obj)) {
return defaultValue;
}
auto i = obj.FindMember(key);
if (i != obj.MemberEnd() && i->value.IsUint()) {
@@ -169,5 +193,5 @@ rapidjson::Value xmrig::Json::normalize(double value, bool zero)
bool xmrig::JsonReader::isEmpty() const
{
return !m_obj.IsObject() || m_obj.ObjectEmpty();
return Json::isEmpty(m_obj);
}

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -37,6 +37,7 @@ class Json
{
public:
static bool getBool(const rapidjson::Value &obj, const char *key, bool defaultValue = false);
static bool isEmpty(const rapidjson::Value &obj);
static const char *getString(const rapidjson::Value &obj, const char *key, const char *defaultValue = nullptr);
static const rapidjson::Value &getArray(const rapidjson::Value &obj, const char *key);
static const rapidjson::Value &getObject(const rapidjson::Value &obj, const char *key);

View File

@@ -0,0 +1,63 @@
/* XMRig
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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/>.
*/
#include "base/io/log/FileLogWriter.h"
#include "base/kernel/Env.h"
#include <cassert>
#include <uv.h>
bool xmrig::FileLogWriter::open(const char *fileName)
{
assert(fileName != nullptr);
if (!fileName) {
return false;
}
uv_fs_t req;
m_file = uv_fs_open(uv_default_loop(), &req, Env::expand(fileName), O_CREAT | O_APPEND | O_WRONLY, 0644, nullptr);
uv_fs_req_cleanup(&req);
return isOpen();
}
bool xmrig::FileLogWriter::write(const char *data, size_t size)
{
if (!isOpen()) {
return false;
}
uv_buf_t buf = uv_buf_init(new char[size], size);
memcpy(buf.base, data, size);
auto req = new uv_fs_t;
req->data = buf.base;
uv_fs_write(uv_default_loop(), req, m_file, &buf, 1, -1, [](uv_fs_t *req) {
delete [] static_cast<char *>(req->data);
uv_fs_req_cleanup(req);
delete req;
});
return true;
}

View File

@@ -0,0 +1,48 @@
/* XMRig
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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_FILELOGWRITER_H
#define XMRIG_FILELOGWRITER_H
#include <cstddef>
namespace xmrig {
class FileLogWriter
{
public:
FileLogWriter() = default;
FileLogWriter(const char *fileName) { open(fileName); }
inline bool isOpen() const { return m_file >= 0; }
bool open(const char *fileName);
bool write(const char *data, size_t size);
private:
int m_file = -1;
};
} /* namespace xmrig */
#endif /* XMRIG_FILELOGWRITER_H */

View File

@@ -27,9 +27,10 @@
#include <cstdio>
#include "base/tools/Handle.h"
#include "base/io/log/backends/ConsoleLog.h"
#include "base/tools/Handle.h"
#include "base/io/log/Log.h"
#include "version.h"
xmrig::ConsoleLog::ConsoleLog()
@@ -48,7 +49,7 @@ xmrig::ConsoleLog::ConsoleLog()
uv_tty_set_mode(m_tty, UV_TTY_MODE_NORMAL);
# ifdef WIN32
# ifdef XMRIG_OS_WIN
m_stream = reinterpret_cast<uv_stream_t*>(m_tty);
HANDLE handle = GetStdHandle(STD_INPUT_HANDLE);
@@ -59,6 +60,8 @@ xmrig::ConsoleLog::ConsoleLog()
SetConsoleMode(handle, mode | ENABLE_EXTENDED_FLAGS);
}
}
SetConsoleTitleA(APP_NAME " " APP_VERSION);
# endif
}
@@ -75,7 +78,7 @@ void xmrig::ConsoleLog::print(int, const char *line, size_t, size_t size, bool c
return;
}
# ifdef _WIN32
# ifdef XMRIG_OS_WIN
uv_buf_t buf = uv_buf_init(const_cast<char *>(line), static_cast<unsigned int>(size));
if (!isWritable()) {
@@ -99,7 +102,7 @@ bool xmrig::ConsoleLog::isSupported() const
}
#ifdef WIN32
#ifdef XMRIG_OS_WIN
bool xmrig::ConsoleLog::isWritable() const
{
if (!m_stream || uv_is_writable(m_stream) != 1) {

View File

@@ -54,7 +54,7 @@ private:
uv_tty_t *m_tty = nullptr;
# ifdef _WIN32
# ifdef XMRIG_OS_WIN
bool isWritable() const;
uv_stream_t *m_stream = nullptr;

View File

@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2019 Spudz76 <https://github.com/Spudz76>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -29,39 +29,21 @@
#include <cassert>
#include <cstring>
#include <uv.h>
xmrig::FileLog::FileLog(const char *fileName)
xmrig::FileLog::FileLog(const char *fileName) :
m_writer(fileName)
{
uv_fs_t req;
m_file = uv_fs_open(uv_default_loop(), &req, fileName, O_CREAT | O_APPEND | O_WRONLY, 0644, nullptr);
uv_fs_req_cleanup(&req);
}
void xmrig::FileLog::print(int, const char *line, size_t, size_t size, bool colors)
{
if (m_file < 0 || colors) {
if (!m_writer.isOpen() || colors) {
return;
}
assert(strlen(line) == size);
uv_buf_t buf = uv_buf_init(new char[size], size);
memcpy(buf.base, line, size);
auto req = new uv_fs_t;
req->data = buf.base;
uv_fs_write(uv_default_loop(), req, m_file, &buf, 1, -1, FileLog::onWrite);
}
void xmrig::FileLog::onWrite(uv_fs_t *req)
{
delete [] static_cast<char *>(req->data);
uv_fs_req_cleanup(req);
delete req;
m_writer.write(line, size);
}

View File

@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2019 Spudz76 <https://github.com/Spudz76>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -27,9 +27,7 @@
#define XMRIG_FILELOG_H
typedef struct uv_fs_s uv_fs_t;
#include "base/io/log/FileLogWriter.h"
#include "base/kernel/interfaces/ILogBackend.h"
@@ -41,14 +39,11 @@ class FileLog : public ILogBackend
public:
FileLog(const char *fileName);
protected:
void print(int level, const char *line, size_t offset, size_t size, bool colors) override;
private:
static void onWrite(uv_fs_t *req);
int m_file;
FileLogWriter m_writer;
};

View File

@@ -127,7 +127,7 @@ private:
return config.release();
}
chain.addFile(process->location(Process::ExeLocation, "config.json"));
chain.addFile(Process::location(Process::ExeLocation, "config.json"));
if (read(chain, config)) {
return config.release();

View File

@@ -101,9 +101,9 @@ static int showVersion()
#ifdef XMRIG_FEATURE_HWLOC
static int exportTopology(const Process &process)
static int exportTopology(const Process &)
{
const String path = process.location(Process::ExeLocation, "topology.xml");
const String path = Process::location(Process::ExeLocation, "topology.xml");
hwloc_topology_t topology;
hwloc_topology_init(&topology);

147
src/base/kernel/Env.cpp Normal file
View File

@@ -0,0 +1,147 @@
/* 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/>.
*/
#include "base/kernel/Env.h"
#include "base/kernel/Process.h"
#include "version.h"
#include <regex>
#include <uv.h>
#include <map>
#ifndef _WIN32
# include <unistd.h>
#endif
#ifndef UV_MAXHOSTNAMESIZE
# ifdef MAXHOSTNAMELEN
# define UV_MAXHOSTNAMESIZE (MAXHOSTNAMELEN + 1)
# else
# define UV_MAXHOSTNAMESIZE 256
# endif
#endif
namespace xmrig {
#ifdef XMRIG_FEATURE_ENV
static std::map<String, String> variables;
static void createVariables()
{
variables.insert({ "XMRIG_VERSION", APP_VERSION });
variables.insert({ "XMRIG_EXE_DIR", Process::location(Process::ExeLocation, "") });
variables.insert({ "XMRIG_CWD", Process::location(Process::CwdLocation, "") });
}
#endif
} // namespace xmrig
xmrig::String xmrig::Env::expand(const char *in)
{
# ifdef XMRIG_FEATURE_ENV
if (in == nullptr) {
return {};
}
std::string text(in);
if (text.size() < 4) {
return text.c_str();
}
static const std::regex env_re{R"--(\$\{([^}]+)\})--"};
std::map<std::string, String> vars;
for (std::sregex_iterator i = std::sregex_iterator(text.begin(), text.end(), env_re); i != std::sregex_iterator(); ++i) {
std::smatch m = *i;
const auto var = m.str();
if (vars.count(var)) {
continue;
}
vars.insert({ var, get(m[1].str().c_str()) });
}
for (const auto &kv : vars) {
if (kv.second.isNull()) {
continue;
}
size_t pos = 0;
while ((pos = text.find(kv.first, pos)) != std::string::npos) {
text.replace(pos, kv.first.size(), kv.second);
pos += kv.second.size();
}
}
return text.c_str();
# else
return in;
# endif
}
xmrig::String xmrig::Env::get(const String &name)
{
# ifdef XMRIG_FEATURE_ENV
if (variables.empty()) {
createVariables();
}
if (variables.count(name)) {
return variables.at(name);
}
# endif
return static_cast<const char *>(getenv(name));
}
xmrig::String xmrig::Env::hostname()
{
char buf[UV_MAXHOSTNAMESIZE]{};
size_t size = sizeof(buf);
# if UV_VERSION_HEX >= 0x010c00
if (uv_os_gethostname(buf, &size) == 0) {
return static_cast<const char *>(buf);
}
# else
if (gethostname(buf, size) == 0) {
return static_cast<const char *>(buf);
}
# endif
return {};
}

View File

@@ -22,12 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef XMRIG_NETWORKSTATE_H
#define XMRIG_NETWORKSTATE_H
#include <array>
#include <vector>
#ifndef XMRIG_ENV_H
#define XMRIG_ENV_H
#include "base/tools/String.h"
@@ -36,45 +32,16 @@
namespace xmrig {
class IClient;
class SubmitResult;
class NetworkState
class Env
{
public:
NetworkState();
inline const String &fingerprint() const { return m_fingerprint; }
inline const String &ip() const { return m_ip; }
inline const String &tls() const { return m_tls; }
uint32_t avgTime() const;
uint32_t latency() const;
uint64_t connectionTime() const;
void add(const SubmitResult &result, const char *error);
void onActive(IClient *client);
void stop();
char pool[256];
std::array<uint64_t, 10> topDiff { { } };
uint64_t accepted;
uint64_t diff;
uint64_t failures;
uint64_t rejected;
uint64_t total;
private:
bool m_active;
std::vector<uint16_t> m_latency;
String m_fingerprint;
String m_ip;
String m_tls;
uint64_t m_connectionTime;
static String expand(const char *in);
static String get(const String &name);
static String hostname();
};
} /* namespace xmrig */
#endif /* XMRIG_NETWORKSTATE_H */
#endif /* XMRIG_ENV_H */

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -51,6 +51,7 @@ public:
static uint32_t setTimerResolution(uint32_t resolution);
static void init(const char *userAgent);
static void restoreTimerResolution();
static void setProcessPriority(int priority);
static void setThreadPriority(int priority);
static inline const char *userAgent() { return m_userAgent; }

View File

@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -30,6 +30,7 @@
#include <hwloc.h>
#include <thread>
bool xmrig::Platform::setThreadAffinity(uint64_t cpu_id)
@@ -42,8 +43,11 @@ bool xmrig::Platform::setThreadAffinity(uint64_t cpu_id)
}
if (hwloc_set_cpubind(cpu->topology(), pu->cpuset, HWLOC_CPUBIND_THREAD | HWLOC_CPUBIND_STRICT) >= 0) {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
return true;
}
return hwloc_set_cpubind(cpu->topology(), pu->cpuset, HWLOC_CPUBIND_THREAD) >= 0;
const bool result = (hwloc_set_cpubind(cpu->topology(), pu->cpuset, HWLOC_CPUBIND_THREAD) >= 0);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
return result;
}

View File

@@ -4,8 +4,8 @@
* 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 2016-2017 XMRig <support@xmrig.com>
*
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <sys/resource.h>
#include <uv.h>
#include <thread>
#include "base/kernel/Platform.h"
@@ -67,7 +68,9 @@ bool xmrig::Platform::setThreadAffinity(uint64_t cpu_id)
thread_affinity_policy_data_t policy = { static_cast<integer_t>(cpu_id) };
mach_thread = pthread_mach_thread_np(pthread_self());
return thread_policy_set(mach_thread, THREAD_AFFINITY_POLICY, (thread_policy_t)&policy, 1) == KERN_SUCCESS;
const bool result = (thread_policy_set(mach_thread, THREAD_AFFINITY_POLICY, (thread_policy_t)&policy, 1) == KERN_SUCCESS);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
return result;
}
#endif
@@ -83,6 +86,11 @@ void xmrig::Platform::restoreTimerResolution()
}
void xmrig::Platform::setProcessPriority(int)
{
}
void xmrig::Platform::setThreadPriority(int priority)
{
if (priority == -1) {

View File

@@ -4,8 +4,8 @@
* 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 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -37,6 +37,7 @@
#include <sys/resource.h>
#include <unistd.h>
#include <uv.h>
#include <thread>
#include "base/kernel/Platform.h"
@@ -92,10 +93,13 @@ bool xmrig::Platform::setThreadAffinity(uint64_t cpu_id)
CPU_SET(cpu_id, &mn);
# ifndef __ANDROID__
return pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &mn) == 0;
const bool result = (pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &mn) == 0);
# else
return sched_setaffinity(gettid(), sizeof(cpu_set_t), &mn) == 0;
const bool result = (sched_setaffinity(gettid(), sizeof(cpu_set_t), &mn) == 0);
# endif
std::this_thread::sleep_for(std::chrono::milliseconds(1));
return result;
}
#endif
@@ -111,6 +115,11 @@ void xmrig::Platform::restoreTimerResolution()
}
void xmrig::Platform::setProcessPriority(int)
{
}
void xmrig::Platform::setThreadPriority(int priority)
{
if (priority == -1) {

View File

@@ -4,9 +4,8 @@
* 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 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -98,7 +97,9 @@ bool xmrig::Platform::setThreadAffinity(uint64_t cpu_id)
LOG_ERR("Unable to set affinity. Windows supports only affinity up to 63.");
}
return SetThreadAffinityMask(GetCurrentThread(), 1ULL << cpu_id) != 0;
const bool result = (SetThreadAffinityMask(GetCurrentThread(), 1ULL << cpu_id) != 0);
Sleep(1);
return result;
}
#endif
@@ -131,6 +132,43 @@ void xmrig::Platform::restoreTimerResolution()
}
void xmrig::Platform::setProcessPriority(int priority)
{
if (priority == -1) {
return;
}
DWORD prio = IDLE_PRIORITY_CLASS;
switch (priority)
{
case 1:
prio = BELOW_NORMAL_PRIORITY_CLASS;
break;
case 2:
prio = NORMAL_PRIORITY_CLASS;
break;
case 3:
prio = ABOVE_NORMAL_PRIORITY_CLASS;
break;
case 4:
prio = HIGH_PRIORITY_CLASS;
break;
case 5:
prio = REALTIME_PRIORITY_CLASS;
break;
default:
break;
}
SetPriorityClass(GetCurrentProcess(), prio);
}
void xmrig::Platform::setThreadPriority(int priority)
{
if (priority == -1) {

View File

@@ -31,7 +31,10 @@
#include "base/tools/Chrono.h"
static size_t location(xmrig::Process::Location location, char *buf, size_t max)
namespace xmrig {
static size_t getLocation(Process::Location location, char *buf, size_t max)
{
using namespace xmrig;
@@ -48,6 +51,9 @@ static size_t location(xmrig::Process::Location location, char *buf, size_t max)
}
} // namespace xmrig
xmrig::Process::Process(int argc, char **argv) :
m_arguments(argc, argv)
{
@@ -55,12 +61,12 @@ xmrig::Process::Process(int argc, char **argv) :
}
xmrig::String xmrig::Process::location(Location location, const char *fileName) const
xmrig::String xmrig::Process::location(Location location, const char *fileName)
{
constexpr const size_t max = 520;
char *buf = new char[max]();
size_t size = ::location(location, buf, max);
size_t size = getLocation(location, buf, max);
if (size == 0) {
delete [] buf;

View File

@@ -48,7 +48,7 @@ public:
Process(int argc, char **argv);
String location(Location location, const char *fileName = nullptr) const;
static String location(Location location, const char *fileName = nullptr);
inline const Arguments &arguments() const { return m_arguments; }

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -47,6 +47,28 @@
#endif
namespace xmrig {
const char *BaseConfig::kApi = "api";
const char *BaseConfig::kApiId = "id";
const char *BaseConfig::kApiWorkerId = "worker-id";
const char *BaseConfig::kAutosave = "autosave";
const char *BaseConfig::kBackground = "background";
const char *BaseConfig::kColors = "colors";
const char *BaseConfig::kDryRun = "dry-run";
const char *BaseConfig::kHttp = "http";
const char *BaseConfig::kLogFile = "log-file";
const char *BaseConfig::kPrintTime = "print-time";
const char *BaseConfig::kSyslog = "syslog";
const char *BaseConfig::kUserAgent = "user-agent";
const char *BaseConfig::kVerbose = "verbose";
const char *BaseConfig::kWatch = "watch";
} // namespace xmrig
bool xmrig::BaseConfig::read(const IJsonReader &reader, const char *fileName)
{
m_fileName = fileName;
@@ -55,26 +77,25 @@ bool xmrig::BaseConfig::read(const IJsonReader &reader, const char *fileName)
return false;
}
m_autoSave = reader.getBool("autosave", m_autoSave);
m_background = reader.getBool("background", m_background);
m_dryRun = reader.getBool("dry-run", m_dryRun);
m_syslog = reader.getBool("syslog", m_syslog);
m_watch = reader.getBool("watch", m_watch);
m_logFile = reader.getString("log-file");
m_userAgent = reader.getString("user-agent");
m_version = reader.getUint("version");
m_autoSave = reader.getBool(kAutosave, m_autoSave);
m_background = reader.getBool(kBackground, m_background);
m_dryRun = reader.getBool(kDryRun, m_dryRun);
m_syslog = reader.getBool(kSyslog, m_syslog);
m_watch = reader.getBool(kWatch, m_watch);
m_logFile = reader.getString(kLogFile);
m_userAgent = reader.getString(kUserAgent);
Log::setColors(reader.getBool("colors", Log::isColors()));
setPrintTime(reader.getUint("print-time", 60));
setVerbose(reader.getValue("verbose"));
Log::setColors(reader.getBool(kColors, Log::isColors()));
setPrintTime(reader.getUint(kPrintTime, 60));
setVerbose(reader.getValue(kVerbose));
const rapidjson::Value &api = reader.getObject("api");
const rapidjson::Value &api = reader.getObject(kApi);
if (api.IsObject()) {
m_apiId = Json::getString(api, "id");
m_apiWorkerId = Json::getString(api, "worker-id");
m_apiId = Json::getString(api, kApiId);
m_apiWorkerId = Json::getString(api, kApiWorkerId);
}
m_http.load(reader.getObject("http"));
m_http.load(reader.getObject(kHttp));
m_pools.load(reader);
return m_pools.active() > 0;

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -40,6 +40,21 @@ class IJsonReader;
class BaseConfig : public IConfig
{
public:
static const char *kApi;
static const char *kApiId;
static const char *kApiWorkerId;
static const char *kAutosave;
static const char *kBackground;
static const char *kColors;
static const char *kDryRun;
static const char *kHttp;
static const char *kLogFile;
static const char *kPrintTime;
static const char *kSyslog;
static const char *kUserAgent;
static const char *kVerbose;
static const char *kWatch;
BaseConfig() = default;
inline bool isAutoSave() const { return m_autoSave; }
@@ -78,7 +93,6 @@ protected:
String m_logFile;
String m_userAgent;
uint32_t m_printTime = 60;
uint32_t m_version = 0;
private:
inline void setPrintTime(uint32_t printTime) { if (printTime <= 3600) { m_printTime = printTime; } }

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -33,27 +33,17 @@
#endif
#include "base/kernel/config/BaseTransform.h"
#include "base/io/json/JsonChain.h"
#include "base/io/log/Log.h"
#include "base/kernel/config/BaseTransform.h"
#include "base/kernel/config/BaseConfig.h"
#include "base/kernel/interfaces/IConfig.h"
#include "base/kernel/Process.h"
#include "base/net/stratum/Pool.h"
#include "base/net/stratum/Pools.h"
#include "core/config/Config_platform.h"
namespace xmrig
{
static const char *kAlgo = "algo";
static const char *kApi = "api";
static const char *kCoin = "coin";
static const char *kHttp = "http";
static const char *kPools = "pools";
} // namespace xmrig
void xmrig::BaseTransform::load(JsonChain &chain, Process *process, IConfigTransform &transform)
{
using namespace rapidjson;
@@ -95,26 +85,26 @@ void xmrig::BaseTransform::finalize(rapidjson::Document &doc)
using namespace rapidjson;
auto &allocator = doc.GetAllocator();
if (m_algorithm.isValid() && doc.HasMember(kPools)) {
auto &pools = doc[kPools];
if (m_algorithm.isValid() && doc.HasMember(Pools::kPools)) {
auto &pools = doc[Pools::kPools];
for (Value &pool : pools.GetArray()) {
if (!pool.HasMember(kAlgo)) {
pool.AddMember(StringRef(kAlgo), m_algorithm.toJSON(), allocator);
if (!pool.HasMember(Pool::kAlgo)) {
pool.AddMember(StringRef(Pool::kAlgo), m_algorithm.toJSON(), allocator);
}
}
}
if (m_coin.isValid() && doc.HasMember(kPools)) {
auto &pools = doc[kPools];
if (m_coin.isValid() && doc.HasMember(Pools::kPools)) {
auto &pools = doc[Pools::kPools];
for (Value &pool : pools.GetArray()) {
if (!pool.HasMember(kCoin)) {
pool.AddMember(StringRef(kCoin), m_coin.toJSON(), allocator);
if (!pool.HasMember(Pool::kCoin)) {
pool.AddMember(StringRef(Pool::kCoin), m_coin.toJSON(), allocator);
}
}
}
if (m_http) {
set(doc, kHttp, "enabled", true);
set(doc, BaseConfig::kHttp, Http::kEnabled, true);
}
}
@@ -123,20 +113,20 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
{
switch (key) {
case IConfig::AlgorithmKey: /* --algo */
if (!doc.HasMember(kPools)) {
if (!doc.HasMember(Pools::kPools)) {
m_algorithm = arg;
}
else {
return add(doc, kPools, kAlgo, arg);
return add(doc, Pools::kPools, Pool::kAlgo, arg);
}
break;
case IConfig::CoinKey: /* --coin */
if (!doc.HasMember(kPools)) {
if (!doc.HasMember(Pools::kPools)) {
m_coin = arg;
}
else {
return add(doc, kPools, kCoin, arg);
return add(doc, Pools::kPools, Pool::kCoin, arg);
}
break;
@@ -150,61 +140,64 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
char *user = new char[p - arg + 1]();
strncpy(user, arg, static_cast<size_t>(p - arg));
add<const char *>(doc, kPools, "user", user);
add(doc, kPools, "pass", p + 1);
add<const char *>(doc, Pools::kPools, Pool::kUser, user);
add(doc, Pools::kPools, Pool::kPass, p + 1);
delete [] user;
}
break;
case IConfig::UrlKey: /* --url */
{
if (!doc.HasMember(kPools)) {
doc.AddMember(rapidjson::StringRef(kPools), rapidjson::kArrayType, doc.GetAllocator());
if (!doc.HasMember(Pools::kPools)) {
doc.AddMember(rapidjson::StringRef(Pools::kPools), rapidjson::kArrayType, doc.GetAllocator());
}
rapidjson::Value &array = doc[kPools];
rapidjson::Value &array = doc[Pools::kPools];
if (array.Size() == 0 || Pool(array[array.Size() - 1]).isValid()) {
array.PushBack(rapidjson::kObjectType, doc.GetAllocator());
}
set(doc, array[array.Size() - 1], "url", arg);
set(doc, array[array.Size() - 1], Pool::kUrl, arg);
break;
}
case IConfig::UserKey: /* --user */
return add(doc, kPools, "user", arg);
return add(doc, Pools::kPools, Pool::kUser, arg);
case IConfig::PasswordKey: /* --pass */
return add(doc, kPools, "pass", arg);
return add(doc, Pools::kPools, Pool::kPass, arg);
case IConfig::RigIdKey: /* --rig-id */
return add(doc, kPools, "rig-id", arg);
return add(doc, Pools::kPools, Pool::kRigId, arg);
case IConfig::FingerprintKey: /* --tls-fingerprint */
return add(doc, kPools, "tls-fingerprint", arg);
return add(doc, Pools::kPools, Pool::kFingerprint, arg);
case IConfig::SelfSelectKey: /* --self-select */
return add(doc, kPools, "self-select", arg);
return add(doc, Pools::kPools, Pool::kSelfSelect, arg);
case IConfig::ProxyKey: /* --proxy */
return add(doc, Pools::kPools, Pool::kSOCKS5, arg);
case IConfig::LogFileKey: /* --log-file */
return set(doc, "log-file", arg);
return set(doc, BaseConfig::kLogFile, arg);
case IConfig::HttpAccessTokenKey: /* --http-access-token */
m_http = true;
return set(doc, kHttp, "access-token", arg);
return set(doc, BaseConfig::kHttp, Http::kToken, arg);
case IConfig::HttpHostKey: /* --http-host */
m_http = true;
return set(doc, kHttp, "host", arg);
return set(doc, BaseConfig::kHttp, Http::kHost, arg);
case IConfig::ApiWorkerIdKey: /* --api-worker-id */
return set(doc, kApi, "worker-id", arg);
return set(doc, BaseConfig::kApi, BaseConfig::kApiWorkerId, arg);
case IConfig::ApiIdKey: /* --api-id */
return set(doc, kApi, "id", arg);
return set(doc, BaseConfig::kApi, BaseConfig::kApiId, arg);
case IConfig::UserAgentKey: /* --user-agent */
return set(doc, "user-agent", arg);
return set(doc, BaseConfig::kUserAgent, arg);
case IConfig::RetriesKey: /* --retries */
case IConfig::RetryPauseKey: /* --retry-pause */
@@ -239,43 +232,43 @@ void xmrig::BaseTransform::transformBoolean(rapidjson::Document &doc, int key, b
{
switch (key) {
case IConfig::BackgroundKey: /* --background */
return set(doc, "background", enable);
return set(doc, BaseConfig::kBackground, enable);
case IConfig::SyslogKey: /* --syslog */
return set(doc, "syslog", enable);
return set(doc, BaseConfig::kSyslog, enable);
case IConfig::KeepAliveKey: /* --keepalive */
return add(doc, kPools, "keepalive", enable);
return add(doc, Pools::kPools, Pool::kKeepalive, enable);
case IConfig::TlsKey: /* --tls */
return add(doc, kPools, "tls", enable);
return add(doc, Pools::kPools, Pool::kTls, enable);
# ifdef XMRIG_FEATURE_HTTP
case IConfig::DaemonKey: /* --daemon */
return add(doc, kPools, "daemon", enable);
return add(doc, Pools::kPools, Pool::kDaemon, enable);
# endif
# ifndef XMRIG_PROXY_PROJECT
case IConfig::NicehashKey: /* --nicehash */
return add<bool>(doc, kPools, "nicehash", enable);
return add<bool>(doc, Pools::kPools, Pool::kNicehash, enable);
# endif
case IConfig::ColorKey: /* --no-color */
return set(doc, "colors", enable);
return set(doc, BaseConfig::kColors, enable);
case IConfig::HttpRestrictedKey: /* --http-no-restricted */
m_http = true;
return set(doc, kHttp, "restricted", enable);
return set(doc, BaseConfig::kHttp, Http::kRestricted, enable);
case IConfig::HttpEnabledKey: /* --http-enabled */
m_http = true;
break;
case IConfig::DryRunKey: /* --dry-run */
return set(doc, "dry-run", enable);
return set(doc, BaseConfig::kDryRun, enable);
case IConfig::VerboseKey: /* --verbose */
return set(doc, "verbose", enable);
return set(doc, BaseConfig::kVerbose, enable);
default:
break;
@@ -287,27 +280,27 @@ void xmrig::BaseTransform::transformUint64(rapidjson::Document &doc, int key, ui
{
switch (key) {
case IConfig::RetriesKey: /* --retries */
return set(doc, "retries", arg);
return set(doc, Pools::kRetries, arg);
case IConfig::RetryPauseKey: /* --retry-pause */
return set(doc, "retry-pause", arg);
return set(doc, Pools::kRetryPause, arg);
case IConfig::DonateLevelKey: /* --donate-level */
return set(doc, "donate-level", arg);
return set(doc, Pools::kDonateLevel, arg);
case IConfig::ProxyDonateKey: /* --donate-over-proxy */
return set(doc, "donate-over-proxy", arg);
return set(doc, Pools::kDonateOverProxy, arg);
case IConfig::HttpPort: /* --http-port */
m_http = true;
return set(doc, kHttp, "port", arg);
return set(doc, BaseConfig::kHttp, Http::kPort, arg);
case IConfig::PrintTimeKey: /* --print-time */
return set(doc, "print-time", arg);
return set(doc, BaseConfig::kPrintTime, arg);
# ifdef XMRIG_FEATURE_HTTP
case IConfig::DaemonPollKey: /* --daemon-poll-interval */
return add(doc, kPools, "daemon-poll-interval", arg);
return add(doc, Pools::kPools, Pool::kDaemonPollInterval, arg);
# endif
default:

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -39,6 +39,7 @@ class Algorithm;
class Job;
class JobResult;
class Pool;
class ProxyUrl;
class String;
@@ -79,6 +80,7 @@ public:
virtual void setAlgo(const Algorithm &algo) = 0;
virtual void setEnabled(bool enabled) = 0;
virtual void setPool(const Pool &pool) = 0;
virtual void setProxy(const ProxyUrl &proxy) = 0;
virtual void setQuiet(bool quiet) = 0;
virtual void setRetries(int retries) = 0;
virtual void setRetryPause(uint64_t ms) = 0;

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -66,6 +66,7 @@ public:
UserAgentKey = 1008,
UserKey = 'u',
UserpassKey = 'O',
ProxyKey = 'x',
VerboseKey = 1100,
TlsKey = 1013,
FingerprintKey = 1014,
@@ -92,6 +93,7 @@ public:
RandomXModeKey = 1029,
RandomX1GbPagesKey = 1031,
RandomXWrmsrKey = 1032,
RandomXRdmsrKey = 1033,
CPUMaxThreadsKey = 1026,
MemoryPoolKey = 1027,
YieldKey = 1030,
@@ -114,6 +116,7 @@ public:
AccessLogFileKey = 'A',
BindKey = 'b',
CustomDiffKey = 1102,
CustomDiffStatsKey = 1104,
DebugKey = 1101,
ModeKey = 'm',
PoolCoinKey = 'C',

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -35,6 +35,7 @@ namespace xmrig {
class Algorithm;
class IClient;
class JobResult;
class ProxyUrl;
class IStrategy
@@ -48,6 +49,7 @@ public:
virtual void connect() = 0;
virtual void resume() = 0;
virtual void setAlgo(const Algorithm &algo) = 0;
virtual void setProxy(const ProxyUrl &proxy) = 0;
virtual void stop() = 0;
virtual void tick(uint64_t now) = 0;
};

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -30,12 +30,14 @@
namespace xmrig {
static const char *kEnabled = "enabled";
static const char *kHost = "host";
static const char *kLocalhost = "127.0.0.1";
static const char *kPort = "port";
static const char *kRestricted = "restricted";
static const char *kToken = "access-token";
const char *Http::kEnabled = "enabled";
const char *Http::kHost = "host";
const char *Http::kLocalhost = "127.0.0.1";
const char *Http::kPort = "port";
const char *Http::kRestricted = "restricted";
const char *Http::kToken = "access-token";
}

View File

@@ -5,8 +5,8 @@
* 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>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -36,6 +36,13 @@ namespace xmrig {
class Http
{
public:
static const char *kEnabled;
static const char *kHost;
static const char *kLocalhost;
static const char *kPort;
static const char *kRestricted;
static const char *kToken;
Http();
inline bool isAuthRequired() const { return !m_restricted || !m_token.isNull(); }

View File

@@ -6,8 +6,8 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2014-2019 heapwolf <https://github.com/heapwolf>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 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
@@ -77,7 +77,7 @@ private:
} // namespace xmrig
xmrig::HttpClient::HttpClient(int method, const String &url, IHttpListener *listener, const char *data, size_t size) :
xmrig::HttpClient::HttpClient(int method, const String &url, const std::weak_ptr<IHttpListener> &listener, const char *data, size_t size) :
HttpContext(HTTP_RESPONSE, listener)
{
this->method = method;

Some files were not shown because too many files have changed in this diff Show More