back to matrix, but trouble in combining L4 predict with matrixparallelqueue

This commit is contained in:
Youmu Liu
2026-03-19 19:53:22 +08:00
parent fd82829788
commit e521bed222
10 changed files with 291 additions and 142 deletions
@@ -31,6 +31,7 @@ using StgSharp.Mathematics;
using StgSharp.Mathematics.Internal;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Numerics;
using System.Runtime.CompilerServices;
@@ -48,6 +49,7 @@ namespace StgSharp.Mathematics.Numeric
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe MatrixParallelWrap ScheduleTask<TTask>(
nuint computeHandle,
MatrixParallelTask* package
) where TTask : IPrefetchPredict
{
@@ -61,8 +63,10 @@ namespace StgSharp.Mathematics.Numeric
long recommendCount = /*count / /**/ 1024;
MatrixParallelThread[] pool = LeadParallel((int)recommendCount);
MatrixParallelWrap wrap = new MatrixParallelWrap(pool);
wrap.TaskQueue = MatrixParallelQueue.Rent(package);
MatrixParallelWrap wrap = new(pool)
{
TaskQueue = MatrixParallelQueue.Rent(package)
};
return wrap;
}