Exemplo n.º 1
0
		public static unsafe Vector2d AndNot (this Vector2d v1, Vector2d v2)
		{
			Vector2d res = new Vector2d ();
			int *a = (int*)&v1;
			int *b = (int*)&v2;
			int *c = (int*)&res;
			*c++ = ~*a++ & *b++;
			*c++ = ~*a++ & *b++;
			*c++ = ~*a++ & *b++;
			*c = ~*a & *b;
			return res;
		}
Exemplo n.º 2
0
		public static unsafe Vector2d operator ^ (Vector2d v1, Vector2d v2)
		{
			Vector2d res = new Vector2d ();
			int *a = (int*)&v1;
			int *b = (int*)&v2;
			int *c = (int*)&res;
			*c++ = *a++ ^ *b++;
			*c++ = *a++ ^ *b++;
			*c++ = *a++ ^ *b++;
			*c = *a ^ *b;
			return res;
		}
Exemplo n.º 3
0
		public static Vector2d AddSub (this Vector2d v1, Vector2d v2)
		{
			return new Vector2d (v1.x - v2.x, v1.y + v2.y);
		}
Exemplo n.º 4
0
		public static Vector2d Min (this Vector2d v1, Vector2d v2)
		{
			return new Vector2d (System.Math.Min (v1.x, v2.x),
								System.Math.Min (v1.y, v2.y));
		}
Exemplo n.º 5
0
		public static unsafe void PrefetchNonTemporal (Vector2d *res)
		{
		}
Exemplo n.º 6
0
		public static unsafe void PrefetchTemporalAllCacheLevels (Vector2d *res)
		{
		}
Exemplo n.º 7
0
		public static void PrefetchTemporal2ndLevelCache (ref Vector2d res)
		{
		}
Exemplo n.º 8
0
		public static Vector2d InterleaveLow (this Vector2d v1, Vector2d v2)
		{
			return new Vector2d (v1.x, v2.x);
		}
Exemplo n.º 9
0
 public static Vector2d AddSub(this Vector2d v1, Vector2d v2)
 {
     return(new Vector2d(v1.x - v2.x, v1.y + v2.y));
 }
Exemplo n.º 10
0
 public static Vector2d HorizontalSub(this Vector2d v1, Vector2d v2)
 {
     return(new Vector2d(v1.x - v1.y, v2.x - v2.y));
 }
Exemplo n.º 11
0
 public static Vector2d HorizontalAdd(this Vector2d v1, Vector2d v2)
 {
     return(new Vector2d(v1.x + v1.y, v2.x + v2.y));
 }
Exemplo n.º 12
0
 public static Vector2d Min(this Vector2d v1, Vector2d v2)
 {
     return(new Vector2d(System.Math.Min(v1.x, v2.x),
                         System.Math.Min(v1.y, v2.y)));
 }
Exemplo n.º 13
0
 public static Vector2d Sqrt(this Vector2d v1)
 {
     return(new Vector2d(System.Math.Sqrt(v1.x),
                         System.Math.Sqrt(v1.y)));
 }
Exemplo n.º 14
0
 public static unsafe Vector4f ConvertToFloat(this Vector2d v0)
 {
     return(new Vector4f((float)v0.X, (float)v0.Y, 0, 0));
 }
Exemplo n.º 15
0
		public unsafe static Vector2d CompareNotEqual (this Vector2d v1, Vector2d v2)
		{
			Vector2d res = new Vector2d ();
			long *c = (long*)&res;
			*c++ = v1.x != v2.x ? -1 : 0;
			*c = v1.y != v2.y ? -1 : 0;
			return res;
		}
Exemplo n.º 16
0
		public unsafe static Vector2d CompareOrdered (this Vector2d v1, Vector2d v2)
		{
			Vector2d res = new Vector2d ();
			long *c = (long*)&res;
			*c++ = !double.IsNaN (v1.x) && !double.IsNaN (v2.x) ? -1 : 0;
			*c = !double.IsNaN (v1.y) && !double.IsNaN (v2.y) ? -1 : 0;
			return res;
		}
Exemplo n.º 17
0
 public static Vector2d InterleaveHigh(this Vector2d v1, Vector2d v2)
 {
     return(new Vector2d(v1.y, v2.y));
 }
Exemplo n.º 18
0
 public static unsafe Vector4i ConvertToIntTruncated(this Vector2d v0)
 {
     return(new Vector4i((int)(v0.X), (int)(v0.Y), 0, 0));
 }
Exemplo n.º 19
0
 public static Vector2d InterleaveLow(this Vector2d v1, Vector2d v2)
 {
     return(new Vector2d(v1.x, v2.x));
 }
Exemplo n.º 20
0
		public static void PrefetchNonTemporal (ref Vector2d res)
		{
		}
Exemplo n.º 21
0
 public static Vector2d Duplicate(this Vector2d v1)
 {
     return(new Vector2d(v1.x, v1.x));
 }
Exemplo n.º 22
0
		public static unsafe void PrefetchTemporal2ndLevelCache (Vector2d *res)
		{
		}
Exemplo n.º 23
0
		public unsafe static Vector2d CompareUnordered (Vector2d v1, Vector2d v2)
		{
			Vector2d res = new Vector2d ();
			long *c = (long*)&res;
			*c++ = double.IsNaN (v1.x) || double.IsNaN (v2.x) ? -1 : 0;
			*c = double.IsNaN (v1.y) || double.IsNaN (v2.y) ? -1 : 0;
			return res;
		}
Exemplo n.º 24
0
		public static void Set (out Vector2d result, double x, double y)
		{
			result.x = x;
			result.y = y;
		}
Exemplo n.º 25
0
		public static Vector2d Duplicate (Vector2d v1)
		{
			return new Vector2d (v1.x, v1.x);
		}
Exemplo n.º 26
0
		public static Vector2d HorizontalAdd (this Vector2d v1, Vector2d v2)
		{
			return new Vector2d (v1.x + v1.y, v2.x + v2.y);
		}
Exemplo n.º 27
0
		public static Vector2d LoadAligned (ref Vector2d v)
		{
			return v;
		}
Exemplo n.º 28
0
		public static Vector2d HorizontalSub (this Vector2d v1, Vector2d v2)
		{
			return new Vector2d (v1.x - v1.y, v2.x - v2.y);
		}
Exemplo n.º 29
0
		public static void StoreAligned (ref Vector2d res, Vector2d val)
		{
			res = val;
		}
Exemplo n.º 30
0
		public unsafe static Vector2d CompareLessThan (this Vector2d v1, Vector2d v2)
		{
			Vector2d res = new Vector2d ();
			long *c = (long*)&res;
			*c++ = v1.x < v2.x ? -1 : 0;
			*c = v1.y < v2.y ? -1 : 0;
			return res;
		}
Exemplo n.º 31
0
		public static unsafe Vector2d LoadAligned (Vector2d *v)
		{
			return *v;
		}
Exemplo n.º 32
0
		public unsafe static Vector2d CompareNotLessEqual (this Vector2d v1, Vector2d v2)
		{
			Vector2d res = new Vector2d ();
			long *c = (long*)&res;
			*c++ = v1.x <= v2.x ? 0 : -1;
			*c = v1.y <= v2.y ? 0 : -1;
			return res;
		}
Exemplo n.º 33
0
		public static unsafe void StoreAligned (Vector2d *res, Vector2d val)
		{
			*res = val;
		}
Exemplo n.º 34
0
		public static Vector2d InterleaveHigh (this Vector2d v1, Vector2d v2)
		{
			return new Vector2d (v1.y, v2.y);
		}
Exemplo n.º 35
0
		public static void PrefetchTemporalAllCacheLevels (ref Vector2d res)
		{
		}
Exemplo n.º 36
0
		public static unsafe Vector2d Shuffle (this Vector2d v1, Vector2d v2, int sel)
		{
			double *p1 = (double*)&v1;
			double *p2 = (double*)&v2;
			return new Vector2d (*(p1 + ((sel >> 0) & 0x1)), *(p2 + ((sel >> 1) & 0x1))); 
		}
Exemplo n.º 37
0
 public static unsafe Vector4i ConvertToInt(this Vector2d v0)
 {
     return(new Vector4i((int)System.Math.Round(v0.X), (int)System.Math.Round(v0.Y), 0, 0));
 }