Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
fix: remove __m256i_u
Browse files Browse the repository at this point in the history
  • Loading branch information
Nambers committed May 8, 2024
1 parent 67cad54 commit 5b1bdd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/str.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bool count_skipped(const char *buf, size_t max_len, size_t *skipped, size_t *len
int skip_next = 0;

for (; i + 32 < max_len; i += 32) {
__m256i batch = _mm256_loadu_si256((__m256i_u *) (buf + i));
__m256i batch = _mm256_loadu_si256((__m256i *) (buf + i));
// __mmask32 escape_result = _mm256_cmpeq_epi8_mask(batch, escape_mask);
// __mmask32 end_result = _mm256_cmpeq_epi8_mask(batch, end_mask);
// __mmask32 u_result = _mm256_cmpeq_epi8_mask(batch, u_mask);
Expand Down Expand Up @@ -228,7 +228,7 @@ bool count_skipped(const char *buf, size_t max_len, size_t *skipped, size_t *len
int get_utf8_kind(const unsigned char *buf, size_t len) {
int i;
const __m256i unicode_mask1 = _mm256_set1_epi16(0x755c); // little endian for \\u
const __m256i unicode_mask2 = _mm256_loadu_si256((__m256i_u *) "0\\u\\u\\u\\u\\u\\u\\u\\u\\u\\u\\u\\u\\u\\u\\u0");
const __m256i unicode_mask2 = _mm256_loadu_si256((__m256i *) "0\\u\\u\\u\\u\\u\\u\\u\\u\\u\\u\\u\\u\\u\\u\\u0");
const __m256i min_4bytes = _mm256_set1_epi8((char) 0b11101111); // -17 or 239U
const __m256i m256_zero = _mm256_set1_epi8((char) 0); // 0
const __m256i max_onebyte = _mm256_set1_epi8((char) 0x80); // -128 or 128U
Expand Down

0 comments on commit 5b1bdd6

Please sign in to comment.