Skip to content

Commit 0ee976e

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 d2bd8ac commit 0ee976e

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
@@ -1007,27 +1001,6 @@ mod tests {
10071001
);
10081002
}
10091003

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

0 commit comments

Comments
 (0)