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

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

            ValidateResult(test._fld1, test._fld2, result);
        }
        public void RunLclVarScenario()
        {
            var left   = Unsafe.Read <Vector128 <Single> >(_dataTable.inArray1Ptr);
            var right  = Unsafe.Read <Vector128 <Single> >(_dataTable.inArray2Ptr);
            var result = Sse.CompareLessThanOrEqualOrderedScalar(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.CompareLessThanOrEqualOrderedScalar(left, right);

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

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

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

            ValidateResult(_clsVar1, _clsVar2, result);
        }
        public void RunBasicScenario()
        {
            var result = Sse.CompareLessThanOrEqualOrderedScalar(
                Unsafe.Read <Vector128 <Single> >(_dataTable.inArray1Ptr),
                Unsafe.Read <Vector128 <Single> >(_dataTable.inArray2Ptr)
                );

            ValidateResult(_dataTable.inArray1, _dataTable.inArray2, result);
        }
        public void RunBasicScenario_LoadAligned()
        {
            var result = Sse.CompareLessThanOrEqualOrderedScalar(
                Sse.LoadAlignedVector128((Single *)(_dataTable.inArray1Ptr)),
                Sse.LoadAlignedVector128((Single *)(_dataTable.inArray2Ptr))
                );

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

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

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

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

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

            var result = Sse.CompareLessThanOrEqualOrderedScalar(
                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.CompareLessThanOrEqualOrderedScalar(
                Unsafe.Read <Vector128 <Single> >(_dataTable.inArray1Ptr),
                Unsafe.Read <Vector128 <Single> >(_dataTable.inArray2Ptr)
                );

            ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, result);
        }
        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.CompareLessThanOrEqualOrderedScalar(vf1, vf2))
                    {
                        Console.WriteLine("SSE CompareLessThanOrEqualOrderedScalar failed positive test");
                        testResult = Fail;
                    }
                }

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


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

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

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