Lines Matching refs:start
4261 // ask that you pass a pointer to the start of the stream (start).
4262 inline simdutf_warn_unused result rewind_and_validate_with_errors(const char *start, const char *buf, size_t len) noexcept {
4263 // First check that we start with a leading byte
4264 if ((*start & 0b11000000) == 0b10000000) {
4288 // -65 is 0b10111111, anything larger in two-complement's should start a new code point.
10768 char* start{utf8_output};
10809 return utf8_output - start;
10832 char* start{utf8_output};
10875 return utf8_output - start;
10881 char* start{utf8_output};
10924 return result(error_code::SUCCESS, utf8_output - start);
10948 char16_t* start{utf16_output};
10969 return utf16_output - start;
10992 char16_t* start{utf16_output};
11014 return utf16_output - start;
11021 char16_t* start{utf16_output};
11043 return result(error_code::SUCCESS, utf16_output - start);
11067 char* start{utf8_output};
11118 return utf8_output - start;
11141 char* start{utf8_output};
11193 return utf8_output - start;
11200 char* start{utf8_output};
11252 return result(error_code::SUCCESS, utf8_output - start);
11276 char32_t* start{utf32_output};
11294 return utf32_output - start;
11317 char32_t* start{utf32_output};
11337 return utf32_output - start;
11344 char32_t* start{utf32_output};
11364 return result(error_code::SUCCESS, utf32_output - start);
11388 char16_t* start{utf16_output};
11448 return utf16_output - start;
11472 char16_t* start{utf16_output};
11555 return utf16_output - start;
11562 char16_t* start{utf16_output};
11645 return result(error_code::SUCCESS, utf16_output - start);
11690 // Or we possibly have a stream that does not start with a leading byte.
11720 char32_t* start{utf32_output};
11762 return utf32_output - start;
11785 char32_t* start{utf32_output};
11851 return utf32_output - start;
11857 char32_t* start{utf32_output};
11924 return result(error_code::SUCCESS, utf32_output - start);
11966 // Or we possibly have a stream that does not start with a leading byte.
11997 char* start{utf8_output};
12028 return utf8_output - start;
12051 char16_t* start{ utf16_output };
12059 return utf16_output - start;
12066 char16_t* start{ utf16_output };
12074 return result(error_code::SUCCESS, utf16_output - start);
12096 char32_t* start{utf32_output};
12100 return utf32_output - start;
12124 char* start{latin_output};
12167 return latin_output - start;
12173 char* start{latin_output};
12230 return result(error_code::SUCCESS, latin_output - start);
12262 // Or we possibly have a stream that does not start with a leading byte.
12318 char* start{latin_output};
12349 return result(error_code::SUCCESS,latin_output - start);
12371 char* start = latin1_output;
12383 return latin1_output - start;
12388 char* start{latin1_output};
12407 return result(error_code::SUCCESS, latin1_output - start);
12431 char* start{latin_output};
12470 return latin_output - start;
12493 char* start{latin_output};
12502 return latin_output - start;
12523 char* start = latin1_output;
12544 return latin1_output - start;
12677 const char* start = buf;
12730 const char16_t* end16 = reinterpret_cast<const char16_t*>(start) + len/2;
12794 const char32_t* end32 = reinterpret_cast<const char32_t*>(start) + len/4;
12796 // Must start checking for surrogates
12852 if (static_cast<size_t>(buf - start) != len) {
12855 std::memcpy(block, buf, len - (buf - start));
12864 if (is_utf16 && scalar::utf16::validate<endianness::LITTLE>(reinterpret_cast<const char16_t*>(buf), (len - (buf - start))/2)) {
12871 if (vmaxvq_u32(is_zero) == 0 && scalar::utf32::validate(reinterpret_cast<const char32_t*>(buf), (len - (buf - start))/4)) {
12951 const char16_t* start = input;
13012 return result(error_code::SURROGATE, input - start);
13016 return result(error_code::SUCCESS, input - start);
13052 const char32_t* start = input;
13068 return result(error_code::TOO_LARGE, input - start);
13073 return result(error_code::SURROGATE, input - start);
13079 return result(error_code::SUCCESS, input - start);
13731 const char16_t* start = buf;
13751 return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), latin1_output);
13756 return std::make_pair(result(error_code::SUCCESS, buf - start), latin1_output);
14067 const char16_t* start = buf;
14296 if((diff | diff2) > 0x3FF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k - 1), reinterpret_cast<char*>(utf8_output)); }
14308 return std::make_pair(result(error_code::SUCCESS, buf - start), reinterpret_cast<char*>(utf8_output));
14424 const char16_t* start = buf;
14461 if((diff | diff2) > 0x3FF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k - 1), reinterpret_cast<char32_t*>(utf32_output)); }
14469 return std::make_pair(result(error_code::SUCCESS, buf - start), reinterpret_cast<char32_t*>(utf32_output));
14498 const char32_t* start = buf;
14522 return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), latin1_output);
14527 return std::make_pair(result(error_code::SUCCESS, buf - start), latin1_output);
14767 const char32_t* start = buf;
14847 return std::make_pair(result(error_code::SURROGATE, buf - start), reinterpret_cast<char*>(utf8_output));
14980 if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), reinterpret_cast<char*>(utf8_output)); }
14985 if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), reinterpret_cast<char*>(utf8_output)); }
14996 return std::make_pair(result(error_code::SUCCESS, buf - start), reinterpret_cast<char*>(utf8_output));
15062 const char32_t* start = buf;
15076 return std::make_pair(result(error_code::SURROGATE, buf - start), reinterpret_cast<char16_t*>(utf16_output));
15091 if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), reinterpret_cast<char16_t*>(utf16_output)); }
15095 if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), reinterpret_cast<char16_t*>(utf16_output)); }
15111 return std::make_pair(result(error_code::SUCCESS, buf - start), reinterpret_cast<char16_t*>(utf16_output));
15541 char16_t* start{utf16_output};
15554 // start of a new code point.
15558 // The *start* of code points is not so useful, rather, we want the *end* of code points.
15592 return utf16_output - start;
15730 char16_t* start{utf16_output};
15799 return utf16_output - start;
15805 char16_t* start{utf16_output};
15893 return result(error_code::SUCCESS, utf16_output - start);
15920 char32_t* start{utf32_output};
15943 return utf32_output - start;
16082 char32_t* start{utf32_output};
16151 return utf32_output - start;
16156 char32_t* start{utf32_output};
16238 return result(error_code::SUCCESS, utf32_output - start);
16480 char* start{latin1_output};
16549 return latin1_output - start;
16554 char* start{latin1_output};
16642 return result(error_code::SUCCESS, latin1_output - start);
16667 char* start{latin1_output};
16722 return latin1_output - start;
17884 _MM_CMPINT_NLT); // 0xf0 <= zmm0 (4 byte start bytes)
17946 // the location of 3-byte sequence start bytes in the input
18029 // the location of 3-byte sequence start bytes in the input
19215 // _mm512_storeu_si512 and have the next process_block start from the
19225 char *start = latin_output;
19253 return (size_t)(latin_output - start);
19301 char *start = latin_output;
19323 return (size_t)(latin_output - start);
19376 const char16_t *start = buf;
19398 return std::make_pair(result(error_code::TOO_LARGE, buf - start),
19421 return std::make_pair(result(error_code::TOO_LARGE, buf - start),
19778 const char32_t *start = buf;
19790 return std::make_pair(result(error_code::TOO_LARGE, buf - start),
19805 return std::make_pair(result(error_code::TOO_LARGE, buf - start),
20061 const char32_t* start = buf;
20079 return std::make_pair(result(error_code::TOO_LARGE, buf - start), utf8_output);
20159 return std::make_pair(result(error_code::SURROGATE, buf - start), utf8_output);
20281 if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), utf8_output); }
20286 if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), utf8_output); }
20297 return std::make_pair(result(error_code::SUCCESS, buf - start), utf8_output);
20372 const char32_t* start = buf;
20392 return std::make_pair(result(error_code::SURROGATE, buf - start), utf16_output);
20411 if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), utf16_output); }
20415 if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), utf16_output); }
20431 return std::make_pair(result(error_code::SUCCESS, buf - start), utf16_output);
20568 char *start = utf8_output;
20587 return (size_t)(utf8_output - start);
20667 const char *start = buf;
20708 sizeof(char16_t); // advance only by 31 code units so that we start
20728 reinterpret_cast<const char32_t *>(start) + length / 4;
20750 size_t current_length = static_cast<size_t>(buf - start);
20764 (length - (buf - start)) / 2)) {
20771 (1ULL << (length - static_cast<size_t>(buf - start))) - 1,
20876 buf += 31; // advance only by 31 code units so that we start with the high surrogate on the next round.
20925 buf += 31; // advance only by 31 code units so that we start with the high surrogate on the next round.
20967 buf += 31; // advance only by 31 code units so that we start with the high surrogate on the next round.
21021 buf += 31; // advance only by 31 code units so that we start with the high surrogate on the next round.
22041 const char* start = buf;
22086 const char16_t* end16 = reinterpret_cast<const char16_t*>(start) + len/2;
22151 const char32_t* end32 = reinterpret_cast<const char32_t*>(start) + len/4;
22153 // Must start checking for surrogates
22198 if (static_cast<size_t>(buf - start) != len) {
22201 std::memcpy(block, buf, len - (buf - start));
22210 if (is_utf16 && scalar::utf16::validate<endianness::LITTLE>(reinterpret_cast<const char16_t*>(buf), (len - (buf - start))/2)) {
22217 if (_mm256_testz_si256(is_zero, is_zero) == 1 && scalar::utf32::validate(reinterpret_cast<const char32_t*>(buf), (len - (buf - start))/4)) {
22351 const char16_t* start = input;
22418 return result(error_code::SURROGATE, input - start);
22423 return result(error_code::SUCCESS, input - start);
22461 const char32_t* start = input;
22477 return result(error_code::TOO_LARGE, input - start);
22482 return result(error_code::SURROGATE, input - start);
22487 return result(error_code::SUCCESS, input - start);
22982 const char16_t *start = buf;
23016 result{error_code::TOO_LARGE, (size_t)(buf - start + k)},
23023 return std::make_pair(result{error_code::SUCCESS, (size_t)(buf - start)},
23325 const char16_t* start = buf;
23545 if((diff | diff2) > 0x3FF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k - 1), utf8_output); }
23556 return std::make_pair(result(error_code::SUCCESS, buf - start), utf8_output);
23683 const char16_t* start = buf;
23731 if((diff | diff2) > 0x3FF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k - 1), utf32_output); }
23739 return std::make_pair(result(error_code::SUCCESS, buf - start), utf32_output);
23797 const char32_t *start = buf;
23812 return std::make_pair(result(error_code::TOO_LARGE, buf - start + k),
23834 return std::make_pair(result(error_code::SUCCESS, buf - start), latin1_output);
24080 const char32_t* start = buf;
24098 return std::make_pair(result(error_code::TOO_LARGE, buf - start), utf8_output);
24178 return std::make_pair(result(error_code::SURROGATE, buf - start), utf8_output);
24300 if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), utf8_output); }
24305 if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), utf8_output); }
24316 return std::make_pair(result(error_code::SUCCESS, buf - start), utf8_output);
24388 const char32_t* start = buf;
24408 return std::make_pair(result(error_code::SURROGATE, buf - start), utf16_output);
24427 if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), utf16_output); }
24431 if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), utf16_output); }
24447 return std::make_pair(result(error_code::SUCCESS, buf - start), utf16_output);
24952 char16_t* start{utf16_output};
24965 // start of a new code point.
24969 // The *start* of code points is not so useful, rather, we want the *end* of code points.
25003 return utf16_output - start;
25141 char16_t* start{utf16_output};
25210 return utf16_output - start;
25216 char16_t* start{utf16_output};
25304 return result(error_code::SUCCESS, utf16_output - start);
25331 char32_t* start{utf32_output};
25354 return utf32_output - start;
25493 char32_t* start{utf32_output};
25562 return utf32_output - start;
25567 char32_t* start{utf32_output};
25649 return result(error_code::SUCCESS, utf32_output - start);
25893 char* start{latin1_output};
25962 return latin1_output - start;
25967 char* start{latin1_output};
26055 return result(error_code::SUCCESS, latin1_output - start);
26080 char* start{latin1_output};
26135 return latin1_output - start;
27324 char16_t* start{utf16_output};
27337 // start of a new code point.
27341 // The *start* of code points is not so useful, rather, we want the *end* of code points.
27375 return utf16_output - start;
27513 char16_t* start{utf16_output};
27582 return utf16_output - start;
27588 char16_t* start{utf16_output};
27676 return result(error_code::SUCCESS, utf16_output - start);
27703 char32_t* start{utf32_output};
27726 return utf32_output - start;
27865 char32_t* start{utf32_output};
27934 return utf32_output - start;
27939 char32_t* start{utf32_output};
28021 return result(error_code::SUCCESS, utf32_output - start);
28498 const char* start = buf;
28553 const char16_t* end16 = reinterpret_cast<const char16_t*>(start) + len/2;
28622 const char32_t* end32 = reinterpret_cast<const char32_t*>(start) + len/4;
28624 // Must start checking for surrogates
28675 if (static_cast<size_t>(buf - start) != len) {
28678 std::memcpy(block, buf, len - (buf - start));
28687 if (is_utf16 && scalar::utf16::validate<endianness::LITTLE>(reinterpret_cast<const char16_t*>(buf), (len - (buf - start))/2)) {
28694 if (_mm_testz_si128(is_zero, is_zero) == 1 && scalar::utf32::validate(reinterpret_cast<const char32_t*>(buf), (len - (buf - start))/4)) {
28827 const char16_t* start = input;
28894 return result(error_code::SURROGATE, input - start);
28899 return result(error_code::SUCCESS, input - start);
28937 const char32_t* start = input;
28953 return result(error_code::TOO_LARGE, input - start);
28958 return result(error_code::SURROGATE, input - start);
28963 return result(error_code::SUCCESS, input - start);
29506 const char16_t* start = buf;
29529 return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), latin1_output);
29535 return std::make_pair(result(error_code::SUCCESS, buf - start), latin1_output);
29798 const char16_t* start = buf;
29978 if((diff | diff2) > 0x3FF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k - 1), utf8_output); }
29990 return std::make_pair(result(error_code::SUCCESS, buf - start), utf8_output);
30116 const char16_t* start = buf;
30164 if((diff | diff2) > 0x3FF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k - 1), utf32_output); }
30172 return std::make_pair(result(error_code::SUCCESS, buf - start), utf32_output);
30213 const char32_t *start = buf;
30237 return std::make_pair(result(error_code::TOO_LARGE, buf - start + k),
30252 return std::make_pair(result(error_code::SUCCESS, buf - start),
30284 //remember : having leading byte 0 means a positive number by the two complements system. Unicode is well beneath the range where you'll start getting issues so that's OK.
30519 const char32_t* start = buf;
30539 return std::make_pair(result(error_code::TOO_LARGE, buf - start), utf8_output);
30569 return std::make_pair(result(error_code::TOO_LARGE, buf - start), utf8_output);
30647 return std::make_pair(result(error_code::SURROGATE, buf - start), utf8_output);
30750 if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), utf8_output); }
30755 if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf- start + k), utf8_output); }
30766 return std::make_pair(result(error_code::SUCCESS, buf - start), utf8_output);
30839 const char32_t* start = buf;
30860 return std::make_pair(result(error_code::SURROGATE, buf - start), utf16_output);
30879 if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), utf16_output); }
30883 if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), utf16_output); }
30899 return std::make_pair(result(error_code::SUCCESS, buf - start), utf16_output);
31331 char16_t* start{utf16_output};
31344 // start of a new code point.
31348 // The *start* of code points is not so useful, rather, we want the *end* of code points.
31382 return utf16_output - start;
31520 char16_t* start{utf16_output};
31589 return utf16_output - start;
31595 char16_t* start{utf16_output};
31683 return result(error_code::SUCCESS, utf16_output - start);
31710 char32_t* start{utf32_output};
31733 return utf32_output - start;
31872 char32_t* start{utf32_output};
31941 return utf32_output - start;
31946 char32_t* start{utf32_output};
32028 return result(error_code::SUCCESS, utf32_output - start);
32270 char* start{latin1_output};
32339 return latin1_output - start;
32344 char* start{latin1_output};
32432 return result(error_code::SUCCESS, latin1_output - start);
32457 char* start{latin1_output};
32512 return latin1_output - start;