This commit is contained in:
Rian Drake 2026-10-15 14:09:11 +13:00
commit b578433e37

View file

@ -0,0 +1,28 @@
// <auto-generated /> - edit Vector.copy.tt to modify
#nullable enable
namespace Brutal.Numerics;
public partial struct sbyte4
{
/// <inheritdoc />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public readonly void CopyTo(Span<sbyte> destination)
{
if (destination.Length < ComponentCount)
throw new ArgumentException("Length must be at least 4.", nameof(destination));
Unsafe.WriteUnaligned(ref Unsafe.As<sbyte, byte>(ref MemoryMarshal.GetReference(destination)), this);
}
/// <inheritdoc />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public readonly bool TryCopyTo(Span<sbyte> destination)
{
if (destination.Length < ComponentCount)
return false;
Unsafe.WriteUnaligned(ref Unsafe.As<sbyte, byte>(ref MemoryMarshal.GetReference(destination)), this);
return true;
}
}