Restore GPU-backed UInt128 pow2 Montgomery helper

This commit is contained in:
Marek Lemańczyk committed 2025-10-05 02:13:31 +02:00
1 parent 7ffd438eee
commit 0bc97937aa
11 files changed
+1561 -30

No files matched your search

+2 -1
View File
@@ -1,2 +1,3 @@
- Implement GpuRational struct to extend GpuUInt128 range. Avoid extending method calls stack. Instead prefer code duplication for a better performance. Create unit tests for it and benchmarks to compare against GpuUInt128. GpuRational should work in a similar way to ERational to avoid excessive memory usage. You have many methods available in GpuUInt128 and GpuUInt128Extensions. Many are also similar to UInt128Extensions and/or ULongExtensions.
- Prototype a UInt128-native Pow2MontgomeryModWindowed path that matches the GPU implementation once a faster modular multiplication helper is available, so we can revisit removing the GPU struct dependency without regressing benchmarks.
- Mirror the complete CPU heuristic cycle algorithm on the GPU path so both implementations stay aligned.
- Extend the GPU numeric type probe to cover proposed custom types such as GpuUInt256 and GpuUInt512 once their definitions are available so we can plan the wide-order heuristics on the device.