Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Antares0982 committed Jan 4, 2025
1 parent 2c99579 commit 14d1ff3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/encode/encode_unicode_impl.inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define MASK_ELEVATE_WRITE_512 PYYJSON_CONCAT3(mask_elevate_write_512, COMPILE_READ_UCS_LEVEL, COMPILE_WRITE_UCS_LEVEL)

// forward declaration
force_inline SIMD_MASK_TYPE CHECK_ESCAPE_IMPL_GET_MASK(const _FROM_TYPE *src, SIMD_TYPE *restrict SIMD_VAR);
force_inline SIMD_MASK_TYPE CHECK_ESCAPE_IMPL_GET_MASK(const _FROM_TYPE *restrict src, SIMD_TYPE *restrict SIMD_VAR);
force_inline u32 GET_DONE_COUNT_FROM_MASK(SIMD_MASK_TYPE mask);
#if SIMD_BIT_SIZE == 512
force_inline SIMD_MASK_TYPE CHECK_ESCAPE_TAIL_IMPL_GET_MASK_512(SIMD_512 z, SIMD_MASK_TYPE rw_mask);
Expand Down
6 changes: 3 additions & 3 deletions src/simd/check_mask.inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define GET_DONE_COUNT_FROM_MASK PYYJSON_CONCAT2(get_done_count_from_mask, COMPILE_READ_UCS_LEVEL)
#define CHECK_ESCAPE_TAIL_IMPL_GET_MASK_512 PYYJSON_CONCAT2(check_escape_tail_impl_get_mask_512, COMPILE_READ_UCS_LEVEL)

force_inline SIMD_MASK_TYPE CHECK_ESCAPE_IMPL_GET_MASK(const _FROM_TYPE *src, SIMD_TYPE *restrict SIMD_VAR) {
force_inline SIMD_MASK_TYPE CHECK_ESCAPE_IMPL_GET_MASK(const _FROM_TYPE *restrict src, SIMD_TYPE *restrict SIMD_VAR) {
#if SIMD_BIT_SIZE == 512
# define CUR_QUOTE PYYJSON_SIMPLE_CONCAT2(_Quote_i, READ_BIT_SIZE)
# define CUR_SLASH PYYJSON_SIMPLE_CONCAT2(_Slash_i, READ_BIT_SIZE)
Expand Down Expand Up @@ -41,8 +41,8 @@ force_inline SIMD_MASK_TYPE CHECK_ESCAPE_IMPL_GET_MASK(const _FROM_TYPE *src, SI
# else // COMPILE_READ_UCS_LEVEL == 4
// there is no `_mm256_subs_epu32`
__m256i t3 = SET1(_MinusOne);
__m256i _1 = _mm256_cmpgt_epi32(*y, t3);
__m256i _2 = _mm256_cmpgt_epi32(t4, *y);
__m256i _1 = cmpgt_i32_256(*y, t3);
__m256i _2 = cmpgt_i32_256(t4, *y);
__m256i m3 = simd_and_256(_1, _2);
# endif // COMPILE_READ_UCS_LEVEL
__m256i r = simd_or_256(simd_or_256(m1, m2), m3);
Expand Down

0 comments on commit 14d1ff3

Please sign in to comment.