small size buffer op ok

This commit is contained in:
Youmu Liu
2025-11-14 18:28:15 +08:00
parent 1417785726
commit a8c522ab23
19 changed files with 578 additions and 1048 deletions
@@ -34,6 +34,29 @@ namespace StgSharp.Mathematics.Numeric
internal static class MatrixComputeModel
{
internal static unsafe void BufferComputeBinary(MatrixParallelTaskPackageNonGeneric* p)
{
int size = p->ElementSize * 16;
int count = p->PrimCount * p->SecCount;
int offset = p->LeftPrimOffset * p->SecCount;
((delegate* unmanaged[Cdecl]<void*, void*, void*, int, void>)p->ComputeHandle)((void*)(p->Left + offset * size),
(void*)(p->Right + offset * size),
(void*)(p->Result + offset * size),
count);
}
internal static unsafe void BufferComputeUnaryScalar(MatrixParallelTaskPackageNonGeneric* p)
{
int size = p->ElementSize * 16;
int count = p->PrimCount * p->SecCount;
int offset = p->LeftPrimOffset * p->SecCount;
((delegate* unmanaged[Cdecl]<void*, void*, int, void>)p->ComputeHandle)((void*)(p->Right + offset * size),
(void*)(p->Result + offset * size),
count);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe void Compute_Binary(MatrixParallelTaskPackageNonGeneric* p)
{