Skip to content

Commit 2d8d1d1

Browse files
committed
Remove NvvmArch::iter_up_to.
This is just a slightly less powerful version of `all_target_features`, one that always includes all the 'a' and 'f' variants for each level. It doesn't seem worth having.
1 parent f8d68e6 commit 2d8d1d1

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

crates/nvvm/src/lib.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -532,12 +532,6 @@ impl NvvmArch {
532532
}
533533
}
534534

535-
/// Create an iterator over all architectures from Compute35 up to and including this one
536-
pub fn iter_up_to(&self) -> impl Iterator<Item = Self> {
537-
let current = self.capability_value();
538-
NvvmArch::iter().filter(move |arch| arch.capability_value() <= current)
539-
}
540-
541535
/// Check if this architecture is a base variant (no suffix)
542536
pub fn is_base_variant(&self) -> bool {
543537
!self.target_feature().ends_with(['f', 'a'])
@@ -1005,27 +999,6 @@ mod tests {
1005999
);
10061000
}
10071001

1008-
#[test]
1009-
fn nvvm_arch_iter_up_to_includes_only_lower_or_equal() {
1010-
// Compute35 only includes itself
1011-
let archs: Vec<_> = Compute35.iter_up_to().collect();
1012-
assert_eq!(archs, vec![Compute35]);
1013-
1014-
// Compute52 includes all up to 52
1015-
let archs: Vec<_> = Compute52.iter_up_to().collect();
1016-
assert_eq!(archs, vec![Compute35, Compute37, Compute50, Compute52,]);
1017-
1018-
// Compute75 includes all up to 75
1019-
let archs: Vec<_> = Compute75.iter_up_to().collect();
1020-
assert_eq!(
1021-
archs,
1022-
vec![
1023-
Compute35, Compute37, Compute50, Compute52, Compute53, Compute60, Compute61,
1024-
Compute62, Compute70, Compute72, Compute75,
1025-
]
1026-
);
1027-
}
1028-
10291002
#[test]
10301003
fn options_parse_correctly() {
10311004
use NvvmOption::{self, *};

0 commit comments

Comments
 (0)