Пример #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;
		}
Пример #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;
		}
Пример #3
0
		public static Vector2d AddSub (this Vector2d v1, Vector2d v2)
		{
			return new Vector2d (v1.x - v2.x, v1.y + v2.y);
		}
Пример #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));
		}
Пример #5
0
		public static unsafe void PrefetchNonTemporal (Vector2d *res)
		{
		}
Пример #6
0
		public static unsafe void PrefetchTemporalAllCacheLevels (Vector2d *res)
		{
		}
Пример #7
0
		public static void PrefetchTemporal2ndLevelCache (ref Vector2d res)
		{
		}
Пример #8
0
		public static Vector2d InterleaveLow (this Vector2d v1, Vector2d v2)
		{
			return new Vector2d (v1.x, v2.x);
		}
Пример #9
0
 public static Vector2d AddSub(this Vector2d v1, Vector2d v2)
 {
     return(new Vector2d(v1.x - v2.x, v1.y + v2.y));
 }
Пример #10
0
 public static Vector2d HorizontalSub(this Vector2d v1, Vector2d v2)
 {
     return(new Vector2d(v1.x - v1.y, v2.x - v2.y));
 }
Пример #11
0
 public static Vector2d HorizontalAdd(this Vector2d v1, Vector2d v2)
 {
     return(new Vector2d(v1.x + v1.y, v2.x + v2.y));
 }
Пример #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)));
 }
Пример #13
0
 public static Vector2d Sqrt(this Vector2d v1)
 {
     return(new Vector2d(System.Math.Sqrt(v1.x),
                         System.Math.Sqrt(v1.y)));
 }
Пример #14
0
 public static unsafe Vector4f ConvertToFloat(this Vector2d v0)
 {
     return(new Vector4f((float)v0.X, (float)v0.Y, 0, 0));
 }
Пример #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;
		}
Пример #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;
		}
Пример #17
0
 public static Vector2d InterleaveHigh(this Vector2d v1, Vector2d v2)
 {
     return(new Vector2d(v1.y, v2.y));
 }
Пример #18
0
 public static unsafe Vector4i ConvertToIntTruncated(this Vector2d v0)
 {
     return(new Vector4i((int)(v0.X), (int)(v0.Y), 0, 0));
 }
Пример #19
0
 public static Vector2d InterleaveLow(this Vector2d v1, Vector2d v2)
 {
     return(new Vector2d(v1.x, v2.x));
 }
Пример #20
0
		public static void PrefetchNonTemporal (ref Vector2d res)
		{
		}
Пример #21
0
 public static Vector2d Duplicate(this Vector2d v1)
 {
     return(new Vector2d(v1.x, v1.x));
 }
Пример #22
0
		public static unsafe void PrefetchTemporal2ndLevelCache (Vector2d *res)
		{
		}
Пример #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;
		}
Пример #24
0
		public static void Set (out Vector2d result, double x, double y)
		{
			result.x = x;
			result.y = y;
		}
Пример #25
0
		public static Vector2d Duplicate (Vector2d v1)
		{
			return new Vector2d (v1.x, v1.x);
		}
Пример #26
0
		public static Vector2d HorizontalAdd (this Vector2d v1, Vector2d v2)
		{
			return new Vector2d (v1.x + v1.y, v2.x + v2.y);
		}
Пример #27
0
		public static Vector2d LoadAligned (ref Vector2d v)
		{
			return v;
		}
Пример #28
0
		public static Vector2d HorizontalSub (this Vector2d v1, Vector2d v2)
		{
			return new Vector2d (v1.x - v1.y, v2.x - v2.y);
		}
Пример #29
0
		public static void StoreAligned (ref Vector2d res, Vector2d val)
		{
			res = val;
		}
Пример #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;
		}
Пример #31
0
		public static unsafe Vector2d LoadAligned (Vector2d *v)
		{
			return *v;
		}
Пример #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;
		}
Пример #33
0
		public static unsafe void StoreAligned (Vector2d *res, Vector2d val)
		{
			*res = val;
		}
Пример #34
0
		public static Vector2d InterleaveHigh (this Vector2d v1, Vector2d v2)
		{
			return new Vector2d (v1.y, v2.y);
		}
Пример #35
0
		public static void PrefetchTemporalAllCacheLevels (ref Vector2d res)
		{
		}
Пример #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))); 
		}
Пример #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));
 }