File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,4 @@ opt-level = 3
20
20
21
21
[dev-dependencies ]
22
22
stdsimd-test = { path = " stdsimd-test" }
23
+ cupid = " 0.3"
Original file line number Diff line number Diff line change
1
+ #![ feature( cfg_target_feature) ]
2
+
3
+ #[ macro_use]
4
+ extern crate stdsimd;
5
+ extern crate cupid;
6
+
7
+ #[ test]
8
+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
9
+ fn works ( ) {
10
+ let information = cupid:: master ( ) . unwrap ( ) ;
11
+ assert_eq ! ( cfg_feature_enabled!( "sse" ) , information. sse( ) ) ;
12
+ assert_eq ! ( cfg_feature_enabled!( "sse2" ) , information. sse2( ) ) ;
13
+ assert_eq ! ( cfg_feature_enabled!( "sse3" ) , information. sse3( ) ) ;
14
+ assert_eq ! ( cfg_feature_enabled!( "ssse3" ) , information. ssse3( ) ) ;
15
+ assert_eq ! ( cfg_feature_enabled!( "sse4.1" ) , information. sse4_1( ) ) ;
16
+ assert_eq ! ( cfg_feature_enabled!( "sse4.2" ) , information. sse4_2( ) ) ;
17
+ assert_eq ! ( cfg_feature_enabled!( "avx" ) , information. avx( ) ) ;
18
+ assert_eq ! ( cfg_feature_enabled!( "avx2" ) , information. avx2( ) ) ;
19
+ assert_eq ! ( cfg_feature_enabled!( "fma" ) , information. fma( ) ) ;
20
+ assert_eq ! ( cfg_feature_enabled!( "bmi" ) , information. bmi1( ) ) ;
21
+ assert_eq ! ( cfg_feature_enabled!( "bmi2" ) , information. bmi2( ) ) ;
22
+ assert_eq ! ( cfg_feature_enabled!( "popcnt" ) , information. popcnt( ) ) ;
23
+
24
+ // TODO: tbm, abm, lzcnt
25
+ }
You can’t perform that action at this time.
0 commit comments