mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
28
Brutal.Numerics/Vector/bool2/bool2.copy.gen.cs
Normal file
28
Brutal.Numerics/Vector/bool2/bool2.copy.gen.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
// <auto-generated /> - edit Vector.copy.tt to modify
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.Numerics;
|
||||
|
||||
public partial struct bool2
|
||||
{
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public readonly void CopyTo(Span<bool> destination)
|
||||
{
|
||||
if (destination.Length < ComponentCount)
|
||||
throw new ArgumentException("Length must be at least 2.", nameof(destination));
|
||||
|
||||
Unsafe.WriteUnaligned(ref Unsafe.As<bool, byte>(ref MemoryMarshal.GetReference(destination)), this);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public readonly bool TryCopyTo(Span<bool> destination)
|
||||
{
|
||||
if (destination.Length < ComponentCount)
|
||||
return false;
|
||||
|
||||
Unsafe.WriteUnaligned(ref Unsafe.As<bool, byte>(ref MemoryMarshal.GetReference(destination)), this);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue