buffer op and parallel framework is now on full complete

This commit is contained in:
Youmu Liu
2025-11-20 17:50:06 +08:00
parent c595076005
commit 28bdc42982
6 changed files with 88 additions and 51 deletions
@@ -67,7 +67,8 @@ namespace StgSharp.Mathematics.Numeric
int primCount = package->PrimCount;
int secCount = package->SecCount;
long count = (long)primCount * secCount;
Console.WriteLine($"amount of kernels is {count}");
// Console.WriteLine($"amount of kernels is {count}");
long recommendCount = count / 1024;
MatrixParallelThread[] pool = LeadParallel((int)recommendCount);
@@ -103,9 +104,9 @@ namespace StgSharp.Mathematics.Numeric
lengthRef = length;
wrap.WrapTask.Enqueue((nint) current);
Console.WriteLine($"Offset is {offset}");
Console.WriteLine($"Scheduling {length} kernels into {wrap.WrapTaskCapacity} threads");
Console.WriteLine();
// Console.WriteLine($"Offset is {offset}");
// Console.WriteLine($"Scheduling {length} kernels into {wrap.WrapTaskCapacity} threads");
// Console.WriteLine();
current = MatrixParallelFactory.FromExistPackage(current);
offset += length;
}