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

            ValidateResult(test._fld1, test._fld2, result);
        }
        public void RunClassLclFldScenario()
        {
            var test   = new BooleanComparisonOpTest__CompareGreaterThanOrEqualOrderedScalarBoolean();
            var result = Sse.CompareGreaterThanOrEqualOrderedScalar(test._fld1, test._fld2);

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

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

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

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

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

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

            ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result);
        }
        public void RunBasicScenario_UnsafeRead()
        {
            var result = Sse.CompareGreaterThanOrEqualOrderedScalar(
                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.CompareGreaterThanOrEqualOrderedScalar(test._fld1, test._fld2);

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

            var test   = new BooleanComparisonOpTest__CompareGreaterThanOrEqualOrderedScalarBoolean();
            var result = Sse.CompareGreaterThanOrEqualOrderedScalar(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.CompareGreaterThanOrEqualOrderedScalar(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.CompareGreaterThanOrEqualOrderedScalar(left, right);

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

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

            ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result);
        }
コード例 #14
0
        static unsafe int Main(string[] args)
        {
            int testResult = Pass;

            if (Sse.IsSupported)
            {
                using (TestTable <float> floatTable = new TestTable <float>(new float[4] {
                    22, -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.CompareGreaterThanOrEqualOrderedScalar(vf1, vf2))
                    {
                        Console.WriteLine("SSE CompareGreaterThanOrEqualOrderedScalar failed positive test");
                        testResult = Fail;
                    }
                }

                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.CompareGreaterThanOrEqualOrderedScalar(vf1, vf2))
                    {
                        Console.WriteLine("SSE CompareGreaterThanOrEqualOrderedScalar failed negative test");
                        testResult = Fail;
                    }
                }
            }


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

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

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