* Vector8(u)s.cs: Add operator == and !=.
svn path=/trunk/mcs/; revision=120903
+2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * Vector8(u)s.cs: Add operator == and !=.
+
2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
* Vector4f.cs: Add operator == and !=.
return res;
}
+ [Acceleration (AccelMode.SSE2)]
+ public unsafe static bool operator ==(Vector8s va, Vector8s vb)
+ {
+ short *a = &va.v0;
+ short *b = &vb.v0;
+ for (int i = 0; i < 8; ++i)
+ if (*a++ != *b++)
+ return false;
+ return true;
+ }
+
+ [Acceleration (AccelMode.SSE2)]
+ public unsafe static bool operator !=(Vector8s va, Vector8s vb)
+ {
+ short *a = &va.v0;
+ short *b = &vb.v0;
+ for (int i = 0; i < 8; ++i)
+ if (*a++ != *b++)
+ return true;
+ return false;
+ }
+
[Acceleration (AccelMode.SSE2)]
public static unsafe Vector8s UnpackLow (Vector8s va, Vector8s vb)
{
return res;
}
+ [Acceleration (AccelMode.SSE2)]
+ public unsafe static bool operator ==(Vector8us va, Vector8us vb)
+ {
+ ushort *a = &va.v0;
+ ushort *b = &vb.v0;
+ for (int i = 0; i < 8; ++i)
+ if (*a++ != *b++)
+ return false;
+ return true;
+ }
+
+ [Acceleration (AccelMode.SSE2)]
+ public unsafe static bool operator !=(Vector8us va, Vector8us vb)
+ {
+ ushort *a = &va.v0;
+ ushort *b = &vb.v0;
+ for (int i = 0; i < 8; ++i)
+ if (*a++ != *b++)
+ return true;
+ return false;
+ }
+
[Acceleration (AccelMode.SSE2)]
public static unsafe Vector8us UnpackLow (Vector8us va, Vector8us vb)
{