feat(jobs): add IJobScheduler interface and job scheduling improvements\n\nIntroduce IJobScheduler interface and enhance JobScheduler, WorkerThread, JobInfo and related collections. Add ConcurrentSlotMap tests and codegen generator updates.\n\nSee changed files for details.

This commit is contained in:
2026-04-17 16:08:20 +09:00
parent 123aa69a35
commit ebee3bb7fb
12 changed files with 402 additions and 304 deletions

View File

@@ -68,20 +68,9 @@ namespace Misaki.HighPerformance.Mathematics.CodeGen.Generators
{INLINE_METHOD_ATTRIBUTE}
get
{{
RangeCheck(index);
return ref (({typeInfo.ComponentTypeFullName}*)global::System.Runtime.CompilerServices.Unsafe.AsPointer(ref this))[index];
}}
}}");
sourceBuilder.AppendLine(@$"
[global::System.Diagnostics.Conditional(""ENABLE_COLLECTION_CHECKS"")]
private void RangeCheck(int index)
{{
if (index < 0 || index >= {typeInfo.Column})
{{
throw new global::System.ArgumentOutOfRangeException(nameof(index), $""Index {{index}} is out of range of '{typeInfo.TypeName}'"");
}}
}}");
}
private void GenerateUnitMatrix()

View File

@@ -127,20 +127,9 @@ namespace Misaki.HighPerformance.Mathematics.CodeGen.Generators
{INLINE_METHOD_ATTRIBUTE}
get
{{
RangeCheck(index);
return ref global::System.Runtime.CompilerServices.Unsafe.Add(ref {s_vectorComponents[0]}, index);
}}
}}");
sourceBuilder.AppendLine(@$"
[global::System.Diagnostics.Conditional(""ENABLE_COLLECTION_CHECKS"")]
private void RangeCheck(int index)
{{
if (index < 0 || index >= {typeInfo.Row})
{{
throw new global::System.ArgumentOutOfRangeException(nameof(index), $""Index {{index}} is out of range of '{typeInfo.TypeName}'"");
}}
}}");
}
private static List<List<int>> GetPartitions(int target)