You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213
  1. #ifndef _UTIL_PARITY_H_
  2. #define _UTIL_PARITY_H_
  3. static inline uint8_t parity_even_bit(uint8_t x) __attribute__((pure, always_inline, unused));
  4. static inline uint8_t parity_even_bit(uint8_t x)
  5. {
  6. x ^= x >> 1;
  7. x ^= x >> 2;
  8. x ^= x >> 4;
  9. return x & 1;
  10. }
  11. #endif