mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
54
Brutal.Numerics/Vector/float4/float4.numerics-binary.gen.cs
Normal file
54
Brutal.Numerics/Vector/float4/float4.numerics-binary.gen.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
// <auto-generated /> - edit Vector.numerics-binary.tt to modify
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.Numerics;
|
||||
|
||||
// IBinaryNumber
|
||||
public partial struct float4 : IBinaryNumber<float4>
|
||||
{
|
||||
/// <summary>Determines if every component of a value is a power of two.</summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
static bool IBinaryNumber<float4>.IsPow2(float4 value)
|
||||
{
|
||||
return float.IsPow2(value.X) && float.IsPow2(value.Y) && float.IsPow2(value.Z) && float.IsPow2(value.W);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
static float4 IBitwiseOperators<float4, float4, float4>.operator &(float4 a, float4 b)
|
||||
{
|
||||
return Unsafe.BitCast<int4, float4>(Unsafe.BitCast<float4, int4>(a) & Unsafe.BitCast<float4, int4>(b));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
static float4 IBitwiseOperators<float4, float4, float4>.operator |(float4 a, float4 b)
|
||||
{
|
||||
return Unsafe.BitCast<int4, float4>(Unsafe.BitCast<float4, int4>(a) | Unsafe.BitCast<float4, int4>(b));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
static float4 IBitwiseOperators<float4, float4, float4>.operator ^(float4 a, float4 b)
|
||||
{
|
||||
return Unsafe.BitCast<int4, float4>(Unsafe.BitCast<float4, int4>(a) ^ Unsafe.BitCast<float4, int4>(b));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
static float4 IBitwiseOperators<float4, float4, float4>.operator ~(float4 value)
|
||||
{
|
||||
return Unsafe.BitCast<int4, float4>(~Unsafe.BitCast<float4, int4>(value));
|
||||
}
|
||||
}
|
||||
|
||||
// the componentwise predicate mask (no interface to mirror) - the per-lane truth IsPow2 collapses
|
||||
public partial struct float4
|
||||
{
|
||||
/// <summary>Determines which components of a value are powers of two.</summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool4 IsPow2(float4 value)
|
||||
{
|
||||
return new bool4(float.IsPow2(value.X), float.IsPow2(value.Y), float.IsPow2(value.Z), float.IsPow2(value.W));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue