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="MatrixParallelTaskPackage"
// Project: StgSharp
@@ -52,12 +52,17 @@ namespace StgSharp.Mathematics.Numeric
* matrix_op_mode;
*/
public enum MatrixOperationSpecial : short
{
SEQ_FMA = -1,
}
public enum MatrixOperationStyle : short
{
PANEL_OP = 1,
BUFFER_OP = 2,
KERNEL_OP = 3,
BUFFER_INDEX = 1,
}
@@ -79,6 +84,9 @@ namespace StgSharp.Mathematics.Numeric
public MatrixOperationParam ParameterStyle = paramLayout;
public MatrixOperationStyle OperationStyle = style;
public MatrixOpMode(MatrixOperationStyle style, MatrixOperationSpecial paramLayout)
: this(style, (MatrixOperationParam)paramLayout) { }
}
[StructLayout(LayoutKind.Explicit, Size = 128)]
@@ -86,9 +94,12 @@ namespace StgSharp.Mathematics.Numeric
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void Copy(MatrixParallelTaskPackage* source, MatrixParallelTaskPackage* target)
public static unsafe void Copy(
MatrixParallelTaskPackage* source,
MatrixParallelTaskPackage* target)
{
Buffer.MemoryCopy(source, target, sizeof(MatrixParallelTaskPackage), sizeof(MatrixParallelTaskPackage));
Buffer.MemoryCopy(source, target, sizeof(MatrixParallelTaskPackage),
sizeof(MatrixParallelTaskPackage));
}
#region source