mat task adapts L4
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.HighPerformance.Memory;
|
||||
using StgSharp.HighPerformance.ProcessorAbstraction;
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
@@ -43,39 +44,17 @@ namespace StgSharp.Mathematics.Numeric.Runtime
|
||||
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
internal unsafe ref struct MatrixTask
|
||||
{
|
||||
|
||||
[FieldOffset(0)]public L4.Handle Line;
|
||||
|
||||
}
|
||||
|
||||
internal unsafe struct MatrixExecutionHandle { }
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
internal unsafe struct MatrixParallelTask
|
||||
{
|
||||
|
||||
[FieldOffset(0)] public MatrixKernel* Mat1;
|
||||
[FieldOffset(8)] public MatrixKernel* Mat2;
|
||||
[FieldOffset(16)] public MatrixKernel* Mat3;
|
||||
/// <summary>
|
||||
/// Count of kernels to be calculated in a L4 cache line.
|
||||
/// </summary>
|
||||
[FieldOffset(28)] public int CacheLength;
|
||||
[FieldOffset(32)] public int CommonK;
|
||||
[FieldOffset(36)] public int CommonX;
|
||||
[FieldOffset(40)] public int CommonY;
|
||||
[FieldOffset(44)] public int VectorLength;
|
||||
[FieldOffset(48)] public MatrixElementType ElementType;
|
||||
[FieldOffset(52)] public MatrixIntrinsicHandle ComputeHandle;
|
||||
/// <summary>
|
||||
/// Beginning offset of first kernel in a L4 cache line.
|
||||
/// </summary>
|
||||
[FieldOffset(24)] public nuint Offset;
|
||||
[FieldOffset(56)] public nuint Vector;
|
||||
[FieldOffset(64)] public ScalarPacket Scalar;
|
||||
[FieldOffset(0)] public L4.Handle Buffer0;
|
||||
[FieldOffset(16)] public L4.Handle Buffer1;
|
||||
[FieldOffset(32)] public L4.Handle Buffer2;
|
||||
[FieldOffset(48)] public L4.Handle Buffer3;
|
||||
[FieldOffset(64)] public M512 Profile;
|
||||
[FieldOffset(120)] public MatrixElementType ElementType;
|
||||
[FieldOffset(124)] public MatrixIntrinsicHandle ComputeHandle;
|
||||
|
||||
public MatrixParallelTask()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user