Correction of identation.

This commit is contained in:
ioioioio 2019-06-28 15:33:30 -04:00
parent c2e4b8ca9a
commit de08df6a7e
3 changed files with 17 additions and 15 deletions

View File

@ -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 // (buf + len - 1) / pagesize == (buf + len - 1 + SIMDJSON_PADDING) / pagesize
// That's true if (buf + len - 1) % pagesize + SIMDJSON_PADDING < pagesize. // That's true if (buf + len - 1) % pagesize + SIMDJSON_PADDING < pagesize.
/////////// ///////////
if ( (reinterpret_cast<uintptr_t>(buf + len - 1) % pagesize ) + SIMDJSON_PADDING < static_cast<uintptr_t>(pagesize) ) { if ( (reinterpret_cast<uintptr_t>(buf + len - 1) % pagesize ) + SIMDJSON_PADDING < static_cast<uintptr_t>(pagesize) ) {
#else // SIMDJSON_SAFE_SAME_PAGE_READ_OVERRUN #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 #endif
const uint8_t *tmpbuf = buf; const uint8_t *tmpbuf = buf;
buf = (uint8_t *) allocate_padded_buffer(len); buf = (uint8_t *) allocate_padded_buffer(len);
if(buf == NULL) return simdjson::MEMALLOC; if(buf == NULL) return simdjson::MEMALLOC;
memcpy((void*)buf,tmpbuf,len); memcpy((void*)buf,tmpbuf,len);
reallocated = true; reallocated = true;
} }
} }
int stage1_is_ok = find_structural_bits<T>(buf, len, pj); int stage1_is_ok = find_structural_bits<T>(buf, len, pj);
if(stage1_is_ok != simdjson::SUCCESS) { if(stage1_is_ok != simdjson::SUCCESS) {

View File

@ -149,7 +149,8 @@ template<> really_inline
uint64_t compute_quote_mask<simdjson::instruction_set::neon>(uint64_t quote_bits) { uint64_t compute_quote_mask<simdjson::instruction_set::neon>(uint64_t quote_bits) {
#ifdef __PCLMUL__ // Might cause problems on runtime dispatch #ifdef __PCLMUL__ // Might cause problems on runtime dispatch
uint64_t quote_mask = _mm_cvtsi128_si64(_mm_clmulepi64_si128( 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 #else
uint64_t quote_mask = vmull_p64( -1ULL, quote_bits); uint64_t quote_mask = vmull_p64( -1ULL, quote_bits);
#endif #endif
@ -161,8 +162,8 @@ uint64_t compute_quote_mask<simdjson::instruction_set::neon>(uint64_t quote_bits
#ifdef SIMDJSON_UTF8VALIDATE #ifdef SIMDJSON_UTF8VALIDATE
template<simdjson::instruction_set T>really_inline template<simdjson::instruction_set T>really_inline
void check_utf8(simd_input<T> in, void check_utf8(simd_input<T> in,
__m256i &has_error, __m256i &has_error,
struct avx_processed_utf_bytes &previous) { struct avx_processed_utf_bytes &previous) {
__m256i highbit = _mm256_set1_epi8(0x80); __m256i highbit = _mm256_set1_epi8(0x80);
if ((_mm256_testz_si256(_mm256_or_si256(in.lo, in.hi), highbit)) == 1) { if ((_mm256_testz_si256(_mm256_or_si256(in.lo, in.hi), highbit)) == 1) {
// it is ascii, we just check continuation // it is ascii, we just check continuation
@ -449,9 +450,10 @@ void find_whitespace_and_structurals<simdjson::instruction_set::avx2>(simd_input
#ifdef __ARM_NEON #ifdef __ARM_NEON
template<> really_inline template<> really_inline
void find_whitespace_and_structurals<simdjson::instruction_set::neon>(simd_input<simdjson::instruction_set::neon> in, void find_whitespace_and_structurals<simdjson::instruction_set::neon>(
uint64_t &whitespace, simd_input<simdjson::instruction_set::neon> in,
uint64_t &structurals) { uint64_t &whitespace,
uint64_t &structurals) {
#ifndef FUNKY_BAD_TABLE #ifndef FUNKY_BAD_TABLE
const uint8x16_t low_nibble_mask = (uint8x16_t){ const uint8x16_t low_nibble_mask = (uint8x16_t){
16, 0, 0, 0, 0, 0, 0, 0, 0, 8, 12, 1, 2, 9, 0, 0}; 16, 0, 0, 0, 0, 0, 0, 0, 0, 8, 12, 1, 2, 9, 0, 0};

View File

@ -1 +1 @@
// File kept in case we want to reuse it soon. (many configuration files to edit) // File kept in case we want to reuse it soon. (many configuration files to edit)