Skip to content

Use cfg_select! for conditional compilation based on target_feature#895

Open
jgilchrist wants to merge 1 commit intocodedeliveryservice:mainfrom
jgilchrist:use-cfg_select
Open

Use cfg_select! for conditional compilation based on target_feature#895
jgilchrist wants to merge 1 commit intocodedeliveryservice:mainfrom
jgilchrist:use-cfg_select

Conversation

@jgilchrist
Copy link
Copy Markdown

Ups the Rust requirement to 1.95, so may be a while before this could be merged. But is a much nicer way of expressing this pattern.

@jgilchrist jgilchrist force-pushed the use-cfg_select branch 6 times, most recently from e644c9b to 36f6c24 Compare April 16, 2026 13:36
Ups the Rust requirement to 1.95, so may be a while before this could be
merged. But is a _much_ nicer way of expressing this pattern.
ft_out: &Aligned<[u8; L1_SIZE]>, nnz_table: &[SparseEntry],
) -> (Aligned<[u16; L1_SIZE / 4]>, usize) {
use std::arch::x86_64::*;
cfg_select! {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely an argument that it's trickier to read for these larger functions, so will revert if others agree

@jgilchrist jgilchrist changed the title Use cfg_select! for code based on target_feature Use cfg_select! for conditional compilation based on target_feature Apr 16, 2026
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.

1 participant