public void MatrixIntrinsicsTests_Negate() { for (int i = 0; i < 1024; i++) { var m = GenerateMatrix(i); var expected = Matrix4x4.Negate(m); var actual = MatrixIntrinsics.Negate_Avx(m); Assert.True(actual.Equals(expected)); } }
public void MatrixIntrinsicsTests_Multiply() { for (int i = 0; i < 1024; i++) { var m1 = GenerateMatrix(i); var expected = m1 * (i + 1); var actual = MatrixIntrinsics.Multiply_Avx(m1, i + 1); Assert.True(actual.Equals(expected)); } }
public void MatrixIntrinsicsTests_Sum() { for (int i = 0; i < 1024; i++) { var m1 = GenerateMatrix(i); var m2 = GenerateMatrix(-i - 1); var expected = m1 + m2; var actual = MatrixIntrinsics.Sum_Avx(m1, m2); Assert.True(actual.Equals(expected)); } }