Files
even-perfect-numbers-scanner/docs/gpu-context-rework-plan.md
T

820 B

GPU context pooling and heuristic divisor updates

  • Review existing GPU context pooling in PerfectNumbers.Core/PrimeTester.cs and determine shared table allocations that can be scoped per trailing digit.
  • Split PrimeTesterGpuContextPool into 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 % 10 and 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.