We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b18e0a8 commit 5450176Copy full SHA for 5450176
1 file changed
src/simd.rs
@@ -332,7 +332,7 @@ pub fn read_u64_be_simd(data: &[u8]) -> u64 {
332
{
333
if data.len() >= 8 && is_avx512_available() {
334
let v = unsafe { std::ptr::read_unaligned(data.as_ptr() as *const u64) };
335
- rv = Some(v.swap_bytes());
+ rv = Some(v.to_be());
336
}
337
338
@@ -767,7 +767,7 @@ pub fn read_u64_be_avx512(data: &[u8]) -> u64 {
767
if is_avx512_available() && data.len() >= 8 {
768
unsafe {
769
let v = std::ptr::read_unaligned(data.as_ptr() as *const u64);
770
- return v.swap_bytes();
+ return v.to_be();
771
772
773
read_u64_be_simd(data)
0 commit comments