swiss ok, needs more benchmark

This commit is contained in:
Youmu Liu
2026-03-06 18:22:30 +08:00
parent 83997f64d0
commit f6e897ed06
70 changed files with 1889 additions and 3371 deletions
@@ -124,9 +124,11 @@ namespace StgSharp.Mathematics.Numeric
// Bind OS-thread affinity once when the worker starts running
SetThreadAffinity(PoolId);
Thread.Yield();
SIMDID feature = new();
feature.Mask = GetSimdId();
_ = Thread.Yield();
SIMDID feature = new()
{
Mask = GetSimdId()
};
_context = (nint*)MatrixParallel.GetContext(feature);
State = MatrixThreadState.Ready;
while (true)
@@ -148,6 +150,7 @@ namespace StgSharp.Mathematics.Numeric
{
MatrixParallelQueue taskQueue = BindedWrap.TaskQueue;
MatrixParallelTask* p = taskQueue.Package;
/*
if (0 > (int)p ->ComputeHandle) {
SpecialBufferCompute(p);
}
@@ -159,6 +162,7 @@ namespace StgSharp.Mathematics.Numeric
default:
break;
}
/**/
BindedWrap.ReportThreadAccomplished();
}
_managedThread.Priority = AfterWork;