mod.rs
Rust calls mem::transmute
SHA-256f2e558e364e64b90c1bd55659332f54a3d6d36badc1aab9f67c4cfc2689c557a
MaleculeH(Db)
Evidence
1use std::mem;
2use std::sync::atomic::{AtomicUsize, Ordering};
3
4use fallback;
5
6mod avx;
7mod sse2;
8
9// This macro employs a gcc-like "ifunc" trick where by upon first calling
10// `memchr` (for example), CPU feature detection will be performed at runtime
11// to determine the best implementation to use. After CPU feature detection
12// is done, we replace `memchr`'s function pointer with the selection. Upon
13// subsequent invocations, the CPU-specific routine is invoked directly, which
14// skips the CPU feature detection and subsequent branch that's required.
15//
16// While this typically doesn't matter for rare occurrences or when used on
17// l …
44:36… , Ordering::Relaxed);
45 unsafe {
46 mem::transmute::<usize, $fnty>(fun)($($needle),+, haystack)
47 }
48 }
49
50 unsafe {
51 let slot = &*(&FN as *const _ as *const Atomi …