PrimeOrderCalculator.ExponentLoweringCpu optimized to reuse factors & exponents span instead of its own buffers

This commit is contained in:
mlemanczyk committed 2025-12-15 20:22:03 +01:00
1 parent 6d427c6906
commit b7773adad8
3 files changed
+50 -59

No files matched your search

@@ -11,8 +11,6 @@ namespace PerfectNumbers.Core
public readonly int[] Exponents = new int[PrimeOrderConstants.GpuSmallPrimeFactorSlots];
public readonly FixedCapacityStack<ulong> CompositeStack = new (PrimeOrderConstants.GpuSmallPrimeFactorSlots);
public readonly List<PartialFactorPendingEntry> PendingFactors = new (PrimeOrderConstants.GpuSmallPrimeFactorSlots);
public readonly ulong[] TempFactorsArray = new ulong[PrimeOrderConstants.GpuSmallPrimeFactorSlots << 3];
public readonly int[] TempExponentsArray = new int[PrimeOrderConstants.GpuSmallPrimeFactorSlots << 3];
public readonly ulong[] StackCandidates = new ulong[PrimeOrderConstants.GpuSmallPrimeFactorSlots << 3];
public readonly bool[] StackEvaluations = new bool[PrimeOrderConstants.GpuSmallPrimeFactorSlots << 3];
private PartialFactorResult? _next;