Skip to content
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

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

@calebzulawski
Copy link
Member

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?)

@programmerjake
Copy link
Member Author

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!(
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member

@calebzulawski calebzulawski left a 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

@programmerjake programmerjake merged commit d5cd4a8 into rust-lang:master Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants