Lines Matching defs:first

26 // The best choice should always come first!
273 simdutf_really_inline T first() const { return vgetq_lane_u8(*this,0); }
1690 __m256i first = _mm256_cvtepu8_epi16(_mm256_castsi256_si128(*this));
1695 first = _mm256_shuffle_epi8(first, swap);
1698 _mm256_storeu_si256(reinterpret_cast<__m256i *>(ptr), first);
1728 simdutf_really_inline T first() const { return _mm256_extract_epi8(*this,0); }
2596 __m128i first = _mm_cvtepu8_epi16(*this);
2600 first = _mm_shuffle_epi8(first, swap);
2603 _mm_storeu_si128(reinterpret_cast<__m128i *>(p), first);
2631 simdutf_really_inline T first() const { return _mm_extract_epi8(*this,0); }
4473 // An interesting twist might be to check for UTF-16 ASCII first (every
4532 * @private Detects best supported implementation on first use, and sets it
12150 } else if ((leading_byte & 0b11100000) == 0b11000000) { // the first three bits indicate:
12157 uint32_t code_point = (leading_byte & 0b00011111) << 6 | (data[pos + 1] & 0b00111111); // assembles the Unicode code point from the two bytes. It does this by discarding the leading 110 and 10 bits from the two bytes, shifting the remaining bits of the first byte, and then combining the results with a bitwise OR operation.
12198 } else if ((leading_byte & 0b11100000) == 0b11000000) { // the first three bits indicate:
12205 uint32_t code_point = (leading_byte & 0b00011111) << 6 | (data[pos + 1] & 0b00111111); // assembles the Unicode code point from the two bytes. It does this by discarding the leading 110 and 10 bits from the two bytes, shifting the remaining bits of the first byte, and then combining the results with a bitwise OR operation.
12457 } else if ((leading_byte & 0b11100000) == 0b11000000) { // the first three bits indicate:
12462 uint32_t code_point = (leading_byte & 0b00011111) << 6 | (data[pos + 1] & 0b00111111); // assembles the Unicode code point from the two bytes. It does this by discarding the leading 110 and 10 bits from the two bytes, shifting the remaining bits of the first byte, and then combining the results with a bitwise OR operation.
13085 Returns a pair: the first unprocessed byte from buf and utf8_output
13094 // We always write 16 bytes, of which more than the first 8 bytes
13221 // We first try a few fast paths.
13222 // The obvious first test is ASCII, which actually consumes the full 16.
13387 // Because the surrogates need more work, the high surrogate is computed first.
13481 // We first try a few fast paths.
13656 // We first try a few fast paths.
13657 // The obvious first test is ASCII, which actually consumes the full 16.
13697 // writing 8 bytes even though we only care about the first 6 bytes.
13792 The first register contains lower two UTF8 bytes (used in all
13809 Returns a pair: the first unprocessed byte from buf and utf8_output
14061 Otherwise, it is the position of the first unprocessed byte in buf (even if finished).
14344 The first register contains lower two UTF8 bytes (used in all
14361 Returns a pair: the first unprocessed byte from buf and utf8_output
14418 Otherwise, it is the position of the first unprocessed byte in buf (even if finished).
15356 // too large in the first of two bytes.
16832 if (ret.first != buf + len) {
16834 ret.first, len - (ret.first - buf), ret.second);
16843 if (ret.first != buf + len) {
16845 ret.first, len - (ret.first - buf), ret.second);
16854 if (ret.first != buf + len) {
16856 ret.first, len - (ret.first - buf), ret.second);
16865 if (ret.first != buf + len) {
16867 ret.first, len - (ret.first - buf), ret.second);
16934 if (ret.first == nullptr) { return 0; }
16937 if (ret.first != buf + len) {
16939 ret.first, len - (ret.first - buf), ret.second);
16948 if (ret.first == nullptr) { return 0; }
16951 if (ret.first != buf + len) {
16953 ret.first, len - (ret.first - buf), ret.second);
16962 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
16963 if (ret.first.count != len) { // All good so far, but not finished
16965 buf + ret.first.count, len - ret.first.count, ret.second);
16967 scalar_res.count += ret.first.count;
16973 ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written
16974 return ret.first;
16979 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
16980 if (ret.first.count != len) { // All good so far, but not finished
16982 buf + ret.first.count, len - ret.first.count, ret.second);
16984 scalar_res.count += ret.first.count;
16990 ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written
16991 return ret.first;
17006 if (ret.first == nullptr) { return 0; }
17008 if (ret.first != buf + len) {
17010 ret.first, len - (ret.first - buf), ret.second);
17019 if (ret.first == nullptr) { return 0; }
17021 if (ret.first != buf + len) {
17023 ret.first, len - (ret.first - buf), ret.second);
17031 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
17033 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
17034 if (ret.first.count != len) { // All good so far, but not finished
17036 buf + ret.first.count, len - ret.first.count, ret.second);
17038 scalar_res.count += ret.first.count;
17044 ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written
17045 return ret.first;
17049 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
17051 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
17052 if (ret.first.count != len) { // All good so far, but not finished
17054 buf + ret.first.count, len - ret.first.count, ret.second);
17056 scalar_res.count += ret.first.count;
17062 ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written
17063 return ret.first;
17076 if (ret.first == nullptr) { return 0; }
17078 if (ret.first != buf + len) {
17080 ret.first, len - (ret.first - buf), ret.second);
17088 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
17090 if (ret.first.count != len) {
17092 buf + ret.first.count, len - ret.first.count, ret.second);
17094 scalar_res.count += ret.first.count;
17100 ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written
17101 return ret.first;
17106 if (ret.first == nullptr) { return 0; }
17108 if (ret.first != buf + len) {
17110 ret.first, len - (ret.first - buf), ret.second);
17119 if (ret.first == nullptr) { return 0; }
17121 if (ret.first != buf + len) {
17123 ret.first, len - (ret.first - buf), ret.second);
17131 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
17133 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
17134 if (ret.first.count != len) { // All good so far, but not finished
17136 buf + ret.first.count, len - ret.first.count, ret.second);
17138 scalar_res.count += ret.first.count;
17144 ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit code units written
17145 return ret.first;
17149 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
17151 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
17152 if (ret.first.count != len) { // All good so far, but not finished
17154 buf + ret.first.count, len - ret.first.count, ret.second);
17156 scalar_res.count += ret.first.count;
17162 ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit code units written
17163 return ret.first;
17168 if (ret.first == nullptr) { return 0; }
17171 if (ret.first != buf + len) {
17173 ret.first, len - (ret.first - buf), ret.second);
17182 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
17183 if (ret.first.count != len) { // All good so far, but not finished
17185 buf + ret.first.count, len - ret.first.count, ret.second);
17187 scalar_res.count += ret.first.count;
17193 ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written
17194 return ret.first;
17199 if (ret.first == nullptr) { return 0; }
17202 if (ret.first != buf + len) {
17204 ret.first, len - (ret.first - buf), ret.second);
17217 if (ret.first == nullptr) { return 0; }
17219 if (ret.first != buf + len) {
17221 ret.first, len - (ret.first - buf), ret.second);
17230 if (ret.first == nullptr) { return 0; }
17232 if (ret.first != buf + len) {
17234 ret.first, len - (ret.first - buf), ret.second);
17242 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
17244 if (ret.first.count != len) {
17246 buf + ret.first.count, len - ret.first.count, ret.second);
17248 scalar_res.count += ret.first.count;
17254 ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written
17255 return ret.first;
17259 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
17261 if (ret.first.count != len) {
17263 buf + ret.first.count, len - ret.first.count, ret.second);
17265 scalar_res.count += ret.first.count;
17271 ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written
17272 return ret.first;
18054 __mmask64 leading = tail == (tail == SIMDUTF_FULL) ? _kor_mask64(m1, m234) : _kand_mask64(_kor_mask64(m1, m234), b); // first bytes of each sequence
18606 - pair.first - the first unprocessed input byte
18607 - pair.second - the first unprocessed output word
18828 // too large in the first of two bytes.
19634 Returns a pair: the first unprocessed byte from buf and utf32_output
19679 const __m512i first = _mm512_cvtepu16_epi32(_mm512_castsi512_si256(in));
19686 const __m512i shifted_first = _mm512_alignr_epi32(second, first, 1);
19689 /* 3. Align all high surrogates in first and second by shifting to the left by 10 bits
19692 const __m512i aligned_first = _mm512_mask_slli_epi32(first, (__mmask16)H, first, 10);
20512 We adjust for the bytes that have their two most significant bits. This takes care of the first 32 bytes, assuming we interleaved the bytes. */
20520 // in the second 32-bit half, set first or second option based on whether original input is leading byte (second case) or not (first case)
20575 // in the last 128 bytes, the first 64 may require masking the output
21110 if (ret.first == nullptr) { return 0; }
21112 if (ret.first != buf + len) {
21114 ret.first, len - (ret.first - buf), ret.second);
21181 if (ret.first == end) {
21189 // the beginning ret.first, as they were already consumed.
21190 while (ret.first != end && ((uint8_t(*ret.first) & 0xc0) == 0x80)) {
21191 ret.first += 1;
21194 if (ret.first != end) {
21196 ret.first, len - (ret.first - buf), ret.second);
21208 if (ret.first == end) {
21216 // the beginning ret.first, as they were already consumed.
21217 while (ret.first != end && ((uint8_t(*ret.first) & 0xc0) == 0x80)) {
21218 ret.first += 1;
21221 if (ret.first != end) {
21223 ret.first, len - (ret.first - buf), ret.second);
21240 if (ret.first == end) {
21248 // the beginning ret.first, as they were already consumed.
21249 while (ret.first != end and ((uint8_t(*ret.first) & 0xc0) == 0x80)) {
21250 ret.first += 1;
21253 if (ret.first != end) {
21255 ret.first, len - (ret.first - buf), utf32_out + saved_bytes);
21284 // the beginning ret.first, as they were already consumed.
21309 if (ret.first == end) {
21317 // the beginning ret.first, as they were already consumed.
21318 while (ret.first != end && ((uint8_t(*ret.first) & 0xc0) == 0x80)) {
21319 ret.first += 1;
21322 if (ret.first != end) {
21324 ret.first, len - (ret.first - buf), utf32_out + saved_bytes);
21342 return icelake_convert_utf16_to_latin1_with_errors<endianness::LITTLE>(buf,len,latin1_output).first;
21346 return icelake_convert_utf16_to_latin1_with_errors<endianness::BIG>(buf,len,latin1_output).first;
21408 return icelake_convert_utf32_to_latin1_with_errors(buf,len,latin1_output).first;
21418 if (ret.first == nullptr) { return 0; }
21420 if (ret.first != buf + len) {
21422 ret.first, len - (ret.first - buf), ret.second);
21430 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
21432 if (ret.first.count != len) {
21434 buf + ret.first.count, len - ret.first.count, ret.second);
21436 scalar_res.count += ret.first.count;
21442 ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written
21443 return ret.first;
21452 if (ret.first == nullptr) { return 0; }
21454 if (ret.first != buf + len) {
21456 ret.first, len - (ret.first - buf), ret.second);
21465 if (ret.first == nullptr) { return 0; }
21467 if (ret.first != buf + len) {
21469 ret.first, len - (ret.first - buf), ret.second);
21477 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
21479 if (ret.first.count != len) {
21481 buf + ret.first.count, len - ret.first.count, ret.second);
21483 scalar_res.count += ret.first.count;
21489 ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written
21490 return ret.first;
21494 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
21496 if (ret.first.count != len) {
21498 buf + ret.first.count, len - ret.first.count, ret.second);
21500 scalar_res.count += ret.first.count;
21506 ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written
21507 return ret.first;
22512 // We proceed only with the first 16 bytes.
22651 // We first try a few fast paths.
22832 // We first try a few fast paths.
23060 The first register contains lower two UTF8 bytes (used in all
23079 Returns a pair: the first unprocessed byte from buf and utf8_output
23320 Otherwise, it is the position of the first unprocessed byte in buf (even if finished).
23592 The first register contains lower two UTF8 bytes (used in all
23611 Returns a pair: the first unprocessed byte from buf and utf32_output
23678 Otherwise, it is the position of the first unprocessed byte in buf (even if finished).
24516 // writing 8 bytes even though we only care about the first 6 bytes.
24767 // too large in the first of two bytes.
26240 if (ret.first != buf + len) {
26242 ret.first, len - (ret.first - buf), ret.second);
26251 if (ret.first == nullptr) { return 0; }
26253 if (ret.first != buf + len) {
26255 ret.first, len - (ret.first - buf), ret.second);
26264 if (ret.first == nullptr) { return 0; }
26266 if (ret.first != buf + len) {
26268 ret.first, len - (ret.first - buf), ret.second);
26277 if (ret.first == nullptr) { return 0; }
26279 if (ret.first != buf + len) {
26281 ret.first, len - (ret.first - buf), ret.second);
26351 if (ret.first == nullptr) { return 0; }
26353 if (ret.first != buf + len) {
26355 ret.first, len - (ret.first - buf), ret.second);
26364 if (ret.first == nullptr) { return 0; }
26366 if (ret.first != buf + len) {
26368 ret.first, len - (ret.first - buf), ret.second);
26377 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
26378 if (ret.first.count != len) { // All good so far, but not finished
26380 buf + ret.first.count, len - ret.first.count, ret.second);
26382 scalar_res.count += ret.first.count;
26388 ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written
26389 return ret.first;
26394 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
26395 if (ret.first.count != len) { // All good so far, but not finished
26397 buf + ret.first.count, len - ret.first.count, ret.second);
26399 scalar_res.count += ret.first.count;
26405 ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written
26406 return ret.first;
26421 if (ret.first == nullptr) { return 0; }
26423 if (ret.first != buf + len) {
26425 ret.first, len - (ret.first - buf), ret.second);
26434 if (ret.first == nullptr) { return 0; }
26436 if (ret.first != buf + len) {
26438 ret.first, len - (ret.first - buf), ret.second);
26446 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
26448 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
26449 if (ret.first.count != len) { // All good so far, but not finished
26451 buf + ret.first.count, len - ret.first.count, ret.second);
26453 scalar_res.count += ret.first.count;
26459 ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written
26460 return ret.first;
26464 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
26466 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
26467 if (ret.first.count != len) { // All good so far, but not finished
26469 buf + ret.first.count, len - ret.first.count, ret.second);
26471 scalar_res.count += ret.first.count;
26477 ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written
26478 return ret.first;
26491 if (ret.first == nullptr) { return 0; }
26493 if (ret.first != buf + len) {
26495 ret.first, len - (ret.first - buf), ret.second);
26504 if (ret.first == nullptr) { return 0; }
26506 if (ret.first != buf + len) {
26508 ret.first, len - (ret.first - buf), ret.second);
26516 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
26518 if (ret.first.count != len) {
26520 buf + ret.first.count, len - ret.first.count, ret.second);
26522 scalar_res.count += ret.first.count;
26528 ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written
26529 return ret.first;
26537 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
26539 if (ret.first.count != len) {
26541 buf + ret.first.count, len - ret.first.count, ret.second);
26543 scalar_res.count += ret.first.count;
26549 ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written
26550 return ret.first;
26555 if (ret.first == nullptr) { return 0; }
26557 if (ret.first != buf + len) {
26559 ret.first, len - (ret.first - buf), ret.second);
26568 if (ret.first == nullptr) { return 0; }
26570 if (ret.first != buf + len) {
26572 ret.first, len - (ret.first - buf), ret.second);
26580 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
26582 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
26583 if (ret.first.count != len) { // All good so far, but not finished
26585 buf + ret.first.count, len - ret.first.count, ret.second);
26587 scalar_res.count += ret.first.count;
26593 ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit code units written
26594 return ret.first;
26598 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
26600 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
26601 if (ret.first.count != len) { // All good so far, but not finished
26603 buf + ret.first.count, len - ret.first.count, ret.second);
26605 scalar_res.count += ret.first.count;
26611 ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit code units written
26612 return ret.first;
26621 if (ret.first == nullptr) { return 0; }
26623 if (ret.first != buf + len) {
26625 ret.first, len - (ret.first - buf), ret.second);
26634 if (ret.first == nullptr) { return 0; }
26636 if (ret.first != buf + len) {
26638 ret.first, len - (ret.first - buf), ret.second);
26646 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
26648 if (ret.first.count != len) {
26650 buf + ret.first.count, len - ret.first.count, ret.second);
26652 scalar_res.count += ret.first.count;
26658 ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written
26659 return ret.first;
26663 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
26665 if (ret.first.count != len) {
26667 buf + ret.first.count, len - ret.first.count, ret.second);
26669 scalar_res.count += ret.first.count;
26675 ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written
26676 return ret.first;
27139 // too large in the first of two bytes.
28424 * first 11 bits are encoded into utf8
29126 // We first try a few fast paths.
29309 // We first try a few fast paths.
29468 // writing 8 bytes even though we only care about the first 6 bytes.
29571 The first register contains lower two UTF8 bytes (used in all
29589 Returns a pair: the first unprocessed byte from buf and utf8_output
29793 Otherwise, it is the position of the first unprocessed byte in buf (even if finished).
30026 The first register contains lower two UTF8 bytes (used in all
30044 Returns a pair: the first unprocessed byte from buf and utf8_output
30111 Otherwise, it is the position of the first unprocessed byte in buf (even if finished).
30295 if(_mm_testz_si128(in_16, v_ff80)) { //if the first two blocks are ASCII
30308 utf8_output += 8; //same with output, e.g. lift the first two blocks alone.
30328 _mm_and_si128(in_16, v_ff80), // the vector that get only the first 9 bits of each 16-bit/2-byte units
30349 const __m128i t1 = _mm_and_si128(t0, v_1f00); // potentital first utf8 byte
30353 const __m128i t3 = _mm_or_si128(t1, t2); // first and second potential utf8 byte together
31146 // too large in the first of two bytes.
32623 if (ret.first != buf + len) {
32625 ret.first, len - (ret.first - buf), ret.second);
32634 if (ret.first == nullptr) { return 0; }
32636 if (ret.first != buf + len) {
32638 ret.first, len - (ret.first - buf), ret.second);
32647 if (ret.first == nullptr) { return 0; }
32649 if (ret.first != buf + len) {
32651 ret.first, len - (ret.first - buf), ret.second);
32660 if (ret.first == nullptr) { return 0; }
32662 if (ret.first != buf + len) {
32664 ret.first, len - (ret.first - buf), ret.second);
32734 if (ret.first == nullptr) { return 0; }
32737 if (ret.first != buf + len) {
32739 ret.first, len - (ret.first - buf), ret.second);
32748 if (ret.first == nullptr) { return 0; }
32751 if (ret.first != buf + len) {
32753 ret.first, len - (ret.first - buf), ret.second);
32762 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
32763 if (ret.first.count != len) { // All good so far, but not finished
32765 buf + ret.first.count, len - ret.first.count, ret.second);
32767 scalar_res.count += ret.first.count;
32773 ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written
32774 return ret.first;
32779 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
32780 if (ret.first.count != len) { // All good so far, but not finished
32782 buf + ret.first.count, len - ret.first.count, ret.second);
32784 scalar_res.count += ret.first.count;
32790 ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written
32791 return ret.first;
32807 if (ret.first == nullptr) { return 0; }
32809 if (ret.first != buf + len) {
32811 ret.first, len - (ret.first - buf), ret.second);
32820 if (ret.first == nullptr) { return 0; }
32822 if (ret.first != buf + len) {
32824 ret.first, len - (ret.first - buf), ret.second);
32832 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
32834 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
32835 if (ret.first.count != len) { // All good so far, but not finished
32837 buf + ret.first.count, len - ret.first.count, ret.second);
32839 scalar_res.count += ret.first.count;
32845 ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written
32846 return ret.first;
32850 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
32852 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
32853 if (ret.first.count != len) { // All good so far, but not finished
32855 buf + ret.first.count, len - ret.first.count, ret.second);
32857 scalar_res.count += ret.first.count;
32863 ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written
32864 return ret.first;
32877 if (ret.first == nullptr) { return 0; }
32879 // if (ret.first != buf + len) {
32880 if (ret.first < buf + len) {
32882 ret.first, len - (ret.first - buf), ret.second);
32891 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
32893 if (ret.first.count != len) {
32895 buf + ret.first.count, len - ret.first.count, ret.second);
32897 scalar_res.count += ret.first.count;
32903 ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written
32904 return ret.first;
32914 if (ret.first == nullptr) { return 0; }
32916 if (ret.first != buf + len) {
32918 ret.first, len - (ret.first - buf), ret.second);
32926 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
32928 if (ret.first.count != len) {
32930 buf + ret.first.count, len - ret.first.count, ret.second);
32932 scalar_res.count += ret.first.count;
32938 ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written
32939 return ret.first;
32944 if (ret.first == nullptr) { return 0; }
32946 if (ret.first != buf + len) {
32948 ret.first, len - (ret.first - buf), ret.second);
32957 if (ret.first == nullptr) { return 0; }
32959 if (ret.first != buf + len) {
32961 ret.first, len - (ret.first - buf), ret.second);
32969 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
32971 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
32972 if (ret.first.count != len) { // All good so far, but not finished
32974 buf + ret.first.count, len - ret.first.count, ret.second);
32976 scalar_res.count += ret.first.count;
32982 ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit code units written
32983 return ret.first;
32987 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
32989 if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count
32990 if (ret.first.count != len) { // All good so far, but not finished
32992 buf + ret.first.count, len - ret.first.count, ret.second);
32994 scalar_res.count += ret.first.count;
33000 ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit code units written
33001 return ret.first;
33010 if (ret.first == nullptr) { return 0; }
33012 if (ret.first != buf + len) {
33014 ret.first, len - (ret.first - buf), ret.second);
33023 if (ret.first == nullptr) { return 0; }
33025 if (ret.first != buf + len) {
33027 ret.first, len - (ret.first - buf), ret.second);
33035 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
33037 if (ret.first.count != len) {
33039 buf + ret.first.count, len - ret.first.count, ret.second);
33041 scalar_res.count += ret.first.count;
33047 ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written
33048 return ret.first;
33052 // ret.first.count is always the position in the buffer, not the number of code units written even if finished
33054 if (ret.first.count != len) {
33056 buf + ret.first.count, len - ret.first.count, ret.second);
33058 scalar_res.count += ret.first.count;
33064 ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written
33065 return ret.first;