File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
BitFaster.Caching.UnitTests Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 11#if NETCOREAPP3_1_OR_GREATER
22using System . Runtime . Intrinsics . X86 ;
33#endif
4+ #if NET6_0_OR_GREATER
5+ using System . Runtime . Intrinsics . Arm ;
6+ #endif
7+
48using Xunit ;
59
610namespace BitFaster . Caching . UnitTests
@@ -10,8 +14,15 @@ public static class Intrinsics
1014 public static void SkipAvxIfNotSupported < I > ( )
1115 {
1216#if NETCOREAPP3_1_OR_GREATER
17+ #if NET6_0_OR_GREATER
1318 // when we are trying to test Avx2, skip the test if it's not supported
19+ Skip . If ( typeof ( I ) == typeof ( DetectIsa ) && ! ( Avx2 . IsSupported || AdvSimd . Arm64 . IsSupported ) ) ;
20+ #else
21+ // when we are trying to test Avx2, skip the test if it's not supported
1422 Skip . If ( typeof ( I ) == typeof ( DetectIsa ) && ! Avx2 . IsSupported ) ;
23+ #endif
24+
25+
1526#else
1627 Skip . If ( true ) ;
1728#endif
Original file line number Diff line number Diff line change @@ -409,7 +409,7 @@ private unsafe void IncrementArm(T value)
409409 maskedB = AdvSimd . Not ( maskedB ) ;
410410
411411 incA = AdvSimd . And ( maskedA , incA ) ;
412- incB = AdvSimd . And ( maskedA , incB ) ;
412+ incB = AdvSimd . And ( maskedB , incB ) ;
413413
414414 tablePtr [ t0 ] += AdvSimd . Extract ( incA , 0 ) ;
415415 tablePtr [ t1 ] += AdvSimd . Extract ( incA , 1 ) ;
You can’t perform that action at this time.
0 commit comments