2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 14 Oct 2008 15:36:25 +0000 (15:36 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 14 Oct 2008 15:36:25 +0000 (15:36 -0000)
     * basic-simd.cs: Tests for dup low and dup high.

svn path=/trunk/mono/; revision=115788

mono/mini/ChangeLog
mono/mini/basic-simd.cs

index 6e2305713cd6a95fea48955501cbd17c9c9f361c..9a9bfe96b7e3982a326eb2534bef9e3c75e7a6f9 100644 (file)
@@ -1,3 +1,7 @@
+2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * basic-simd.cs: Tests for dup low and dup high.
+
 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
 
        * mini-ops.h: Add dup low and dup high ops.
index c27b4794dbb313e62aa484dc8722ee0bc820c943..4b370dd30918b3ca8023068eeac14167d00ffaf2 100644 (file)
@@ -3,6 +3,37 @@ using Mono.Simd;
 
 public class SimdTests {
 
+       public static int test_0_vector4f_dup_high () {
+               Vector4f a = new Vector4f (1, 2, 3, 4);
+               Vector4f c = Vector4f.DuplicateHigh(a);
+
+               if (c.X != 2)
+                       return 1;
+               if (c.Y != 2)
+                       return 2;
+               if (c.Z != 4)
+                       return 3;
+               if (c.W != 4)
+                       return 4;
+               return 0;
+       }
+
+       public static int test_0_vector4f_dup_low () {
+               Vector4f a = new Vector4f (1, 2, 3, 4);
+               Vector4f c = Vector4f.DuplicateLow (a);
+
+               if (c.X != 1)
+                       return 1;
+               if (c.Y != 1)
+                       return 2;
+               if (c.Z != 3)
+                       return 3;
+               if (c.W != 3)
+                       return 4;
+               return 0;
+       }
+
+
        public static int test_0_vector4f_interleave_high () {
                Vector4f a = new Vector4f (1, 2, 3, 4);
                Vector4f b = new Vector4f (5, 6, 7, 8);