Fixed floating-point rounding, resolved conflict between cn/2 and cn/gpu. Thanks @SChernykh.

This commit is contained in:
XMRig 2019-02-06 00:38:55 +07:00
parent 3f8898f228
commit aabdff2cc9
2 changed files with 8 additions and 0 deletions

View file

@ -586,6 +586,8 @@ inline void cryptonight_single_hash_gpu(const uint8_t *__restrict__ input, size_
xmrig::keccak(input, size, ctx[0]->state);
cn_explode_scratchpad_gpu<ALGO, MEM>(ctx[0]->state, ctx[0]->memory);
fesetround(FE_TONEAREST);
cn_gpu_inner_arm<ITERATIONS, MASK>(ctx[0]->state, ctx[0]->memory);
cn_implode_scratchpad<xmrig::CRYPTONIGHT_HEAVY, MEM, SOFT_AES>((__m128i*) ctx[0]->memory, (__m128i*) ctx[0]->state);

View file

@ -616,6 +616,12 @@ inline void cryptonight_single_hash_gpu(const uint8_t *__restrict__ input, size_
xmrig::keccak(input, size, ctx[0]->state);
cn_explode_scratchpad_gpu<ALGO, MEM>(ctx[0]->state, ctx[0]->memory);
# ifdef _MSC_VER
_control87(RC_NEAR, MCW_RC);
# else
fesetround(FE_TONEAREST);
# endif
if (xmrig::Cpu::info()->hasAVX2()) {
cn_gpu_inner_avx<ITERATIONS, MASK>(ctx[0]->state, ctx[0]->memory);
} else {