Adds separate v7 hash methods and cleans up pre-v7 hash functions (#67)
* Adds separate v7 hash methods and cleans up pre-v7 hash functions
This commit is contained in:
parent
3b44f055c4
commit
7c0ed8b8c2
3 changed files with 1530 additions and 142 deletions
|
@ -36,13 +36,22 @@
|
||||||
template <size_t NUM_HASH_BLOCKS>
|
template <size_t NUM_HASH_BLOCKS>
|
||||||
static void cryptonight_aesni(const void *input, size_t size, void *output, cryptonight_ctx *ctx) {
|
static void cryptonight_aesni(const void *input, size_t size, void *output, cryptonight_ctx *ctx) {
|
||||||
# if !defined(XMRIG_ARMv7)
|
# if !defined(XMRIG_ARMv7)
|
||||||
|
if (reinterpret_cast<const uint8_t*>(input)[0] > 6) {
|
||||||
|
CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, false, NUM_HASH_BLOCKS>::hashV7(input, size, output, ctx);
|
||||||
|
} else {
|
||||||
CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, false, NUM_HASH_BLOCKS>::hash(input, size, output, ctx);
|
CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, false, NUM_HASH_BLOCKS>::hash(input, size, output, ctx);
|
||||||
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
template <size_t NUM_HASH_BLOCKS>
|
template <size_t NUM_HASH_BLOCKS>
|
||||||
static void cryptonight_softaes(const void *input, size_t size, void *output, cryptonight_ctx *ctx) {
|
static void cryptonight_softaes(const void *input, size_t size, void *output, cryptonight_ctx *ctx) {
|
||||||
|
if (reinterpret_cast<const uint8_t*>(input)[0] > 6)
|
||||||
|
{
|
||||||
|
CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, true, NUM_HASH_BLOCKS>::hashV7(input, size, output, ctx);
|
||||||
|
} else {
|
||||||
CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, true, NUM_HASH_BLOCKS>::hash(input, size, output, ctx);
|
CryptoNightMultiHash<0x80000, MEMORY, 0x1FFFF0, true, NUM_HASH_BLOCKS>::hash(input, size, output, ctx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <size_t NUM_HASH_BLOCKS>
|
template <size_t NUM_HASH_BLOCKS>
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue