Lines Matching refs:nbits
35 pub unsafe fn from_raw<'a>(ptr: *const usize, nbits: usize) -> &'a Bitmap { in from_raw()
36 let data: *const [()] = core::ptr::slice_from_raw_parts(ptr.cast(), nbits); in from_raw()
60 pub unsafe fn from_raw_mut<'a>(ptr: *mut usize, nbits: usize) -> &'a mut Bitmap { in from_raw_mut()
61 let data: *mut [()] = core::ptr::slice_from_raw_parts_mut(ptr.cast(), nbits); in from_raw_mut()
158 nbits: usize, field
165 let ptr = if self.nbits <= BitmapVec::MAX_INLINE_LEN { in deref()
178 unsafe { Bitmap::from_raw(ptr, self.nbits) } in deref()
184 let ptr = if self.nbits <= BitmapVec::MAX_INLINE_LEN { in deref_mut()
197 unsafe { Bitmap::from_raw_mut(ptr, self.nbits) } in deref_mut()
214 if self.nbits <= BitmapVec::MAX_INLINE_LEN { in drop()
239 nbits: BitmapVec::MAX_INLINE_LEN, in new_inline()
248 pub fn new(nbits: usize, flags: Flags) -> Result<Self, AllocError> { in new()
249 if nbits <= BitmapVec::MAX_INLINE_LEN { in new()
252 nbits, in new()
255 if nbits > Self::MAX_LEN { in new()
258 let nbits_u32 = u32::try_from(nbits).unwrap(); in new()
265 nbits, in new()
273 self.nbits in len()
284 usize::div_ceil(self.nbits, bindings::BITS_PER_LONG as usize) in fill_random()