本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例5: LoadAligned
public static unsafe Vector4ui LoadAligned (Vector4ui *v)
{
return *v;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例10: PrefetchTemporal2ndLevelCache
public static unsafe void PrefetchTemporal2ndLevelCache (Vector4ui *res)
{
}
示例11: PrefetchNonTemporal
public static unsafe void PrefetchNonTemporal (Vector4ui *res)
{
}
示例12: PrefetchTemporalAllCacheLevels
public static unsafe void PrefetchTemporalAllCacheLevels (Vector4ui *res)
{
}
示例13: StoreAligned
public static unsafe void StoreAligned (Vector4ui *res, Vector4ui val)
{
*res = val;
}
示例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;
}
示例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;
}