Fixed the bug that Vector type in SPMD does not work as expected

This commit is contained in:
2026-02-22 11:57:49 +09:00
parent f4c929fd88
commit 49dc44605b
3 changed files with 13 additions and 5 deletions

View File

@@ -57,9 +57,17 @@ jobs:
else
echo "🆕 Version $VERSION of $PACKAGE_ID is new."
# 4. PACK (Packages the DLLs created above)
# 4. EXPLICIT BUILD (Creates the DLLs)
echo "Building $projfile..."
if ! dotnet build "$projfile" -c Release; then
echo "❌ Failed to build $projfile"
exit 1
fi
# 5. PACK (Packages the DLLs created above)
echo "Packing $projfile..."
if ! dotnet pack "$projfile" -c Release -o ./artifacts; then
# We use --no-build because we just built it in step 4
if ! dotnet pack "$projfile" -c Release -o ./artifacts --no-build; then
echo "❌ Failed to pack $projfile"
exit 1
fi

View File

@@ -395,7 +395,7 @@ public static unsafe partial class MathV
where TLane : ISPMD<TLane, TNumber>
where TNumber : unmanaged, INumber<TNumber>, IBinaryNumber<TNumber>, IMinMaxValue<TNumber>, IBitwiseOperators<TNumber, TNumber, TNumber>
{
return a.x * b.x + a.y * b.y;
return a.x * b.x + a.y * b.y + a.z * b.z;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -689,7 +689,7 @@ public static unsafe partial class MathV
where TLane : ISPMD<TLane, TNumber>
where TNumber : unmanaged, INumber<TNumber>, IBinaryNumber<TNumber>, IMinMaxValue<TNumber>, IBitwiseOperators<TNumber, TNumber, TNumber>
{
return a.x * b.x + a.y * b.y;
return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]

View File

@@ -140,7 +140,7 @@ public static unsafe partial class MathV
<#= TLaneRestrictions #>
<#= TNumberRestrictions #>
{
return a.x * b.x + a.y * b.y;
return <#= ForEachDimension(dimension, i => $"a.{components[i]} * b.{components[i]}", " + ") #>;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]