Skip to content

Commit

Permalink
replace ptrdiff_t
Browse files Browse the repository at this point in the history
See #277
  • Loading branch information
genivia-inc committed Aug 18, 2023
1 parent 73694bf commit 440c994
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/simd_avx2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ size_t simd_nlcount_avx2(const char*& b, const char *e)
return 0;
size_t n = 0;
// align on 32 bytes
while ((reinterpret_cast<ptrdiff_t>(s) & 0x1f) != 0)
while ((reinterpret_cast<uint64_t>(s) & 0x1f) != 0)
n += (*s++ == '\n');
__m256i vlcn = _mm256_set1_epi8('\n');
while (s <= e)
Expand Down
2 changes: 1 addition & 1 deletion lib/simd_avx512bw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ size_t simd_nlcount_avx512bw(const char*& b, const char *e)
return 0;
size_t n = 0;
// align on 64 bytes
while ((reinterpret_cast<ptrdiff_t>(s) & 0x3f) != 0)
while ((reinterpret_cast<uint64_t>(s) & 0x3f) != 0)
n += (*s++ == '\n');
__m512i vlcn = _mm512_set1_epi8('\n');
while (s <= e)
Expand Down

0 comments on commit 440c994

Please sign in to comment.