public void RunLclFldScenario() { var test = new SimpleScalarUnaryOpTest__SetAllVector128Int16(); var result = Sse2.SetAllVector128(test._fld); Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(test._fld, _dataTable.outArrayPtr); }
private static void SetAllVector128Int16() { bool skipIf32Bit = typeof(Int16) == typeof(Int64) ? true : typeof(Int16) == typeof(UInt64) ? true : false; if (skipIf32Bit && !Environment.Is64BitProcess) { return; } var test = new SimpleScalarUnaryOpTest__SetAllVector128Int16(); if (test.IsSupported) { // Validates basic functionality works, using Unsafe.Read test.RunBasicScenario_UnsafeRead(); // Validates calling via reflection works, using Unsafe.Read test.RunReflectionScenario_UnsafeRead(); if (Sse2.IsSupported) { // Validates calling via reflection works, using Load test.RunReflectionScenario(); } // Validates passing a static member works test.RunClsVarScenario(); // Validates passing a local works, using Unsafe.Read test.RunLclVarScenario_UnsafeRead(); // Validates passing the field of a local works test.RunLclFldScenario(); // Validates passing an instance member works test.RunFldScenario(); } else { // Validates we throw on unsupported hardware test.RunUnsupportedScenario(); } if (!test.Succeeded) { throw new Exception("One or more scenarios did not complete as expected."); } }