GPU stabilization improvements to prevent calculation crashes
This commit is contained in:
1 parent
a338bb0d0b
commit
d0b1639a5d
40 files changed
+2318
-1764
No files matched your search
@@ -101,7 +101,7 @@ public class Pow2ModBenchmarks
|
||||
|
||||
for (int i = 0; i < SampleCount; i++)
|
||||
{
|
||||
checksum ^= exponents[i].Pow2MontgomeryModWindowedGpu(divisors[i], keepMontgomery: false);
|
||||
checksum ^= exponents[i].Pow2MontgomeryModWindowedConvertGpu(divisors[i]);
|
||||
}
|
||||
|
||||
return checksum;
|
||||
|
||||
@@ -77,7 +77,7 @@ public class Pow2MontgomeryModBenchmarks
|
||||
|
||||
for (int i = 0; i < SampleCount; i++)
|
||||
{
|
||||
checksum ^= exponents[i].Pow2MontgomeryModWindowedGpu(divisors[i], keepMontgomery: false);
|
||||
checksum ^= exponents[i].Pow2MontgomeryModWindowedConvertGpu(divisors[i]);
|
||||
}
|
||||
|
||||
return checksum;
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@ public class Pow2MontgomeryModWindowedKeepMontgomeryGpuBenchmarks
|
||||
for (int i = 0; i < cases.Length; i++)
|
||||
{
|
||||
ref readonly Pow2MontgomeryModWindowedBenchmarkCase current = ref cases[i];
|
||||
checksum ^= current.Exponent.Pow2MontgomeryModWindowedGpu(current.Divisor, keepMontgomery: false);
|
||||
checksum ^= current.Exponent.Pow2MontgomeryModWindowedConvertGpu(current.Divisor);
|
||||
}
|
||||
|
||||
return checksum;
|
||||
@@ -52,7 +52,7 @@ public class Pow2MontgomeryModWindowedKeepMontgomeryGpuBenchmarks
|
||||
for (int i = 0; i < cases.Length; i++)
|
||||
{
|
||||
ref readonly Pow2MontgomeryModWindowedBenchmarkCase current = ref cases[i];
|
||||
checksum ^= current.Exponent.Pow2MontgomeryModWindowedGpu(current.Divisor, keepMontgomery: true);
|
||||
checksum ^= current.Exponent.Pow2MontgomeryModWindowedKeepGpu(current.Divisor);
|
||||
}
|
||||
|
||||
return checksum;
|
||||
|
||||
@@ -30,7 +30,7 @@ public class PrimeTesterBenchmarks
|
||||
_ = Prime.Numbers.IsPrime(_candidates[0]);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
// [Benchmark]
|
||||
public int HeuristicCpu()
|
||||
{
|
||||
HeuristicPrimeTester tester = _heuristicTester;
|
||||
@@ -48,7 +48,7 @@ public class PrimeTesterBenchmarks
|
||||
return primeCount;
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
// [Benchmark]
|
||||
public int HeuristicGpu()
|
||||
{
|
||||
HeuristicPrimeTester tester = _heuristicTester;
|
||||
@@ -66,7 +66,7 @@ public class PrimeTesterBenchmarks
|
||||
return primeCount;
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
// [Benchmark]
|
||||
public int HeuristicCombinedGpu()
|
||||
{
|
||||
ulong[] values = _candidates;
|
||||
@@ -83,7 +83,7 @@ public class PrimeTesterBenchmarks
|
||||
return primeCount;
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
// [Benchmark]
|
||||
public int HeuristicCombinedCpu()
|
||||
{
|
||||
ulong[] values = _candidates;
|
||||
@@ -134,7 +134,7 @@ public class PrimeTesterBenchmarks
|
||||
return primeCount;
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
// [Benchmark]
|
||||
public int OpenNumericPrimes()
|
||||
{
|
||||
ulong[] values = _candidates;
|
||||
|
||||
Reference in new issue
Block a user