Exemplo n.º 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))));
        }
Exemplo n.º 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;
	}
Exemplo n.º 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);
        }
Exemplo n.º 4
0
		public static Vector2ul UnpackLow (this Vector2ul v1, Vector2ul v2)
		{
			return new Vector2ul (v1.x, v2.x);
		}
Exemplo n.º 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))); 
		}
Exemplo n.º 6
0
 public static void PrefetchTemporal2ndLevelCache(ref Vector2ul res)
 {
 }
Exemplo n.º 7
0
 public static unsafe void StoreAligned(Vector2ul *res, Vector2ul val)
 {
     *res = val;
 }
Exemplo n.º 8
0
 public static Vector2ul LoadAligned(ref Vector2ul v)
 {
     return(v);
 }
Exemplo n.º 9
0
		public static Vector2ul LoadAligned (ref Vector2ul v)
		{
			return v;
		}
Exemplo n.º 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;
		}
Exemplo n.º 11
0
 public static Vector2ul UnpackLow(Vector2ul v1, Vector2ul v2)
 {
     return(new Vector2ul(v1.x, v2.x));
 }
Exemplo n.º 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)));
 }
Exemplo n.º 13
0
 public static Vector2ul UnpackHigh(Vector2ul v1, Vector2ul v2)
 {
     return(new Vector2ul(v1.y, v2.y));
 }
Exemplo n.º 14
0
		public static unsafe void PrefetchTemporal2ndLevelCache (Vector2ul *res)
		{
		}
Exemplo n.º 15
0
		public static void StoreAligned (ref Vector2ul res, Vector2ul val)
		{
			res = val;
		}
Exemplo n.º 16
0
		public static unsafe void PrefetchNonTemporal (Vector2ul *res)
		{
		}
Exemplo n.º 17
0
		public static unsafe Vector2ul LoadAligned (Vector2ul *v)
		{
			return *v;
		}
Exemplo n.º 18
0
 public static void StoreAligned(ref Vector2ul res, Vector2ul val)
 {
     res = val;
 }
Exemplo n.º 19
0
		public static unsafe void StoreAligned (Vector2ul *res, Vector2ul val)
		{
			*res = val;
		}
Exemplo n.º 20
0
 public static void PrefetchTemporalAllCacheLevels(ref Vector2ul res)
 {
 }
Exemplo n.º 21
0
		public static void PrefetchTemporalAllCacheLevels (ref Vector2ul res)
		{
		}
Exemplo n.º 22
0
 public static void PrefetchNonTemporal(ref Vector2ul res)
 {
 }
Exemplo n.º 23
0
		public static void PrefetchTemporal2ndLevelCache (ref Vector2ul res)
		{
		}
Exemplo n.º 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));
		}
Exemplo n.º 25
0
		public static void PrefetchNonTemporal (ref Vector2ul res)
		{
		}
Exemplo n.º 26
0
		public static Vector2ul UnpackHigh (this Vector2ul v1, Vector2ul v2)
		{
			return new Vector2ul (v1.y, v2.y);
		}
Exemplo n.º 27
0
		public static unsafe void PrefetchTemporalAllCacheLevels (Vector2ul *res)
		{
		}
Exemplo n.º 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;
	}
Exemplo n.º 29
0
 public static void SetVectorAligned(this ulong[] array, Vector2ul val, int offset)
 {
     array [offset + 0] = val.X;
     array [offset + 1] = val.Y;
 }