From de08df6a7e0ecf8b999e7faabcbabd0b3b39aa54 Mon Sep 17 00:00:00 2001 From: ioioioio Date: Fri, 28 Jun 2019 15:33:30 -0400 Subject: [PATCH] Correction of identation. --- include/simdjson/jsonparser.h | 16 ++++++++-------- include/simdjson/stage1_find_marks.h | 14 ++++++++------ src/stage1_find_marks.cpp | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/include/simdjson/jsonparser.h b/include/simdjson/jsonparser.h index a5e2fcb4..249a0408 100644 --- a/include/simdjson/jsonparser.h +++ b/include/simdjson/jsonparser.h @@ -44,16 +44,16 @@ int json_parse_implementation(const uint8_t *buf, size_t len, ParsedJson &pj, bo // (buf + len - 1) / pagesize == (buf + len - 1 + SIMDJSON_PADDING) / pagesize // That's true if (buf + len - 1) % pagesize + SIMDJSON_PADDING < pagesize. /////////// - if ( (reinterpret_cast(buf + len - 1) % pagesize ) + SIMDJSON_PADDING < static_cast(pagesize) ) { + if ( (reinterpret_cast(buf + len - 1) % pagesize ) + SIMDJSON_PADDING < static_cast(pagesize) ) { #else // SIMDJSON_SAFE_SAME_PAGE_READ_OVERRUN - if(true) { // if not SIMDJSON_SAFE_SAME_PAGE_READ_OVERRUN, we always reallocate + if(true) { // if not SIMDJSON_SAFE_SAME_PAGE_READ_OVERRUN, we always reallocate #endif - const uint8_t *tmpbuf = buf; - buf = (uint8_t *) allocate_padded_buffer(len); - if(buf == NULL) return simdjson::MEMALLOC; - memcpy((void*)buf,tmpbuf,len); - reallocated = true; - } + const uint8_t *tmpbuf = buf; + buf = (uint8_t *) allocate_padded_buffer(len); + if(buf == NULL) return simdjson::MEMALLOC; + memcpy((void*)buf,tmpbuf,len); + reallocated = true; + } } int stage1_is_ok = find_structural_bits(buf, len, pj); if(stage1_is_ok != simdjson::SUCCESS) { diff --git a/include/simdjson/stage1_find_marks.h b/include/simdjson/stage1_find_marks.h index f594a13c..3504fdbe 100644 --- a/include/simdjson/stage1_find_marks.h +++ b/include/simdjson/stage1_find_marks.h @@ -149,7 +149,8 @@ template<> really_inline uint64_t compute_quote_mask(uint64_t quote_bits) { #ifdef __PCLMUL__ // Might cause problems on runtime dispatch uint64_t quote_mask = _mm_cvtsi128_si64(_mm_clmulepi64_si128( - _mm_set_epi64x(0ULL, quote_bits), _mm_set1_epi8(0xFF), 0)); + _mm_set_epi64x(0ULL, quote_bits), + _mm_set1_epi8(0xFF), 0)); #else uint64_t quote_mask = vmull_p64( -1ULL, quote_bits); #endif @@ -161,8 +162,8 @@ uint64_t compute_quote_mask(uint64_t quote_bits #ifdef SIMDJSON_UTF8VALIDATE templatereally_inline void check_utf8(simd_input in, - __m256i &has_error, - struct avx_processed_utf_bytes &previous) { + __m256i &has_error, + struct avx_processed_utf_bytes &previous) { __m256i highbit = _mm256_set1_epi8(0x80); if ((_mm256_testz_si256(_mm256_or_si256(in.lo, in.hi), highbit)) == 1) { // it is ascii, we just check continuation @@ -449,9 +450,10 @@ void find_whitespace_and_structurals(simd_input #ifdef __ARM_NEON template<> really_inline -void find_whitespace_and_structurals(simd_input in, - uint64_t &whitespace, - uint64_t &structurals) { +void find_whitespace_and_structurals( + simd_input in, + uint64_t &whitespace, + uint64_t &structurals) { #ifndef FUNKY_BAD_TABLE const uint8x16_t low_nibble_mask = (uint8x16_t){ 16, 0, 0, 0, 0, 0, 0, 0, 0, 8, 12, 1, 2, 9, 0, 0}; diff --git a/src/stage1_find_marks.cpp b/src/stage1_find_marks.cpp index d859edd6..e0ee94cf 100644 --- a/src/stage1_find_marks.cpp +++ b/src/stage1_find_marks.cpp @@ -1 +1 @@ -// File kept in case we want to reuse it soon. (many configuration files to edit) \ No newline at end of file +// File kept in case we want to reuse it soon. (many configuration files to edit)