Home
last modified time | relevance | path

Searched refs:usize (Results 1 – 25 of 2915) sorted by relevance

12345678910>>...117

/external/rust/crates/aho-corasick/src/
Dstate_id.rs14 alphabet_len: usize, in premultiply_overflow_error() argument
29 pub fn usize_to_state_id<S: StateID>(value: usize) -> Result<S> { in usize_to_state_id()
57 impl Sealed for usize {} implementation
88 fn from_usize(n: usize) -> Self; in from_usize()
98 fn to_usize(self) -> usize; in to_usize() argument
104 fn max_id() -> usize; in max_id()
107 impl StateID for usize { implementation
109 fn from_usize(n: usize) -> usize { in from_usize() argument
114 fn to_usize(self) -> usize { in to_usize() argument
119 fn max_id() -> usize { in max_id()
[all …]
/external/rust/crates/base64/src/engine/general_purpose/
Dmod.rs45 fn internal_encode(&self, input: &[u8], output: &mut [u8]) -> usize { in internal_encode() argument
46 let mut input_index: usize = 0; in internal_encode()
48 const BLOCKS_PER_FAST_LOOP: usize = 4; in internal_encode()
75 output_chunk[0] = self.encode_table[((input_u64 >> 58) & LOW_SIX_BITS) as usize]; in internal_encode()
76 output_chunk[1] = self.encode_table[((input_u64 >> 52) & LOW_SIX_BITS) as usize]; in internal_encode()
77 output_chunk[2] = self.encode_table[((input_u64 >> 46) & LOW_SIX_BITS) as usize]; in internal_encode()
78 output_chunk[3] = self.encode_table[((input_u64 >> 40) & LOW_SIX_BITS) as usize]; in internal_encode()
79 output_chunk[4] = self.encode_table[((input_u64 >> 34) & LOW_SIX_BITS) as usize]; in internal_encode()
80 output_chunk[5] = self.encode_table[((input_u64 >> 28) & LOW_SIX_BITS) as usize]; in internal_encode()
81 output_chunk[6] = self.encode_table[((input_u64 >> 22) & LOW_SIX_BITS) as usize]; in internal_encode()
[all …]
/external/rust/crates/arbitrary/src/
Dlib.rs277 fn size_hint(depth: usize) -> (usize, Option<usize>) { in size_hint() argument
289 fn size_hint(_depth: usize) -> (usize, Option<usize>) { in size_hint() argument
300 fn size_hint(depth: usize) -> (usize, Option<usize>) { in size_hint() argument
320 fn size_hint(_depth: usize) -> (usize, Option<usize>) {
336 usize: usize;
342 isize: usize;
354 fn size_hint(depth: usize) -> (usize, Option<usize>) {
386 fn size_hint(depth: usize) -> (usize, Option<usize>) { in size_hint() argument
397 fn size_hint(depth: usize) -> (usize, Option<usize>) { in size_hint() argument
408 fn size_hint(depth: usize) -> (usize, Option<usize>) { in size_hint() argument
[all …]
Dsize_hint.rs13 depth: usize, in recursion_guard() argument
14 f: impl FnOnce(usize) -> (usize, Option<usize>), in recursion_guard() argument
15 ) -> (usize, Option<usize>) { in recursion_guard()
16 const MAX_DEPTH: usize = 20; in recursion_guard()
26 pub fn and(lhs: (usize, Option<usize>), rhs: (usize, Option<usize>)) -> (usize, Option<usize>) { in and() argument
37 pub fn and_all(hints: &[(usize, Option<usize>)]) -> (usize, Option<usize>) { in and_all() argument
44 pub fn or(lhs: (usize, Option<usize>), rhs: (usize, Option<usize>)) -> (usize, Option<usize>) { in or() argument
57 pub fn or_all(hints: &[(usize, Option<usize>)]) -> (usize, Option<usize>) { in or_all() argument
/external/rust/crates/regex-automata/src/
Dstate_id.rs23 alphabet_len: usize, in premultiply_overflow_error() argument
42 None => return Err(Error::state_id_overflow(::std::usize::MAX)), in next_state_id()
53 pub fn usize_to_state_id<S: StateID>(value: usize) -> Result<S> { in usize_to_state_id()
123 fn from_usize(n: usize) -> Self; in from_usize()
133 fn to_usize(self) -> usize; in to_usize() argument
139 fn max_id() -> usize; in max_id()
156 unsafe impl StateID for usize { implementation
158 fn from_usize(n: usize) -> usize { in from_usize() argument
163 fn to_usize(self) -> usize { in to_usize() argument
168 fn max_id() -> usize { in max_id()
[all …]
/external/rust/crates/buddy_system_allocator/src/
Dlib.rs49 pub struct Heap<const ORDER: usize> {
54 user: usize,
55 allocated: usize,
56 total: usize,
59 impl<const ORDER: usize> Heap<ORDER> {
76 pub unsafe fn add_to_heap(&mut self, mut start: usize, mut end: usize) { in add_to_heap() argument
78 start = (start + size_of::<usize>() - 1) & (!size_of::<usize>() + 1); in add_to_heap()
79 end = end & (!size_of::<usize>() + 1); in add_to_heap()
85 while current_start + size_of::<usize>() <= end { in add_to_heap()
90 self.free_list[size.trailing_zeros() as usize].push(current_start as *mut usize); in add_to_heap()
[all …]
Dtest.rs11 let mut value1: usize = 0; in test_linked_list()
12 let mut value2: usize = 0; in test_linked_list()
13 let mut value3: usize = 0; in test_linked_list()
16 list.push(&mut value1 as *mut usize); in test_linked_list()
17 list.push(&mut value2 as *mut usize); in test_linked_list()
18 list.push(&mut value3 as *mut usize); in test_linked_list()
22 assert_eq!(value3, &value2 as *const usize as usize); in test_linked_list()
23 assert_eq!(value2, &value1 as *const usize as usize); in test_linked_list()
28 assert_eq!(iter.next(), Some(&mut value3 as *mut usize)); in test_linked_list()
29 assert_eq!(iter.next(), Some(&mut value2 as *mut usize)); in test_linked_list()
[all …]
Dframe.rs33 pub struct FrameAllocator<const ORDER: usize = 32> {
35 free_list: [BTreeSet<usize>; ORDER],
38 allocated: usize,
39 total: usize,
42 impl<const ORDER: usize> FrameAllocator<ORDER> {
53 pub fn add_frame(&mut self, start: usize, end: usize) { in add_frame() argument
71 self.free_list[size.trailing_zeros() as usize].insert(current_start); in add_frame()
79 pub fn insert(&mut self, range: Range<usize>) { in insert() argument
85 pub fn alloc(&mut self, count: usize) -> Option<usize> { in alloc() argument
92 pub fn alloc_aligned(&mut self, layout: Layout) -> Option<usize> { in alloc_aligned() argument
[all …]
/external/rust/crates/crc32fast/src/
Dbaseline.rs31 const UNROLL: usize = 4; in update_fast_16()
32 const BYTES_AT_ONCE: usize = 16 * UNROLL; in update_fast_16()
38 crc = CRC32_TABLE[0x0][buf[0xf] as usize] in update_fast_16()
39 ^ CRC32_TABLE[0x1][buf[0xe] as usize] in update_fast_16()
40 ^ CRC32_TABLE[0x2][buf[0xd] as usize] in update_fast_16()
41 ^ CRC32_TABLE[0x3][buf[0xc] as usize] in update_fast_16()
42 ^ CRC32_TABLE[0x4][buf[0xb] as usize] in update_fast_16()
43 ^ CRC32_TABLE[0x5][buf[0xa] as usize] in update_fast_16()
44 ^ CRC32_TABLE[0x6][buf[0x9] as usize] in update_fast_16()
45 ^ CRC32_TABLE[0x7][buf[0x8] as usize] in update_fast_16()
[all …]
/external/crosvm/base/src/sys/unix/
Dmmap.rs41 InvalidRange(usize, usize, usize),
57 fn validate_includes_range(mmap_size: usize, offset: usize, range_size: usize) -> Result<()> { in validate_includes_range() argument
73 pub fn msync(&self, offset: usize, size: usize) -> Result<()> { in msync() argument
81 (self.as_ptr() as usize + offset) as *mut libc::c_void, in msync()
99 size: usize,
114 pub fn new(size: usize) -> Result<MemoryMapping> { in new()
123 pub fn new_protection(size: usize, prot: Protection) -> Result<MemoryMapping> { in new_protection() argument
142 pub fn from_fd(fd: &dyn AsRawDescriptor, size: usize) -> Result<MemoryMapping> { in from_fd()
148 size: usize, in from_fd_offset() argument
164 size: usize, in from_fd_offset_flags() argument
[all …]
/external/rust/crates/codespan-reporting/src/
Dfiles.rs35 IndexTooLarge { given: usize, max: usize },
37 LineTooLarge { given: usize, max: usize },
39 ColumnTooLarge { given: usize, max: usize },
41 InvalidCharBoundary { given: usize },
113 fn line_index(&'a self, id: Self::FileId, byte_index: usize) -> Result<usize, Error>; in line_index() argument
127 fn line_number(&'a self, id: Self::FileId, line_index: usize) -> Result<usize, Error> { in line_number() argument
144 line_index: usize, in column_number() argument
145 byte_index: usize, in column_number() argument
146 ) -> Result<usize, Error> { in column_number() argument
156 fn location(&'a self, id: Self::FileId, byte_index: usize) -> Result<Location, Error> { in location()
[all …]
/external/rust/crates/nom/src/bits/
Dcomplete.rs33 pub fn take<I, O, C, E: ParseError<(I, usize)>>( in take() argument
35 ) -> impl Fn((I, usize)) -> IResult<(I, usize), O, E> in take()
37 I: Slice<RangeFrom<usize>> + InputIter<Item = u8> + InputLength, in take()
39 O: From<u8> + AddAssign + Shl<usize, Output = O> + Shr<usize, Output = O>, in take() argument
42 move |(input, bit_offset): (I, usize)| { in take()
54 let mut offset: usize = bit_offset; in take()
55 let mut remaining: usize = count; in take()
56 let mut end_offset: usize = 0; in take()
85 pub fn tag<I, O, C, E: ParseError<(I, usize)>>( in tag() argument
88 ) -> impl Fn((I, usize)) -> IResult<(I, usize), O, E> in tag()
[all …]
Dstreaming.rs10 pub fn take<I, O, C, E: ParseError<(I, usize)>>( in take() argument
12 ) -> impl Fn((I, usize)) -> IResult<(I, usize), O, E> in take()
14 I: Slice<RangeFrom<usize>> + InputIter<Item = u8> + InputLength, in take()
16 O: From<u8> + AddAssign + Shl<usize, Output = O> + Shr<usize, Output = O>, in take() argument
19 move |(input, bit_offset): (I, usize)| { in take()
25 Err(Err::Incomplete(Needed::new(count as usize))) in take()
28 let mut offset: usize = bit_offset; in take()
29 let mut remaining: usize = count; in take()
30 let mut end_offset: usize = 0; in take()
59 pub fn tag<I, O, C, E: ParseError<(I, usize)>>( in tag() argument
[all …]
/external/rust/crates/bstr/src/
Dascii.rs27 const USIZE_BYTES: usize = mem::size_of::<usize>();
29 const FALLBACK_LOOP_SIZE: usize = 2 * USIZE_BYTES;
38 const ASCII_MASK: usize = ASCII_MASK_U64 as usize;
44 pub fn first_non_ascii_byte(slice: &[u8]) -> usize { in first_non_ascii_byte() argument
57 fn first_non_ascii_byte_fallback(slice: &[u8]) -> usize { in first_non_ascii_byte_fallback() argument
74 ptr = ptr_add(ptr, USIZE_BYTES - (start_ptr as usize & align)); in first_non_ascii_byte_fallback()
79 debug_assert_eq!(0, (ptr as usize) % USIZE_BYTES); in first_non_ascii_byte_fallback()
81 let a = *(ptr as *const usize); in first_non_ascii_byte_fallback() constant
82 let b = *(ptr_add(ptr, USIZE_BYTES) as *const usize); in first_non_ascii_byte_fallback() constant
94 ) -> usize { in first_non_ascii_byte_fallback() argument
[all …]
/external/rust/crates/regex/src/
Dre_trait.rs7 pub type Slot = Option<usize>;
22 pub fn pos(&self, i: usize) -> Option<(usize, usize)> { in pos() argument
41 pub fn len(&self) -> usize { in len() argument
59 idx: usize,
64 type Item = Option<(usize, usize)>;
66 fn next(&mut self) -> Option<Option<(usize, usize)>> { in next() argument
78 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
83 fn count(self) -> usize { in count() argument
110 fn slots_len(&self) -> usize; in slots_len() argument
122 fn next_after_empty(&self, text: &Self::Text, i: usize) -> usize; in next_after_empty() argument
[all …]
/external/rust/crates/memchr/src/memchr/
Dfallback.rs5 use core::{cmp, usize};
8 const USIZE_BYTES: usize = 2;
11 const USIZE_BYTES: usize = 4;
14 const USIZE_BYTES: usize = 8;
17 const LOOP_SIZE: usize = 2 * USIZE_BYTES;
27 fn contains_zero_byte(x: usize) -> bool { in contains_zero_byte()
31 const LO_USIZE: usize = LO_U64 as usize; in contains_zero_byte()
32 const HI_USIZE: usize = HI_U64 as usize; in contains_zero_byte()
42 fn repeat_byte(b: u8) -> usize { in repeat_byte() argument
43 (b as usize) * (usize::MAX / 255) in repeat_byte()
[all …]
/external/rust/crates/rayon-core/src/sleep/
Dcounters.rs20 word: usize,
27 pub(super) struct JobsEventCounter(usize);
30 pub(super) const DUMMY: JobsEventCounter = JobsEventCounter(std::usize::MAX);
33 pub(super) fn as_usize(self) -> usize { in as_usize() argument
57 const THREADS_BITS: usize = 16;
60 const THREADS_BITS: usize = 8;
65 const SLEEPING_SHIFT: usize = 0 * THREADS_BITS;
70 const INACTIVE_SHIFT: usize = 1 * THREADS_BITS;
74 const JEC_SHIFT: usize = 2 * THREADS_BITS;
77 pub(crate) const THREADS_MAX: usize = (1 << THREADS_BITS) - 1;
[all …]
/external/rust/crates/rayon-core/src/
Dlog.rs37 worker: usize,
38 terminate_addr: usize,
42 ThreadTerminate { worker: usize },
45 ThreadIdle { worker: usize, latch_addr: usize },
49 ThreadFoundWork { worker: usize, yields: u32 },
55 ThreadSawLatchSet { worker: usize, latch_addr: usize },
59 ThreadSleepy { worker: usize, jobs_counter: usize },
64 ThreadSleepInterruptedByLatch { worker: usize, latch_addr: usize },
69 ThreadSleepInterruptedByJob { worker: usize },
72 ThreadSleeping { worker: usize, latch_addr: usize },
[all …]
/external/rust/crates/userfaultfd-sys/src/out/
Dbindings.rs64 ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize in bindgen_test_layout___kernel_fd_set()
121 ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize in bindgen_test_layout___kernel_fsid_t()
201 ::std::ptr::addr_of!((*ptr).ptid) as usize - ptr as usize in bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1()
238 ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize in bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_1()
256 ::std::ptr::addr_of!((*ptr).address) as usize - ptr as usize in bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_1()
274 ::std::ptr::addr_of!((*ptr).feat) as usize - ptr as usize in bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_1()
316 ::std::ptr::addr_of!((*ptr).ufd) as usize - ptr as usize in bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_2()
360 ::std::ptr::addr_of!((*ptr).from) as usize - ptr as usize in bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_3()
378 ::std::ptr::addr_of!((*ptr).to) as usize - ptr as usize in bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_3()
396 ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize in bindgen_test_layout_uffd_msg__bindgen_ty_1__bindgen_ty_3()
[all …]
/external/rust/crates/rustc-hash/src/
Dlib.rs61 hash: usize,
65 const K: usize = 0x9e3779b9;
67 const K: usize = 0x517cc1b727220a95;
78 fn add_to_hash(&mut self, i: usize) { in add_to_hash() argument
92 assert!(size_of::<usize>() <= 8); in write()
93 while bytes.len() >= size_of::<usize>() { in write()
94 hash.add_to_hash(read_usize(bytes) as usize); in write()
95 bytes = &bytes[size_of::<usize>()..]; in write()
97 if (size_of::<usize>() > 4) && (bytes.len() >= 4) { in write()
98 hash.add_to_hash(u32::from_ne_bytes(bytes[..4].try_into().unwrap()) as usize); in write()
[all …]
/external/rust/cxx/tests/ffi/
Dlib.rs28 z: usize,
47 z: usize,
67 z: usize,
97 fn c_return_primitive() -> usize; in c_return_primitive()
102 fn c_return_ref(shared: &Shared) -> &usize; in c_return_ref() argument
103 fn c_return_mut(shared: &mut Shared) -> &mut usize; in c_return_mut() argument
122 fn c_return_identity(_: usize) -> usize; in c_return_identity() argument
123 fn c_return_sum(_: usize, _: usize) -> usize; in c_return_sum() argument
125 fn c_return_ns_ref(shared: &AShared) -> &usize; in c_return_ns_ref() argument
126 fn c_return_nested_ns_ref(shared: &ABShared) -> &usize; in c_return_nested_ns_ref() argument
[all …]
/external/crosvm/devices/src/irqchip/
Dpic.rs163 self.pics[select as usize] in get_pic_state()
168 self.pics[select as usize] = *state; in set_pic_state()
183 Pic::set_irq_internal(&mut self.pics[pic as usize], irq & 7, level); in service_irq()
190 self.pics[PicSelect::Primary as usize].imr == 0xFF in masked()
224 self.pics[PicSelect::Secondary as usize].irq_base + irq_secondary in get_external_interrupt()
226 self.pics[PicSelect::Primary as usize].irq_base + irq_primary in get_external_interrupt()
234 if self.pics[pic_type as usize].poll { in pic_read_command()
236 self.pics[pic_type as usize].poll = false; in pic_read_command()
243 } else if self.pics[pic_type as usize].read_reg_select { in pic_read_command()
244 self.pics[pic_type as usize].isr in pic_read_command()
[all …]
/external/rust/crates/bstr/src/byteset/
Dscalar.rs5 use core::{cmp, usize};
8 const USIZE_BYTES: usize = 4;
11 const USIZE_BYTES: usize = 8;
14 const LOOP_SIZE: usize = 2 * USIZE_BYTES;
21 fn repeat_byte(b: u8) -> usize { in repeat_byte() argument
22 (b as usize) * (usize::MAX / 255) in repeat_byte()
25 pub fn inv_memchr(n1: u8, haystack: &[u8]) -> Option<usize> { in inv_memchr() argument
45 ptr = ptr.add(USIZE_BYTES - (start_ptr as usize & align)); in inv_memchr()
49 debug_assert_eq!(0, (ptr as usize) % USIZE_BYTES); in inv_memchr()
51 let a = *(ptr as *const usize); in inv_memchr() constant
[all …]
/external/rust/crates/url/src/
Dslicing.rs102 fn index(&self, position: Position) -> usize { in index() argument
106 Position::AfterScheme => self.scheme_end as usize, in index()
110 self.scheme_end as usize + "://".len() in index()
114 self.scheme_end as usize + ":".len() in index()
118 Position::AfterUsername => self.username_end as usize, in index()
122 self.username_end as usize + ":".len() in index()
125 self.username_end as usize in index()
132 self.host_start as usize - "@".len() in index()
135 self.host_start as usize in index()
139 Position::BeforeHost => self.host_start as usize, in index()
[all …]
/external/crosvm/x86_64/src/
Dmpspec.rs77 unsafe { &(*(0 as *const mpf_intel)).signature as *const _ as usize }, in bindgen_test_layout_mpf_intel()
87 unsafe { &(*(0 as *const mpf_intel)).physptr as *const _ as usize }, in bindgen_test_layout_mpf_intel()
97 unsafe { &(*(0 as *const mpf_intel)).length as *const _ as usize }, in bindgen_test_layout_mpf_intel()
107 unsafe { &(*(0 as *const mpf_intel)).specification as *const _ as usize }, in bindgen_test_layout_mpf_intel()
117 unsafe { &(*(0 as *const mpf_intel)).checksum as *const _ as usize }, in bindgen_test_layout_mpf_intel()
127 unsafe { &(*(0 as *const mpf_intel)).feature1 as *const _ as usize }, in bindgen_test_layout_mpf_intel()
137 unsafe { &(*(0 as *const mpf_intel)).feature2 as *const _ as usize }, in bindgen_test_layout_mpf_intel()
147 unsafe { &(*(0 as *const mpf_intel)).feature3 as *const _ as usize }, in bindgen_test_layout_mpf_intel()
157 unsafe { &(*(0 as *const mpf_intel)).feature4 as *const _ as usize }, in bindgen_test_layout_mpf_intel()
167 unsafe { &(*(0 as *const mpf_intel)).feature5 as *const _ as usize }, in bindgen_test_layout_mpf_intel()
[all …]

12345678910>>...117