Lines Matching refs:amount
109 __bitset_rotate_right(BITSET_WORD *x, unsigned amount, unsigned n)
111 assert(amount < BITSET_WORDBITS);
113 if (amount == 0)
117 x[i] = (x[i] >> amount) | (x[i + 1] << (BITSET_WORDBITS - amount));
120 x[n - 1] = x[n - 1] >> amount;
124 __bitset_rotate_left(BITSET_WORD *x, unsigned amount, unsigned n)
126 assert(amount < BITSET_WORDBITS);
128 if (amount == 0)
132 x[i] = (x[i] << amount) | (x[i - 1] >> (BITSET_WORDBITS - amount));
135 x[0] = x[0] << amount;
139 __bitset_shr(BITSET_WORD *x, unsigned amount, unsigned n)
141 const unsigned int words = amount / BITSET_WORDBITS;
143 if (amount == 0)
155 amount %= BITSET_WORDBITS;
158 __bitset_rotate_right(x, amount, n);
163 __bitset_shl(BITSET_WORD *x, unsigned amount, unsigned n)
165 const int words = amount / BITSET_WORDBITS;
167 if (amount == 0)
181 amount %= BITSET_WORDBITS;
184 __bitset_rotate_left(x, amount, n);