Update math library

This commit is contained in:
2026-02-12 19:43:04 +09:00
parent a9c143c2a2
commit f9cb909841
12 changed files with 798 additions and 431 deletions

View File

@@ -39,8 +39,8 @@ public unsafe class SPMDBenchmark
job.Run(_SIZE * _SIZE, 0);
}
//[Benchmark]
public void VectorNoise()
[Benchmark]
public void VectorJobNoise()
{
var job = new Jobs.NoiseJobVector
{
@@ -53,35 +53,23 @@ public unsafe class SPMDBenchmark
_scheduler.WaitComplete(handle);
}
//[Benchmark]
public void MathNoise()
[Benchmark]
public void ParallelVectorNoise()
{
var job = new Jobs.NoiseJobMath
var job = new Jobs.NoiseJobVector
{
buffers = _buf,
width = _SIZE,
height = _SIZE,
};
var handle = _scheduler.ScheduleParallel(ref job, _SIZE * _SIZE, 64);
_scheduler.WaitComplete(handle);
}
//[Benchmark(Baseline = true)]
public void ManualSPMDNoise()
{
var job = new Jobs.NoiseJobMathV
Parallel.For(0, _SIZE * _SIZE, (i) =>
{
buffers = _buf,
width = _SIZE,
height = _SIZE,
};
var iterations = (_SIZE * _SIZE + 8 - 1) / 8;
var handle = _scheduler.ScheduleParallel(ref job, iterations, 64);
_scheduler.WaitComplete(handle);
job.Execute(i, 0);
});
}
[Benchmark(Baseline = true)]
public void SPMDNoise()
{