Skip to content

Commit 87af6c7

Browse files
committed
Changed: Removed Unnecessary Annotations
1 parent 0a605da commit 87af6c7

File tree

5 files changed

+1
-35
lines changed

5 files changed

+1
-35
lines changed

Reloaded.Memory.Sigscan/Reloaded.Memory.Sigscan.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<LangVersion>preview</LangVersion>
2323
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
24-
<Version>3.1.4</Version>
24+
<Version>3.1.5</Version>
2525
<IsTrimmable>true</IsTrimmable>
2626
</PropertyGroup>
2727

Reloaded.Memory.Sigscan/Scanner_AVX2.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
#if SIMD_INTRINSICS
66
using System.Runtime.Intrinsics;
77
using System.Runtime.Intrinsics.X86;
8-
#endif
98

109
namespace Reloaded.Memory.Sigscan;
1110

12-
#if SIMD_INTRINSICS
1311
/// <summary>
1412
/// Modified version of: Pattern scan implementation 'LazySIMD' - by uberhalit
1513
/// https://github.com/uberhalit
@@ -46,7 +44,6 @@ public unsafe partial class Scanner
4644
#if NET5_0_OR_GREATER
4745
[SkipLocalsInit]
4846
#endif
49-
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
5047
public static PatternScanResult FindPatternAvx2(byte* data, int dataLength, string pattern)
5148
{
5249
var patternData = new SimdPatternScanData(pattern);
@@ -125,10 +122,6 @@ public static PatternScanResult FindPatternAvx2(byte* data, int dataLength, stri
125122
/// Generates byte-Vectors that are right-padded with 0 from a pattern. The first byte is skipped.
126123
/// </summary>
127124
/// <param name="cbPattern">The pattern in question.</param>
128-
#if NET5_0_OR_GREATER
129-
[SkipLocalsInit]
130-
#endif
131-
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
132125
private static Vector256<byte>[] PadPatternToVector256Avx(in SimdPatternScanData cbPattern)
133126
{
134127
int patternLen = cbPattern.Mask.Length;

Reloaded.Memory.Sigscan/Scanner_Compiled.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ public unsafe partial class Scanner
1616
/// The compiled pattern to look for inside the given region.
1717
/// </param>
1818
/// <returns>A result indicating an offset (if found) of the pattern.</returns>
19-
#if NET5_0_OR_GREATER
20-
[SkipLocalsInit]
21-
#endif
22-
#if NETCOREAPP3_0_OR_GREATER
23-
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
24-
#endif
2519
public static PatternScanResult FindPatternCompiled(byte* data, int dataLength, CompiledScanPattern pattern)
2620
{
2721
const int numberOfUnrolls = 8;
@@ -123,10 +117,6 @@ as opposing to having to dereference a pointer and then take an offset from the
123117
}
124118
}
125119

126-
#if NET5_0_OR_GREATER
127-
[SkipLocalsInit]
128-
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
129-
#endif
130120
private static bool TestRemainingMasks(int numberOfInstructions, byte* currentDataPointer, GenericInstruction* instructions)
131121
{
132122
/* When NumberOfInstructions > 1 */

Reloaded.Memory.Sigscan/Scanner_SSE2.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
#if SIMD_INTRINSICS
77
using System.Runtime.Intrinsics;
88
using System.Runtime.Intrinsics.X86;
9-
#endif
109

1110
namespace 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
{

Reloaded.Memory.Sigscan/Scanner_Simple.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ public unsafe partial class Scanner
1919
/// Key: ?? represents a byte that should be ignored, anything else if a hex byte. i.e. 11 represents 0x11, 1F represents 0x1F
2020
/// </param>
2121
/// <returns>A result indicating an offset (if found) of the pattern.</returns>
22-
#if NET5_0_OR_GREATER
23-
[SkipLocalsInit]
24-
#endif
25-
#if NETCOREAPP3_0_OR_GREATER
26-
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
27-
#endif
2822
public static PatternScanResult FindPatternSimple(byte* data, int dataLength, SimplePatternScanData pattern)
2923
{
3024
var patternData = pattern.Bytes;

0 commit comments

Comments
 (0)