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:
2026-04-21 11:21:16 +09:00
parent 13802ca6c8
commit f4bbef0be3
8 changed files with 336 additions and 401 deletions

View File

@@ -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;