add scheduler method; fixing buffer parallel errors

This commit is contained in:
Youmu Liu
2025-11-19 18:09:25 +08:00
parent 45d1d08af8
commit 04fc55d31e
11 changed files with 272 additions and 339 deletions
@@ -1,9 +1,9 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="MatrixParallelPool"
// file="MatrixParallelHandle"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
// AuthorGroup: Nitload
// Copyright (c) Nitload. 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,7 +39,8 @@ 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
@@ -157,6 +158,7 @@ namespace StgSharp.Mathematics.Numeric
{
MatrixParallelWrap wrap = new MatrixParallelWrap(_threads, 0, count);
_wraps = [ wrap ];
return;
}
(int c3,int c4) = FastDecompose(_threads.Length);
_wraps = new(c3 + c4);