can create and retire matrix thread by numa infomation
This commit is contained in:
@@ -48,7 +48,7 @@ namespace StgSharp.Mathematics.Numeric
|
||||
|
||||
}
|
||||
|
||||
public unsafe partial class MatrixParallelThread : IDisposable
|
||||
public unsafe partial class MatrixParallelThread : IEquatable<MatrixParallelThread>, IDisposable
|
||||
{
|
||||
|
||||
private IntrinsicContext* _context;
|
||||
@@ -122,7 +122,7 @@ namespace StgSharp.Mathematics.Numeric
|
||||
State = MatrixThreadState.Born;
|
||||
|
||||
// Bind OS-thread affinity once when the worker starts running
|
||||
ThreadHelper.SetThreadAffinity(BindedLogicalCore);
|
||||
ThreadHelper.BindToLogicalCore(BindedLogicalCore);
|
||||
_ = Thread.Yield();
|
||||
if (Simd.Mask != 0)
|
||||
{
|
||||
@@ -186,6 +186,13 @@ namespace StgSharp.Mathematics.Numeric
|
||||
IntrinsicContext* context,
|
||||
ulong id
|
||||
);
|
||||
|
||||
public bool Equals(
|
||||
MatrixParallelThread? other
|
||||
)
|
||||
{
|
||||
return (other is not null) && ReferenceEquals(this, other);
|
||||
}
|
||||
#pragma warning restore CA5393
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user