820 B
820 B
GPU context pooling and heuristic divisor updates
- Review existing GPU context pooling in
PerfectNumbers.Core/PrimeTester.csand determine shared table allocations that can be scoped per trailing digit. - Split
PrimeTesterGpuContextPoolinto trailing-digit specific pools so each lease only uploads the divisor tables required for that digit. - Update GPU warm-up and rental code paths to pick pools based on
n % 10and ensure thread-safe reuse. - Replace square-table usage in GPU heuristic trial division with square-root limits so divisor tables no longer need squared values on the accelerator.
- Remove GPU square buffers and adjust kernels, table types, and callers accordingly.
- Build solution to confirm the new pooling and divisor logic compiles; tests documented in summary.