Kernels replaced with pre-compiled actions for better performance

This commit is contained in:
mlemanczyk committed 2025-11-20 03:00:11 +01:00
1 parent df04ba601c
commit 497b1fcf89
7 files changed
+39 -66

No files matched your search

@@ -604,7 +604,7 @@ internal static partial class PrimeOrderGpuHeuristics
}
exponentBuffer.View.CopyFromCPU(stream, exponentSpan);
var kernelLauncher = gpu.Pow2ModWideKernel.CreateLauncherDelegate<Action<AcceleratorStream, Index1D, ArrayView1D<GpuUInt128, Stride1D.Dense>, GpuUInt128, ArrayView1D<GpuUInt128, Stride1D.Dense>>>();
var kernelLauncher = gpu.Pow2ModWideKernelLauncher;
kernelLauncher(stream, length, exponentBuffer.View, modulus, remainderBuffer.View);
remainderBuffer.View.CopyToCPU(stream, ref MemoryMarshal.GetReference(resultSpan), length);