diff --git a/include/simdjson/portability.h b/include/simdjson/portability.h index ec5a409e..8781655d 100644 --- a/include/simdjson/portability.h +++ b/include/simdjson/portability.h @@ -35,7 +35,7 @@ static inline int hamming(uint64_t input_num) { __popcnt((uint32_t)(input_num >> 32))); #endif } -} +} // namespace simdjson #else #include #include diff --git a/include/simdjson/simdprune_tables.h b/include/simdjson/simdprune_tables.h index 43566fe7..5314d844 100644 --- a/include/simdjson/simdprune_tables.h +++ b/include/simdjson/simdprune_tables.h @@ -1,5 +1,6 @@ #ifndef SIMDJSON_SIMDPRUNE_TABLES_H #define SIMDJSON_SIMDPRUNE_TABLES_H +#include #include "simdjson/portability.h" @@ -34985,12 +34986,11 @@ static const unsigned char mask128_epi32[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; -} +} // namespace simdjson #endif //__SSE3__ #ifdef __AVX2__ -#include namespace simdjson { static const uint32_t mask256_epi32[] = { 0, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 7, 0, 2, 3, 4, 5, 6, 7, 7, 2, diff --git a/include/simdjson/simdutf8check_neon.h b/include/simdjson/simdutf8check_neon.h index eb891cd8..9f970806 100644 --- a/include/simdjson/simdutf8check_neon.h +++ b/include/simdjson/simdutf8check_neon.h @@ -169,4 +169,4 @@ checkUTF8Bytes(int8x16_t current_bytes, struct processed_utf_bytes *previous, } #endif -#endif \ No newline at end of file +#endif diff --git a/include/simdjson/stage1_find_marks.h b/include/simdjson/stage1_find_marks.h index b6e44c5a..37d8981b 100644 --- a/include/simdjson/stage1_find_marks.h +++ b/include/simdjson/stage1_find_marks.h @@ -106,18 +106,10 @@ uint64_t neonmovemask_bulk(uint8x16_t p0, uint8x16_t p1, uint8x16_t p2, uint8x16 0x04, 0x40, 0x04, 0x40, 0x04, 0x40, 0x04, 0x40}; const uint8x16_t bitmask4 = { 0x08, 0x80, 0x08, 0x80, 0x08, 0x80, 0x08, 0x80, 0x08, 0x80, 0x08, 0x80, 0x08, 0x80, 0x08, 0x80}; -#if 0 - uint8x16_t t0 = vandq_u8(p0, bitmask1); - uint8x16_t t1 = vandq_u8(p1, bitmask2); - uint8x16_t t2 = vandq_u8(p2, bitmask3); - uint8x16_t t3 = vandq_u8(p3, bitmask4); - uint8x16_t tmp = vorrq_u8(vorrq_u8(t0, t1), vorrq_u8(t2, t3)); -#else uint8x16_t t0 = vandq_u8(p0, bitmask1); uint8x16_t t1 = vbslq_u8(bitmask2, p1, t0); uint8x16_t t2 = vbslq_u8(bitmask3, p2, t1); uint8x16_t tmp = vbslq_u8(bitmask4, p3, t2); -#endif uint8x16_t sum = vpaddq_u8(tmp, tmp); return vgetq_lane_u64(vreinterpretq_u64_u8(sum), 0); #endif diff --git a/src/jsonminifier.cpp b/src/jsonminifier.cpp index d4c14646..f62d3a8d 100644 --- a/src/jsonminifier.cpp +++ b/src/jsonminifier.cpp @@ -57,7 +57,7 @@ size_t jsonminify(const unsigned char *bytes, size_t howmany, } return pos; } -} +} // namespace simdjson #else #include "simdjson/simdprune_tables.h" #include diff --git a/src/jsonparser.cpp b/src/jsonparser.cpp index be17b069..29602827 100644 --- a/src/jsonparser.cpp +++ b/src/jsonparser.cpp @@ -71,4 +71,4 @@ ParsedJson build_parsed_json(const uint8_t *buf, size_t len, bool reallocifneede } return pj; } -} \ No newline at end of file +}