-
Notifications
You must be signed in to change notification settings - Fork 287
Convert vsli_n_* neon methods to const generics #1027
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
Conversation
r? @Amanieu (rust-highfive has picked a reviewer for you, use r? to override) |
d220418
to
4bd13c1
Compare
vsli_n_s8_(a, b, n) | ||
#[rustc_legacy_const_generics(2)] | ||
pub unsafe fn vsli_n_s8<const N: i32>(a: int8x8_t, b: int8x8_t) -> int8x8_t { | ||
assert!(0 <= N && N <= 7, "must have 0 ≤ N ≤ 7, but N = {}", N); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use static_assert!
instead of assert!
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing. It has been corrected.
4bd13c1
to
2a1d6b8
Compare
Sorry I currently only have aarch64 machines on hand, so I can't test arm and armv7 by myself. I will get them soon. |
ee1788f
to
c4ef544
Compare
In order to make the review easier, I split this pr into several parts |
Use generic const in the following methods:
vsli_n_*
vsliq_n_*
Fixes #1017