Commit Graph
76 Commits
Author SHA1 Message Date
mlemanczyk 49e47b161d Tiny cleanup. Namespace updated. 2025-12-12 00:56:33 +01:00
mlemanczyk 5df2cc7f9b using cleaned up. 2025-12-10 23:59:04 +01:00
mlemanczyk 05d3061c47 MethodImplOptions.AggressiveOptimization & MethodImplOptions.AggressiveInlining optimized. Small optimizations. 2025-12-10 19:59:51 +01:00
mlemanczyk 928e847f1f AscendingdivisorRemainderStepper used in PrimeTesterByLastDigit 2025-12-05 14:17:24 +01:00
mlemanczyk c311b27dcc Prime testing using divisor tables depending on the last digit separated to its own class. PrimeTester switched back to standard endings. 2025-11-27 16:45:02 +01:00
mlemanczyk 13498dc460 Most device buffers integrated into PrimeOrderCalculatorAccelerator. PrimeOrderCalculator switched to partial factoring on GPU. 2025-11-26 03:16:39 +01:00
mlemanczyk 57a50e2a37 Pow2Mod kernel specific methods moved to Pow2MontgomeryKernels. 2025-11-24 18:04:07 +01:00
mlemanczyk 070e2a14fd MontgomeryDivisorData converted to a pooled class to limit GC pressure. MontgomeryDivisorDataGpu added for GPU operations. PrimeOrderCalculator kernels precompiled during warmup. 2025-11-24 15:14:31 +01:00
mlemanczyk 56be12ab95 Cleanup & compilation fixes. 2025-11-18 04:45:18 +01:00
mlemanczyk 801b1be3e3 Cleanup 2025-11-18 04:22:39 +01:00
mlemanczyk 66ca969929 Naming improvements and small cleanup 2025-11-18 03:43:52 +01:00
mlemanczyk 183b147135 Heuristic tables split into 2 groups 2025-11-17 16:04:27 +01:00
mlemanczyk c413ee1162 Revert "Stream handling simplified to avoid dictionary lookups in favor of array lookups with known indexes."
This reverts commit a84445ef2a.
2025-11-16 17:14:48 +01:00
mlemanczyk a84445ef2a Stream handling simplified to avoid dictionary lookups in favor of array lookups with known indexes. 2025-11-16 15:01:51 +01:00
mlemanczyk 42447c4e43 BinaryGcd switched to the best performing variant according to benchmarks. 2025-11-14 11:43:16 +01:00
mlemanczyk 5bc65464d0 Initial PollardRho implementation for GPU. Added pool for accelerator streams shared across the threads. GPU processing performance and stabilization improvements. GpuUInt128.BinaryGcd switched to the version which outperformed other in benchmarks. 2025-11-12 21:18:30 +01:00
mlemanczyk cf5f78c2ef PrimeTesterByLastDigitAccelerator integrated into Pow2MontgomeryGpuCalculator for better performance. 2025-11-11 13:36:21 +01:00
mlemanczyk 0de9871529 Functionality and classes separated. Kernel initialization made dependent on a flag. Cleanup. 2025-11-10 18:35:50 +01:00
mlemanczyk fa89958736 Stabilization improvements. Stream will be released when releasing GPU lease to prevent application crashes. 2025-11-10 14:30:30 +01:00
mlemanczyk d0b1639a5d GPU stabilization improvements to prevent calculation crashes 2025-11-09 21:52:16 +01:00
mlemanczyk de2a78b27b Streams added to all kernels and GPU operations to separate threads from each other. 2025-11-06 18:53:55 +01:00
mlemanczyk 64d615c402 Various optimizations to separate non-static data between threads and resolve read/write access issue. 2025-11-04 20:45:56 +01:00
Marek Lemańczyk 4c4d4243fb Merge remote-tracking branch 'github/codex/optimize-evenperfectbitscanner-for-static-arrays-khd9w8' into work
# Conflicts:
#	PerfectNumbers.Core/Gpu/GpuContextPool.cs
#	PerfectNumbers.Core/Gpu/GpuKernelLease.cs
#	PerfectNumbers.Core/Gpu/GpuKernelPool.cs
#	PerfectNumbers.Core/Gpu/GpuStaticTableInitializer.cs
#	PerfectNumbers.Core/Gpu/Kernels/PrimeOrderSpecialMaxKernels.cs
#	PerfectNumbers.Core/PrimeOrderCalculator.Cpu.cs
#	PerfectNumbers.Core/PrimeOrderCalculator.Gpu.cs
#	PerfectNumbers.Core/PrimeTester.cs
2025-11-03 23:59:12 +01:00
Marek Lemańczyk 76dfe108a9 Address feedback on GPU pooling and heuristic factoring 2025-11-02 11:22:49 +01:00
Marek Lemańczyk ab6a416de2 Warm GPU resources before thread startup 2025-11-02 11:22:28 +01:00
mlemanczyk 2281d9535e Revert "Merge pull request #251 from mlemanczyk/codex/refactor-prime-checking-on-gpu-n5t2pm"
This reverts commit 936ce239db, reversing
changes made to e14b77e504.
2025-11-02 11:22:14 +01:00
Marek Lemańczyk 469c8057d3 Flatten heuristic trial division bounds checks 2025-10-31 22:45:59 +01:00
Marek Lemańczyk 8c662c5c85 Address feedback on GPU pooling and heuristic factoring 2025-10-31 21:47:42 +01:00
Marek Lemańczyk 6864b316d5 Warm GPU resources before thread startup 2025-10-31 16:56:25 +01:00
mlemanczyk e14b77e504 Batch size made dynamic - dependent on the value 2025-10-30 02:43:15 +01:00
Marek Lemańczyk f9504a6a19 Use atomic flag writes in heuristic trial division 2025-10-29 20:40:40 +01:00
Marek Lemańczyk 08499fdda1 Refine GPU prime tester leasing 2025-10-29 17:39:38 +01:00
Marek Lemańczyk b0158a844a Use divisor squares to bound heuristic combined trial division 2025-10-29 15:13:54 +01:00
Marek Lemańczyk 1792349bad Make GPU sieve results authoritative 2025-10-28 20:14:22 +01:00
Marek Lemańczyk c53966e481 Enable residue-aware GPU sieve in PrimeTester 2025-10-28 18:39:18 +01:00
Marek Lemańczyk 94a4ed8328 Hoist prime order thresholds in CPU heuristics 2025-10-27 21:24:43 +01:00
Marek Lemańczyk 9a0e328995 Reintroduce MulHigh CPU helper and tighten GPU sieve loop 2025-10-26 23:41:14 +01:00
Marek Lemańczyk e2f68cedf2 Short-circuit small prime sieve kernel loops 2025-10-26 22:42:27 +01:00
Marek Lemańczyk 3d458fc6da Use precomputed small prime squares in GPU sieve 2025-10-26 22:28:04 +01:00
Marek Lemańczyk 15c229665d Add heuristic prime sieves for cached divisor sequences 2025-10-26 03:21:29 +01:00
Marek Lemańczyk 2d103a9662 Compute initial divisor remainders inside GPU kernel 2025-10-25 05:41:05 +02:00
Marek Lemańczyk 4e9d57df4b Unify GPU divisor kernels with stepper path 2025-10-24 20:50:52 +02:00
Marek Lemańczyk 46a2178d65 Remove Montgomery data from GPU divisor flow 2025-10-24 18:56:28 +02:00
Marek Lemańczyk 69acd3dad9 Cache GPU divisor partial data on GPU path 2025-10-24 18:56:21 +02:00
Marek Lemańczyk cc281ab423 Refactor GPU powmod helpers into ULongExtensions 2025-10-24 17:26:55 +02:00
Marek Lemańczyk d20362a2fc Switch GPU by-divisor stepper to standard modular arithmetic 2025-10-24 09:20:17 +02:00
Marek Lemańczyk 1e5a9128cb Split CPU and GPU exponent steppers 2025-10-24 08:49:53 +02:00
Marek Lemańczyk 035956cdb6 Replace GPU by-divisor kernel with standard modular exponentiation 2025-10-24 08:49:48 +02:00
Marek Lemańczyk 8a258f7536 Collapse GPU by-divisor batching to a single launch 2025-10-24 01:23:38 +02:00
Marek Lemańczyk 1075ab1ea1 Fuse GPU hit detection with divisor evaluation 2025-10-24 01:23:31 +02:00