mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
Making vecdecode a header file.
This commit is contained in:
@@ -277,7 +277,7 @@ const u32 ROOT_NODE = 1;
|
||||
|
||||
#define VECDECODE
|
||||
#ifdef VECDECODE
|
||||
#include "vecdecode.c"
|
||||
#include "vecdecode.h"
|
||||
#endif
|
||||
// just transform the bitmask to a big list of 32-bit integers for now
|
||||
// that's all; the type of character the offset points to will
|
||||
@@ -287,8 +287,7 @@ never_inline bool flatten_indexes(size_t len, ParsedJson & pj) {
|
||||
u32 * base_ptr = pj.structural_indexes;
|
||||
base_ptr[DUMMY_NODE] = base_ptr[ROOT_NODE] = 0; // really shouldn't matter
|
||||
#ifdef VECDECODE
|
||||
|
||||
u32 number = bitmap_decode_avx2(pj.structurals, len, base_ptr + NUM_RESERVED_NODES) + NUM_RESERVED_NODES;
|
||||
u32 number = bitmap_decode_avx2(pj.structurals, len, base_ptr + NUM_RESERVED_NODES) + NUM_RESERVED_NODES;
|
||||
pj.n_structural_indexes = number;
|
||||
base_ptr[pj.n_structural_indexes] = 0; // make it safe to dereference one beyond this array
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user