Lines Matching refs:amount
110 __bitset_rotate_right(BITSET_WORD *x, unsigned amount, unsigned n)
112 assert(amount < BITSET_WORDBITS);
114 if (amount == 0)
118 x[i] = (x[i] >> amount) | (x[i + 1] << (BITSET_WORDBITS - amount));
121 x[n - 1] = x[n - 1] >> amount;
125 __bitset_rotate_left(BITSET_WORD *x, unsigned amount, unsigned n)
127 assert(amount < BITSET_WORDBITS);
129 if (amount == 0)
133 x[i] = (x[i] << amount) | (x[i - 1] >> (BITSET_WORDBITS - amount));
136 x[0] = x[0] << amount;
140 __bitset_shr(BITSET_WORD *x, unsigned amount, unsigned n)
142 const unsigned int words = amount / BITSET_WORDBITS;
144 if (amount == 0)
156 amount %= BITSET_WORDBITS;
159 __bitset_rotate_right(x, amount, n);
164 __bitset_shl(BITSET_WORD *x, unsigned amount, unsigned n)
166 const int words = amount / BITSET_WORDBITS;
168 if (amount == 0)
182 amount %= BITSET_WORDBITS;
185 __bitset_rotate_left(x, amount, n);