fixes
This commit is contained in:
parent
1af1a7924e
commit
c962668261
@ -6,3 +6,7 @@ git clone https://rcxpony.name/rcxpony/yggm.git && cd yggm
|
||||
cmake -B build && cmake --build build -j$(nproc)
|
||||
build/yggm -t 10
|
||||
```
|
||||
# ToDo
|
||||
- [x] Support for avx2
|
||||
- [ ] Support for sse4
|
||||
#
|
@ -89,18 +89,7 @@ void getRawAddress(int lErase, Key& InvertedPublicKey, Address& rawAddr) {
|
||||
_mm256_storeu_si256(reinterpret_cast<__m256i*>(inverted), chunk);
|
||||
}
|
||||
[[nodiscard]] inline unsigned char zeroCounter(unsigned int x) noexcept {
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
if (x == 0)
|
||||
return 32;
|
||||
return static_cast<unsigned char>(__builtin_clz(x));
|
||||
#else
|
||||
unsigned char zeros = 0;
|
||||
for (uint32_t mask = 0x80000000; mask; mask >>= 1) {
|
||||
if (x & mask) break;
|
||||
zeros++;
|
||||
}
|
||||
return zeros;
|
||||
#endif
|
||||
return x == 0 ? 32 : static_cast<unsigned char>(__builtin_clz(x));
|
||||
}
|
||||
[[nodiscard]] inline unsigned char getZeros(const Key& value) noexcept {
|
||||
unsigned char leadZeros = 0;
|
||||
@ -146,7 +135,7 @@ void miner_thread() noexcept {
|
||||
conf.high = ones;
|
||||
bitwiseInverse(keys.PublicKey, inv);
|
||||
getRawAddress(ones, inv, rawAddr);
|
||||
printf("\nIPv6:\t%s/%d\nPK:\t%s\nSK:\t%s\n", getAddress(rawAddr), ones, keyToString(keys.PublicKey).c_str(), keyToString(keys.PrivateKey).c_str());
|
||||
printf("\nIPv6:\t%s\nPK:\t%s\nSK:\t%s\n", getAddress(rawAddr), keyToString(keys.PublicKey).c_str(), keyToString(keys.PrivateKey).c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user