Lines Matching refs:k
49 unsigned int k, lim = bits/BITS_PER_LONG; in __bitmap_equal() local
50 for (k = 0; k < lim; ++k) in __bitmap_equal()
51 if (bitmap1[k] != bitmap2[k]) in __bitmap_equal()
55 if ((bitmap1[k] ^ bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) in __bitmap_equal()
67 unsigned int k, lim = bits / BITS_PER_LONG; in __bitmap_or_equal() local
70 for (k = 0; k < lim; ++k) { in __bitmap_or_equal()
71 if ((bitmap1[k] | bitmap2[k]) != bitmap3[k]) in __bitmap_or_equal()
78 tmp = (bitmap1[k] | bitmap2[k]) ^ bitmap3[k]; in __bitmap_or_equal()
84 unsigned int k, lim = BITS_TO_LONGS(bits); in __bitmap_complement() local
85 for (k = 0; k < lim; ++k) in __bitmap_complement()
86 dst[k] = ~src[k]; in __bitmap_complement()
104 unsigned k, lim = BITS_TO_LONGS(nbits); in __bitmap_shift_right() local
107 for (k = 0; off + k < lim; ++k) { in __bitmap_shift_right()
114 if (!rem || off + k + 1 >= lim) in __bitmap_shift_right()
117 upper = src[off + k + 1]; in __bitmap_shift_right()
118 if (off + k + 1 == lim - 1) in __bitmap_shift_right()
122 lower = src[off + k]; in __bitmap_shift_right()
123 if (off + k == lim - 1) in __bitmap_shift_right()
126 dst[k] = lower | upper; in __bitmap_shift_right()
149 int k; in __bitmap_shift_left() local
152 for (k = lim - off - 1; k >= 0; --k) { in __bitmap_shift_left()
159 if (rem && k > 0) in __bitmap_shift_left()
160 lower = src[k - 1] >> (BITS_PER_LONG - rem); in __bitmap_shift_left()
163 upper = src[k] << rem; in __bitmap_shift_left()
164 dst[k + off] = lower | upper; in __bitmap_shift_left()
241 unsigned int k; in __bitmap_and() local
245 for (k = 0; k < lim; k++) in __bitmap_and()
246 result |= (dst[k] = bitmap1[k] & bitmap2[k]); in __bitmap_and()
248 result |= (dst[k] = bitmap1[k] & bitmap2[k] & in __bitmap_and()
257 unsigned int k; in __bitmap_or() local
260 for (k = 0; k < nr; k++) in __bitmap_or()
261 dst[k] = bitmap1[k] | bitmap2[k]; in __bitmap_or()
268 unsigned int k; in __bitmap_xor() local
271 for (k = 0; k < nr; k++) in __bitmap_xor()
272 dst[k] = bitmap1[k] ^ bitmap2[k]; in __bitmap_xor()
279 unsigned int k; in __bitmap_andnot() local
283 for (k = 0; k < lim; k++) in __bitmap_andnot()
284 result |= (dst[k] = bitmap1[k] & ~bitmap2[k]); in __bitmap_andnot()
286 result |= (dst[k] = bitmap1[k] & ~bitmap2[k] & in __bitmap_andnot()
296 unsigned int k; in __bitmap_replace() local
299 for (k = 0; k < nr; k++) in __bitmap_replace()
300 dst[k] = (old[k] & ~mask[k]) | (new[k] & mask[k]); in __bitmap_replace()
307 unsigned int k, lim = bits/BITS_PER_LONG; in __bitmap_intersects() local
308 for (k = 0; k < lim; ++k) in __bitmap_intersects()
309 if (bitmap1[k] & bitmap2[k]) in __bitmap_intersects()
313 if ((bitmap1[k] & bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) in __bitmap_intersects()
322 unsigned int k, lim = bits/BITS_PER_LONG; in __bitmap_subset() local
323 for (k = 0; k < lim; ++k) in __bitmap_subset()
324 if (bitmap1[k] & ~bitmap2[k]) in __bitmap_subset()
328 if ((bitmap1[k] & ~bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) in __bitmap_subset()
336 unsigned int k, lim = bits/BITS_PER_LONG; in __bitmap_weight() local
339 for (k = 0; k < lim; k++) in __bitmap_weight()
340 w += hweight_long(bitmap[k]); in __bitmap_weight()
343 w += hweight_long(bitmap[k] & BITMAP_LAST_WORD_MASK(bits)); in __bitmap_weight()