@@ -10,7 +10,6 @@ use std::fs::{self, File};
10
10
use rayon:: prelude:: * ;
11
11
12
12
use crate :: common:: cli:: ProcessedCli ;
13
- use crate :: common:: compare:: compare_outputs;
14
13
use crate :: common:: gen_c:: { write_main_cpp, write_mod_cpp} ;
15
14
use crate :: common:: gen_rust:: {
16
15
compile_rust_programs, write_bin_cargo_toml, write_lib_cargo_toml, write_lib_rs, write_main_rs,
@@ -28,7 +27,17 @@ pub struct ArmArchitectureTest {
28
27
}
29
28
30
29
impl SupportedArchitectureTest for ArmArchitectureTest {
31
- fn create ( cli_options : ProcessedCli ) -> Box < Self > {
30
+ type IntrinsicImpl = ArmIntrinsicType ;
31
+
32
+ fn cli_options ( & self ) -> & ProcessedCli {
33
+ & self . cli_options
34
+ }
35
+
36
+ fn intrinsics ( & self ) -> & [ Intrinsic < ArmIntrinsicType > ] {
37
+ & self . intrinsics
38
+ }
39
+
40
+ fn create ( cli_options : ProcessedCli ) -> Self {
32
41
let a32 = cli_options. target . contains ( "v7" ) ;
33
42
let mut intrinsics = get_neon_intrinsics ( & cli_options. filename , & cli_options. target )
34
43
. expect ( "Error parsing input file" ) ;
@@ -50,10 +59,10 @@ impl SupportedArchitectureTest for ArmArchitectureTest {
50
59
. collect :: < Vec < _ > > ( ) ;
51
60
intrinsics. dedup ( ) ;
52
61
53
- Box :: new ( Self {
62
+ Self {
54
63
intrinsics,
55
64
cli_options,
56
- } )
65
+ }
57
66
}
58
67
59
68
fn build_c_file ( & self ) -> bool {
@@ -177,22 +186,4 @@ impl SupportedArchitectureTest for ArmArchitectureTest {
177
186
178
187
compile_rust_programs ( toolchain, target, linker)
179
188
}
180
-
181
- fn compare_outputs ( & self ) -> bool {
182
- if self . cli_options . toolchain . is_some ( ) {
183
- let intrinsics_name_list = self
184
- . intrinsics
185
- . iter ( )
186
- . map ( |i| i. name . clone ( ) )
187
- . collect :: < Vec < _ > > ( ) ;
188
-
189
- compare_outputs (
190
- & intrinsics_name_list,
191
- & self . cli_options . runner ,
192
- & self . cli_options . target ,
193
- )
194
- } else {
195
- true
196
- }
197
- }
198
189
}
0 commit comments