Document GPU kernel audit progress
This commit is contained in:
1 parent
1e25ea0ccf
commit
6217ea7888
31 files changed
+3496
-3246
No files matched your search
@@ -0,0 +1,20 @@
|
||||
using ILGPU;
|
||||
|
||||
namespace PerfectNumbers.Core.Gpu;
|
||||
|
||||
internal static class NttPointwiseKernels
|
||||
{
|
||||
public static void MulKernel(Index1D index, ArrayView<GpuUInt128> a, ArrayView<GpuUInt128> b, GpuUInt128 modulus)
|
||||
{
|
||||
var val = a[index];
|
||||
val.MulMod(b[index], modulus);
|
||||
a[index] = val;
|
||||
}
|
||||
|
||||
public static void ScaleKernel(Index1D index, ArrayView<GpuUInt128> data, GpuUInt128 scale, GpuUInt128 modulus)
|
||||
{
|
||||
var v = data[index];
|
||||
v.MulMod(scale, modulus);
|
||||
data[index] = v;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user