Home
last modified time | relevance | path

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

12345678910>>...72

/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/parking_lot/src/
Delision.rs38 type IntType = usize;
41 fn elision_compare_exchange_acquire(&self, _: usize, _: usize) -> Result<usize, usize> { in elision_compare_exchange_acquire() argument
46 fn elision_fetch_sub_release(&self, _: usize) -> usize { in elision_fetch_sub_release() argument
53 type IntType = usize;
57 fn elision_compare_exchange_acquire(&self, current: usize, new: usize) -> Result<usize, usize> { in elision_compare_exchange_acquire() argument
59 let prev: usize; in elision_compare_exchange_acquire()
74 fn elision_compare_exchange_acquire(&self, current: usize, new: usize) -> Result<usize, usize> { in elision_compare_exchange_acquire() argument
76 let prev: usize; in elision_compare_exchange_acquire()
92 fn elision_fetch_sub_release(&self, val: usize) -> usize { in elision_fetch_sub_release() argument
94 let prev: usize; in elision_fetch_sub_release()
[all …]
/external/rust/crates/arbitrary/src/
Dlib.rs255 fn size_hint(depth: usize) -> (usize, Option<usize>) { in size_hint() argument
267 fn size_hint(_depth: usize) -> (usize, Option<usize>) { in size_hint() argument
278 fn size_hint(depth: usize) -> (usize, Option<usize>) { in size_hint() argument
298 fn size_hint(_depth: usize) -> (usize, Option<usize>) {
314 usize: usize;
320 isize: usize;
332 fn size_hint(depth: usize) -> (usize, Option<usize>) {
363 fn size_hint(depth: usize) -> (usize, Option<usize>) { in size_hint() argument
374 fn size_hint(depth: usize) -> (usize, Option<usize>) { in size_hint() argument
385 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/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/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/vmm_vhost/src/vhost_user/
Ddummy_slave.rs9 pub const MAX_QUEUE_NUM: usize = 2;
10 pub const MAX_VRING_NUM: usize = 256;
11 pub const MAX_MEM_SLOTS: usize = 32;
20 pub queue_num: usize,
91 if index as usize >= self.queue_num || num == 0 || num as usize > MAX_VRING_NUM { in set_vring_num()
94 self.vring_num[index as usize] = num; in set_vring_num()
107 if index as usize >= self.queue_num { in set_vring_addr()
114 if index as usize >= self.queue_num || base as usize >= MAX_VRING_NUM { in set_vring_base()
117 self.vring_base[index as usize] = base; in set_vring_base()
122 if index as usize >= self.queue_num { in get_vring_base()
[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/memchr/src/
Dfallback.rs6 use core::usize;
9 const USIZE_BYTES: usize = 2;
12 const USIZE_BYTES: usize = 4;
15 const USIZE_BYTES: usize = 8;
18 const LOOP_SIZE: usize = 2 * USIZE_BYTES;
28 fn contains_zero_byte(x: usize) -> bool { in contains_zero_byte()
32 const LO_USIZE: usize = LO_U64 as usize; in contains_zero_byte()
33 const HI_USIZE: usize = HI_U64 as usize; in contains_zero_byte()
43 fn repeat_byte(b: u8) -> usize { in repeat_byte() argument
44 (b as usize) * (usize::MAX / 255) in repeat_byte()
[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/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
56 const THREADS_BITS: usize = 10;
60 const SLEEPING_SHIFT: usize = 0 * THREADS_BITS;
64 const INACTIVE_SHIFT: usize = 1 * THREADS_BITS;
68 const JEC_SHIFT: usize = 2 * THREADS_BITS;
71 const THREADS_MAX: usize = (1 << THREADS_BITS) - 1;
74 const ONE_SLEEPING: usize = 1;
[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
99 fn slots_len(&self) -> usize; in slots_len() argument
111 fn next_after_empty(&self, text: &Self::Text, i: usize) -> usize; in next_after_empty() argument
117 start: usize, in shortest_match_at() argument
118 ) -> Option<usize>; in shortest_match_at() argument
[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/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/adhd/cras/client/cras-sys/src/
Dgen.rs72 unsafe { &(*(::std::ptr::null::<cras_iodev_info>())).idx as *const _ as usize }, in bindgen_test_layout_cras_iodev_info()
82 unsafe { &(*(::std::ptr::null::<cras_iodev_info>())).name as *const _ as usize }, in bindgen_test_layout_cras_iodev_info()
92 unsafe { &(*(::std::ptr::null::<cras_iodev_info>())).stable_id as *const _ as usize }, in bindgen_test_layout_cras_iodev_info()
103 &(*(::std::ptr::null::<cras_iodev_info>())).max_supported_channels as *const _ as usize in bindgen_test_layout_cras_iodev_info()
152 &(*(::std::ptr::null::<cras_ionode_info__bindgen_ty_1>())).tv_sec as *const _ as usize in bindgen_test_layout_cras_ionode_info__bindgen_ty_1()
164 &(*(::std::ptr::null::<cras_ionode_info__bindgen_ty_1>())).tv_usec as *const _ as usize in bindgen_test_layout_cras_ionode_info__bindgen_ty_1()
188 unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).iodev_idx as *const _ as usize }, in bindgen_test_layout_cras_ionode_info()
198 unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).ionode_idx as *const _ as usize }, in bindgen_test_layout_cras_ionode_info()
208 unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).plugged as *const _ as usize }, in bindgen_test_layout_cras_ionode_info()
218 unsafe { &(*(::std::ptr::null::<cras_ionode_info>())).active as *const _ as usize }, in bindgen_test_layout_cras_ionode_info()
[all …]
/external/rust/cxx/tests/ffi/
Dlib.rs27 z: usize,
46 z: usize,
66 z: usize,
95 fn c_return_primitive() -> usize; in c_return_primitive()
100 fn c_return_ref(shared: &Shared) -> &usize; in c_return_ref() argument
101 fn c_return_mut(shared: &mut Shared) -> &mut usize; in c_return_mut() argument
118 fn c_return_identity(_: usize) -> usize; in c_return_identity() argument
119 fn c_return_sum(_: usize, _: usize) -> usize; in c_return_sum() argument
121 fn c_return_ns_ref(shared: &AShared) -> &usize; in c_return_ns_ref() argument
122 fn c_return_nested_ns_ref(shared: &ABShared) -> &usize; in c_return_nested_ns_ref() argument
[all …]
/external/crosvm/devices/src/irqchip/
Dpic.rs151 self.pics[select as usize] in get_pic_state()
156 self.pics[select as usize] = *state; in set_pic_state()
171 Pic::set_irq_internal(&mut self.pics[pic as usize], irq & 7, level); in service_irq()
178 self.pics[PicSelect::Primary as usize].imr == 0xFF in masked()
215 self.pics[PicSelect::Secondary as usize].irq_base + irq_secondary in get_external_interrupt()
217 self.pics[PicSelect::Primary as usize].irq_base + irq_primary in get_external_interrupt()
225 if self.pics[pic_type as usize].poll { in pic_read_command()
227 self.pics[pic_type as usize].poll = false; in pic_read_command()
234 } else if self.pics[pic_type as usize].read_reg_select { in pic_read_command()
235 self.pics[pic_type as usize].isr in pic_read_command()
[all …]
/external/crosvm/sys_util/src/
Dmmap.rs35 InvalidRange(usize, usize, usize),
119 fn validate_includes_range(mmap_size: usize, offset: usize, range_size: usize) -> Result<()> { in validate_includes_range() argument
142 fn size(&self) -> usize; in size() argument
156 _offset: usize, in add_fd_mapping() argument
157 _size: usize, in add_fd_mapping() argument
166 fn remove_mapping(&mut self, _offset: usize, _size: usize) -> Result<()> { in remove_mapping() argument
174 pub fn msync(&self, offset: usize, size: usize) -> Result<()> { in msync() argument
182 (self.as_ptr() as usize + offset) as *mut libc::c_void, in msync()
199 size: usize,
214 pub fn new(size: usize) -> Result<MemoryMapping> { in new()
[all …]
/external/rust/crates/tokio/src/util/
Dbit.rs5 mask: usize,
31 pub(crate) const fn max_value(&self) -> usize { in max_value() argument
35 pub(crate) fn pack(&self, value: usize, base: usize) -> usize { in pack() argument
44 pub(crate) fn pack_lossy(&self, value: usize, base: usize) -> usize { in pack_lossy() argument
48 pub(crate) fn unpack(&self, src: usize) -> usize { in unpack() argument
65 std::mem::size_of::<usize>() as u32 * 8 in pointer_width()
69 pub(crate) const fn mask_for(n: u32) -> usize { in mask_for() argument
75 pub(crate) const fn unpack(src: usize, mask: usize, shift: u32) -> usize { in unpack() argument
/external/crosvm/x86_64/src/
Dmpspec.rs71 unsafe { &(*(0 as *const mpf_intel)).signature as *const _ as usize }, in bindgen_test_layout_mpf_intel()
81 unsafe { &(*(0 as *const mpf_intel)).physptr as *const _ as usize }, in bindgen_test_layout_mpf_intel()
91 unsafe { &(*(0 as *const mpf_intel)).length as *const _ as usize }, in bindgen_test_layout_mpf_intel()
101 unsafe { &(*(0 as *const mpf_intel)).specification as *const _ as usize }, in bindgen_test_layout_mpf_intel()
111 unsafe { &(*(0 as *const mpf_intel)).checksum as *const _ as usize }, in bindgen_test_layout_mpf_intel()
121 unsafe { &(*(0 as *const mpf_intel)).feature1 as *const _ as usize }, in bindgen_test_layout_mpf_intel()
131 unsafe { &(*(0 as *const mpf_intel)).feature2 as *const _ as usize }, in bindgen_test_layout_mpf_intel()
141 unsafe { &(*(0 as *const mpf_intel)).feature3 as *const _ as usize }, in bindgen_test_layout_mpf_intel()
151 unsafe { &(*(0 as *const mpf_intel)).feature4 as *const _ as usize }, in bindgen_test_layout_mpf_intel()
161 unsafe { &(*(0 as *const mpf_intel)).feature5 as *const _ as usize }, in bindgen_test_layout_mpf_intel()
[all …]
/external/rust/crates/ryu/src/pretty/
Dmod.rs52 pub unsafe fn format64(f: f64, result: *mut u8) -> usize { in format64() argument
67 return sign as usize + 3; in format64()
85 index as usize + kk as usize + 2 in format64()
89 ptr::copy(result.offset(index + 1), result.offset(index), kk as usize); in format64()
91 index as usize + length as usize + 1 in format64()
101 index as usize + length as usize + offset as usize in format64()
106 index as usize + 2 + write_exponent3(kk - 1, result.offset(index + 2)) in format64()
113 index as usize in format64()
114 + length as usize in format64()
159 pub unsafe fn format32(f: f32, result: *mut u8) -> usize { in format32() argument
[all …]
/external/rust/crates/nix/src/
Dfeatures.rs13 static VERS_UNKNOWN: usize = 1;
14 static VERS_2_6_18: usize = 2;
15 static VERS_2_6_27: usize = 3;
16 static VERS_2_6_28: usize = 4;
17 static VERS_3: usize = 5;
20 fn digit(dst: &mut usize, b: u8) { in digit() argument
22 *dst += (b - b'0') as usize; in digit()
25 fn parse_kernel_version() -> usize { in parse_kernel_version()
28 let mut curr: usize = 0; in parse_kernel_version()
29 let mut major: usize = 0; in parse_kernel_version()
[all …]
/external/crosvm/kvm_sys/src/x86/
Dbindings.rs32 pub fn get_bit(&self, index: usize) -> bool { in get_bit()
45 pub fn set_bit(&mut self, index: usize, val: bool) { in set_bit() argument
62 pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { in get() argument
65 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); in get()
67 for i in 0..(bit_width as usize) { in get()
70 bit_width as usize - 1 - i in get()
80 pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { in set() argument
83 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); in set()
84 for i in 0..(bit_width as usize) { in set()
88 bit_width as usize - 1 - i in set()
[all …]
/external/adhd/audio_streams/src/
Dshm_streams.rs26 fn callback(&mut self, offset: usize, frames: usize) -> GenericResult<()>; in callback() argument
34 TooManyFrames(usize, usize),
54 requested_frames: usize,
71 pub fn new<D: BufferSet>(requested_frames: usize, buffer_set: &'a mut D) -> Self { in new() argument
82 pub fn requested_frames(&self) -> usize { in requested_frames() argument
103 pub fn set_buffer_offset_and_frames(self, offset: usize, frames: usize) -> GenericResult<()> { in set_buffer_offset_and_frames() argument
127 fn frame_size(&self) -> usize; in frame_size() argument
130 fn num_channels(&self) -> usize; in num_channels() argument
199 num_channels: usize, in new_stream() argument
202 buffer_size: usize, in new_stream() argument
[all …]

12345678910>>...72