Lines Matching defs:size
483 // The bandwidth of [ST4 with element size less than 64b] is limited by decode
2079 /// the size of vector in bytes
4429 simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* out) {
4432 for (size_t i = 0; i < size; i++) {
5182 size_t available_implementation_list::size() const noexcept {
5183 return internal::get_available_implementation_pointers().size();
12882 const char16_t* arm_validate_utf16(const char16_t* input, size_t size) {
12883 const char16_t* end = input + size;
12950 const result arm_validate_utf16_with_errors(const char16_t* input, size_t size) {
12952 const char16_t* end = input + size;
13021 const char32_t* arm_validate_utf32le(const char32_t* input, size_t size) {
13022 const char32_t* end = input + size;
13051 const result arm_validate_utf32le_with_errors(const char32_t* input, size_t size) {
13053 const char32_t* end = input + size;
13210 // Why 12 input bytes and not 16? Because we are concerned with the size of
13469 // Why 12 input bytes and not 16? Because we are concerned with the size of
13645 // Why 12 input bytes and not 16? Because we are concerned with the size of
15537 simdutf_warn_unused size_t convert_valid(const char* input, size_t size,
15543 while(pos + 64 + safety_margin <= size) {
15591 utf16_output += scalar::utf8_to_utf16::convert_valid<endian>(input + pos, size - pos, utf16_output);
15728 simdutf_really_inline size_t convert(const char* in, size_t size, char16_t* utf16_output) {
15738 size_t margin = size;
15743 const size_t safety_margin = size - margin + 1; // to avoid overruns!
15744 while(pos + 64 + safety_margin <= size) {
15794 if(pos < size) {
15795 size_t howmany = scalar::utf8_to_utf16::convert<endian>(in + pos, size - pos, utf16_output);
15803 simdutf_really_inline result convert_with_errors(const char* in, size_t size, char16_t* utf16_output) {
15813 size_t margin = size;
15818 const size_t safety_margin = size - margin + 1; // to avoid overruns!
15819 while(pos + 64 + safety_margin <= size) {
15841 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
15842 result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors<endian>(pos, in + pos, size - pos, utf16_output);
15877 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
15878 result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors<endian>(pos, in + pos, size - pos, utf16_output);
15882 if(pos < size) {
15884 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
15885 result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors<endian>(pos, in + pos, size - pos, utf16_output);
15917 simdutf_warn_unused size_t convert_valid(const char* input, size_t size,
15922 while(pos + 64 + safety_margin <= size) {
15942 utf32_output += scalar::utf8_to_utf32::convert_valid(input + pos, size - pos, utf32_output);
16080 simdutf_really_inline size_t convert(const char* in, size_t size, char32_t* utf32_output) {
16090 size_t margin = size;
16095 const size_t safety_margin = size - margin + 1; // to avoid overruns!
16096 while(pos + 64 + safety_margin <= size) {
16146 if(pos < size) {
16147 size_t howmany = scalar::utf8_to_utf32::convert(in + pos, size - pos, utf32_output);
16154 simdutf_really_inline result convert_with_errors(const char* in, size_t size, char32_t* utf32_output) {
16164 size_t margin = size;
16169 const size_t safety_margin = size - margin + 1; // to avoid overruns!
16170 while(pos + 64 + safety_margin <= size) {
16191 result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output);
16225 result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output);
16229 if(pos < size) {
16230 result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output);
16261 simdutf_really_inline size_t count_code_points(const char* in, size_t size) {
16264 for(;pos + 64 <= size; pos += 64) {
16269 return count + scalar::utf8::count_code_points(in + pos, size - pos);
16272 simdutf_really_inline size_t utf16_length_from_utf8(const char* in, size_t size) {
16276 for(;pos + 64 <= size; pos += 64) {
16285 return count + scalar::utf8::utf16_length_from_utf8(in + pos, size - pos);
16299 simdutf_really_inline size_t count_code_points(const char16_t* in, size_t size) {
16302 for(;pos < size/32*32; pos += 32) {
16308 return count + scalar::utf16::count_code_points<big_endian>(in + pos, size - pos);
16312 simdutf_really_inline size_t utf8_length_from_utf16(const char16_t* in, size_t size) {
16316 for(;pos < size/32*32; pos += 32) {
16329 return count + scalar::utf16::utf8_length_from_utf16<big_endian>(in + pos, size - pos);
16333 simdutf_really_inline size_t utf32_length_from_utf16(const char16_t* in, size_t size) {
16334 return count_code_points<big_endian>(in, size);
16337 simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* output) {
16340 while (pos < size/32*32) {
16348 scalar::utf16::change_endianness_utf16(in + pos, size - pos, output);
16478 simdutf_really_inline size_t convert(const char* in, size_t size, char* latin1_output) {
16488 size_t margin = size;
16493 const size_t safety_margin = size - margin + 1; // to avoid overruns!
16494 while(pos + 64 + safety_margin <= size) {
16544 if(pos < size) {
16545 size_t howmany = scalar::utf8_to_latin1::convert(in + pos, size - pos, latin1_output);
16552 simdutf_really_inline result convert_with_errors(const char* in, size_t size, char* latin1_output) {
16562 size_t margin = size;
16567 const size_t safety_margin = size - margin + 1; // to avoid overruns!
16568 while(pos + 64 + safety_margin <= size) {
16590 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
16591 result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output);
16626 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
16627 result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output);
16631 if(pos < size) {
16633 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
16634 result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output);
16665 simdutf_really_inline size_t convert_valid(const char* in, size_t size, char* latin1_output) {
16675 size_t margin = size;
16680 const size_t safety_margin = size - margin + 1; // to avoid overruns!
16681 while(pos + 64 + safety_margin <= size) {
16718 if(pos < size) {
16719 size_t howmany = scalar::utf8_to_latin1::convert_valid(in + pos, size - pos, latin1_output);
16907 simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16le(const char* input, size_t size,
16909 return utf8_to_utf16::convert_valid<endianness::LITTLE>(input, size, utf16_output);
16912 simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16be(const char* input, size_t size,
16914 return utf8_to_utf16::convert_valid<endianness::BIG>(input, size, utf16_output);
16927 simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf32(const char* input, size_t size,
16929 return utf8_to_utf32::convert_valid(input, size, utf32_output);
17320 // See https://lemire.me/blog/2023/05/15/computing-the-utf-8-size-of-a-latin-1-string-quickly-arm-neon-edition/
17562 simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf32(const char* input, size_t size,
17564 return scalar::utf8_to_utf32::convert_valid(input, size, utf32_output);
20508 // double size of each byte, and insert the leading byte 1100 0010
22273 const char16_t* avx2_validate_utf16(const char16_t* input, size_t size) {
22274 const char16_t* end = input + size;
22350 const result avx2_validate_utf16_with_errors(const char16_t* input, size_t size) {
22352 const char16_t* end = input + size;
22431 const char32_t* avx2_validate_utf32le(const char32_t* input, size_t size) {
22432 const char32_t* end = input + size;
22460 const result avx2_validate_utf32le_with_errors(const char32_t* input, size_t size) {
22462 const char32_t* end = input + size;
22643 // Why 12 input bytes and not 16? Because we are concerned with the size of
22824 // Why 12 input bytes and not 16? Because we are concerned with the size of
24462 // Why 12 input bytes and not 16? Because we are concerned with the size of
24948 simdutf_warn_unused size_t convert_valid(const char* input, size_t size,
24954 while(pos + 64 + safety_margin <= size) {
25002 utf16_output += scalar::utf8_to_utf16::convert_valid<endian>(input + pos, size - pos, utf16_output);
25139 simdutf_really_inline size_t convert(const char* in, size_t size, char16_t* utf16_output) {
25149 size_t margin = size;
25154 const size_t safety_margin = size - margin + 1; // to avoid overruns!
25155 while(pos + 64 + safety_margin <= size) {
25205 if(pos < size) {
25206 size_t howmany = scalar::utf8_to_utf16::convert<endian>(in + pos, size - pos, utf16_output);
25214 simdutf_really_inline result convert_with_errors(const char* in, size_t size, char16_t* utf16_output) {
25224 size_t margin = size;
25229 const size_t safety_margin = size - margin + 1; // to avoid overruns!
25230 while(pos + 64 + safety_margin <= size) {
25252 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
25253 result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors<endian>(pos, in + pos, size - pos, utf16_output);
25288 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
25289 result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors<endian>(pos, in + pos, size - pos, utf16_output);
25293 if(pos < size) {
25295 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
25296 result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors<endian>(pos, in + pos, size - pos, utf16_output);
25328 simdutf_warn_unused size_t convert_valid(const char* input, size_t size,
25333 while(pos + 64 + safety_margin <= size) {
25353 utf32_output += scalar::utf8_to_utf32::convert_valid(input + pos, size - pos, utf32_output);
25491 simdutf_really_inline size_t convert(const char* in, size_t size, char32_t* utf32_output) {
25501 size_t margin = size;
25506 const size_t safety_margin = size - margin + 1; // to avoid overruns!
25507 while(pos + 64 + safety_margin <= size) {
25557 if(pos < size) {
25558 size_t howmany = scalar::utf8_to_utf32::convert(in + pos, size - pos, utf32_output);
25565 simdutf_really_inline result convert_with_errors(const char* in, size_t size, char32_t* utf32_output) {
25575 size_t margin = size;
25580 const size_t safety_margin = size - margin + 1; // to avoid overruns!
25581 while(pos + 64 + safety_margin <= size) {
25602 result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output);
25636 result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output);
25640 if(pos < size) {
25641 result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output);
25672 simdutf_really_inline size_t count_code_points(const char* in, size_t size) {
25675 for(;pos + 64 <= size; pos += 64) {
25680 return count + scalar::utf8::count_code_points(in + pos, size - pos);
25683 simdutf_really_inline size_t utf16_length_from_utf8(const char* in, size_t size) {
25687 for(;pos + 64 <= size; pos += 64) {
25696 return count + scalar::utf8::utf16_length_from_utf8(in + pos, size - pos);
25710 simdutf_really_inline size_t count_code_points(const char16_t* in, size_t size) {
25713 for(;pos < size/32*32; pos += 32) {
25719 return count + scalar::utf16::count_code_points<big_endian>(in + pos, size - pos);
25723 simdutf_really_inline size_t utf8_length_from_utf16(const char16_t* in, size_t size) {
25727 for(;pos < size/32*32; pos += 32) {
25740 return count + scalar::utf16::utf8_length_from_utf16<big_endian>(in + pos, size - pos);
25744 simdutf_really_inline size_t utf32_length_from_utf16(const char16_t* in, size_t size) {
25745 return count_code_points<big_endian>(in, size);
25748 simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* output) {
25751 while (pos < size/32*32) {
25759 scalar::utf16::change_endianness_utf16(in + pos, size - pos, output);
25891 simdutf_really_inline size_t convert(const char* in, size_t size, char* latin1_output) {
25901 size_t margin = size;
25906 const size_t safety_margin = size - margin + 1; // to avoid overruns!
25907 while(pos + 64 + safety_margin <= size) {
25957 if(pos < size) {
25958 size_t howmany = scalar::utf8_to_latin1::convert(in + pos, size - pos, latin1_output);
25965 simdutf_really_inline result convert_with_errors(const char* in, size_t size, char* latin1_output) {
25975 size_t margin = size;
25980 const size_t safety_margin = size - margin + 1; // to avoid overruns!
25981 while(pos + 64 + safety_margin <= size) {
26003 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
26004 result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output);
26039 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
26040 result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output);
26044 if(pos < size) {
26046 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
26047 result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output);
26078 simdutf_really_inline size_t convert_valid(const char* in, size_t size, char* latin1_output) {
26088 size_t margin = size;
26093 const size_t safety_margin = size - margin + 1; // to avoid overruns!
26094 while(pos + 64 + safety_margin <= size) {
26131 if(pos < size) {
26132 size_t howmany = scalar::utf8_to_latin1::convert_valid(in + pos, size - pos, latin1_output);
26298 simdutf_warn_unused size_t implementation::convert_valid_utf8_to_latin1(const char* input, size_t size,
26300 return utf8_to_latin1::convert_valid(input, size, latin1_output);
26323 simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16le(const char* input, size_t size,
26325 return utf8_to_utf16::convert_valid<endianness::LITTLE>(input, size, utf16_output);
26328 simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16be(const char* input, size_t size,
26330 return utf8_to_utf16::convert_valid<endianness::BIG>(input, size, utf16_output);
26343 simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf32(const char* input, size_t size,
26345 return utf8_to_utf32::convert_valid(input, size, utf32_output);
27320 simdutf_warn_unused size_t convert_valid(const char* input, size_t size,
27326 while(pos + 64 + safety_margin <= size) {
27374 utf16_output += scalar::utf8_to_utf16::convert_valid<endian>(input + pos, size - pos, utf16_output);
27511 simdutf_really_inline size_t convert(const char* in, size_t size, char16_t* utf16_output) {
27521 size_t margin = size;
27526 const size_t safety_margin = size - margin + 1; // to avoid overruns!
27527 while(pos + 64 + safety_margin <= size) {
27577 if(pos < size) {
27578 size_t howmany = scalar::utf8_to_utf16::convert<endian>(in + pos, size - pos, utf16_output);
27586 simdutf_really_inline result convert_with_errors(const char* in, size_t size, char16_t* utf16_output) {
27596 size_t margin = size;
27601 const size_t safety_margin = size - margin + 1; // to avoid overruns!
27602 while(pos + 64 + safety_margin <= size) {
27624 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
27625 result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors<endian>(pos, in + pos, size - pos, utf16_output);
27660 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
27661 result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors<endian>(pos, in + pos, size - pos, utf16_output);
27665 if(pos < size) {
27667 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
27668 result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors<endian>(pos, in + pos, size - pos, utf16_output);
27700 simdutf_warn_unused size_t convert_valid(const char* input, size_t size,
27705 while(pos + 64 + safety_margin <= size) {
27725 utf32_output += scalar::utf8_to_utf32::convert_valid(input + pos, size - pos, utf32_output);
27863 simdutf_really_inline size_t convert(const char* in, size_t size, char32_t* utf32_output) {
27873 size_t margin = size;
27878 const size_t safety_margin = size - margin + 1; // to avoid overruns!
27879 while(pos + 64 + safety_margin <= size) {
27929 if(pos < size) {
27930 size_t howmany = scalar::utf8_to_utf32::convert(in + pos, size - pos, utf32_output);
27937 simdutf_really_inline result convert_with_errors(const char* in, size_t size, char32_t* utf32_output) {
27947 size_t margin = size;
27952 const size_t safety_margin = size - margin + 1; // to avoid overruns!
27953 while(pos + 64 + safety_margin <= size) {
27974 result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output);
28008 result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output);
28012 if(pos < size) {
28013 result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output);
28044 simdutf_really_inline size_t count_code_points(const char* in, size_t size) {
28047 for(;pos + 64 <= size; pos += 64) {
28052 return count + scalar::utf8::count_code_points(in + pos, size - pos);
28055 simdutf_really_inline size_t utf16_length_from_utf8(const char* in, size_t size) {
28059 for(;pos + 64 <= size; pos += 64) {
28068 return count + scalar::utf8::utf16_length_from_utf8(in + pos, size - pos);
28082 simdutf_really_inline size_t count_code_points(const char16_t* in, size_t size) {
28085 for(;pos < size/32*32; pos += 32) {
28091 return count + scalar::utf16::count_code_points<big_endian>(in + pos, size - pos);
28095 simdutf_really_inline size_t utf8_length_from_utf16(const char16_t* in, size_t size) {
28099 for(;pos < size/32*32; pos += 32) {
28112 return count + scalar::utf16::utf8_length_from_utf16<big_endian>(in + pos, size - pos);
28116 simdutf_really_inline size_t utf32_length_from_utf16(const char16_t* in, size_t size) {
28117 return count_code_points<big_endian>(in, size);
28120 simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* output) {
28123 while (pos < size/32*32) {
28131 scalar::utf16::change_endianness_utf16(in + pos, size - pos, output);
28750 const char16_t* sse_validate_utf16(const char16_t* input, size_t size) {
28751 const char16_t* end = input + size;
28826 const result sse_validate_utf16_with_errors(const char16_t* input, size_t size) {
28828 const char16_t* end = input + size;
28907 const char32_t* sse_validate_utf32le(const char32_t* input, size_t size) {
28908 const char32_t* end = input + size;
28936 const result sse_validate_utf32le_with_errors(const char32_t* input, size_t size) {
28938 const char32_t* end = input + size;
29004 // so the last write can exceed the utf8_output size by 8-1 bytes
29118 // Why 12 input bytes and not 16? Because we are concerned with the size of
29301 // Why 12 input bytes and not 16? Because we are concerned with the size of
29431 // Why 12 input bytes and not 16? Because we are concerned with the size of
31327 simdutf_warn_unused size_t convert_valid(const char* input, size_t size,
31333 while(pos + 64 + safety_margin <= size) {
31381 utf16_output += scalar::utf8_to_utf16::convert_valid<endian>(input + pos, size - pos, utf16_output);
31518 simdutf_really_inline size_t convert(const char* in, size_t size, char16_t* utf16_output) {
31528 size_t margin = size;
31533 const size_t safety_margin = size - margin + 1; // to avoid overruns!
31534 while(pos + 64 + safety_margin <= size) {
31584 if(pos < size) {
31585 size_t howmany = scalar::utf8_to_utf16::convert<endian>(in + pos, size - pos, utf16_output);
31593 simdutf_really_inline result convert_with_errors(const char* in, size_t size, char16_t* utf16_output) {
31603 size_t margin = size;
31608 const size_t safety_margin = size - margin + 1; // to avoid overruns!
31609 while(pos + 64 + safety_margin <= size) {
31631 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
31632 result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors<endian>(pos, in + pos, size - pos, utf16_output);
31667 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
31668 result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors<endian>(pos, in + pos, size - pos, utf16_output);
31672 if(pos < size) {
31674 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
31675 result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors<endian>(pos, in + pos, size - pos, utf16_output);
31707 simdutf_warn_unused size_t convert_valid(const char* input, size_t size,
31712 while(pos + 64 + safety_margin <= size) {
31732 utf32_output += scalar::utf8_to_utf32::convert_valid(input + pos, size - pos, utf32_output);
31870 simdutf_really_inline size_t convert(const char* in, size_t size, char32_t* utf32_output) {
31880 size_t margin = size;
31885 const size_t safety_margin = size - margin + 1; // to avoid overruns!
31886 while(pos + 64 + safety_margin <= size) {
31936 if(pos < size) {
31937 size_t howmany = scalar::utf8_to_utf32::convert(in + pos, size - pos, utf32_output);
31944 simdutf_really_inline result convert_with_errors(const char* in, size_t size, char32_t* utf32_output) {
31954 size_t margin = size;
31959 const size_t safety_margin = size - margin + 1; // to avoid overruns!
31960 while(pos + 64 + safety_margin <= size) {
31981 result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output);
32015 result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output);
32019 if(pos < size) {
32020 result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output);
32051 simdutf_really_inline size_t count_code_points(const char* in, size_t size) {
32054 for(;pos + 64 <= size; pos += 64) {
32059 return count + scalar::utf8::count_code_points(in + pos, size - pos);
32062 simdutf_really_inline size_t utf16_length_from_utf8(const char* in, size_t size) {
32066 for(;pos + 64 <= size; pos += 64) {
32075 return count + scalar::utf8::utf16_length_from_utf8(in + pos, size - pos);
32089 simdutf_really_inline size_t count_code_points(const char16_t* in, size_t size) {
32092 for(;pos < size/32*32; pos += 32) {
32098 return count + scalar::utf16::count_code_points<big_endian>(in + pos, size - pos);
32102 simdutf_really_inline size_t utf8_length_from_utf16(const char16_t* in, size_t size) {
32106 for(;pos < size/32*32; pos += 32) {
32119 return count + scalar::utf16::utf8_length_from_utf16<big_endian>(in + pos, size - pos);
32123 simdutf_really_inline size_t utf32_length_from_utf16(const char16_t* in, size_t size) {
32124 return count_code_points<big_endian>(in, size);
32127 simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* output) {
32130 while (pos < size/32*32) {
32138 scalar::utf16::change_endianness_utf16(in + pos, size - pos, output);
32268 simdutf_really_inline size_t convert(const char* in, size_t size, char* latin1_output) {
32278 size_t margin = size;
32283 const size_t safety_margin = size - margin + 1; // to avoid overruns!
32284 while(pos + 64 + safety_margin <= size) {
32334 if(pos < size) {
32335 size_t howmany = scalar::utf8_to_latin1::convert(in + pos, size - pos, latin1_output);
32342 simdutf_really_inline result convert_with_errors(const char* in, size_t size, char* latin1_output) {
32352 size_t margin = size;
32357 const size_t safety_margin = size - margin + 1; // to avoid overruns!
32358 while(pos + 64 + safety_margin <= size) {
32380 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
32381 result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output);
32416 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
32417 result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output);
32421 if(pos < size) {
32423 // with the ability to go back up to pos bytes, and read size-pos bytes forward.
32424 result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output);
32455 simdutf_really_inline size_t convert_valid(const char* in, size_t size, char* latin1_output) {
32465 size_t margin = size;
32470 const size_t safety_margin = size - margin + 1; // to avoid overruns!
32471 while(pos + 64 + safety_margin <= size) {
32508 if(pos < size) {
32509 size_t howmany = scalar::utf8_to_latin1::convert_valid(in + pos, size - pos, latin1_output);
32707 simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16le(const char* input, size_t size,
32709 return utf8_to_utf16::convert_valid<endianness::LITTLE>(input, size, utf16_output);
32712 simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16be(const char* input, size_t size,
32714 return utf8_to_utf16::convert_valid<endianness::BIG>(input, size, utf16_output);
32727 simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf32(const char* input, size_t size,
32729 return utf8_to_utf32::convert_valid(input, size, utf32_output);