示例#1
0
        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));
            }
        }
示例#2
0
        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));
            }
        }
示例#3
0
        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));
            }
        }