123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384 |
- using Burst.Compiler.IL.Tests.Helpers;
- using NUnit.Framework;
- using Unity.Mathematics;
-
- namespace Burst.Compiler.IL.Tests
- {
- [TestFixture]
- internal partial class VectorsEquality
- {
- // Float4
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static bool Float4Equals(ref float4 a, ref float4 b)
- {
- return a.Equals(b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Float4Equality(ref float4 a, ref float4 b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Float4Inequality(ref float4 a, ref float4 b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Float4EqualityWithFloat(ref float4 a, float b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Float4InequalityWithFloat(ref float4 a, float b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- // Float3
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static bool Float3Equals(ref float3 a, ref float3 b)
- {
- return a.Equals(b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Float3Equality(ref float3 a, ref float3 b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Float3Inequality(ref float3 a, ref float3 b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Float3EqualityWithFloat(ref float3 a, float b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Float3InequalityWithFloat(ref float3 a, float b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- // Float2
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static bool Float2Equals(ref float2 a, ref float2 b)
- {
- return a.Equals(b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Float2Equality(ref float2 a, ref float2 b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Float2Inequality(ref float2 a, ref float2 b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Float2EqualityWithFloat(ref float2 a, float b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Float2InequalityWithFloat(ref float2 a, float b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- // Int4
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static bool Int4Equals(ref int4 a, ref int4 b)
- {
- return a.Equals(b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Int4Equality(ref int4 a, ref int4 b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Int4Inequality(ref int4 a, ref int4 b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Int4EqualityWithScalar(ref int4 a, int b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Int4InequalityWithScalar(ref int4 a, int b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- // Int3
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static bool Int3Equals(ref int3 a, ref int3 b)
- {
- return a.Equals(b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Int3Equality(ref int3 a, ref int3 b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Int3Inequality(ref int3 a, ref int3 b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Int3EqualityWithScalar(ref int3 a, int b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Int3InequalityWithScalar(ref int3 a, int b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- // Int2
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static bool Int2Equals(ref int2 a, ref int2 b)
- {
- return a.Equals(b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Int2Equality(ref int2 a, ref int2 b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Int2Inequality(ref int2 a, ref int2 b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Int2EqualityWithScalar(ref int2 a, int b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Int2InequalityWithScalar(ref int2 a, int b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
-
-
- // UInt4
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static bool UInt4Equals(ref uint4 a, ref uint4 b)
- {
- return a.Equals(b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int UInt4Equality(ref uint4 a, ref uint4 b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int UInt4Inequality(ref uint4 a, ref uint4 b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int UInt4EqualityWithScalar(ref uint4 a, uint b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int UInt4InequalityWithScalar(ref uint4 a, uint b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- // UInt3
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static bool UInt3Equals(ref uint3 a, ref uint3 b)
- {
- return a.Equals(b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int UInt3Equality(ref uint3 a, ref uint3 b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int UInt3Inequality(ref uint3 a, ref uint3 b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int UInt3EqualityWithScalar(ref uint3 a, uint b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int UInt3InequalityWithScalar(ref uint3 a, uint b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- // Int2
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static bool UInt2Equals(ref uint2 a, ref uint2 b)
- {
- return a.Equals(b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int UInt2Equality(ref uint2 a, ref uint2 b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int UInt2Inequality(ref uint2 a, ref uint2 b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int UInt2EqualityWithScalar(ref uint2 a, uint b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int UInt2InequalityWithScalar(ref uint2 a, uint b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- // Bool4
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static bool Bool4Equals(ref bool4 a, ref bool4 b)
- {
- return a.Equals(b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Bool4Equality(ref bool4 a, ref bool4 b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Bool4Inequality(ref bool4 a, ref bool4 b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Bool4EqualityWithScalar(ref bool4 a, bool b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Bool4InequalityWithScalar(ref bool4 a, bool b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- // Bool3
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static bool Bool3Equals(ref bool3 a, ref bool3 b)
- {
- return a.Equals(b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Bool3Equality(ref bool3 a, ref bool3 b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Bool3Inequality(ref bool3 a, ref bool3 b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Bool3EqualityWithScalar(ref bool3 a, bool b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Bool3InequalityWithScalar(ref bool3 a, bool b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- // Int2
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static bool Bool2Equals(ref bool2 a, ref bool2 b)
- {
- return a.Equals(b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Bool2Equality(ref bool2 a, ref bool2 b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Bool2Inequality(ref bool2 a, ref bool2 b)
- {
- return Vectors.ConvertToInt(a != b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Bool2EqualityWithScalar(ref bool2 a, bool b)
- {
- return Vectors.ConvertToInt(a == b);
- }
-
- [TestCompiler(DataRange.Standard, DataRange.Standard)]
- public static int Bool2InequalityWithScalar(ref bool2 a, bool b)
- {
- return Vectors.ConvertToInt(a != b);
- }
- }
- }
|