Check that vectors aren't padded
This commit is contained in:
parent
0fd7c8e138
commit
36829ddca7
1 changed files with 2 additions and 0 deletions
|
|
@ -174,6 +174,7 @@ where
|
|||
slice.len() >= LANES,
|
||||
"slice length must be at least the number of lanes"
|
||||
);
|
||||
assert!(core::mem::size_of::<Self>() == LANES * core::mem::size_of::<T>());
|
||||
// Safety:
|
||||
// - We've checked the length is sufficient.
|
||||
// - `T` and `Simd<T, N>` are Copy types.
|
||||
|
|
@ -203,6 +204,7 @@ where
|
|||
slice.len() >= LANES,
|
||||
"slice length must be at least the number of lanes"
|
||||
);
|
||||
assert!(core::mem::size_of::<Self>() == LANES * core::mem::size_of::<T>());
|
||||
// Safety:
|
||||
// - We've checked the length is sufficient
|
||||
// - `T` and `Simd<T, N>` are Copy types.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue