L4 completely add support for multi predictor, working on ver 5 mat para
This commit is contained in:
@@ -69,12 +69,8 @@ namespace StgSharp.Mathematics.Numeric
|
||||
|
||||
public ThreadPriority AfterWork { get; set; }
|
||||
|
||||
internal ref readonly IntrinsicContext Intrinsic => ref (*_context);
|
||||
|
||||
internal bool IsSingle { get; set; }
|
||||
|
||||
internal MatrixParallelWrap BindedWrap { get; set; }
|
||||
|
||||
internal MatrixThreadState State { get; private set; }
|
||||
|
||||
internal SIMDID Simd { get; private set; }
|
||||
@@ -163,7 +159,6 @@ namespace StgSharp.Mathematics.Numeric
|
||||
}
|
||||
State = MatrixThreadState.Idle;
|
||||
State = MatrixThreadState.Running;
|
||||
AfterWork = BindedWrap.AfterWork;
|
||||
_managedThread.Priority = ThreadPriority.Highest;
|
||||
if (IsSingle)
|
||||
{
|
||||
@@ -173,17 +168,6 @@ namespace StgSharp.Mathematics.Numeric
|
||||
IsSingle = false;
|
||||
} else
|
||||
{
|
||||
PredictPolicy policy = BindedWrap.Policy;
|
||||
switch (policy)
|
||||
{
|
||||
case PredictPolicy.Transparent:
|
||||
break;
|
||||
case PredictPolicy.BufferSequential:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// MatrixParallelQueue taskQueue = BindedWrap.TaskQueue;
|
||||
/*
|
||||
if (0 > (int)p ->ComputeHandle) {
|
||||
@@ -198,7 +182,6 @@ namespace StgSharp.Mathematics.Numeric
|
||||
break;
|
||||
}
|
||||
/**/
|
||||
BindedWrap.ReportThreadAccomplished();
|
||||
}
|
||||
_managedThread.Priority = AfterWork;
|
||||
State = MatrixThreadState.Idle;
|
||||
@@ -208,19 +191,19 @@ namespace StgSharp.Mathematics.Numeric
|
||||
|
||||
#pragma warning disable CA5393
|
||||
[LibraryImport(Native.LibName, EntryPoint = "sn_get_simd_level_local")]
|
||||
[UnmanagedCallConv(CallConvs = [ typeof(CallConvCdecl) ])]
|
||||
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
|
||||
[DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory)]
|
||||
internal static partial ulong GetSimdId();
|
||||
|
||||
[LibraryImport(Native.LibName, EntryPoint = "sn_set_thread_affinity")]
|
||||
[UnmanagedCallConv(CallConvs = [ typeof(CallConvCdecl) ])]
|
||||
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
|
||||
[DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory)]
|
||||
internal static partial void SetThreadAffinity(
|
||||
int coreId
|
||||
);
|
||||
|
||||
[LibraryImport(Native.LibName, EntryPoint = "load_intrinsic_function")]
|
||||
[UnmanagedCallConv(CallConvs = [ typeof(CallConvCdecl) ])]
|
||||
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
|
||||
[DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory)]
|
||||
private static unsafe partial void LoadIntrinsicFunction(
|
||||
IntrinsicContext* context,
|
||||
|
||||
Reference in New Issue
Block a user