working on matrix mul matrix, rebuilding task model defines in C#

This commit is contained in:
Youmu Liu
2025-12-12 18:00:49 +08:00
parent 9ff438d3b9
commit 2c7277f3f9
12 changed files with 223 additions and 444 deletions
@@ -1,4 +1,4 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="MatrixParallel.Publish"
// Project: StgSharp
@@ -51,18 +51,15 @@ namespace StgSharp.Mathematics.Numeric
MatrixParallelTaskPackage* nonGeneric = package;
switch (nonGeneric->ComputeMode.OperationStyle)
{
case MatrixOperationStyle.PANEL_OP:
throw new NotImplementedException();
case MatrixOperationStyle.BUFFER_OP:
case MatrixOperationStyle.BUFFER_INDEX:
return ScheduleBufferTask(nonGeneric);
case MatrixOperationStyle.KERNEL_OP:
return ScheduleKernelTask(nonGeneric);
default:
throw new InvalidOperationException($"Unknown mode {nonGeneric->ComputeMode.OperationStyle}.");
}
}
private static unsafe MatrixParallelHandle ScheduleBufferTask(MatrixParallelTaskPackage* package)
private static unsafe MatrixParallelHandle ScheduleBufferTask(
MatrixParallelTaskPackage* package)
{
int primCount = package->PrimCount;
int secCount = package->SecCount;
@@ -113,7 +110,8 @@ namespace StgSharp.Mathematics.Numeric
return handle;
}
private static unsafe MatrixParallelHandle ScheduleKernelTask(MatrixParallelTaskPackage* package)
private static unsafe MatrixParallelHandle ScheduleKernelTask(
MatrixParallelTaskPackage* package)
{
int primCount = package->PrimCount;
int secCount = package->SecCount;