Refactor SIMD gather, tighten constraints, doc & test opts

- Require TLane : unmanaged, ISPMDLane for stricter type safety and direct memory ops
- Refactor GatherVectorN and WideLane<T>.Gather to use Unsafe.SkipInit and direct assignment, removing stackalloc and TLane.Load for better SIMD performance
- Use Vector.Sum in WideLane<T>.ReduceAdd
- Add/improve XML docs for ReduceAdd/ReduceMax/ReduceMin
- Update test project for AOT, AVX2, speed optimization, and disable reflection
- Tweak GGXMipGenerationBenchmark and Program.cs for improved benchmarking and output
This commit is contained in:
2026-04-30 16:02:18 +09:00
parent 90461cd0ca
commit 5b4832a886
8 changed files with 394 additions and 265 deletions

View File

@@ -597,13 +597,22 @@ public unsafe interface ISPMDLane<TSelf, TNumber> : ISPMDLane, IEquatable<TSelf>
static abstract TSelf Rsqrt(TSelf value);
/// <summary>
/// Horizontally reduces the lane value by adding all lanes together, returning a single-lane result.
/// Reduces the lane value to a single scalar by adding all lanes together.
/// </summary>
/// <param name="a"></param>
/// <param name="b"></param>
/// <returns></returns>
/// <param name="value">The lane value to reduce.</param>
/// <returns>The reduced scalar value.</returns>
static abstract TNumber ReduceAdd(TSelf value);
/// <summary>
/// Reduces the lane value to a single scalar by finding the maximum element.
/// </summary>
/// <param name="value">The lane value to reduce.</param>
/// <returns>The reduced scalar value.</returns>
static abstract TNumber ReduceMax(TSelf value);
/// <summary>
/// Reduces the lane value to a single scalar by finding the minimum element.
/// </summary>
/// <param name="value">The lane value to reduce.</param>
/// <returns>The reduced scalar value.</returns>
static abstract TNumber ReduceMin(TSelf value);
/// <summary>