Lines Matching defs:bits

326     // Returns 4-bit out of each byte, alternating between the high 4 bits and low bits
413 simdutf_really_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const { return vtstq_u8(*this, bits); }
417 simdutf_really_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const { return (*this & bits).any_bits_set_anywhere(); }
1910 simdutf_really_inline simd8<bool> bits_not_set(simd8<uint8_t> bits) const { return (*this & bits).bits_not_set(); }
1912 simdutf_really_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const { return ~this->bits_not_set(bits); }
1916 simdutf_really_inline bool bits_not_set_anywhere(simd8<uint8_t> bits) const { return _mm256_testz_si256(*this, bits); }
1917 simdutf_really_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const { return !bits_not_set_anywhere(bits); }
1922 // Get one of the bits and make a bitmask out of it.
2177 simdutf_really_inline simd16<bool> bits_not_set(simd16<uint16_t> bits) const { return (*this & bits).bits_not_set(); }
2179 simdutf_really_inline simd16<bool> any_bits_set(simd16<uint16_t> bits) const { return ~this->bits_not_set(bits); }
2183 simdutf_really_inline bool bits_not_set_anywhere(simd16<uint16_t> bits) const { return _mm256_testz_si256(*this, bits); }
2184 simdutf_really_inline bool any_bits_set_anywhere(simd16<uint16_t> bits) const { return !bits_not_set_anywhere(bits); }
2189 // Get one of the bits and make a bitmask out of it.
2801 simdutf_really_inline simd8<bool> bits_not_set(simd8<uint8_t> bits) const { return (*this & bits).bits_not_set(); }
2803 simdutf_really_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const { return ~this->bits_not_set(bits); }
2808 simdutf_really_inline bool bits_not_set_anywhere(simd8<uint8_t> bits) const { return _mm_testz_si128(*this, bits); }
2809 simdutf_really_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const { return !bits_not_set_anywhere(bits); }
2814 // Get one of the bits and make a bitmask out of it.
2865 simdutf_really_inline bool bits_not_set_anywhere(simd8<uint16_t> bits) const { return _mm_testz_si128(*this, bits); }
2866 simdutf_really_inline bool any_bits_set_anywhere(simd8<uint16_t> bits) const { return !bits_not_set_anywhere(bits); }
3142 simdutf_really_inline simd16<bool> bits_not_set(simd16<uint16_t> bits) const { return (*this & bits).bits_not_set(); }
3144 simdutf_really_inline simd16<bool> any_bits_set(simd16<uint16_t> bits) const { return ~this->bits_not_set(bits); }
3148 simdutf_really_inline bool bits_not_set_anywhere(simd16<uint16_t> bits) const { return _mm_testz_si128(*this, bits); }
3149 simdutf_really_inline bool any_bits_set_anywhere(simd16<uint16_t> bits) const { return !bits_not_set_anywhere(bits); }
3154 // Get one of the bits and make a bitmask out of it.
3775 simdutf_really_inline simd8<bool> bits_not_set(simd8<uint8_t> bits) const {
3776 return (*this & bits).bits_not_set();
3781 simdutf_really_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const {
3782 return ~this->bits_not_set(bits);
3795 simdutf_really_inline bool bits_not_set_anywhere(simd8<uint8_t> bits) const {
3796 return vec_all_eq(vec_and(this->value, (__m128i)bits),
3799 simdutf_really_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const {
3800 return !bits_not_set_anywhere(bits);
12005 uint64_t v{v1 | v2}; // We are only interested in these bits: 1000 1000 1000 1000, so it makes sense to concatenate everything
12133 uint64_t v{v1 | v2}; // We are only interested in these bits: 1000 1000 1000 1000 .... etc
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.
12182 uint64_t v{v1 | v2}; // We are only interested in these bits: 1000 1000 1000 1000...etc
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.
12440 uint64_t v{v1 | v2}; // We are only interested in these bits: 1000 1000 1000 1000, so it makes sense to concatenate everything
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.
12577 simd8<uint8_t> bits = input.reduce_or();
12578 return bits.max_val() < 0b10000000u;
12624 // Shift left insert into the low bits
12662 uint16x8_t ascii = vandq_u16(perm, vmovq_n_u16(0x7f)); // 6 or 7 bits
12665 uint16x8_t highbyte = vandq_u16(perm, vmovq_n_u16(0x1f00)); // 5 bits
12916 // H - word-mask for high surrogates: the six highest bits are 0b1101'11
12987 // H - word-mask for high surrogates: the six highest bits are 0b1101'11
13202 // end of the code points. Only the least significant 12 bits of the mask
13293 // The shift left insert below will clear the top bits.
13311 // Shift left and insert the top 4 bits, overwriting the garbage
13338 // Shift left 2 bits
13341 // Create a magic number containing the low 2 bits of the trail surrogate and all the
13350 // Generate unadjusted trail surrogate minus lowest 2 bits
13353 // Insert low 2 bits of trail surrogate to magic number for later
13396 // Top 16 bits contains the high ten bits of the surrogate pair before correction
13398 // 4 byte: 11110aaa bbbbbbcc|cccc0000 00000000 - high 10 bits correct w/o correction
13400 // Combine the low 6 or 7 bits by a shift right accumulate
13401 // 3 byte: 00000000 00000010|bbbbcccc ccdddddd - low 16 bits correct
13402 // 4 byte: 00000011 110aaabb|bbbbcccc ccdddddd - low 10 bits correct w/o correction
13408 // Clear the upper 6 bits of the low surrogate. Don't clear the upper bits yet as
13462 // end of the code points. Only the least significant 12 bits of the mask
13541 uint32x4_t ascii = vandq_u32(perm, vmovq_n_u32(0x7F)); // 6 or 7 bits
13544 uint32x4_t high = vshrq_n_u32(perm, 4); // 4 bits
13546 // The top bits will be corrected later in the bsl
13549 vreinterpretq_u32_u16(vbicq_u16(vreinterpretq_u16_u32(perm), vmovq_n_u16(uint16_t(~0xff00)))); // 5 or 6 bits
13553 // Insert top 4 bits from high byte with bitwise select
13638 // end of the code points. Only the least significant 12 bits of the mask
13689 uint16x8_t ascii = vandq_u16(perm, vmovq_n_u16(0x7f)); // 6 or 7 bits
13692 uint16x8_t highbyte = vandq_u16(perm, vmovq_n_u16(0x1f00)); // 5 bits
13770 can have 16 or 32 bits.
14322 can have 16 or 32 bits.
14543 // Check if no bits set above 16th
14776 // Check if no bits set above 16th
15010 // Check if no bits set above 16th
15068 // Check if no bits set above 16th
17918 __m512i clearedbytes = _mm512_andnot_si512(nonasciitags, input); // high two bits cleared where not ASCII
17980 __m512i clearedbytes = _mm512_andnot_si512(nonasciitags, input); // high two bits cleared where not ASCII
18299 0x8080800N, where N is 4 higest bits from the leading byte; 0x80 resets
18309 UTF-8 character encoding. The `?` denotes bits we must not
18319 /* 1. Reset control bits of continuation bytes and the MSB
18351 /* 4. Shift left the values by variable amounts to reset highest UTF-8 bits
18398 /* 5. Shift right the values by variable amounts to reset lowest bits
19689 /* 3. Align all high surrogates in first and second by shifting to the left by 10 bits
19841 // Try to apply UTF-16 => UTF-8 routine on 256 bits (haswell/avx2_convert_utf16_to_utf8.cpp)
19853 // no bits set above 7th bit
19857 // no bits set above 11th bit
20086 // Try to apply UTF-16 => UTF-8 routine on 256 bits (haswell/avx2_convert_utf16_to_utf8.cpp)
20098 // no bits set above 7th bit
20102 // no bits set above 11th bit
20318 // no bits set above 16th bit <=> can pack to UTF16 without surrogate pairs
20383 // no bits set above 16th bit <=> can pack to UTF16 without surrogate pairs
20496 // the bits in ascii are inverted and zeros are interspersed in between them
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. */
22314 // H - word-mask for high surrogates: the six highest bits are 0b1101'11
22392 // H - word-mask for high surrogates: the six highest bits are 0b1101'11
22534 // no bits set above 7th bit
22635 // end of the code points. Only the least significant 12 bits of the mask
22687 _mm_and_si128(perm, _mm_set1_epi32(0x7f)); // 7 or 6 bits
22689 _mm_and_si128(perm, _mm_set1_epi32(0x3f00)); // 5 or 6 bits
22692 _mm_and_si128(perm, _mm_set1_epi32(0x0f0000)); // 4 bits
22728 _mm_and_si128(perm, _mm_set1_epi32(0x7f)); // 7 or 6 bits
22730 _mm_and_si128(perm, _mm_set1_epi32(0x3f00)); // 5 or 6 bits
22733 _mm_and_si128(perm, _mm_set1_epi32(0x0f0000)); // 4 bits
22763 // We deliberately carry the leading four bits in highbyte if they are present,
22817 // end of the code points. Only the least significant 12 bits of the mask
22861 _mm_and_si128(perm, _mm_set1_epi32(0x7f)); // 7 or 6 bits
22863 _mm_and_si128(perm, _mm_set1_epi32(0x3f00)); // 5 or 6 bits
22866 _mm_and_si128(perm, _mm_set1_epi32(0x0f0000)); // 4 bits
22901 _mm_and_si128(perm, _mm_set1_epi32(0x7f)); // 7 or 6 bits
22903 _mm_and_si128(perm, _mm_set1_epi32(0x3f00)); // 5 or 6 bits
22906 _mm_and_si128(perm, _mm_set1_epi32(0x0f0000)); // 4 bits
23038 can have 16 or 32 bits.
23110 // no bits set above 7th bit
23114 // no bits set above 11th bit
23353 // no bits set above 7th bit
23357 // no bits set above 11th bit
23570 can have 16 or 32 bits.
23860 // Try to apply UTF-16 => UTF-8 routine on 256 bits (haswell/avx2_convert_utf16_to_utf8.cpp)
23872 // no bits set above 7th bit
23876 // no bits set above 11th bit
24105 // Try to apply UTF-16 => UTF-8 routine on 256 bits (haswell/avx2_convert_utf16_to_utf8.cpp)
24117 // no bits set above 7th bit
24121 // no bits set above 11th bit
24334 // no bits set above 16th bit <=> can pack to UTF16 without surrogate pairs
24399 // no bits set above 16th bit <=> can pack to UTF16 without surrogate pairs
24455 // end of the code points. Only the least significant 12 bits of the mask
24477 // Load the next 128 bits.
28423 * bits after 11th are ignored
28424 * first 11 bits are encoded into utf8
28460 // one_byte_bitmask = hhggffeeddccbbaa -- the bits are doubled (h - MSB, a - LSB)
28482 // no bits set above 7th bit
28790 // H - word-mask for high surrogates: the six highest bits are 0b1101'11
28868 // H - word-mask for high surrogates: the six highest bits are 0b1101'11
29110 // end of the code points. Only the least significant 12 bits of the mask
29163 _mm_and_si128(perm, _mm_set1_epi32(0x7f)); // 7 or 6 bits
29165 _mm_and_si128(perm, _mm_set1_epi32(0x3f00)); // 5 or 6 bits
29168 _mm_and_si128(perm, _mm_set1_epi32(0x0f0000)); // 4 bits
29205 _mm_and_si128(perm, _mm_set1_epi32(0x7f)); // 7 or 6 bits
29207 _mm_and_si128(perm, _mm_set1_epi32(0x3f00)); // 5 or 6 bits
29210 _mm_and_si128(perm, _mm_set1_epi32(0x0f0000)); // 4 bits
29240 // We deliberately carry the leading four bits in highbyte if they are present,
29294 // end of the code points. Only the least significant 12 bits of the mask
29341 _mm_and_si128(perm, _mm_set1_epi32(0x7f)); // 7 or 6 bits
29343 _mm_and_si128(perm, _mm_set1_epi32(0x3f00)); // 5 or 6 bits
29346 _mm_and_si128(perm, _mm_set1_epi32(0x0f0000)); // 4 bits
29381 _mm_and_si128(perm, _mm_set1_epi32(0x7f)); // 7 or 6 bits
29383 _mm_and_si128(perm, _mm_set1_epi32(0x3f00)); // 5 or 6 bits
29386 _mm_and_si128(perm, _mm_set1_epi32(0x0f0000)); // 4 bits
29424 // end of the code points. Only the least significant 12 bits of the mask
29549 can have 16 or 32 bits.
29639 // no bits set above 7th bit
29643 // no bits set above 11th bit
29843 // no bits set above 7th bit
29847 // no bits set above 11th bit
30004 can have 16 or 32 bits.
30260 const __m128i v_0000 = _mm_setzero_si128();//__m128 = 128 bits
30270 while (buf + 16 + safety_margin <= end) { //buf is a char32_t pointer, each char32_t has 4 bytes or 32 bits, thus buf + 16 * char_32t = 512 bits = 64 bytes
30307 buf += 8; //the char32_t buffer pointer goes up 8 char32_t chars* 32 bits = 256 bits
30326 // no bits set above 7th bit -- find out all the ASCII characters
30328 _mm_and_si128(in_16, v_ff80), // the vector that get only the first 9 bits of each 16-bit/2-byte units
30334 // no bits set above 11th bit
30361 // one_byte_bitmask = hhggffeeddccbbaa -- the bits are doubled (h - MSB, a - LSB)
30586 // no bits set above 7th bit
30590 // no bits set above 11th bit
30617 // one_byte_bitmask = hhggffeeddccbbaa -- the bits are doubled (h - MSB, a - LSB)
30785 // Check if no bits set above 16th
30851 // Check if no bits set above 16th