SPMD SIMD math library & lock-free job system integration
- Add new SPMD SIMD math project with scalar/vector lanes - Integrate SPMD jobs and scheduling into job system - Implement lock-free job dependency management - Update math functions for .NET 10 and SIMD performance - Add SPMD benchmarks, compress-store tests, and race tests - Introduce generic Result<T> error handling utilities - Solution/project file updates and code cleanup
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Misaki.HighPerformance.Jobs;
|
||||
using Misaki.HighPerformance.Jobs;
|
||||
|
||||
namespace Misaki.HighPerformance.Test.UnitTest.Jobs;
|
||||
|
||||
@@ -70,4 +70,28 @@ internal unsafe struct ParallelMultiplyJob : IJobParallelFor
|
||||
{
|
||||
inout[loopIndex] *= multiplier;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe struct WaitJob : IJob
|
||||
{
|
||||
public bool* pSignal;
|
||||
|
||||
public void Execute(int loopIndex)
|
||||
{
|
||||
var spin = new SpinWait();
|
||||
while (!Volatile.Read(ref *pSignal))
|
||||
{
|
||||
spin.SpinOnce();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe struct IncrementJob : IJob
|
||||
{
|
||||
public int* pCounter;
|
||||
|
||||
public void Execute(int loopIndex)
|
||||
{
|
||||
Interlocked.Increment(ref *pCounter);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user