--gpu-ration command-line argument added. AscendingDivisorRemainderStepper implemented in PrimeTester.IsPrimeCpu. PrimeOrderCalculator.RunOnCpu adjusted for low GPU ratios to prevent infinite increase of the counter.
This commit is contained in:
1 parent
f43c67c86f
commit
85a90c70bf
9 files changed
+296
-212
No files matched your search
@@ -29,11 +29,26 @@ internal static class Utf8CliParser
|
||||
return result;
|
||||
}
|
||||
|
||||
public static uint ParseUInt32(ReadOnlySpan<char> value)
|
||||
{
|
||||
if (!TryParseUInt32(value, out uint result))
|
||||
{
|
||||
ThrowFormatException(value);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static bool TryParseUInt64(ReadOnlySpan<char> value, out ulong result)
|
||||
{
|
||||
return TryParse(value, static (ReadOnlySpan<byte> source, out ulong parsed, out int consumed) => Utf8Parser.TryParse(source, out parsed, out consumed), out result);
|
||||
}
|
||||
|
||||
public static bool TryParseUInt32(ReadOnlySpan<char> value, out uint result)
|
||||
{
|
||||
return TryParse(value, static (ReadOnlySpan<byte> source, out uint parsed, out int consumed) => Utf8Parser.TryParse(source, out parsed, out consumed), out result);
|
||||
}
|
||||
|
||||
public static bool TryParseInt32(ReadOnlySpan<char> value, out int result)
|
||||
{
|
||||
return TryParse(value, static (ReadOnlySpan<byte> source, out int parsed, out int consumed) => Utf8Parser.TryParse(source, out parsed, out consumed), out result);
|
||||
|
||||
Reference in new issue
Block a user