Fixed undefined function call to hc_byte_perm_S() in hash-mode 17010 on non-CUDA compute devices

This commit is contained in:
Jens Steube
2021-12-08 16:30:32 +01:00
parent c01a2b1a9e
commit 4dc98b334a
2 changed files with 5 additions and 2 deletions
+4 -2
View File
@@ -87,7 +87,8 @@ DECLSPEC void memzero_le_S (u32 *block, const u32 start_offset, const u32 end_of
const u32 start_idx = start_offset / 4;
// zero out bytes in the first u32 starting from 'start_offset'
block[start_idx] &= 0xffffffff >> ((4 - (start_offset & 3)) * 8);
// math is a bit complex to avoid shifting by 32 bits, which is not possible on some architectures
block[start_idx] &= ~(0xffffffff << ((start_offset & 3) * 8));
const u32 end_idx = (end_offset + 3) / 4;
@@ -103,7 +104,8 @@ DECLSPEC void memzero_be_S (u32 *block, const u32 start_offset, const u32 end_of
const u32 start_idx = start_offset / 4;
// zero out bytes in the first u32 starting from 'start_offset'
block[start_idx] &= 0xffffffff << ((4 - (start_offset & 3)) * 8);
// math is a bit complex to avoid shifting by 32 bits, which is not possible on some architectures
block[start_idx] &= ~(0xffffffff >> ((start_offset & 3) * 8));
const u32 end_idx = (end_offset + 3) / 4;