mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-27 21:48:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
100
Brutal.Numerics/Vector/ulong3/ulong3.numerics-binary.gen.cs
Normal file
100
Brutal.Numerics/Vector/ulong3/ulong3.numerics-binary.gen.cs
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
// <auto-generated /> - edit Vector.numerics-binary.tt to modify
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.Numerics;
|
||||
|
||||
// IBinaryNumber
|
||||
public partial struct ulong3 : IBinaryNumber<ulong3>
|
||||
{
|
||||
/// <summary>Determines if every component of a value is a power of two.</summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
static bool IBinaryNumber<ulong3>.IsPow2(ulong3 value)
|
||||
{
|
||||
return ulong.IsPow2(value.X) && ulong.IsPow2(value.Y) && ulong.IsPow2(value.Z);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IBinaryNumber{TSelf}.Log2" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ulong3 Log2(ulong3 value)
|
||||
{
|
||||
return new ulong3(ulong.Log2(value.X), ulong.Log2(value.Y), ulong.Log2(value.Z));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ulong3 operator &(ulong3 a, ulong3 b)
|
||||
{
|
||||
return new(a.X & b.X, a.Y & b.Y, a.Z & b.Z);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ulong3 operator |(ulong3 a, ulong3 b)
|
||||
{
|
||||
return new(a.X | b.X, a.Y | b.Y, a.Z | b.Z);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ulong3 operator ^(ulong3 a, ulong3 b)
|
||||
{
|
||||
return new(a.X ^ b.X, a.Y ^ b.Y, a.Z ^ b.Z);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ulong3 operator ~(ulong3 value)
|
||||
{
|
||||
return new(~value.X, ~value.Y, ~value.Z);
|
||||
}
|
||||
}
|
||||
|
||||
// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses
|
||||
public partial struct ulong3
|
||||
{
|
||||
/// <summary>Determines which components of a value are powers of two.</summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool3 IsPow2(ulong3 value)
|
||||
{
|
||||
return new bool3(ulong.IsPow2(value.X), ulong.IsPow2(value.Y), ulong.IsPow2(value.Z));
|
||||
}
|
||||
}
|
||||
|
||||
// the good bits from IBinaryInteger - declared on IIntegerVector
|
||||
public partial struct ulong3
|
||||
{
|
||||
/// <inheritdoc cref="IBinaryInteger{TSelf}.PopCount" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ulong3 PopCount(ulong3 value)
|
||||
{
|
||||
return new ulong3(ulong.PopCount(value.X), ulong.PopCount(value.Y), ulong.PopCount(value.Z));
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IBinaryInteger{TSelf}.LeadingZeroCount" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ulong3 LeadingZeroCount(ulong3 value)
|
||||
{
|
||||
return new ulong3(ulong.LeadingZeroCount(value.X), ulong.LeadingZeroCount(value.Y), ulong.LeadingZeroCount(value.Z));
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IBinaryInteger{TSelf}.TrailingZeroCount" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ulong3 TrailingZeroCount(ulong3 value)
|
||||
{
|
||||
return new ulong3(ulong.TrailingZeroCount(value.X), ulong.TrailingZeroCount(value.Y), ulong.TrailingZeroCount(value.Z));
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IBinaryInteger{TSelf}.RotateLeft" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ulong3 RotateLeft(ulong3 value, int rotateAmount)
|
||||
{
|
||||
return new ulong3(ulong.RotateLeft(value.X, rotateAmount), ulong.RotateLeft(value.Y, rotateAmount), ulong.RotateLeft(value.Z, rotateAmount));
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IBinaryInteger{TSelf}.RotateRight" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ulong3 RotateRight(ulong3 value, int rotateAmount)
|
||||
{
|
||||
return new ulong3(ulong.RotateRight(value.X, rotateAmount), ulong.RotateRight(value.Y, rotateAmount), ulong.RotateRight(value.Z, rotateAmount));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue