JIT.HardwareIntrinsics.Arm.SimpleBinaryOpTest__SubtractRoundedHighNarrowingLower_Vector64_Int32.ValidateResult C# (CSharp) Method

ValidateResult() private method

private ValidateResult ( Array left, Array right, Array result, string method = "" ) : void
left Array
right Array
result Array
method string
return void
        private void ValidateResult(Int64[] left, Int64[] right, Int32[] result, [CallerMemberName] string method = "")
        {
            bool succeeded = true;

            for (var i = 0; i < RetElementCount; i++)
            {
                if (Helpers.SubtractRoundedHighNarrowing(left[i], right[i]) != result[i])
                {
                    succeeded = false;
                    break;
                }
            }

            if (!succeeded)
            {
                TestLibrary.TestFramework.LogInformation($"{nameof(AdvSimd)}.{nameof(AdvSimd.SubtractRoundedHighNarrowingLower)}<Int32>(Vector128<Int64>, Vector128<Int64>): {method} failed:");
                TestLibrary.TestFramework.LogInformation($"    left: ({string.Join(", ", left)})");
                TestLibrary.TestFramework.LogInformation($"   right: ({string.Join(", ", right)})");
                TestLibrary.TestFramework.LogInformation($"  result: ({string.Join(", ", result)})");
                TestLibrary.TestFramework.LogInformation(string.Empty);

                Succeeded = false;
            }
        }
    }

Same methods

SimpleBinaryOpTest__SubtractRoundedHighNarrowingLower_Vector64_Int32::ValidateResult ( Vector128 op1, Vector128 op2, void* result, string method = "" ) : void
SimpleBinaryOpTest__SubtractRoundedHighNarrowingLower_Vector64_Int32::ValidateResult ( void* op1, void* op2, void* result, string method = "" ) : void

Usage Example

Ejemplo n.º 1
0
            public void RunStructFldScenario(SimpleBinaryOpTest__SubtractRoundedHighNarrowingLower_Vector64_Int32 testClass)
            {
                var result = AdvSimd.SubtractRoundedHighNarrowingLower(_fld1, _fld2);

                Unsafe.Write(testClass._dataTable.outArrayPtr, result);
                testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr);
            }
All Usage Examples Of JIT.HardwareIntrinsics.Arm.SimpleBinaryOpTest__SubtractRoundedHighNarrowingLower_Vector64_Int32::ValidateResult