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:
2026-02-11 22:44:30 +09:00
parent c36405645b
commit a9c143c2a2
22 changed files with 3433 additions and 221 deletions

View File

@@ -1,4 +1,4 @@
namespace Misaki.HighPerformance.Jobs;
namespace Misaki.HighPerformance.Jobs;
/// <summary>
/// Represents a job that performs a single unit of work.
@@ -23,4 +23,25 @@ public interface IJobParallelFor
/// <param name="loopIndex">The index of the item to process.</param>
/// <param name="threadIndex">The index of the thread executing the job, useful for thread-specific operations.</param>
void Execute(int loopIndex, int threadIndex);
}
public static class IJobExtensions
{
public static void Run<T>(this ref T job, int threadIndex)
where T : unmanaged, IJob
{
job.Execute(threadIndex);
}
}
public static class IJobParallelForExtensions
{
public static void Run<T>(this ref T job, int totalIterations, int threadIndex)
where T : unmanaged, IJobParallelFor
{
for (var i = 0; i < totalIterations; i++)
{
job.Execute(i, threadIndex);
}
}
}