working on dynamic wrapping
This commit is contained in:
@@ -49,8 +49,8 @@ namespace StgSharp.Mathematics.Numeric
|
||||
long count = (long)left.KernelColumnLength * left.KernelRowLength;
|
||||
if (count <= 1024)
|
||||
{
|
||||
CapacityFixedStack<MatrixParallelThread> pool = MatrixParallel.LeadParallel();
|
||||
if (!pool.TryPop(out MatrixParallelThread thread))
|
||||
ReadOnlySpan<MatrixParallelThread> pool = MatrixParallel.LeadParallel(1);
|
||||
if (pool.Length == 0)
|
||||
{
|
||||
/*
|
||||
* wait
|
||||
@@ -84,8 +84,8 @@ namespace StgSharp.Mathematics.Numeric
|
||||
if (count <= 1024)
|
||||
{
|
||||
// TODO: this is very awkward, blocking thread renting, need a better way to handle small tasks
|
||||
CapacityFixedStack<MatrixParallelThread> pool = MatrixParallel.LeadParallel();
|
||||
if (!pool.TryPop(out MatrixParallelThread thread))
|
||||
ReadOnlySpan<MatrixParallelThread> pool = MatrixParallel.LeadParallel(1);
|
||||
if (pool.Length == 0)
|
||||
{
|
||||
/*
|
||||
* wait
|
||||
|
||||
Reference in New Issue
Block a user