public void RunStructLclFldScenario()
        {
            var test   = TestStruct.Create();
            var result = Sse.CompareNotEqualOrderedScalar(test._fld1, test._fld2);

            ValidateResult(test._fld1, test._fld2, result);
        }
        public void RunLclFldScenario()
        {
            var test   = new BooleanComparisonOpTest__CompareNotEqualOrderedScalarSingle();
            var result = Sse.CompareNotEqualOrderedScalar(test._fld1, test._fld2);

            ValidateResult(test._fld1, test._fld2, result);
        }
        public void RunLclVarScenario_LoadAligned()
        {
            var left   = Sse.LoadAlignedVector128((Single *)(_dataTable.inArray1Ptr));
            var right  = Sse.LoadAlignedVector128((Single *)(_dataTable.inArray2Ptr));
            var result = Sse.CompareNotEqualOrderedScalar(left, right);

            ValidateResult(left, right, result);
        }
        public void RunLclVarScenario_UnsafeRead()
        {
            var left   = Unsafe.Read <Vector128 <Single> >(_dataTable.inArray1Ptr);
            var right  = Unsafe.Read <Vector128 <Single> >(_dataTable.inArray2Ptr);
            var result = Sse.CompareNotEqualOrderedScalar(left, right);

            ValidateResult(left, right, result);
        }
        public void RunClassFldScenario()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario));

            var result = Sse.CompareNotEqualOrderedScalar(_fld1, _fld2);

            ValidateResult(_fld1, _fld2, result);
        }
        public void RunClsVarScenario()
        {
            var result = Sse.CompareNotEqualOrderedScalar(
                _clsVar1,
                _clsVar2
                );

            ValidateResult(_clsVar1, _clsVar2, result);
        }
        public void RunBasicScenario_LoadAligned()
        {
            var result = Sse.CompareNotEqualOrderedScalar(
                Sse.LoadAlignedVector128((Single *)(_dataTable.inArray1Ptr)),
                Sse.LoadAlignedVector128((Single *)(_dataTable.inArray2Ptr))
                );

            ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result);
        }
        public void RunBasicScenario_UnsafeRead()
        {
            var result = Sse.CompareNotEqualOrderedScalar(
                Unsafe.Read <Vector128 <Single> >(_dataTable.inArray1Ptr),
                Unsafe.Read <Vector128 <Single> >(_dataTable.inArray2Ptr)
                );

            ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result);
        }
        public void RunStructLclFldScenario()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario));

            var test   = TestStruct.Create();
            var result = Sse.CompareNotEqualOrderedScalar(test._fld1, test._fld2);

            ValidateResult(test._fld1, test._fld2, result);
        }
        public void RunClassLclFldScenario()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunClassLclFldScenario));

            var test   = new BooleanComparisonOpTest__CompareNotEqualOrderedScalarBoolean();
            var result = Sse.CompareNotEqualOrderedScalar(test._fld1, test._fld2);

            ValidateResult(test._fld1, test._fld2, result);
        }
        public void RunLclVarScenario_LoadAligned()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_LoadAligned));

            var left   = Sse.LoadAlignedVector128((Single *)(_dataTable.inArray1Ptr));
            var right  = Sse.LoadAlignedVector128((Single *)(_dataTable.inArray2Ptr));
            var result = Sse.CompareNotEqualOrderedScalar(left, right);

            ValidateResult(left, right, result);
        }
        public void RunLclVarScenario_UnsafeRead()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead));

            var left   = Unsafe.Read <Vector128 <Single> >(_dataTable.inArray1Ptr);
            var right  = Unsafe.Read <Vector128 <Single> >(_dataTable.inArray2Ptr);
            var result = Sse.CompareNotEqualOrderedScalar(left, right);

            ValidateResult(left, right, result);
        }
        public void RunBasicScenario_Load()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load));

            var result = Sse.CompareNotEqualOrderedScalar(
                Sse.LoadVector128((Single *)(_dataTable.inArray1Ptr)),
                Sse.LoadVector128((Single *)(_dataTable.inArray2Ptr))
                );

            ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result);
        }
        public void RunBasicScenario_UnsafeRead()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead));

            var result = Sse.CompareNotEqualOrderedScalar(
                Unsafe.Read <Vector128 <Single> >(_dataTable.inArray1Ptr),
                Unsafe.Read <Vector128 <Single> >(_dataTable.inArray2Ptr)
                );

            ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result);
        }
Пример #15
0
        static unsafe int Main(string[] args)
        {
            int testResult = Pass;

            if (Sse.IsSupported)
            {
                using (TestTable <float> floatTable = new TestTable <float>(new float[4] {
                    1, -5, 100, 0
                }, new float[4] {
                    22, -1, -50, 3
                }))
                {
                    var vf1 = Unsafe.Read <Vector128 <float> >(floatTable.inArray1Ptr);
                    var vf2 = Unsafe.Read <Vector128 <float> >(floatTable.inArray2Ptr);

                    if (!Sse.CompareNotEqualOrderedScalar(vf1, vf2))
                    {
                        Console.WriteLine("SSE CompareNotEqualOrderedScalar failed positive test");
                        testResult = Fail;
                    }
                }

                using (TestTable <float> floatTable = new TestTable <float>(new float[4] {
                    1, -5, 100, 0
                }, new float[4] {
                    1, -1, -50, 3
                }))
                {
                    var vf1 = Unsafe.Read <Vector128 <float> >(floatTable.inArray1Ptr);
                    var vf2 = Unsafe.Read <Vector128 <float> >(floatTable.inArray2Ptr);

                    if (Sse.CompareNotEqualOrderedScalar(vf1, vf2))
                    {
                        Console.WriteLine("SSE CompareNotEqualOrderedScalar failed negative test");
                        testResult = Fail;
                    }
                }
            }


            return(testResult);
        }
        public void RunFldScenario()
        {
            var result = Sse.CompareNotEqualOrderedScalar(_fld1, _fld2);

            ValidateResult(_fld1, _fld2, result);
        }
            public void RunStructFldScenario(BooleanComparisonOpTest__CompareNotEqualOrderedScalarBoolean testClass)
            {
                var result = Sse.CompareNotEqualOrderedScalar(_fld1, _fld2);

                testClass.ValidateResult(_fld1, _fld2, result);
            }