Home
last modified time | relevance | path

Searched refs:from_usize (Results 1 – 17 of 17) sorted by relevance

/external/rust/crates/aho-corasick/src/
Dstate_id.rs33 Ok(S::from_usize(value)) in usize_to_state_id()
40 S::from_usize(0) in fail_id()
46 S::from_usize(1) in dead_id()
88 fn from_usize(n: usize) -> Self; in from_usize() method
109 fn from_usize(n: usize) -> usize { in from_usize() method
126 fn from_usize(n: usize) -> u8 { in from_usize() method
143 fn from_usize(n: usize) -> u16 { in from_usize() method
161 fn from_usize(n: usize) -> u32 { in from_usize() method
179 fn from_usize(n: usize) -> u64 { in from_usize() method
Ddfa.rs535 S::from_usize(cur), in shuffle_match_states()
536 S::from_usize(first_non_match), in shuffle_match_states()
538 swaps[cur] = S::from_usize(first_non_match); in shuffle_match_states()
539 swaps[first_non_match] = S::from_usize(cur); in shuffle_match_states()
550 for id in (0..self.state_count).map(S::from_usize) { in shuffle_match_states()
562 self.max_match = S::from_usize(first_non_match - 1); in shuffle_match_states()
572 S::from_usize(self.state_count - 1), in premultiply()
576 for id in (2..self.state_count).map(S::from_usize) { in premultiply()
582 *next = S::from_usize(next.to_usize() * alpha_len); in premultiply()
586 self.start_id = S::from_usize(self.start_id.to_usize() * alpha_len); in premultiply()
[all …]
/external/rust/crates/crossbeam-epoch/src/
Datomic.rs325 fn from_usize(data: usize) -> Self { in from_usize() method
366 unsafe { Shared::from_usize(self.data.load(ord)) } in load()
391 unsafe { Shared::from_usize(self.data.load_consume()) } in load_consume()
430 unsafe { Shared::from_usize(self.data.swap(new.into_usize(), ord)) } in swap()
477 .map(|_| unsafe { Shared::from_usize(new) }) in compare_exchange()
480 current: Shared::from_usize(current), in compare_exchange()
481 new: P::from_usize(new), in compare_exchange()
552 .map(|_| unsafe { Shared::from_usize(new) }) in compare_exchange_weak()
555 current: Shared::from_usize(current), in compare_exchange_weak()
556 new: P::from_usize(new), in compare_exchange_weak()
[all …]
/external/rust/crates/regex-automata/src/
Dstate_id.rs47 Ok(S::from_usize(next)) in next_state_id()
57 Ok(S::from_usize(value)) in usize_to_state_id()
90 S::from_usize(0) in dead_id()
123 fn from_usize(n: usize) -> Self; in from_usize() method
158 fn from_usize(n: usize) -> usize { in from_usize() method
185 fn from_usize(n: usize) -> u8 { in from_usize() method
212 fn from_usize(n: usize) -> u16 { in from_usize() method
240 fn from_usize(n: usize) -> u32 { in from_usize() method
268 fn from_usize(n: usize) -> u64 { in from_usize() method
Ddense.rs995 max_match: S::from_usize(0), in empty_with_byte_classes()
1186 start: A::from_usize(self.start.to_usize()), in to_sized()
1188 max_match: A::from_usize(self.max_match.to_usize()), in to_sized()
1193 *id = A::from_usize(self.trans()[i].to_usize()); in to_sized()
1353 let start = S::from_usize(NativeEndian::read_u64(buf) as usize); in from_bytes()
1361 let max_match = S::from_usize(NativeEndian::read_u64(buf) as usize); in from_bytes()
1413 S::from_usize(self.state_count - 1), in premultiply()
1417 for id in (0..self.state_count).map(S::from_usize) { in premultiply()
1419 *next = S::from_usize(next.to_usize() * alpha_len); in premultiply()
1423 self.start = S::from_usize(self.start.to_usize() * alpha_len); in premultiply()
[all …]
Dminimize.rs148 let mut new_id = S::from_usize(0); in run()
152 new_id = S::from_usize(new_id.to_usize() + 1); in run()
160 for id in (0..self.dfa.state_count()).map(S::from_usize) { in run()
194 for id in (0..(old_max.to_usize() + 1)).map(S::from_usize) { in run()
Dsparse.rs904 let start = S::from_usize(NativeEndian::read_u64(buf) as usize); in from_bytes()
912 let max_match = S::from_usize(NativeEndian::read_u64(buf) as usize); in from_bytes()
1069 self.id = S::from_usize(self.id.to_usize() + state.bytes()); in next()
/external/rust/crates/once_cell/src/
Drace.rs109 self.inner.get().map(OnceBool::from_usize) in get()
131 OnceBool::from_usize(self.inner.get_or_init(|| OnceBool::to_usize(f()))) in get_or_init()
145 self.inner.get_or_try_init(|| f().map(OnceBool::to_usize)).map(OnceBool::from_usize) in get_or_try_init()
149 fn from_usize(value: NonZeroUsize) -> bool { in from_usize() method
/external/rust/crates/tokio/src/io/driver/
Dscheduled_io.rs172 let current_readiness = Ready::from_usize(current); in set_readiness()
286 ready: interest.mask() & Ready::from_usize(READINESS.unpack(curr)), in ready_event()
302 let ready = direction.mask() & Ready::from_usize(READINESS.unpack(curr)); in poll_readiness()
328 let ready = direction.mask() & Ready::from_usize(READINESS.unpack(curr)); in poll_readiness()
436 let ready = Ready::from_usize(READINESS.unpack(curr));
453 let mut ready = Ready::from_usize(READINESS.unpack(curr));
Dready.rs153 pub(crate) fn from_usize(val: usize) -> Ready { in from_usize() method
Dmod.rs183 let addr = slab::Address::from_usize(ADDRESS.unpack(token.0)); in dispatch()
/external/rust/crates/arbitrary/src/
Dunstructured.rs325 && (range >> T::Widest::from_usize(offset)) > T::Widest::ZERO in int_in_range_impl()
613 fn from_usize(u: usize) -> Self; in from_usize() method
645 fn from_usize(u: usize) -> Self {
/external/rust/crates/log/src/
Dlib.rs520 .map(|idx| Level::from_usize(idx).unwrap()) in from_str()
534 fn from_usize(u: usize) -> Option<Level> { in from_usize() method
554 LevelFilter::from_usize(*self as usize).unwrap() in to_level_filter()
681 .map(|p| LevelFilter::from_usize(p).unwrap()), in from_str()
694 fn from_usize(u: usize) -> Option<LevelFilter> { in from_usize() method
716 Level::from_usize(*self as usize) in to_level()
/external/rust/crates/num-traits/src/
Dcast.rs460 fn from_usize(n: usize) -> Option<Self> { in from_usize() method
555 fn from_usize(n: usize) -> Option<$T> {
662 fn from_usize(usize);
/external/rust/crates/num-derive/src/
Dlib.rs290 fn from_usize(n: usize) -> Option<Self> { in from_primitive()
291 <#inner_ty as #import::FromPrimitive>::from_usize(n).map(#name) in from_primitive()
/external/rust/crates/num-traits/tests/
Dcast.rs350 assert_eq_from!(from_u8 from_u16 from_u32 from_u64 from_usize); in newtype_from_primitive()
/external/rust/crates/tokio/src/util/
Dslab.rs607 pub(crate) fn from_usize(src: usize) -> Address { in from_usize() method