@@ -34,26 +34,26 @@ really_inline void find_whitespace_and_structurals(simd_input<ARCHITECTURE> in,
34
34
const __m256i mask_close_bracket = _mm256_set1_epi8 (0x5d );
35
35
const __m256i mask_column = _mm256_set1_epi8 (0x3a );
36
36
const __m256i mask_comma = _mm256_set1_epi8 (0x2c );
37
- structurals = in-> build_bitmask ([&](auto in) {
37
+ structurals = in. map ([&](auto in) {
38
38
__m256i structurals = _mm256_cmpeq_epi8 (in, mask_open_brace);
39
39
structurals = _mm256_or_si256 (structurals, _mm256_cmpeq_epi8 (in, mask_close_brace));
40
40
structurals = _mm256_or_si256 (structurals, _mm256_cmpeq_epi8 (in, mask_open_bracket));
41
41
structurals = _mm256_or_si256 (structurals, _mm256_cmpeq_epi8 (in, mask_close_bracket));
42
42
structurals = _mm256_or_si256 (structurals, _mm256_cmpeq_epi8 (in, mask_column));
43
43
structurals = _mm256_or_si256 (structurals, _mm256_cmpeq_epi8 (in, mask_comma));
44
44
return structurals;
45
- });
45
+ }). to_bitmask () ;
46
46
47
47
const __m256i mask_space = _mm256_set1_epi8 (0x20 );
48
48
const __m256i mask_linefeed = _mm256_set1_epi8 (0x0a );
49
49
const __m256i mask_tab = _mm256_set1_epi8 (0x09 );
50
50
const __m256i mask_carriage = _mm256_set1_epi8 (0x0d );
51
- whitespace = in-> build_bitmask ([&](auto in) {
51
+ whitespace = in. map ([&](auto in) {
52
52
__m256i space = _mm256_cmpeq_epi8 (in, mask_space);
53
53
space = _mm256_or_si256 (space, _mm256_cmpeq_epi8 (in, mask_linefeed));
54
54
space = _mm256_or_si256 (space, _mm256_cmpeq_epi8 (in, mask_tab));
55
55
space = _mm256_or_si256 (space, _mm256_cmpeq_epi8 (in, mask_carriage));
56
- });
56
+ }). to_bitmask () ;
57
57
// end of naive approach
58
58
59
59
#else // SIMDJSON_NAIVE_STRUCTURAL
@@ -69,15 +69,15 @@ really_inline void find_whitespace_and_structurals(simd_input<ARCHITECTURE> in,
69
69
const __m256i struct_offset = _mm256_set1_epi8 (0xd4u );
70
70
const __m256i struct_mask = _mm256_set1_epi8 (32 );
71
71
72
- whitespace = in.build_bitmask ([&](auto chunk) {
72
+ whitespace = in.map ([&](auto chunk) {
73
73
return _mm256_cmpeq_epi8 (chunk, _mm256_shuffle_epi8 (white_table, chunk));
74
- });
75
- structurals = in.build_bitmask ([&](auto chunk) {
74
+ }). to_bitmask () ;
75
+ structurals = in.map ([&](auto chunk) {
76
76
__m256i struct_r1 = _mm256_add_epi8 (struct_offset, chunk);
77
77
__m256i struct_r2 = _mm256_or_si256 (chunk, struct_mask);
78
78
__m256i struct_r3 = _mm256_shuffle_epi8 (structural_table, struct_r1);
79
79
return _mm256_cmpeq_epi8 (struct_r2, struct_r3);
80
- });
80
+ }). to_bitmask () ;
81
81
82
82
#endif // else SIMDJSON_NAIVE_STRUCTURAL
83
83
}
0 commit comments