SPMD API overhaul: gather/scatter, job & packaging updates
- ISPMDLane: add MaskGather, MaskStore, Scatter, MaskScatter; update MaskLoad/Gather signatures for hardware parity - WideLane/ScalarLane: implement new methods with HW/fallback logic - MathV: gather/mask-gather now delegate to lane methods - Vector2/3/4: add CompressStore, Scatter, MaskScatter - SPMD jobs/tests/README: migrate to new APIs for correctness - Use Unsafe.BitCast instead of Unsafe.As/AsRef - Add SPMDUtility for gather index extraction - Job system: add ICustomJob<TSelf>, ScheduleCustom overload - FreeList concurrency obsolete; always thread-safe - NuGet: include LICENSE/README, set license/readme in .csproj - Docs: update SPMD usage, clarify safety notes - Minor: doc fixes, CompressStore test improvements
This commit is contained in:
@@ -115,6 +115,7 @@ namespace Misaki.HighPerformance.Mathematics.CodeGen.Generators
|
||||
private void GenerateConstructors()
|
||||
{
|
||||
sourceBuilder.AppendLine($@"
|
||||
{INLINE_METHOD_ATTRIBUTE}
|
||||
public unsafe {typeInfo.TypeName}(in global::System.ReadOnlySpan<{typeInfo.ComponentTypeFullName}> values)
|
||||
{{
|
||||
if (values.Length < {typeInfo.Column})
|
||||
@@ -132,6 +133,7 @@ namespace Misaki.HighPerformance.Mathematics.CodeGen.Generators
|
||||
if (typeInfo.ElementTypeSymbol != null)
|
||||
{
|
||||
sourceBuilder.AppendLine($@"
|
||||
{INLINE_METHOD_ATTRIBUTE}
|
||||
public unsafe {typeInfo.TypeName}(in global::System.ReadOnlySpan<{typeInfo.ElementTypeFullName}> values)
|
||||
{{
|
||||
if (values.Length < {typeInfo.Column * typeInfo.Row})
|
||||
@@ -201,6 +203,7 @@ namespace Misaki.HighPerformance.Mathematics.CodeGen.Generators
|
||||
foreach (var (signature, assignment) in _constructorSignatures)
|
||||
{
|
||||
sourceBuilder.Append($@"
|
||||
{INLINE_METHOD_ATTRIBUTE}
|
||||
public {typeInfo.TypeName}({signature})
|
||||
{{");
|
||||
for (var i = 0; i < typeInfo.Column; i++)
|
||||
|
||||
@@ -217,6 +217,7 @@ namespace Misaki.HighPerformance.Mathematics.CodeGen.Generators
|
||||
StartRegion("Constructors");
|
||||
|
||||
sourceBuilder.AppendLine($@"
|
||||
{INLINE_METHOD_ATTRIBUTE}
|
||||
public unsafe {typeName}(global::System.ReadOnlySpan<{componentType}> values)
|
||||
{{
|
||||
if (values.Length < {typeInfo.Row})
|
||||
@@ -307,6 +308,7 @@ namespace Misaki.HighPerformance.Mathematics.CodeGen.Generators
|
||||
foreach (var (signature, assignment) in _constructorSignatures)
|
||||
{
|
||||
sourceBuilder.Append($@"
|
||||
{INLINE_METHOD_ATTRIBUTE}
|
||||
public {typeName}({signature})
|
||||
{{");
|
||||
for (var i = 0; i < typeInfo.Row; i++)
|
||||
|
||||
Reference in New Issue
Block a user