Add AllBitsSet, refactor WideLane, improve math paths

- Add static AllBitsSet property to ISPMDLane and implement in ScalarLane and WideLane
- Refactor WideLane shuffle table pointers and update usages
- Improve pointer safety and mask handling in CompressStore, Gather, and MaskLoad
- Enhance Sin, Cos, SinCos with fast-math and hardware fallback
- Add Newton-Raphson refinement for reciprocal/sqrt when not fast-math
- Optimize MathV.Vector vector loading (struct init, pointer ops)
- Update project file: version 1.3.4, content packaging, AOT settings
- Minor code cleanup and naming consistency fixes
This commit is contained in:
2026-05-01 12:19:58 +09:00
parent 5b4832a886
commit 18a181f57a
7 changed files with 209 additions and 124 deletions

View File

@@ -65,23 +65,22 @@ public static unsafe partial class MathV
<#= TLaneRestrictions #>
<#= TNumberRestrictions #>
{
var width = TLane.LaneWidth;
<# for (int i = 0; i < dimension; i++) { #>
var <#= components[i] #> = stackalloc <#= TNumber #>[width];
Unsafe.SkipInit(out TLane <#= components[i] #>);
var p<#= components[i] #> = (<#= TNumber #>*)&<#= components[i] #>;
<# } #>
for (var i = 0; i < width; i++)
for (var i = 0; i < TLane.LaneWidth; i++)
{
<# for (int i = 0; i < dimension; i++) { #>
<#= components[i] #>[i] = pSrc[i * <#= dimension #> + <#= i #>];
p<#= components[i] #>[i] = pSrc[i * <#= dimension #> + <#= i #>];
<# } #>
}
return new <#= vectorType #>
{
<# for (int i = 0; i < dimension; i++) { #>
<#= components[i] #> = <#= TLane #>.Load(<#= components[i] #>),
<#= components[i] #> = <#= components[i] #>,
<# } #>
};
}