#714 Simplify cn-heavy/xhv.

This commit is contained in:
XMRig 2018-07-09 00:23:27 +07:00
parent b719bbfefc
commit a8de81a51b

View file

@ -485,13 +485,12 @@ inline void cryptonight_single_hash(const uint8_t *__restrict__ input, size_t si
((int64_t*)&l0[idx0 & MASK])[0] = n ^ q;
if (VARIANT == xmrig::VARIANT_XHV) {
idx0 = (~d) ^ q;
d = ~d;
}
else {
idx0 = d ^ q;
}
}
}
cn_implode_scratchpad<ALGO, MEM, SOFT_AES>((__m128i*) ctx[0]->memory, (__m128i*) ctx[0]->state);
@ -600,12 +599,11 @@ inline void cryptonight_double_hash(const uint8_t *__restrict__ input, size_t si
((int64_t*)&l0[idx0 & MASK])[0] = n ^ q;
if (VARIANT == xmrig::VARIANT_XHV) {
idx0 = (~d) ^ q;
d = ~d;
}
else {
idx0 = d ^ q;
}
}
cl = ((uint64_t*) &l1[idx1 & MASK])[0];
ch = ((uint64_t*) &l1[idx1 & MASK])[1];
@ -640,13 +638,12 @@ inline void cryptonight_double_hash(const uint8_t *__restrict__ input, size_t si
((int64_t*)&l1[idx1 & MASK])[0] = n ^ q;
if (VARIANT == xmrig::VARIANT_XHV) {
idx1 = (~d) ^ q;
d = ~d;
}
else {
idx1 = d ^ q;
}
}
}
cn_implode_scratchpad<ALGO, MEM, SOFT_AES>((__m128i*) l0, (__m128i*) h0);
cn_implode_scratchpad<ALGO, MEM, SOFT_AES>((__m128i*) l1, (__m128i*) h1);
@ -709,11 +706,10 @@ inline void cryptonight_double_hash(const uint8_t *__restrict__ input, size_t si
int64_t q = n / (d | 0x5); \
((int64_t*)&l[idx & MASK])[0] = n ^ q; \
if (VARIANT == xmrig::VARIANT_XHV) { \
idx = (~d) ^ q; \
d = ~d; \
} \
else { \
\
idx = d ^ q; \
} \
}