Compilation errors fixed

This commit is contained in:
mlemanczyk committed 2025-10-17 02:40:15 +02:00
1 parent a0154dd587
commit 495b3918c1
3 files changed
+14 -11

No files matched your search

+12 -10
View File
@@ -1,9 +1,10 @@
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
namespace PerfectNumbers.Core;
internal struct CycleRemainderStepper
public struct CycleRemainderStepper
{
private readonly ulong _cycleLength;
private ulong _previousPrime;
@@ -23,15 +24,16 @@ internal struct CycleRemainderStepper
_hasState = false;
}
public void Reset()
{
// TODO: Inline this reset at the call sites so the hot loops reuse struct reinitialization
// measured fastest in MersenneDivisorCycleLengthGpuBenchmarks, avoiding the extra
// method call when scanners need to restart stepping.
_previousPrime = 0UL;
_currentRemainder = 0UL;
_hasState = false;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Reset()
{
// TODO: Inline this reset at the call sites so the hot loops reuse struct reinitialization
// measured fastest in MersenneDivisorCycleLengthGpuBenchmarks, avoiding the extra
// method call when scanners need to restart stepping.
_previousPrime = 0UL;
_currentRemainder = 0UL;
_hasState = false;
}
public ulong Initialize(ulong prime)
{
@@ -1522,4 +1522,4 @@ internal static partial class PrimeOrderCalculator
public readonly long Tertiary = tertiary;
}
}
}
@@ -5,6 +5,7 @@ using System.Diagnostics;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Threading;
using PerfectNumbers.Core.Gpu;
namespace PerfectNumbers.Core;