public void AddScaleCopyUTest(int test) { float[] src = (float[])testArrays[test].Clone(); float[] dst = (float[])src.Clone(); float[] result = (float[])dst.Clone(); float[] expected = (float[])dst.Clone(); for (int i = 0; i < expected.Length; i++) { expected[i] *= (1 + DEFAULT_SCALE); } CpuMathUtils.AddScaleCopy(DEFAULT_SCALE, src, dst, result, dst.Length); var actual = result; Assert.Equal(expected, actual, comparer); }
public void AddScaleCopyUTest(string mode, string test, string scale, Dictionary <string, string> environmentVariables) { RemoteExecutor.RemoteInvoke((arg0, arg1, arg2) => { CheckProperFlag(arg0); float defaultScale = float.Parse(arg2, CultureInfo.InvariantCulture); float[] src = (float[])_testArrays[int.Parse(arg1)].Clone(); float[] dst = (float[])src.Clone(); float[] result = (float[])dst.Clone(); float[] expected = (float[])dst.Clone(); for (int i = 0; i < expected.Length; i++) { expected[i] *= (1 + defaultScale); } CpuMathUtils.AddScaleCopy(defaultScale, src, dst, result, dst.Length); var actual = result; Assert.Equal(expected, actual, _comparer); return(RemoteExecutor.SuccessExitCode); }, mode, test, scale, new RemoteInvokeOptions(environmentVariables)); }
public void AddScaleCopyU() => CpuMathUtils.AddScaleCopy(DefaultScale, src, dst, result, _smallInputLength);
public void ManagedAddScaleCopyUPerf() => CpuMathUtils.AddScaleCopy(DEFAULT_SCALE, src, dst, result, LEN);