Mat mul mat is now on full function
This commit is contained in:
@@ -34,7 +34,7 @@ namespace StgSharp.Mathematics.Numeric
|
||||
internal static class MatrixComputeModel
|
||||
{
|
||||
|
||||
internal static unsafe void KernelComputeBinary(MatrixParallelTaskPackage* p)
|
||||
internal static unsafe void BufferComputeBinary(MatrixParallelTaskPackage* p)
|
||||
{
|
||||
int size = p->ElementSize * 16;
|
||||
long count = Unsafe.As<int, long>(ref p->PrimCount);
|
||||
@@ -42,12 +42,12 @@ namespace StgSharp.Mathematics.Numeric
|
||||
|
||||
((delegate* unmanaged[Cdecl]<void*, void*, void*, long, void>)p->ComputeHandle)((void*)(p->Left + offset),
|
||||
(void*)(p->Right + offset),
|
||||
(void*)(p->Result + offset),
|
||||
(void*)(p->Answer + offset),
|
||||
count);
|
||||
MatrixParallelFactory.Release(p);
|
||||
}
|
||||
|
||||
internal static unsafe void KernelComputeBinaryScalar(MatrixParallelTaskPackage* p)
|
||||
internal static unsafe void BufferComputeBinaryScalar(MatrixParallelTaskPackage* p)
|
||||
{
|
||||
int size = p->ElementSize * 16;
|
||||
long count = Unsafe.As<int, long>(ref p->PrimCount);
|
||||
@@ -55,57 +55,55 @@ namespace StgSharp.Mathematics.Numeric
|
||||
ScalarPacket* scalar = p->Scalar;
|
||||
((delegate* unmanaged[Cdecl]<void*, void*, void*,ScalarPacket*, long, void>)p->ComputeHandle)((void*)(p->Left + offset),
|
||||
(void*)(p->Right + offset),
|
||||
(void*)(p->Result + offset),
|
||||
(void*)(p->Answer + offset),
|
||||
scalar,
|
||||
count);
|
||||
MatrixParallelFactory.Release(p);
|
||||
}
|
||||
|
||||
internal static unsafe void KernelComputeNoOperatorScalar(MatrixParallelTaskPackage* p)
|
||||
internal static unsafe void BufferComputeNoOperatorScalar(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*, ScalarPacket*,long, void>)p->ComputeHandle)((void*)(p->Result + offset),
|
||||
((delegate* unmanaged[Cdecl]<void*, ScalarPacket*,long, void>)p->ComputeHandle)((void*)(p->Answer + offset),
|
||||
p->Scalar, count);
|
||||
MatrixParallelFactory.Release(p);
|
||||
}
|
||||
|
||||
internal static unsafe void KernelComputeUnary(MatrixParallelTaskPackage* p)
|
||||
internal static unsafe void BufferComputeUnary(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*, long, void>)p->ComputeHandle)((void*)(p->Right + offset),
|
||||
(void*)(p->Result + offset),
|
||||
(void*)(p->Answer + offset),
|
||||
count);
|
||||
MatrixParallelFactory.Release(p);
|
||||
}
|
||||
|
||||
internal static unsafe void KernelComputeUnaryScalar(MatrixParallelTaskPackage* 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),
|
||||
(void*)(p->Answer + offset),
|
||||
p->Scalar,
|
||||
count);
|
||||
MatrixParallelFactory.Release(p);
|
||||
}
|
||||
|
||||
internal static unsafe void PanelComputeBinary(MatrixParallelTaskPackage* p) { }
|
||||
|
||||
internal static unsafe void SpecialCompute(MatrixParallelTaskPackage* p)
|
||||
internal static unsafe void SpecialBufferCompute(MatrixParallelTaskPackage* p)
|
||||
{
|
||||
switch ((MatrixOperationSpecial)p->ComputeMode.OperationStyle)
|
||||
switch ((MatrixOperationSpecial)p->ComputeMode.ParameterStyle)
|
||||
{
|
||||
case MatrixOperationSpecial.SEQ_FMA:
|
||||
MatrixCompute.ComputeFmaPanelF32(p);
|
||||
break;
|
||||
default:
|
||||
throw new NotSupportedException("The special matrix operation style is not supported.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user