use modular initing system rather than calling Init() method.

This commit is contained in:
Youmu Liu
2025-11-11 18:22:28 +08:00
parent 678a846e54
commit 44bf78b937
65 changed files with 1328 additions and 1814 deletions
+10 -10
View File
@@ -59,7 +59,16 @@ namespace StgSharp.Mathematics.Numeric
Monitor.Exit(_lock);
}
public static void Init()
public static void LaunchParallel(MatrixParallelHandle handle, SleepMode afterWork)
{
RemainThreadCount = _threads.Count;
_AfterWork = (ThreadPriority)afterWork;
foreach (MatrixParallelWrap w in handle.Wraps) {
w.SchedulerReset.Set();
}
}
internal static void Init()
{
if (IsInitialized) {
return;
@@ -79,14 +88,5 @@ namespace StgSharp.Mathematics.Numeric
IsInitialized = true;
}
public static void LaunchParallel(MatrixParallelHandle handle, SleepMode afterWork)
{
RemainThreadCount = _threads.Count;
_AfterWork = (ThreadPriority)afterWork;
foreach (MatrixParallelWrap w in handle.Wraps) {
w.SchedulerReset.Set();
}
}
}
}