66#if SIMD_INTRINSICS
77using System . Runtime . Intrinsics ;
88using System . Runtime . Intrinsics . X86 ;
9- #endif
109
1110namespace Reloaded . Memory . Sigscan ;
1211
13- #if SIMD_INTRINSICS
1412/// <summary>
1513/// Modified version of: Pattern scan implementation 'LazySIMD' - by uberhalit
1614/// https://github.com/uberhalit
@@ -44,9 +42,6 @@ public unsafe partial class Scanner
4442 /// Key: ?? represents a byte that should be ignored, anything else if a hex byte. i.e. 11 represents 0x11, 1F represents 0x1F
4543 /// </param>
4644 /// <returns>-1 if pattern is not found.</returns>
47- #if NET5_0_OR_GREATER
48- [ SkipLocalsInit ]
49- #endif
5045 [ MethodImpl ( MethodImplOptions . AggressiveOptimization ) ]
5146 public static PatternScanResult FindPatternSse2 ( byte * data , int dataLength , string pattern )
5247 {
@@ -126,9 +121,6 @@ public static PatternScanResult FindPatternSse2(byte* data, int dataLength, stri
126121 /// the first match is skipped and all indexes are shifted to the left by 1.
127122 /// </summary>
128123 /// <param name="scanPattern">Data of the pattern to be scanned.</param>
129- #if NET5_0_OR_GREATER
130- [ SkipLocalsInit ]
131- #endif
132124 [ MethodImpl ( MethodImplOptions . AggressiveOptimization ) ]
133125 private static Span < ushort > BuildMatchIndexes ( in SimdPatternScanData scanPattern )
134126 {
@@ -153,9 +145,6 @@ private static Span<ushort> BuildMatchIndexes(in SimdPatternScanData scanPattern
153145 /// Generates byte-Vectors that are right-padded with 0 from a pattern. The first byte is skipped.
154146 /// </summary>
155147 /// <param name="cbPattern">The pattern in question.</param>
156- #if NET5_0_OR_GREATER
157- [ SkipLocalsInit ]
158- #endif
159148 [ MethodImpl ( MethodImplOptions . AggressiveOptimization ) ]
160149 private static Vector128 < byte > [ ] PadPatternToVector128Sse ( in SimdPatternScanData cbPattern )
161150 {
0 commit comments