Arrange code structure. Introduce dynamic scheduler and multi leader.

This commit is contained in:
Youmu Liu
2025-10-21 18:06:20 +08:00
parent b26ec45433
commit 91a0add1d1
3 changed files with 40 additions and 64 deletions
@@ -49,14 +49,20 @@ namespace StgSharp.Mathematics.Numeric
SpareThreads = threadCount;
}
internal MatrixParallelPool(int threadCount, CapacityFixedStack<MatrixParallelWrap> wrapSpan)
{
SpareWrap = wrapSpan;
SingleThreadAllocation = new CapacityFixedBag<MatrixParallelWrap>(wrapSpan.Count);
SpareThreads = threadCount;
}
public int SpareThreads { get; set; }
internal CapacityFixedBag<MatrixParallelWrap> SingleThreadAllocation { get; set; }
internal CapacityFixedStack<MatrixParallelWrap> SpareWrap { get; set; }
public bool TryRequest(out )
public bool TryRequestLeaderHandle(out MatrixParallelWrap.Handle handle) { }
public bool TryRequestWrap(out MatrixParallelWrap? wrap)
{