• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Simd.Vector4ui类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Mono.Simd.Vector4ui的典型用法代码示例。如果您正苦于以下问题:C# Vector4ui类的具体用法?C# Vector4ui怎么用?C# Vector4ui使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Vector4ui类属于Mono.Simd命名空间,在下文中一共展示了Vector4ui类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: test_0_vector4ui_and

	public  static int test_0_vector4ui_and () {
		Vector4ui a = new Vector4ui (1,2,3,4);
		Vector4ui b = new Vector4ui (7,5,3,1);
		
		Vector4ui c = a & b;
	
		if (c.X != 1)
			return 1;
		if (c.Y != 0)
			return 2;
		if (c.Z != 3)
			return 3;
		if (c.W != 0)
			return 4;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:16,代码来源:basic-simd.cs


示例17: test_0_vector4ui_cmpeq

	public static int test_0_vector4ui_cmpeq () {
		Vector4ui a = new Vector4ui (6,1,6,3);
		Vector4ui b = new Vector4ui (3,4,6,7);
		Vector4ui c = a.CompareEqual (b);

		if (c.X != 0)
			return 1;
		if (c.Y != 0)
			return 2;
		if (c.Z != 0xFFFFFFFF)
			return 3;
		if (c.W != 0)
			return 4;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:15,代码来源:basic-simd.cs


示例18: test_0_vector4ui_shl

	public  static int test_0_vector4ui_shl () {
		Vector4ui a = new Vector4ui (10,20,3,40);
		
		Vector4ui c = a << 2;
	
		if (c.X != 40)
			return 1;
		if (c.Y != 80)
			return 2;
		if (c.Z != 12)
			return 3;
		if (c.W != 160)
			return 4;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:15,代码来源:basic-simd.cs


示例19: test_0_vector4ui_shuffle

	public static int test_0_vector4ui_shuffle () {
		Vector4ui a = new Vector4ui (1,2,3,4);
		Vector4ui c = a.Shuffle (ShuffleSel.XFromY | ShuffleSel.YFromW | ShuffleSel.ZFromX | ShuffleSel.WFromZ);

		if (c.X != 2)
			return 1;
		if (c.Y != 4)
			return 2;
		if (c.Z != 1)
			return 3;
		if (c.W != 3)
			return 4;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:14,代码来源:basic-simd.cs


示例20: test_0_vector4ui_sub

	public  static int test_0_vector4ui_sub () {
		Vector4ui a = new Vector4ui (1,20,3,40);
		Vector4ui b = new Vector4ui (0xFF00FF00u,2,3,4);
		
		Vector4ui c = a - b;
	
		if (c.X != 0xff0101)
			return 1;
		if (c.Y != 18)
			return 2;
		if (c.Z != 0)
			return 3;
		if (c.W != 36)
			return 4;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:16,代码来源:basic-simd.cs



注:本文中的Mono.Simd.Vector4ui类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Simd.Vector8us类代码示例发布时间:2022-05-26
下一篇:
C# Simd.Vector4f类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap