Beispiel #1
0
        public static unsafe Vector2ul Shuffle(this Vector2ul v1, Vector2ul v2, int sel)
        {
            ulong *p1 = (ulong *)&v1;
            ulong *p2 = (ulong *)&v2;

            return(new Vector2ul(*(p1 + ((sel >> 0) & 0x1)), *(p2 + ((sel >> 1) & 0x1))));
        }
Beispiel #2
0
	static int test_0_vector2ul_one_element_ctor () {
		Vector2ul a = new Vector2ul (99);

		if (a.X != 99)
			return 1;
		if (a.Y != 99)
			return 2;
		return 0;
	}
Beispiel #3
0
        public static unsafe int ExtractByteMask(Vector2ul va)
        {
            int   res = 0;
            byte *a   = (byte *)&va;

            for (int i = 0; i < 16; ++i)
            {
                res |= (*a++ & 0x80) >> 7 << i;
            }
            return(res);
        }
Beispiel #4
0
		public static Vector2ul UnpackLow (this Vector2ul v1, Vector2ul v2)
		{
			return new Vector2ul (v1.x, v2.x);
		}
Beispiel #5
0
		public static unsafe Vector2ul Shuffle (this Vector2ul v1, Vector2ul v2, int sel)
		{
			ulong *p1 = (ulong*)&v1;
			ulong *p2 = (ulong*)&v2;
			return new Vector2ul (*(p1 + ((sel >> 0) & 0x1)), *(p2 + ((sel >> 1) & 0x1))); 
		}
Beispiel #6
0
 public static void PrefetchTemporal2ndLevelCache(ref Vector2ul res)
 {
 }
Beispiel #7
0
 public static unsafe void StoreAligned(Vector2ul *res, Vector2ul val)
 {
     *res = val;
 }
Beispiel #8
0
 public static Vector2ul LoadAligned(ref Vector2ul v)
 {
     return(v);
 }
Beispiel #9
0
		public static Vector2ul LoadAligned (ref Vector2ul v)
		{
			return v;
		}
Beispiel #10
0
		public static unsafe int ExtractByteMask (Vector2ul va) {
			int res = 0;
			byte *a = (byte*)&va;
			for (int i = 0; i < 16; ++i)
				res |= (*a++ & 0x80) >> 7 << i;
			return res;
		}
Beispiel #11
0
 public static Vector2ul UnpackLow(Vector2ul v1, Vector2ul v2)
 {
     return(new Vector2ul(v1.x, v2.x));
 }
Beispiel #12
0
 public static Vector2ul CompareEqual(Vector2ul v1, Vector2ul v2)
 {
     return(new Vector2ul((ulong)(v1.x == v2.x ? -1 : 0), (ulong)(v1.y == v2.y ? -1 : 0)));
 }
Beispiel #13
0
 public static Vector2ul UnpackHigh(Vector2ul v1, Vector2ul v2)
 {
     return(new Vector2ul(v1.y, v2.y));
 }
Beispiel #14
0
		public static unsafe void PrefetchTemporal2ndLevelCache (Vector2ul *res)
		{
		}
Beispiel #15
0
		public static void StoreAligned (ref Vector2ul res, Vector2ul val)
		{
			res = val;
		}
Beispiel #16
0
		public static unsafe void PrefetchNonTemporal (Vector2ul *res)
		{
		}
Beispiel #17
0
		public static unsafe Vector2ul LoadAligned (Vector2ul *v)
		{
			return *v;
		}
Beispiel #18
0
 public static void StoreAligned(ref Vector2ul res, Vector2ul val)
 {
     res = val;
 }
Beispiel #19
0
		public static unsafe void StoreAligned (Vector2ul *res, Vector2ul val)
		{
			*res = val;
		}
Beispiel #20
0
 public static void PrefetchTemporalAllCacheLevels(ref Vector2ul res)
 {
 }
Beispiel #21
0
		public static void PrefetchTemporalAllCacheLevels (ref Vector2ul res)
		{
		}
Beispiel #22
0
 public static void PrefetchNonTemporal(ref Vector2ul res)
 {
 }
Beispiel #23
0
		public static void PrefetchTemporal2ndLevelCache (ref Vector2ul res)
		{
		}
Beispiel #24
0
		public static Vector2ul CompareEqual (this Vector2ul v1, Vector2ul v2)
		{
			return new Vector2ul ((ulong)(v1.x ==  v2.x ? -1 : 0), (ulong)(v1.y ==  v2.y ? -1 : 0));
		}
Beispiel #25
0
		public static void PrefetchNonTemporal (ref Vector2ul res)
		{
		}
Beispiel #26
0
		public static Vector2ul UnpackHigh (this Vector2ul v1, Vector2ul v2)
		{
			return new Vector2ul (v1.y, v2.y);
		}
Beispiel #27
0
		public static unsafe void PrefetchTemporalAllCacheLevels (Vector2ul *res)
		{
		}
Beispiel #28
0
	public static unsafe int test_0_vector2ul_slr () {
		Vector2ul a = new Vector2ul (1, 6);

		Vector2ul c = a >> 1;
		if (c.X != 0)
			return 1;
		if (c.Y != 3)
			return 2;	
		return 0;
	}
Beispiel #29
0
 public static void SetVectorAligned(this ulong[] array, Vector2ul val, int offset)
 {
     array [offset + 0] = val.X;
     array [offset + 1] = val.Y;
 }