Lines Matching refs:ctr
95 * @param ctr Reference to counter to update.
100 static inline void unsignedCtrUpdate(uint8_t &ctr, bool up, unsigned nbits)
104 if (ctr < ((1 << nbits) - 1))
105 ctr++;
107 if (ctr)
108 ctr--;
111 static inline void signedCtrUpdate(int8_t &ctr, bool up, unsigned nbits)
114 if (ctr < ((1 << (nbits - 1)) - 1))
115 ctr++;
117 if (ctr > -(1 << (nbits - 1)))
118 ctr--;