public void RunStructFldScenario(HorizontalBinaryOpTest__HorizontalSubtractSaturateInt16 testClass)
            {
                var result = Ssse3.HorizontalSubtractSaturate(_fld1, _fld2);

                Unsafe.Write(testClass._dataTable.outArrayPtr, result);
                testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr);
            }
        public void RunClassFldScenario()
        {
            var result = Ssse3.HorizontalSubtractSaturate(_fld1, _fld2);

            Unsafe.Write(_dataTable.outArrayPtr, result);
            ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr);
        }
        public void RunStructLclFldScenario()
        {
            var test   = TestStruct.Create();
            var result = Ssse3.HorizontalSubtractSaturate(test._fld1, test._fld2);

            Unsafe.Write(_dataTable.outArrayPtr, result);
            ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);
        }
        public void RunClassLclFldScenario()
        {
            var test   = new HorizontalBinaryOpTest__HorizontalSubtractSaturateInt16();
            var result = Ssse3.HorizontalSubtractSaturate(test._fld1, test._fld2);

            Unsafe.Write(_dataTable.outArrayPtr, result);
            ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr);
        }
        public void RunLclVarScenario_LoadAligned()
        {
            var left   = Sse2.LoadAlignedVector128((Int16 *)(_dataTable.inArray1Ptr));
            var right  = Sse2.LoadAlignedVector128((Int16 *)(_dataTable.inArray2Ptr));
            var result = Ssse3.HorizontalSubtractSaturate(left, right);

            Unsafe.Write(_dataTable.outArrayPtr, result);
            ValidateResult(left, right, _dataTable.outArrayPtr);
        }
        public void RunLclVarScenario_UnsafeRead()
        {
            var left   = Unsafe.Read <Vector128 <Int16> >(_dataTable.inArray1Ptr);
            var right  = Unsafe.Read <Vector128 <Int16> >(_dataTable.inArray2Ptr);
            var result = Ssse3.HorizontalSubtractSaturate(left, right);

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

            var result = Ssse3.HorizontalSubtractSaturate(_fld1, _fld2);

            Unsafe.Write(_dataTable.outArrayPtr, result);
            ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr);
        }
        public void RunBasicScenario_UnsafeRead()
        {
            var result = Ssse3.HorizontalSubtractSaturate(
                Unsafe.Read <Vector128 <Int16> >(_dataTable.inArray1Ptr),
                Unsafe.Read <Vector128 <Int16> >(_dataTable.inArray2Ptr)
                );

            Unsafe.Write(_dataTable.outArrayPtr, result);
            ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);
        }
        public void RunClsVarScenario()
        {
            var result = Ssse3.HorizontalSubtractSaturate(
                _clsVar1,
                _clsVar2
                );

            Unsafe.Write(_dataTable.outArrayPtr, result);
            ValidateResult(_clsVar1, _clsVar2, _dataTable.outArrayPtr);
        }
        public void RunBasicScenario_LoadAligned()
        {
            var result = Ssse3.HorizontalSubtractSaturate(
                Sse2.LoadAlignedVector128((Int16 *)(_dataTable.inArray1Ptr)),
                Sse2.LoadAlignedVector128((Int16 *)(_dataTable.inArray2Ptr))
                );

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

            var test   = TestStruct.Create();
            var result = Ssse3.HorizontalSubtractSaturate(test._fld1, test._fld2);

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

            var op1    = Sse2.LoadAlignedVector128((Int16 *)(_dataTable.inArray1Ptr));
            var op2    = Sse2.LoadAlignedVector128((Int16 *)(_dataTable.inArray2Ptr));
            var result = Ssse3.HorizontalSubtractSaturate(op1, op2);

            Unsafe.Write(_dataTable.outArrayPtr, result);
            ValidateResult(op1, op2, _dataTable.outArrayPtr);
        }
        public void RunLclVarScenario_UnsafeRead()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead));

            var op1    = Unsafe.Read <Vector128 <Int16> >(_dataTable.inArray1Ptr);
            var op2    = Unsafe.Read <Vector128 <Int16> >(_dataTable.inArray2Ptr);
            var result = Ssse3.HorizontalSubtractSaturate(op1, op2);

            Unsafe.Write(_dataTable.outArrayPtr, result);
            ValidateResult(op1, op2, _dataTable.outArrayPtr);
        }
        public void RunBasicScenario_Load()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load));

            var result = Ssse3.HorizontalSubtractSaturate(
                Sse2.LoadVector128((Int16 *)(_dataTable.inArray1Ptr)),
                Sse2.LoadVector128((Int16 *)(_dataTable.inArray2Ptr))
                );

            Unsafe.Write(_dataTable.outArrayPtr, result);
            ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr);
        }
            public void RunStructFldScenario_Load(HorizontalBinaryOpTest__HorizontalSubtractSaturateInt16 testClass)
            {
                fixed(Vector128 <Int16> *pFld1 = &_fld1)
                fixed(Vector128 <Int16> *pFld2 = &_fld2)
                {
                    var result = Ssse3.HorizontalSubtractSaturate(
                        Sse2.LoadVector128((Int16 *)(pFld1)),
                        Sse2.LoadVector128((Int16 *)(pFld2))
                        );

                    Unsafe.Write(testClass._dataTable.outArrayPtr, result);
                    testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr);
                }
            }
        public void RunClassFldScenario_Load()
        {
            TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario_Load));

            fixed(Vector128 <Int16> *pFld1 = &_fld1)
            fixed(Vector128 <Int16> *pFld2 = &_fld2)
            {
                var result = Ssse3.HorizontalSubtractSaturate(
                    Sse2.LoadVector128((Int16 *)(pFld1)),
                    Sse2.LoadVector128((Int16 *)(pFld2))
                    );

                Unsafe.Write(_dataTable.outArrayPtr, result);
                ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr);
            }
        }
示例#17
0
 public static Vector128 <short> _mm_hsubs_epi16(Vector128 <short> left, Vector128 <short> right)
 {
     return(Ssse3.HorizontalSubtractSaturate(left, right));
 }