swiss ok, needs more benchmark
This commit is contained in:
@@ -50,26 +50,22 @@ namespace StgSharp.Mathematics.Numeric
|
||||
MatrixParallelTask* package
|
||||
)
|
||||
{
|
||||
switch (package->ComputeMode.OperationStyle)
|
||||
{
|
||||
case MatrixIndexStyle.BUFFER_INDEX:
|
||||
return ScheduleBufferTask(package);
|
||||
default:
|
||||
throw new InvalidOperationException($"Unknown mode {package->ComputeMode.OperationStyle}.");
|
||||
}
|
||||
return ScheduleBufferTask(package);
|
||||
}
|
||||
|
||||
private static unsafe MatrixParallelWrap ScheduleBufferTask(
|
||||
MatrixParallelTask* package
|
||||
)
|
||||
{
|
||||
/*
|
||||
int primCount = package->PrimCount;
|
||||
int secCount = package->SecCount;
|
||||
long count = (long)primCount * secCount;
|
||||
/**/
|
||||
|
||||
// Console.WriteLine($"amount of kernels is {count}");
|
||||
|
||||
long recommendCount = count / 1024;
|
||||
long recommendCount = /*count / /**/ 1024;
|
||||
MatrixParallelThread[] pool = LeadParallel((int)recommendCount);
|
||||
MatrixParallelWrap wrap = new MatrixParallelWrap(pool);
|
||||
wrap.TaskQueue = MatrixParallelQueue.Rent(package);
|
||||
|
||||
Reference in New Issue
Block a user