use modular initing system rather than calling Init() method.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user