當前位置: 首頁>>代碼示例>>C#>>正文


C# Simd.Vector4ui類代碼示例

本文整理匯總了C#中Mono.Simd.Vector4ui的典型用法代碼示例。如果您正苦於以下問題:C# Vector4ui類的具體用法?C# Vector4ui怎麽用?C# Vector4ui使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Vector4ui類屬於Mono.Simd命名空間,在下文中一共展示了Vector4ui類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ArithmeticRightShift

		public static unsafe Vector4ui ArithmeticRightShift (this Vector4ui v1, int amount)
		{
			Vector4ui res = new Vector4ui ();
			uint *a = &v1.x;
			uint *b = &res.x;
			for (int i = 0; i < 4; ++i)
				*b++ = (uint)((int)(*a++) >> amount);
			return res;
		}
開發者ID:REALTOBIZ,項目名稱:mono,代碼行數:9,代碼來源:VectorOperations.cs

示例2: test_0_vector4ui_one_element_ctor

	static int test_0_vector4ui_one_element_ctor () {
		Vector4ui a = new Vector4ui (99);

		if (a.X != 99)
			return 1;
		if (a.Y != 99)
			return 2;
		if (a.Z != 99)
			return 3;
		if (a.W != 99)
			return 4;
		return 0;
	}
開發者ID:Zman0169,項目名稱:mono,代碼行數:13,代碼來源:basic-simd.cs

示例3: test_0_vector4ui_unpack_low

	public  static int test_0_vector4ui_unpack_low () {
		Vector4ui a = new Vector4ui (1,2,3,4);
		Vector4ui b = new Vector4ui (5,6,7,8);
		
		Vector4ui c = a.UnpackLow (b);
	
		if (c.X != 1)
			return 1;
		if (c.Y != 5)
			return 2;
		if (c.Z != 2)
			return 3;
		if (c.W != 6)
			return 4;
		return 0;
	}
開發者ID:Zman0169,項目名稱:mono,代碼行數:16,代碼來源:basic-simd.cs

示例4: test_0_accessor_vecto4ui

	public static int test_0_accessor_vecto4ui () {
		Vector4ui a = new Vector4ui (0xF0000000, 0xF0000, 3, 4);

		if (a.X != 0xF0000000)
			return 1;
		if (a.Y != 0xF0000)
			return 2;
		if (a.Z != 3)
			return 3;
		if (a.W != 4)
			return 4;

		a.X = 11;
		a.Y = 22;
		a.Z = 33333344;
		a.W = 44444444;

		if (a.X != 11)
			return 5;
		if (a.Y != 22)
			return 6;
		if (a.Z != 33333344)
			return 7;
		if (a.W != 44444444)
			return 8;
		return 0;
	}
開發者ID:Zman0169,項目名稱:mono,代碼行數:27,代碼來源:basic-simd.cs

示例5: LoadAligned

		public static unsafe Vector4ui LoadAligned (Vector4ui *v)
		{
			return *v;
		}
開發者ID:d3x0r,項目名稱:Voxelarium,代碼行數:4,代碼來源:Vector4ui.cs

示例6: test_0_vector4ui_add

	public  static int test_0_vector4ui_add () {
		Vector4ui a = new Vector4ui (0xFF00FF00u,2,3,4);
		Vector4ui b = new Vector4ui (0xFF00FF00u,2,3,4);
		
		Vector4ui c = a + b;
	
		if (c.X != 0xfe01fe00)
			return 1;
		if (c.Y != 4)
			return 2;
		if (c.Z != 6)
			return 3;
		if (c.W != 8)
			return 4;
		return 0;
	}
開發者ID:Zman0169,項目名稱:mono,代碼行數:16,代碼來源:basic-simd.cs

示例7: test_1_set_vector4ui_operator_eq

	public static int test_1_set_vector4ui_operator_eq () {
		Vector4ui a = new Vector4ui(1, 2, 3, 4);
		Vector4ui b = new Vector4ui(111, 2, 3, 4);
		if (a == b)
			return 0;
		return 1;
	}
開發者ID:Zman0169,項目名稱:mono,代碼行數:7,代碼來源:basic-simd.cs

示例8: test_0_vector4ui_shr

	public  static int test_0_vector4ui_shr () {
		Vector4ui a = new Vector4ui (0xF0000000u,20,3,40);
		
		Vector4ui c = a >> 2;
	
		if (c.X != 0x3C000000)
			return 1;
		if (c.Y != 5)
			return 2;
		if (c.Z != 0)
			return 3;
		if (c.W != 10)
			return 4;
		return 0;
	}
開發者ID:Zman0169,項目名稱:mono,代碼行數:15,代碼來源:basic-simd.cs

示例9: test_0_vector4ui_mul

	public  static int test_0_vector4ui_mul () {
		Vector4ui a = new Vector4ui (0x8888,20,3,40);
		Vector4ui b = new Vector4ui (0xFF00FF00u,2,3,4);
		
		Vector4ui c = a * b;
	
		if (c.X != 0xffff7800)
			return 1;
		if (c.Y != 40)
			return 2;
		if (c.Z != 9)
			return 3;
		if (c.W != 160)
			return 4;
		return 0;
	}
開發者ID:Zman0169,項目名稱:mono,代碼行數:16,代碼來源:basic-simd.cs

示例10: PrefetchTemporal2ndLevelCache

		public static unsafe void PrefetchTemporal2ndLevelCache (Vector4ui *res)
		{
		}
開發者ID:d3x0r,項目名稱:Voxelarium,代碼行數:3,代碼來源:Vector4ui.cs

示例11: PrefetchNonTemporal

		public static unsafe void PrefetchNonTemporal (Vector4ui *res)
		{
		}
開發者ID:d3x0r,項目名稱:Voxelarium,代碼行數:3,代碼來源:Vector4ui.cs

示例12: PrefetchTemporalAllCacheLevels

		public static unsafe void PrefetchTemporalAllCacheLevels (Vector4ui *res)
		{
		}
開發者ID:d3x0r,項目名稱:Voxelarium,代碼行數:3,代碼來源:Vector4ui.cs

示例13: StoreAligned

		public static unsafe void StoreAligned (Vector4ui *res, Vector4ui val)
		{
			*res = val;
		}
開發者ID:d3x0r,項目名稱:Voxelarium,代碼行數:4,代碼來源:Vector4ui.cs

示例14: test_0_vector4ui_xor

	public  static int test_0_vector4ui_xor () {
		Vector4ui a = new Vector4ui (1,2,3,4);
		Vector4ui b = new Vector4ui (7,5,3,1);
		
		Vector4ui c = a ^ b;
	
		if (c.X != 6)
			return 1;
		if (c.Y != 7)
			return 2;
		if (c.Z != 0)
			return 3;
		if (c.W != 5)
			return 4;
		return 0;
	}
開發者ID:Zman0169,項目名稱:mono,代碼行數:16,代碼來源:basic-simd.cs

示例15: test_0_vector4ui_pack_with_sat

	public static int test_0_vector4ui_pack_with_sat () {
		Vector4ui a = new Vector4ui (0xF0000000,0xF0000,3,4);
		Vector4ui b = new Vector4ui (5,6,7,8);

		Vector8us c = a.SignedPackWithUnsignedSaturation (b);

		if (c.V0 != 0)
			return 1;
		if (c.V1 != 0xFFFF)
			return 2;
		if (c.V2 != 3)
			return 3;
		if (c.V3 != 4)
			return 4;
		if (c.V4 != 5)
			return 5;
		if (c.V5 != 6)
			return 6;
		if (c.V6 != 7)
			return 7;
		if (c.V7 != 8)
			return 8;
		return 0;
	}
開發者ID:Zman0169,項目名稱:mono,代碼行數:24,代碼來源:basic-simd.cs


注:本文中的Mono.Simd.Vector4ui類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。