当前位置: 首页>>代码示例>>C#>>正文


C# Simd.Vector8us类代码示例

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


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

示例1: ArithmeticRightShift

		public static unsafe Vector8us ArithmeticRightShift (this Vector8us va, int amount)
		{
			Vector8us res = new Vector8us ();
			ushort *a = &va.v0;
			ushort *b = &res.v0;
			for (int i = 0; i < 8; ++i)
				*b++ = (ushort)((short)(*a++) >> amount);
			return res;
		}
开发者ID:REALTOBIZ,项目名称:mono,代码行数:9,代码来源:VectorOperations.cs

示例2: Vector8us

		public static unsafe Vector8us operator - (Vector8us va, Vector8us vb)
		{
			Vector8us res = new Vector8us ();
			ushort *a = &va.v0;
			ushort *b = &vb.v0;
			ushort *c = &res.v0;
			for (int i = 0; i < 8; ++i)
				*c++ = (ushort)(*a++ - *b++);
			return res;
		}
开发者ID:kasertim,项目名称:sentience,代码行数:10,代码来源:Vector8us.cs

示例3: PrefetchNonTemporal

		public static void PrefetchNonTemporal (ref Vector8us res)
		{
		}
开发者ID:kasertim,项目名称:sentience,代码行数:3,代码来源:Vector8us.cs

示例4: test_0_vector8us_operator_eq

	public static int test_0_vector8us_operator_eq () {
		Vector8us a = new Vector8us(1, 2, 3, 4, 5, 6, 7, 8);
		Vector8us b = new Vector8us(1, 2, 3, 4, 5, 6, 7, 8);
		if (!(a == b))
			return 1;
		b.V0 = 99;
		if (a == b)
			return 2;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:10,代码来源:basic-simd.cs

示例5: test_0_vector8us_sub

	static int test_0_vector8us_sub () {
		Vector8us a = new Vector8us (3,4,5,6,7,8,9,10);
		Vector8us b = new Vector8us (10,1,2,3,4,5,6,8);

		Vector8us c = a - b;

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

示例6: test_0_vector8us_mul

	static int test_0_vector8us_mul () {
		Vector8us a = new Vector8us (0x0F00,4,5,6,7,8,9,10);
		Vector8us b = new Vector8us (0x0888,1,2,3,4,5,6,8);

		Vector8us c = a * b;
		if (c.V0 != 63488)
			return 1;
		if (c.V1 != 4)
			return 2;
		if (c.V7 != 80)
			return 3;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:13,代码来源:basic-simd.cs

示例7: test_0_vector8us_shift_operand_is_live_after_op

	static int test_0_vector8us_shift_operand_is_live_after_op () {
		Vector8us a = new Vector8us (0xF000,1,2,3,4,5,6,7);
		Vector8us b = a;
		Vector8us c = b >> 2;
		a = b + b;

		if (c.V0 != 0x3C00)
			return 1;
		if (c.V1 != 0)
			return 2;
		if (c.V7 != 1)
			return 3;
		if (a.V1 != 2)
			return 4;
		if (a.V7 != 14)
			return 5;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:18,代码来源:basic-simd.cs

示例8: test_0_vector8us_shift_right_arithmetic

	static int test_0_vector8us_shift_right_arithmetic () {
		Vector8us a = new Vector8us (0xFF00,1,2,3,4,5,6,7);
		int amt = 2;
		Vector8us c = a.ArithmeticRightShift (amt);
	
		if (c.V0 != 0xFFC0)
			return 1;
		if (c.V1 != 0)
			return 2;
		if (c.V7 != 1)
			return 3;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:13,代码来源:basic-simd.cs

示例9: test_0_vector8us_unpack_low

	static int test_0_vector8us_unpack_low () {
		Vector8us a = new Vector8us (0,1,2,3,4,5,6,7);
		Vector8us b = new Vector8us (3,4,5,6,7,8,9,10);
		Vector8us c = a.UnpackLow (b);

		if (c.V0 != 0)
			return 1;
		if (c.V1 != 3)
			return 2;
		if (c.V2 != 1)
			return 3;
		if (c.V3 != 4)
			return 4;
		if (c.V4 != 2)
			return 5;
		if (c.V5 != 5)
			return 6;
		if (c.V6 != 3)
			return 7;
		if (c.V7 != 6)
			return 8;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:23,代码来源:basic-simd.cs

示例10: test_0_vector8us_mul_high

	public static int test_0_vector8us_mul_high () {
		Vector8us a = new Vector8us (0xFF00, 2, 3, 0, 5, 6, 5, 4);
		Vector8us b = new Vector8us (0xFF00, 2, 1, 2, 3, 6, 5, 6);
		Vector8us c = a.MultiplyStoreHigh (b);

		if (c.V0 != 0xFE01)
			return 1;
		if (c.V1 != 0)
			return 2;
		if (c.V2 != 0)
			return 3;
		if (c.V3 != 0)
			return 4;
		if (c.V4 != 0)
			return 5;
		if (c.V5 != 0)
			return 6;
		if (c.V6 != 0)
			return 7;
		if (c.V7 != 0)
			return 8;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:23,代码来源:basic-simd.cs

示例11: test_0_vector8us_pack_with_sat

	public static int test_0_vector8us_pack_with_sat () {
		Vector8us a = new Vector8us (0xFF00,1,2,3,4,5,6,7);
		Vector8us b = new Vector8us (3,4,5,6,7,8,9,10);
		Vector16b c = a.SignedPackWithUnsignedSaturation (b);

		if (c.V0 != 0)
			return 1;
		if (c.V1 != 1)
			return 2;
		if (c.V2 != 2)
			return 3;
		if (c.V8 != 3)
			return 4;
		if (c.V15 != 10)
			return 5;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:17,代码来源:basic-simd.cs

示例12: PrefetchTemporal2ndLevelCache

		public static unsafe void PrefetchTemporal2ndLevelCache (Vector8us *res)
		{
		}
开发者ID:kasertim,项目名称:sentience,代码行数:3,代码来源:Vector8us.cs

示例13: PrefetchTemporalAllCacheLevels

		public static unsafe void PrefetchTemporalAllCacheLevels (Vector8us *res)
		{
		}
开发者ID:kasertim,项目名称:sentience,代码行数:3,代码来源:Vector8us.cs

示例14: test_0_vector8us_sub_sat

	static int test_0_vector8us_sub_sat () {
		Vector8us a = new Vector8us (0xF000,1,20,3,4,5,6,7);
		Vector8us b = new Vector8us (0xFF00,4,5,6,7,8,9,10);
		Vector8us c = a.SubtractWithSaturation (b);

		if (c.V0 != 0)
			return 1;
		if (c.V1 != 0)
			return 2;
		if (c.V2 != 15)
			return 3;
		if (c.V3 != 0)
			return 4;
		if (c.V4 != 0)
			return 5;
		if (c.V5 != 0)
			return 6;
		if (c.V6 != 0)
			return 7;
		if (c.V7 != 0)
			return 8;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:23,代码来源:basic-simd.cs

示例15: test_0_vector8us_add_sat

	static int test_0_vector8us_add_sat () {
		Vector8us a = new Vector8us (0xFF00,1,2,3,4,5,6,7);
		Vector8us b = new Vector8us (0xFF00,4,5,6,7,8,9,10);
		Vector8us c = a.AddWithSaturation (b);

		if (c.V0 != 0xFFFF)
			return 1;
		if (c.V1 != 5)
			return 2;
		if (c.V2 != 7)
			return 3;
		if (c.V3 != 9)
			return 4;
		if (c.V4 != 11)
			return 5;
		if (c.V5 != 13)
			return 6;
		if (c.V6 != 15)
			return 7;
		if (c.V7 != 17)
			return 8;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:23,代码来源:basic-simd.cs


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