Job system priorities, async waits, parallel map/queue
Major refactor: - Add job priority tiers and async wait APIs to IJobScheduler - Implement priority-based job queues and scheduling logic - Introduce UnsafeParallelHashMap and refactor UnsafeParallelQueue - Refactor UnsafeSlotMap to chunked storage for scalability - Update SlotMap/ConcurrentSlotMap for consistency and perf - Add new benchmarks and unit tests for parallel collections - Misc: add MemoryUtility.AlignUp, version bumps, test improvements, bug fixes
This commit is contained in:
@@ -392,5 +392,16 @@ public static unsafe partial class MemoryUtility
|
||||
{
|
||||
return Marshal.SizeOf<AlignOfHelper<T>>() - Marshal.SizeOf<T>();
|
||||
}
|
||||
|
||||
public static nuint AlignUp(nuint value, nuint alignment)
|
||||
{
|
||||
if (alignment == 0)
|
||||
{
|
||||
throw new ArgumentException("Alignment must be greater than zero.", nameof(alignment));
|
||||
}
|
||||
|
||||
var mask = alignment - 1;
|
||||
return (value + mask) & ~mask;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user