Refactor job scheduler API, allocation, and benchmarks
- Removed IJobScheduler interface; merged logic into JobScheduler - Changed scheduling APIs to accept multiple dependencies (ReadOnlySpan) - Moved WaitItem classes to JobScheduler.cs and updated types - Updated JobExecutionContext to use JobScheduler and added docs - Renamed AllocationManagerInitOpts to AllocationManagerDesc (required props) - Added thread-safe TotalAllocatedMemory property to AllocationManager - Refactored Integer to Data in benchmarks; updated usage - Updated tests and improved documentation throughout
This commit is contained in:
@@ -2,21 +2,33 @@ namespace Misaki.HighPerformance.Jobs;
|
||||
|
||||
public readonly ref struct JobExecutionContext
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the index of the current thread executing the job.
|
||||
/// </summary>
|
||||
public int ThreadIndex
|
||||
{
|
||||
get; init;
|
||||
}
|
||||
|
||||
public IJobScheduler JobScheduler
|
||||
/// <summary>
|
||||
/// Gets the job scheduler that is responsible for managing the execution of jobs.
|
||||
/// </summary>
|
||||
public JobScheduler JobScheduler
|
||||
{
|
||||
get; init;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the state object for the job scheduler.
|
||||
/// </summary>
|
||||
public object? State
|
||||
{
|
||||
get; init;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the handle for the currently executing job.
|
||||
/// </summary>
|
||||
public JobHandle SelfHandle
|
||||
{
|
||||
get; init;
|
||||
|
||||
Reference in New Issue
Block a user