Stack overflow fixed
This commit is contained in:
1 parent
0535ad2b7b
commit
dd6d9a71cf
1 file changed
+1
-1
@@ -15,7 +15,7 @@ public sealed class MersenneNumberDivisorGpuTester
|
|||||||
public static void BuildDivisorCandidates()
|
public static void BuildDivisorCandidates()
|
||||||
{
|
{
|
||||||
uint[] snapshot = MersenneDivisorCycles.Shared.ExportSmallCyclesSnapshot();
|
uint[] snapshot = MersenneDivisorCycles.Shared.ExportSmallCyclesSnapshot();
|
||||||
Span<(ulong divisor, uint cycle)> list = stackalloc (ulong divisor, uint cycle)[snapshot.Length / 2];
|
(ulong divisor, uint cycle)[] list = new (ulong divisor, uint cycle)[snapshot.Length / 2];
|
||||||
uint cycle;
|
uint cycle;
|
||||||
int count = 0, i, snapshotLength = snapshot.Length;
|
int count = 0, i, snapshotLength = snapshot.Length;
|
||||||
for (i = 3; i < snapshotLength; i += 2)
|
for (i = 3; i < snapshotLength; i += 2)
|
||||||
|
|||||||
Reference in new issue
Block a user