Skip to content

also implement clamp for integer vectors #262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fmt
  • Loading branch information
RalfJung committed Mar 12, 2022
commit 26da952eebe672d314cfb3747da33b3d256d308c
4 changes: 2 additions & 2 deletions crates/core_simd/tests/i16_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn clamp_is_not_lexicographic() {
let up = i16x2::from_array([-4, 12]);
assert_eq!(a.clamp(lo, up), i16x2::from_array([-4, 10]));

let x = i16x2::from_array([1,10]);
let x = i16x2::from_array([1, 10]);
let y = x.clamp(i16x2::splat(0), i16x2::splat(9));
assert_eq!(y, i16x2::from_array([1,9]));
assert_eq!(y, i16x2::from_array([1, 9]));
}