Better FMA
This commit is contained in:
@@ -33,11 +33,12 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Mathematics.Numeric
|
||||
{
|
||||
public unsafe class MatrixParallelQueue
|
||||
internal unsafe class MatrixParallelQueue
|
||||
{
|
||||
|
||||
private static ConcurrentStack<MatrixParallelQueue> _recycle = [];
|
||||
@@ -57,7 +58,7 @@ namespace StgSharp.Mathematics.Numeric
|
||||
queue = new MatrixParallelQueue();
|
||||
}
|
||||
queue._package = pack;
|
||||
queue._maxCount = (ulong)pack->PrimCount * (ulong)pack->SecCount;
|
||||
queue._maxCount = (ulong)pack->CommonX * (ulong)pack->CommonY;
|
||||
queue._cursor = 0;
|
||||
return queue;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace StgSharp.Mathematics.Numeric
|
||||
int j = (int)(c % ansHeight);
|
||||
enumeration->Member<int>(0) = i;
|
||||
enumeration->Member<int>(1) = j;
|
||||
MathematicsModule.GlobalContext.mat_sk[f32].kernel_tile_fma(leftBuffer, rightBuffer,
|
||||
NumericalModule.GlobalContext.mat_sk[f32].kernel_tile_fma(leftBuffer, rightBuffer,
|
||||
ansBuffer, enumeration);
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ namespace StgSharp.Mathematics.Numeric
|
||||
int j = (int)(c % ansHeight);
|
||||
enumeration->Member<int>(0) = i;
|
||||
enumeration->Member<int>(1) = j;
|
||||
MathematicsModule.GlobalContext.mat_sk[f64].kernel_tile_fma(leftBuffer, rightBuffer,
|
||||
NumericalModule.GlobalContext.mat_sk[f64].kernel_tile_fma(leftBuffer, rightBuffer,
|
||||
ansBuffer, enumeration);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,8 +63,6 @@ namespace StgSharp.Mathematics.Numeric
|
||||
_count = threadArray.Length;
|
||||
}
|
||||
|
||||
public MatrixParallelQueue TaskQueue { get; set; }
|
||||
|
||||
public ReadOnlySpan<MatrixParallelThread> Threads
|
||||
{
|
||||
get
|
||||
@@ -77,6 +75,8 @@ namespace StgSharp.Mathematics.Numeric
|
||||
|
||||
public ThreadPriority AfterWork { get; private set; }
|
||||
|
||||
internal MatrixParallelQueue TaskQueue { get; set; }
|
||||
|
||||
private bool IsMultithread { get; init; }
|
||||
|
||||
public void Dispose()
|
||||
|
||||
Reference in New Issue
Block a user