Minor cleaning = annotating simdjson namespaces and making sure that we don't have headers all over.
This commit is contained in:
parent
977f57fd37
commit
be956654b2
|
@ -35,7 +35,7 @@ static inline int hamming(uint64_t input_num) {
|
|||
__popcnt((uint32_t)(input_num >> 32)));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} // namespace simdjson
|
||||
#else
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#ifndef SIMDJSON_SIMDPRUNE_TABLES_H
|
||||
#define SIMDJSON_SIMDPRUNE_TABLES_H
|
||||
#include <cstdint>
|
||||
|
||||
#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 <cstdint>
|
||||
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,
|
||||
|
|
|
@ -169,4 +169,4 @@ checkUTF8Bytes(int8x16_t current_bytes, struct processed_utf_bytes *previous,
|
|||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <cstring>
|
||||
|
|
|
@ -71,4 +71,4 @@ ParsedJson build_parsed_json(const uint8_t *buf, size_t len, bool reallocifneede
|
|||
}
|
||||
return pj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue