Cleanup
This commit is contained in:
1 parent
e9787f2991
commit
3e756b262e
2 files changed
-42
No files matched your search
@@ -168,7 +168,6 @@ public class PrimeOrderCalculatorTests
|
|||||||
PrimeOrderCalculator.PrimeOrderHeuristicDevice.Gpu);
|
PrimeOrderCalculator.PrimeOrderHeuristicDevice.Gpu);
|
||||||
|
|
||||||
strict.Should().Be(heuristic);
|
strict.Should().Be(heuristic);
|
||||||
|
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -87,46 +87,6 @@ public sealed class PrimeTester
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
||||||
// public static bool IsPrimeGpu(ulong n)
|
|
||||||
// {
|
|
||||||
|
|
||||||
// var gpu = PrimeOrderCalculatorAccelerator.Rent(1);
|
|
||||||
// int acceleratorIndex = gpu.AcceleratorIndex;
|
|
||||||
// var inputView = gpu.Input.View;
|
|
||||||
// var outputView = gpu.OutputByte.View;
|
|
||||||
|
|
||||||
// // GpuPrimeWorkLimiter.Acquire();
|
|
||||||
// AcceleratorStream stream = AcceleratorStreamPool.Rent(acceleratorIndex);
|
|
||||||
// inputView.CopyFromCPU(stream, ref n, 1);
|
|
||||||
|
|
||||||
// var kernelLauncher = gpu.SmallPrimeSieveKernelLauncher;
|
|
||||||
|
|
||||||
// kernelLauncher(
|
|
||||||
// stream,
|
|
||||||
// 1,
|
|
||||||
// inputView,
|
|
||||||
// gpu.DevicePrimesLastOne,
|
|
||||||
// gpu.DevicePrimesLastSeven,
|
|
||||||
// gpu.DevicePrimesLastThree,
|
|
||||||
// gpu.DevicePrimesLastNine,
|
|
||||||
// gpu.DevicePrimesPow2LastOne,
|
|
||||||
// gpu.DevicePrimesPow2LastSeven,
|
|
||||||
// gpu.DevicePrimesPow2LastThree,
|
|
||||||
// gpu.DevicePrimesPow2LastNine,
|
|
||||||
// outputView);
|
|
||||||
|
|
||||||
// byte flag = 0;
|
|
||||||
// outputView.CopyToCPU(stream, ref flag, 1);
|
|
||||||
// stream.Synchronize();
|
|
||||||
|
|
||||||
// AcceleratorStreamPool.Return(acceleratorIndex, stream);
|
|
||||||
// PrimeOrderCalculatorAccelerator.Return(gpu);
|
|
||||||
// // GpuPrimeWorkLimiter.Release();
|
|
||||||
|
|
||||||
// return flag != 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static bool IsPrimeGpu(PrimeOrderCalculatorAccelerator gpu, ulong n)
|
public static bool IsPrimeGpu(PrimeOrderCalculatorAccelerator gpu, ulong n)
|
||||||
{
|
{
|
||||||
@@ -289,5 +249,4 @@ public sealed class PrimeTester
|
|||||||
|
|
||||||
AcceleratorStreamPool.Return(acceleratorIndex, stream);
|
AcceleratorStreamPool.Return(acceleratorIndex, stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user