Ejemplo n.º 1
0
    private static int Main()
    {
        int returnVal = Pass;

        if (VectorMulTest <float> .VectorMul(2, 3, (float)(2 * 3), (float)(2 * 3) * (2 * 3), (float)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <double> .VectorMul(2, 3, (double)(2 * 3), (double)(2 * 3) * (2 * 3), (double)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <int> .VectorMul(2, 3, (2 * 3), (2 * 3) * (2 * 3), (3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <long> .VectorMul(2, 3, (long)(2 * 3), (long)(2 * 3) * (2 * 3), (long)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (Vector4Test.VectorMul(2, 3, (float)(2 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (Vector3Test.VectorMul(2, 3, (float)(2 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (Vector2Test.VectorMul(2, 3, (float)(2 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <ushort> .VectorMul(2, 3, (ushort)(2 * 3), (ushort)(2 * 3) * (2 * 3), (ushort)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <byte> .VectorMul(2, 3, (byte)(2 * 3), (byte)(2 * 3) * (2 * 3), (byte)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <short> .VectorMul(2, 3, (short)(2 * 3), (short)(2 * 3) * (2 * 3), (short)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <sbyte> .VectorMul(2, 3, (sbyte)(2 * 3), (sbyte)(2 * 3) * (2 * 3), (sbyte)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <uint> .VectorMul(2u, 3u, 2u * 3u, (2u * 3u) * (2u * 3u), (3u * 3u)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <ulong> .VectorMul(2ul, 3ul, 2ul * 3ul, (2ul * 3ul) * (2ul * 3ul), (3ul * 3ul)) != Pass)
        {
            returnVal = Fail;
        }
        return(returnVal);
    }
Ejemplo n.º 2
0
    private static int Main()
    {
        int returnVal = Pass;

        if (VectorMulTest <float> .VectorMul(2, 3, (float)(2 * 3), (float)(2 * 3) * (2 * 3), (float)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <double> .VectorMul(2, 3, (double)(2 * 3), (double)(2 * 3) * (2 * 3), (double)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <int> .VectorMul(2, 3, (2 * 3), (2 * 3) * (2 * 3), (3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <long> .VectorMul(2, 3, (long)(2 * 3), (long)(2 * 3) * (2 * 3), (long)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (Vector4Test.VectorMul(2, 3, (float)(2 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (Vector3Test.VectorMul(2, 3, (float)(2 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (Vector2Test.VectorMul(2, 3, (float)(2 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <ushort> .VectorMul(2, 3, (ushort)(2 * 3), (ushort)(2 * 3) * (2 * 3), (ushort)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <byte> .VectorMul(2, 3, (byte)(2 * 3), (byte)(2 * 3) * (2 * 3), (byte)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <short> .VectorMul(2, 3, (short)(2 * 3), (short)(2 * 3) * (2 * 3), (short)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <sbyte> .VectorMul(2, 3, (sbyte)(2 * 3), (sbyte)(2 * 3) * (2 * 3), (sbyte)(3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <uint> .VectorMul(2u, 3u, 2u * 3u, (2u * 3u) * (2u * 3u), (3u * 3u)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <ulong> .VectorMul(2ul, 3ul, 2ul * 3ul, (2ul * 3ul) * (2ul * 3ul), (3ul * 3ul)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <nint> .VectorMul(2, 3, (2 * 3), (2 * 3) * (2 * 3), (3 * 3)) != Pass)
        {
            returnVal = Fail;
        }
        if (VectorMulTest <nuint> .VectorMul(2u, 3u, 2u * 3u, (2u * 3u) * (2u * 3u), (3u * 3u)) != Pass)
        {
            returnVal = Fail;
        }

        JitLog jitLog = new JitLog();

        // Multiply is supported only for float, double, int and short
        if (!jitLog.Check("op_Multiply", "Single"))
        {
            returnVal = Fail;
        }
        if (!jitLog.Check("op_Multiply", "Double"))
        {
            returnVal = Fail;
        }
        if (!jitLog.Check("op_Multiply", "Int32"))
        {
            returnVal = Fail;
        }
        if (!jitLog.Check("System.Numerics.Vector4:op_Multiply"))
        {
            returnVal = Fail;
        }
        if (!jitLog.Check("System.Numerics.Vector3:op_Multiply"))
        {
            returnVal = Fail;
        }
        if (!jitLog.Check("System.Numerics.Vector2:op_Multiply"))
        {
            returnVal = Fail;
        }
        if (!jitLog.Check("op_Multiply", "Int16"))
        {
            returnVal = Fail;
        }
        jitLog.Dispose();

        return(returnVal);
    }