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:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user