@@ -120,15 +120,22 @@ namespace simdjson::arm64::simd {
120120 really_inline simd8<uint8_t >& operator -=(const simd8<uint8_t > other) { *this = *this - other; return *this ; }
121121
122122 // Order-specific operations
123+ really_inline uint8_t max () const { return vmaxvq_u8 (*this ); }
124+ really_inline uint8_t min () const { return vminvq_u8 (*this ); }
123125 really_inline simd8<uint8_t > max (const simd8<uint8_t > other) const { return vmaxq_u8 (*this , other); }
124126 really_inline simd8<uint8_t > min (const simd8<uint8_t > other) const { return vminq_u8 (*this , other); }
125127 really_inline simd8<bool > operator <=(const simd8<uint8_t > other) const { return vcleq_u8 (*this , other); }
126128 really_inline simd8<bool > operator >=(const simd8<uint8_t > other) const { return vcgeq_u8 (*this , other); }
129+ really_inline simd8<bool > operator <(const simd8<uint8_t > other) const { return vcltq_u8 (*this , other); }
127130 really_inline simd8<bool > operator >(const simd8<uint8_t > other) const { return vcgtq_u8 (*this , other); }
131+ // Same as >, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's.
132+ really_inline simd8<uint8_t > gt_bits (const simd8<uint8_t > other) const { return simd8<uint8_t >(*this > other); }
133+ // Same as <, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's.
134+ really_inline simd8<uint8_t > lt_bits (const simd8<uint8_t > other) const { return simd8<uint8_t >(*this < other); }
128135
129136 // Bit-specific operations
130137 really_inline simd8<bool > any_bits_set (simd8<uint8_t > bits) const { return vtstq_u8 (*this , bits); }
131- really_inline bool any_bits_set_anywhere () const { return vmaxvq_u8 (* this ) != 0 ; }
138+ really_inline bool any_bits_set_anywhere () const { return this -> max ( ) != 0 ; }
132139 really_inline bool any_bits_set_anywhere (simd8<uint8_t > bits) const { return (*this & bits).any_bits_set_anywhere (); }
133140 template <int N>
134141 really_inline simd8<uint8_t > shr () const { return vshrq_n_u8 (*this , N); }
@@ -216,6 +223,7 @@ namespace simdjson::arm64::simd {
216223 really_inline simd8<int8_t > max (const simd8<int8_t > other) const { return vmaxq_s8 (*this , other); }
217224 really_inline simd8<int8_t > min (const simd8<int8_t > other) const { return vminq_s8 (*this , other); }
218225 really_inline simd8<bool > operator >(const simd8<int8_t > other) const { return vcgtq_s8 (*this , other); }
226+ really_inline simd8<bool > operator <(const simd8<int8_t > other) const { return vcltq_s8 (*this , other); }
219227 really_inline simd8<bool > operator ==(const simd8<int8_t > other) const { return vceqq_s8 (*this , other); }
220228
221229 template <int N=1 >
0 commit comments