Daily update on 20251109-030228 by Nitload Youmu. Additional Message : Dynamic wrapping is briefly ok, a special sorting is required.

Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Nitload
2025-11-09 03:02:28 +08:00
parent 54e0690ebf
commit 1479cd7c9f
5 changed files with 232 additions and 43 deletions
@@ -2,8 +2,8 @@
// -----------------------------------------------------------------------
// file="MatrixParallelPool"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -39,8 +39,7 @@ namespace StgSharp.Mathematics.Numeric
public struct MatrixParallelHandle : IDisposable
{
private static readonly (int a, int b)[] LookupTable = [
(1, 1), // 7
private static readonly (int a, int b)[] LookupTable = [ (1, 1), // 7
(0, 2), // 8 (no non-zero solution)
(3, 0), // 9 (no non-zero solution)
(2, 1), // 10
@@ -118,7 +117,7 @@ namespace StgSharp.Mathematics.Numeric
/*
* Thread wrapping to accelerate matrix operations by dividing threads into groups (pool).
* For M pool, each containing an average of N threads, we satisfy the condition M * N = T - 4,
* where T is the total thread count of the CPU. Typically, for modern consumer CPUs, T is around 16.
* where T is the total thread _count of the CPU. Typically, for modern consumer CPUs, T is around 16.
* For simplicity, let M * N = 16.
*
* The total time complexity for publishing tasks is O(M + N):