-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix layout of non-power-of-two length vectors
- Loading branch information
1 parent
8c31005
commit 0b3b856
Showing
9 changed files
with
53 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#![feature(portable_simd)] | ||
|
||
macro_rules! layout_tests { | ||
{ $($mod:ident, $ty:ty,)* } => { | ||
$( | ||
mod $mod { | ||
test_helpers::test_lanes! { | ||
fn no_padding<const LANES: usize>() { | ||
assert_eq!( | ||
core::mem::size_of::<core_simd::simd::Simd::<$ty, LANES>>(), | ||
core::mem::size_of::<[$ty; LANES]>(), | ||
); | ||
} | ||
} | ||
} | ||
)* | ||
} | ||
} | ||
|
||
layout_tests! { | ||
i8, i8, | ||
i16, i16, | ||
i32, i32, | ||
i64, i64, | ||
isize, isize, | ||
u8, u8, | ||
u16, u16, | ||
u32, u32, | ||
u64, u64, | ||
usize, usize, | ||
f32, f32, | ||
f64, f64, | ||
mut_ptr, *mut (), | ||
const_ptr, *const (), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[toolchain] | ||
channel = "nightly-2024-04-29" | ||
channel = "nightly-2024-06-03" | ||
components = ["rustfmt", "clippy", "miri", "rust-src"] |