Reserve index 0 in SlotMap, improve unsafe collections

- Reserve index 0 as always invalid in SlotMap, ConcurrentSlotMap, UnsafeSlotMap, and UnsafeSparseSet; update all index checks and slot operations accordingly
- Refactor SlotMap to use parallel arrays and BitArray for occupancy
- Double capacity on resize for all major unsafe collections
- Add debugger display support for unsafe collections
- Improve NuGet publishing workflow to skip existing versions
- Increment package versions (LowLevel: 1.3.1, main: 1.0.2)
- Add comprehensive unit tests for SlotMap and ConcurrentSlotMap
- Update main program and documentation for new slot map behavior
This commit is contained in:
2025-12-12 16:10:49 +09:00
parent a0a4b347dd
commit fb31fd8ca8
16 changed files with 509 additions and 203 deletions

View File

@@ -9,6 +9,13 @@ namespace Misaki.HighPerformance.Jobs;
public unsafe partial class JobScheduler
{
public static readonly TempJobAllocator* pTempAllocator;
/// <summary>
/// Gets the allocation handle for the temporary job allocator.
/// </summary>
/// <remarks>
/// You must dispose the allocation before the fourth time you call <see cref="TempJobAllocator.AdvanceFrame"/> after obtaining this handle.
/// </remarks>
public static AllocationHandle TempAllocatorHandle => pTempAllocator->Handle;
static JobScheduler()