back to matrix
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
// -----------------------------------------------------------------------
|
||||
// file="MatrixParallel.Publish"
|
||||
// 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
|
||||
@@ -48,8 +48,10 @@ namespace StgSharp.Mathematics.Numeric
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
internal static unsafe MatrixParallelWrap ScheduleTask<TTask>(nuint computeHandle, MatrixParallelTask* package)
|
||||
where TTask: IPrefetchPredict
|
||||
internal static unsafe MatrixParallelWrap ScheduleTask<TTask>(
|
||||
MatrixParallelThread[] workers,
|
||||
MatrixParallelTask* package
|
||||
) where TTask : IPrefetchPredict
|
||||
{
|
||||
/*
|
||||
int primCount = package->PrimCount;
|
||||
@@ -59,13 +61,10 @@ namespace StgSharp.Mathematics.Numeric
|
||||
|
||||
// Console.WriteLine($"amount of kernels is {count}");
|
||||
|
||||
long recommendCount = /*count / /**/ 1024;
|
||||
MatrixParallelThread[] pool = LeadParallel((int)recommendCount);
|
||||
MatrixParallelWrap wrap = new(pool)
|
||||
return new(workers)
|
||||
{
|
||||
TaskQueue = MatrixParallelQueue.Rent(package)
|
||||
};
|
||||
return wrap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user