Skip to content

Commit e11a9ea

Browse files
chore: make names in config.rs files uniform across architectures
1 parent 58d85a5 commit e11a9ea

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

crates/intrinsic-test/src/arm/config.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pub const NOTICE: &str = "\
33
// test are derived from a JSON specification, published under the same license as the
44
// `intrinsic-test` crate.\n";
55

6-
pub const POLY128_OSTREAM_DECL: &str = r#"
6+
pub const PLATFORM_C_FORWARD_DECLARATIONS: &str = r#"
77
#ifdef __aarch64__
88
std::ostream& operator<<(std::ostream& os, poly128_t value);
99
#endif
@@ -20,7 +20,7 @@ template<typename T1, typename T2> T1 cast(T2 x) {
2020
}
2121
"#;
2222

23-
pub const POLY128_OSTREAM_DEF: &str = r#"
23+
pub const PLATFORM_C_DEFINITIONS: &str = r#"
2424
#ifdef __aarch64__
2525
std::ostream& operator<<(std::ostream& os, poly128_t value) {
2626
std::stringstream temp;
@@ -53,7 +53,7 @@ std::ostream& operator<<(std::ostream& os, uint8_t value) {
5353
"#;
5454

5555
// Format f16 values (and vectors containing them) in a way that is consistent with C.
56-
pub const F16_FORMATTING_DEF: &str = r#"
56+
pub const PLATFORM_RUST_DEFINITIONS: &str = r#"
5757
/// Used to continue `Debug`ging SIMD types as `MySimd(1, 2, 3, 4)`, as they
5858
/// were before moving to array-based simd.
5959
#[inline]
@@ -139,7 +139,7 @@ impl DebugHexF16 for float16x8x4_t {
139139
}
140140
"#;
141141

142-
pub const AARCH_CONFIGURATIONS: &str = r#"
142+
pub const PLATFORM_RUST_CFGS: &str = r#"
143143
#![cfg_attr(target_arch = "arm", feature(stdarch_arm_neon_intrinsics))]
144144
#![cfg_attr(target_arch = "arm", feature(stdarch_aarch32_crc32))]
145145
#![cfg_attr(any(target_arch = "aarch64", target_arch = "arm64ec"), feature(stdarch_neon_fcma))]

crates/intrinsic-test/src/arm/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ impl SupportedArchitectureTest for ArmArchitectureTest {
3232
const NOTICE: &str = config::NOTICE;
3333

3434
const PLATFORM_C_HEADERS: &[&str] = &["arm_neon.h", "arm_acle.h", "arm_fp16.h"];
35-
const PLATFORM_C_DEFINITIONS: &str = config::POLY128_OSTREAM_DEF;
36-
const PLATFORM_C_FORWARD_DECLARATIONS: &str = config::POLY128_OSTREAM_DECL;
35+
const PLATFORM_C_DEFINITIONS: &str = config::PLATFORM_C_DEFINITIONS;
36+
const PLATFORM_C_FORWARD_DECLARATIONS: &str = config::PLATFORM_C_FORWARD_DECLARATIONS;
3737

38-
const PLATFORM_RUST_DEFINITIONS: &str = config::F16_FORMATTING_DEF;
39-
const PLATFORM_RUST_CFGS: &str = config::AARCH_CONFIGURATIONS;
38+
const PLATFORM_RUST_DEFINITIONS: &str = config::PLATFORM_RUST_DEFINITIONS;
39+
const PLATFORM_RUST_CFGS: &str = config::PLATFORM_RUST_CFGS;
4040

4141
fn cpp_compilation(&self) -> Option<CppCompilation> {
4242
compile::build_cpp_compilation(&self.cli_options)

crates/intrinsic-test/src/x86/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pub const NOTICE: &str = "\
44
// `intrinsic-test` crate.\n";
55

66
// Format f16 values (and vectors containing them) in a way that is consistent with C.
7-
pub const F16_FORMATTING_DEF: &str = r#"
7+
pub const PLATFORM_RUST_DEFINITIONS: &str = r#"
88
use std::arch::x86_64::*;
99
1010
#[inline]
@@ -392,7 +392,7 @@ std::ostream& operator<<(std::ostream& os, __mmask8 value) {
392392
}
393393
"#;
394394

395-
pub const X86_CONFIGURATIONS: &str = r#"
395+
pub const PLATFORM_RUST_CFGS: &str = r#"
396396
#![cfg_attr(target_arch = "x86", feature(avx))]
397397
#![cfg_attr(target_arch = "x86", feature(sse))]
398398
#![cfg_attr(target_arch = "x86", feature(sse2))]

crates/intrinsic-test/src/x86/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ impl SupportedArchitectureTest for X86ArchitectureTest {
4040
const PLATFORM_C_DEFINITIONS: &str = config::PLATFORM_C_DEFINITIONS;
4141
const PLATFORM_C_FORWARD_DECLARATIONS: &str = config::PLATFORM_C_FORWARD_DECLARATIONS;
4242

43-
const PLATFORM_RUST_DEFINITIONS: &str = config::F16_FORMATTING_DEF;
44-
const PLATFORM_RUST_CFGS: &str = config::X86_CONFIGURATIONS;
43+
const PLATFORM_RUST_DEFINITIONS: &str = config::PLATFORM_RUST_DEFINITIONS;
44+
const PLATFORM_RUST_CFGS: &str = config::PLATFORM_RUST_CFGS;
4545

4646
fn create(cli_options: ProcessedCli) -> Self {
4747
let intrinsics =

0 commit comments

Comments
 (0)