L4 briefly pass unit test
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using Microsoft.VisualBasic.FileIO;
|
||||
using StgSharp.HighPerformance.Memory;
|
||||
using StgSharp.Mathematics.Internal;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
@@ -41,6 +42,8 @@ namespace StgSharp.Mathematics.Numeric
|
||||
internal unsafe class MatrixParallelQueue
|
||||
{
|
||||
|
||||
// TODO 为各种不同的计算策略设计专门的预测器,以适配L4
|
||||
|
||||
private static ConcurrentStack<MatrixParallelQueue> _recycle = [];
|
||||
private MatrixParallelTask* _package;
|
||||
private ulong _cursor;
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace StgSharp.Mathematics.Numeric
|
||||
public void WaitAllWraps()
|
||||
{
|
||||
if (_disposed) {
|
||||
throw new ObjectDisposedException(typeof(MatrixParallelWrap).Name);
|
||||
throw new ObjectDisposedException(nameof(MatrixParallelWrap));
|
||||
}
|
||||
SpinWait.SpinUntil(() => Volatile.Read(ref _count) == 0);
|
||||
}
|
||||
@@ -114,7 +114,7 @@ namespace StgSharp.Mathematics.Numeric
|
||||
internal void ReportThreadAccomplished()
|
||||
{
|
||||
if (_disposed) {
|
||||
throw new ObjectDisposedException(typeof(MatrixParallelWrap).Name);
|
||||
throw new ObjectDisposedException(nameof(MatrixParallelWrap));
|
||||
}
|
||||
Interlocked.Decrement(ref _count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user