Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Antares0982 committed Dec 25, 2024
1 parent c076186 commit 75e4bc5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/encode/encode_simd_utils.inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


// read only
#define CHECK_ESCAPE_IMPL_GET_MASK PYYJSON_CONCAT2(check_escape_impl_get_mask, COMPILE_READ_UCS_LEVEL)
#define CHECK_MASK_ZERO PYYJSON_CONCAT2(check_mask_zero, 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)
// write only or read-write
Expand All @@ -16,8 +15,6 @@
#define BACK_WRITE_SIMD256_WITH_TAIL_LEN PYYJSON_CONCAT3(back_write_simd256_with_tail_len, COMPILE_READ_UCS_LEVEL, COMPILE_WRITE_UCS_LEVEL)
#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);

#if COMPILE_WRITE_UCS_LEVEL == 4
force_inline bool CHECK_MASK_ZERO(SIMD_MASK_TYPE mask) {
Expand Down Expand Up @@ -251,5 +248,4 @@ force_inline void MASK_ELEVATE_WRITE_512(_TARGET_TYPE *dst, SIMD_512 z, Py_ssize
#undef WRITE_SIMD_IMPL
#undef CHECK_ESCAPE_TAIL_IMPL_GET_MASK_512
#undef CHECK_MASK_ZERO
#undef CHECK_ESCAPE_IMPL_GET_MASK
#undef CHECK_COUNT_MAX
4 changes: 4 additions & 0 deletions src/encode/encode_unicode_impl.inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
#define WRITE_SIMD_IMPL PYYJSON_CONCAT3(write_simd_impl, COMPILE_READ_UCS_LEVEL, COMPILE_WRITE_UCS_LEVEL)
#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);


#if COMPILE_READ_UCS_LEVEL == 1 && COMPILE_INDENT_LEVEL == 0
static _TARGET_TYPE _CONTROL_SEQ_TABLE[(_Slash + 1) * 8] = {
CONTROL_SEQ_ESCAPE_PREFIX, '0', '0', CONTROL_SEQ_ESCAPE_SUFFIX, // 0
Expand Down
2 changes: 2 additions & 0 deletions src/simd/check_mask.inl.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// requires: READ

#define CHECK_ESCAPE_IMPL_GET_MASK PYYJSON_CONCAT2(check_escape_impl_get_mask, COMPILE_READ_UCS_LEVEL)


force_inline SIMD_MASK_TYPE CHECK_ESCAPE_IMPL_GET_MASK(const _FROM_TYPE *src, SIMD_TYPE *restrict SIMD_VAR) {
#if SIMD_BIT_SIZE == 512
#define CUR_QUOTE PYYJSON_SIMPLE_CONCAT2(_Quote_i, READ_BIT_SIZE)
Expand Down

0 comments on commit 75e4bc5

Please sign in to comment.