Lines Matching refs:k

53 	unsigned int k, lim = bits/BITS_PER_LONG;  in __bitmap_equal()  local
54 for (k = 0; k < lim; ++k) in __bitmap_equal()
55 if (bitmap1[k] != bitmap2[k]) in __bitmap_equal()
59 if ((bitmap1[k] ^ bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) in __bitmap_equal()
68 unsigned int k, lim = BITS_TO_LONGS(bits); in __bitmap_complement() local
69 for (k = 0; k < lim; ++k) in __bitmap_complement()
70 dst[k] = ~src[k]; in __bitmap_complement()
88 unsigned k, lim = BITS_TO_LONGS(nbits); in __bitmap_shift_right() local
91 for (k = 0; off + k < lim; ++k) { in __bitmap_shift_right()
98 if (!rem || off + k + 1 >= lim) in __bitmap_shift_right()
101 upper = src[off + k + 1]; in __bitmap_shift_right()
102 if (off + k + 1 == lim - 1) in __bitmap_shift_right()
106 lower = src[off + k]; in __bitmap_shift_right()
107 if (off + k == lim - 1) in __bitmap_shift_right()
110 dst[k] = lower | upper; in __bitmap_shift_right()
133 int k; in __bitmap_shift_left() local
136 for (k = lim - off - 1; k >= 0; --k) { in __bitmap_shift_left()
143 if (rem && k > 0) in __bitmap_shift_left()
144 lower = src[k - 1] >> (BITS_PER_LONG - rem); in __bitmap_shift_left()
147 upper = src[k] << rem; in __bitmap_shift_left()
148 dst[k + off] = lower | upper; in __bitmap_shift_left()
158 unsigned int k; in __bitmap_and() local
162 for (k = 0; k < lim; k++) in __bitmap_and()
163 result |= (dst[k] = bitmap1[k] & bitmap2[k]); in __bitmap_and()
165 result |= (dst[k] = bitmap1[k] & bitmap2[k] & in __bitmap_and()
174 unsigned int k; in __bitmap_or() local
177 for (k = 0; k < nr; k++) in __bitmap_or()
178 dst[k] = bitmap1[k] | bitmap2[k]; in __bitmap_or()
185 unsigned int k; in __bitmap_xor() local
188 for (k = 0; k < nr; k++) in __bitmap_xor()
189 dst[k] = bitmap1[k] ^ bitmap2[k]; in __bitmap_xor()
196 unsigned int k; in __bitmap_andnot() local
200 for (k = 0; k < lim; k++) in __bitmap_andnot()
201 result |= (dst[k] = bitmap1[k] & ~bitmap2[k]); in __bitmap_andnot()
203 result |= (dst[k] = bitmap1[k] & ~bitmap2[k] & in __bitmap_andnot()
212 unsigned int k, lim = bits/BITS_PER_LONG; in __bitmap_intersects() local
213 for (k = 0; k < lim; ++k) in __bitmap_intersects()
214 if (bitmap1[k] & bitmap2[k]) in __bitmap_intersects()
218 if ((bitmap1[k] & bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) in __bitmap_intersects()
227 unsigned int k, lim = bits/BITS_PER_LONG; in __bitmap_subset() local
228 for (k = 0; k < lim; ++k) in __bitmap_subset()
229 if (bitmap1[k] & ~bitmap2[k]) in __bitmap_subset()
233 if ((bitmap1[k] & ~bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) in __bitmap_subset()
241 unsigned int k, lim = bits/BITS_PER_LONG; in __bitmap_weight() local
244 for (k = 0; k < lim; k++) in __bitmap_weight()
245 w += hweight_long(bitmap[k]); in __bitmap_weight()
248 w += hweight_long(bitmap[k] & BITMAP_LAST_WORD_MASK(bits)); in __bitmap_weight()