new simplified timer. and little other ops

This commit is contained in:
Youmu Liu
2025-11-18 20:39:03 +08:00
parent 81a60d1cfe
commit ece12f2ea7
28 changed files with 2254 additions and 853 deletions
@@ -44,13 +44,28 @@ namespace StgSharp.Mathematics.Numeric
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe MatrixParallelHandle ScheduleTask<T>(MatrixParallelTaskPackage<T>* package)
where T : unmanaged
where T : unmanaged,INumber<T>
{
MatrixParallelTaskPackageNonGeneric* nonGeneric = (MatrixParallelTaskPackageNonGeneric*)package;
return ScheduleTask(nonGeneric);
switch (nonGeneric->ComputeMode.OperationStyle)
{
case MatrixOperationStyle.PANEL_OP:
throw new NotImplementedException();
case MatrixOperationStyle.BUFFER_OP:
return ScheduleBufferTask(nonGeneric);
case MatrixOperationStyle.KERNEL_OP:
return ScheduleKernelTask(nonGeneric);
default:
throw new InvalidOperationException($"Unknown mode {nonGeneric->ComputeMode.OperationStyle}.");
}
}
internal static unsafe MatrixParallelHandle ScheduleTask(MatrixParallelTaskPackageNonGeneric* package)
private static unsafe MatrixParallelHandle ScheduleBufferTask(MatrixParallelTaskPackageNonGeneric* package)
{
throw new NotImplementedException();
}
private static unsafe MatrixParallelHandle ScheduleKernelTask(MatrixParallelTaskPackageNonGeneric* package)
{
int primCount = package->PrimCount;
int secCount = package->SecCount;