hlsf wrong alloc solved

This commit is contained in:
Youmu Liu
2025-11-24 17:00:10 +08:00
parent 67a4ac385f
commit b7b960a604
12 changed files with 357 additions and 290 deletions
@@ -57,7 +57,7 @@ namespace StgSharp.Mathematics.Numeric
MatrixParallelFactory.Release(p);
}
internal static unsafe void BufferComputeUnaryScalar(MatrixParallelTaskPackage* p)
internal static unsafe void BufferComputeUnary(MatrixParallelTaskPackage* p)
{
int size = p->ElementSize * 16;
long count = Unsafe.As<int, long>(ref p->PrimCount);
@@ -69,6 +69,17 @@ namespace StgSharp.Mathematics.Numeric
MatrixParallelFactory.Release(p);
}
internal static unsafe void BufferComputeUnaryScalar(MatrixParallelTaskPackage* p)
{
int size = p->ElementSize * 16;
long count = Unsafe.As<int, long>(ref p->PrimCount);
long offset = Unsafe.As<int, long>(ref p->PrimTileOffset) * size;
((delegate* unmanaged[Cdecl]< void*, void*, ScalarPacket*, long, void>)p->ComputeHandle)((void*)(p->Right + offset),
(void*)(p->Result + offset),
p->Scalar, count);
MatrixParallelFactory.Release(p);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe void Compute_Binary(MatrixParallelTaskPackage* p)
{