-
Notifications
You must be signed in to change notification settings - Fork 82
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
add all_lane_counts feature to enable non-power-of-2 lane counts <= 64 #300
add all_lane_counts feature to enable non-power-of-2 lane counts <= 64 #300
Conversation
I'm curious if this will dramatically slow down CI. I remember some sort of issue in the past with testing too many lane counts (though maybe that's not an issue anymore?) |
the only ci jobs with the feature enabled finished waay faster than a lot of other jobs, i'd expect no slowdown. |
|
||
supported_lane_count!(1, 2, 4, 8, 16, 32, 64); | ||
#[cfg(feature = "all_lane_counts")] | ||
supported_lane_count!( |
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.
Some sort of const generics would be really nice here, I guess we need bounds first. This is pretty clean though.
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.
we could just implement them for all usize
values using a const generic impl, but iirc @workingjubilee specifically wanted to avoid 0
.
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.
Yeah, I'm on the fence about 0. But more than that, LLVM has had issues with larger values in the past, and rustc also has an upper limit on #[repr(simd)]
, so we need an upper limit anyway.
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.
Looks good to me, assuming we're okay with the premise
as discussed here: https://rust-lang.zulipchat.com/#narrow/stream/257879-project-portable-simd/topic/experimental.20feature.20to.20allow.20non-power-of-2.20vector.20lengths