private static int Main() { int returnVal = Pass; if (VectorMulTest <float> .VectorDiv(6f, 2f, 6f / 2f) != Pass) { returnVal = Fail; } if (VectorMulTest <double> .VectorDiv(8d, 4d, 8d / 4d) != Pass) { returnVal = Fail; } if (VectorMulTest <int> .VectorDiv(6, 3, 2) != Pass) { returnVal = Fail; } if (returnVal == Fail) { Console.WriteLine("Failed after int"); } if (VectorMulTest <long> .VectorDiv(8, 2, 4) != Pass) { returnVal = Fail; } if (returnVal == Fail) { Console.WriteLine("Failed after long"); } if (Vector4Test.VectorDiv(8f, 3f, 8f / 3f) != Pass) { Console.WriteLine("Vector4Test.VectorDiv failed"); returnVal = Fail; } if (Vector3Test.VectorDiv(8f, 3f, 8f / 3f) != Pass) { Console.WriteLine("Vector3Test.VectorDiv failed"); returnVal = Fail; } if (Vector2Test.VectorDiv(7f, 2f, 7f / 2f) != Pass) { Console.WriteLine("Vector2Test.VectorDiv failed"); returnVal = Fail; } if (VectorMulTest <ushort> .VectorDiv(6, 3, 2) != Pass) { returnVal = Fail; } if (VectorMulTest <byte> .VectorDiv(6, 3, 2) != Pass) { returnVal = Fail; } if (VectorMulTest <short> .VectorDiv(6, -3, -2) != Pass) { returnVal = Fail; } if (VectorMulTest <sbyte> .VectorDiv(6, -3, -2) != Pass) { returnVal = Fail; } if (VectorMulTest <uint> .VectorDiv(6u, 3u, 2u) != Pass) { returnVal = Fail; } if (VectorMulTest <ulong> .VectorDiv(8ul, 2ul, 4ul) != Pass) { returnVal = Fail; } if (VectorMulTest <nint> .VectorDiv(6, 3, 2) != Pass) { returnVal = Fail; } if (VectorMulTest <nuint> .VectorDiv(6u, 3u, 2u) != Pass) { returnVal = Fail; } JitLog jitLog = new JitLog(); // Division is only recognized as an intrinsic for floating point element types. if (!jitLog.Check("op_Division", "Single")) { returnVal = Fail; } if (!jitLog.Check("op_Division", "Double")) { returnVal = Fail; } if (!jitLog.Check("System.Numerics.Vector4:op_Division")) { returnVal = Fail; } if (!jitLog.Check("System.Numerics.Vector3:op_Division")) { returnVal = Fail; } if (!jitLog.Check("System.Numerics.Vector2:op_Division")) { returnVal = Fail; } jitLog.Dispose(); return(returnVal); }
private static int Main() { int returnVal = Pass; if (VectorMulTest <float> .VectorDiv(6f, 2f, 6f / 2f) != Pass) { returnVal = Fail; } if (VectorMulTest <double> .VectorDiv(8d, 4d, 8d / 4d) != Pass) { returnVal = Fail; } if (VectorMulTest <int> .VectorDiv(6, 3, 2) != Pass) { returnVal = Fail; } if (returnVal == Fail) { Console.WriteLine("Failed after int"); } if (VectorMulTest <long> .VectorDiv(8, 2, 4) != Pass) { returnVal = Fail; } if (returnVal == Fail) { Console.WriteLine("Failed after long"); } if (Vector4Test.VectorDiv(8f, 3f, 8f / 3f) != Pass) { Console.WriteLine("Vector4Test.VectorDiv failed"); returnVal = Fail; } if (Vector3Test.VectorDiv(8f, 3f, 8f / 3f) != Pass) { Console.WriteLine("Vector3Test.VectorDiv failed"); returnVal = Fail; } if (Vector2Test.VectorDiv(7f, 2f, 7f / 2f) != Pass) { Console.WriteLine("Vector2Test.VectorDiv failed"); returnVal = Fail; } if (VectorMulTest <ushort> .VectorDiv(6, 3, 2) != Pass) { returnVal = Fail; } if (VectorMulTest <byte> .VectorDiv(6, 3, 2) != Pass) { returnVal = Fail; } if (VectorMulTest <short> .VectorDiv(6, -3, -2) != Pass) { returnVal = Fail; } if (VectorMulTest <sbyte> .VectorDiv(6, -3, -2) != Pass) { returnVal = Fail; } if (VectorMulTest <uint> .VectorDiv(6u, 3u, 2u) != Pass) { returnVal = Fail; } if (VectorMulTest <ulong> .VectorDiv(8ul, 2ul, 4ul) != Pass) { returnVal = Fail; } return(returnVal); }