Major refactor of job system and memory allocator:
- Replaced threadIndex with preferLocal for scheduling
- Switched local queues to SPMCQueue for better performance
- Introduced lock-free JobEdge pool for dependencies
- Removed remainingBatches; use ref counting for completion
- Updated all scheduling APIs and tests to new model
- Optimized FreeList struct sizes and block management
- Added allocation benchmarks
- Disabled OwnershipTransferAnalyzer temporarily
- Bumped assembly versions
Replaces unsafe pointer-based job data with JobDataPool<T> and ConcurrentSlotMap<T> for safer, type-safe management. JobInfo now references job data by (dataID, dataGeneration). JobExecutor and JobScheduler updated to use the new pool-based approach, requiring T : struct. Removed FreeList and pointer logic. WorkerThread now uses reference counting to prevent use-after-free. Updated all scheduling APIs and benchmarks to match new signatures. Improved documentation and inlining. Bumped assembly version to 3.0.0 due to breaking changes.
Replaced the deprecated Allocator API with the new AllocationHandle API across the codebase. Updated constructors, methods, and tests to use AllocationHandle for memory management. Marked Allocator-based methods as [Obsolete] and provided alternatives.
Added OwnershipTransferAnalyzer to detect ownership transfer issues and introduced OwnershipTransferAttribute for marking parameters. Enhanced DefensiveCopyAnalyzer with additional checks for readonly and ValueType instances.
Refactored internal memory management in AllocationManager and updated benchmarks, utilities, and documentation to reflect the changes.
BREAKING CHANGE: Deprecated Allocator API in favor of AllocationHandle. Updated constructors and methods to use AllocationHandle. Users must migrate to the new API.
Major breaking change: job interfaces now use JobExecutionContext
instead of threadIndex, enabling thread-aware and dynamic job
dispatching. Updated all job system, SPMD, and test code to match.
Collections improved with new methods and clearer enumerators.
Renamed IJobScheduler.WaitComplete to Wait. Incremented project
versions. Includes bug fixes, documentation, and style updates.
Added:
- Added `JobExecutor.cs` for job execution management.
- Added `JobInfo.cs` to hold job execution information.
- Added `TestJobSystem.cs` for unit tests of the job system.
- Added `TestJobs.cs` for additional job implementation tests.
- Added `WorkerThread.cs` to manage worker threads for jobs.
Changed:
- Changed `AssemblyInfo.cs.cs` to include a global using directive for `unsafe JobExecuteFunc`.
- Changed `IJob.cs` to include an overload of the `Execute` method with a `threadIndex` parameter.
- Changed `JobHandle.cs` to include an `IsValid` property and updated internal structure.
- Changed `JobScheduler.cs` to improve job scheduling and management.
- Changed `JobsUtility.cs` to enhance job management functions.
- Changed `MemoryBlock.cs` to reference the heap from which memory was allocated.
- Changed `ParallelNoiseBenchmark.cs` to include benchmarks for the job system.
- Changed `Program.cs` to execute benchmarks instead of previous test code.
Removed:
- Removed `.gitignore` entries for default ignored files.
- Removed `JobBase.cs` to shift from structs to classes for jobs.
- Removed `JobExtensions.cs` indicating a change in job scheduling.
- Removed `JobStruct.cs` indicating a change in job structure.
- Removed `encodings.xml`, `indexLayout.xml`, and `vcs.xml` files to simplify project configuration.
- Removed fields from `JobData.cs` to simplify the job data structure.
- Removed `TestJobSystem.csproj` entries related to old project structure.
Added new numeric types for unsigned integers, including uint2, uint3, and uint4, along with their matrix types.
Added a new `quaternion` struct with constructors and methods for creating and manipulating quaternions.
Added methods for projecting and reflecting vectors, enhancing geometric operations.
Added utility functions for generating orthonormal bases and changing vector signs.
Added comprehensive unit tests for new mathematical functions and quaternion operations.
Added a high-performance job scheduling system with job management features and worker thread management.
Added new structs for job execution, allowing efficient job scheduling and execution.
Added utility functions for job execution, including methods for obtaining unique job IDs.
Changed access modifiers and property definitions in several files for improved clarity and maintainability.
Changed property definitions and method implementations in `ImageInfo.cs`, `ImageResult.cs`, and `ImageResultFloat.cs` for better readability.
Changed memory management functions in `CRuntime.cs` and improved memory allocation tracking in `MemoryStats.cs`.
Changed the project file to include references to necessary projects and enable unsafe code blocks.
Removed the `WorkerThreadPool.cs` file, integrating worker thread management directly into the `JobScheduler`.
Removed the `float4` struct and its associated methods and properties, transitioning to a new code generation strategy.
Removed the `float4.tt` template and other related files, indicating a shift in code generation approach.
Removed the `Vectorize.cs` file, indicating a change in how vector operations are handled.
Updated the `.gitignore` file to include IDE-specific settings.
Updated various XML files to define project components and structure.
Updated the `AllocationManager.cs` to improve memory allocation management and introduce new strategies.
Updated the `UnsafeArray.cs`, `UnsafeHashMap.cs`, and `UnsafeList.cs` to enhance performance and safety in unsafe contexts.
Updated error handling and function pointer management in `MemoryLeakException.cs` and `FunctionPointer.cs`.
Updated the `AssemblyInfo.cs` file to include global using directives for better code organization.